thanks for your work... but everytime I use your code it just draws 3 or 4 straight lines instead of a sew pattern.
I got my own version to work... but it has unexpected results sometimes.
[code]
var dist = 2;
var size = 10;
values = Dialog.prompt("Enter Stich Values", [
{ value: dist, description: "Dist", width: 50 },
{ value: size, description: "Size", width: 50 },
]);
if (values != null) {
dist = values[0];
size = values[1];
}
mul = 1;
res = new Path();
var art = activeDocument.getSelectedItems()[0];
art.curvesToPoints(dist, 10000);
var count = art.curves.length;
for (var i = 0; i < count; i++) {
var bezier = art.curves[i];
var pt = bezier.getPoint(0);
var n = bezier.getNormal(1);
if (n.x != 0 || n.y != 0) {
n = n.normalize(size);
res.segments.add(pt.add(n.multiply(mul)));
mul *= -1;
}
}
art.remove();
[/code]
does this look right?