Sg2.9
non-interactive stich won't w...
Recent RSS
non-interactive stich won't work
From:  Joel Evey
Date:  30. July 2006, 08:54

the stich from the scripts folder does nothing.. I have a path selected and then hit play, nothing..... I tried hacking the object select code around but then it gave me a stich_joel.js:3,0: ReferenceError: "prompt" is not defined. (C:\Documents and Settings\Joel\Desktop\scripts\scripts\stich_joel.js#3

anybody have problems with this script?

Re: non-interactive stich won't work
From:  Joel Evey
Date:  30. July 2006, 09:15

after some testing by me and a friend on 2 different PC machines, we get the same error with stich

(C:\Documents and Settings\Joel\Desktop\scripts\scripts\stich.js#1)

C:\Documents and Settings\Joel\Desktop\scripts\scripts\stich.js:1,0: ReferenceError: "getMatching" is not defined. (C:\Documents and Settings\Joel\Desktop\scripts\scripts\stich.js#1)

???

Re: non-interactive stich won't work
From:  Joel Evey
Date:  30. July 2006, 21:16

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?

Re: non-interactive stich won't work
From:  Joel Evey
Date:  30. July 2006, 22:11

ok... your edit of my code worked like a charm....

I don't know why your version doesn't work for me.
attaced are the results I get when I use yours.

it just makes a few straight lines....

Re: non-interactive stich won't work
From:  Joel Evey
Date:  30. July 2006, 22:25

ok, here might be a problem that your script may not have.

below is all one path, but the stich "bunches" in some spots, any idea why?

Re: non-interactive stich won't work
From:  Joel Evey
Date:  31. July 2006, 02:41

cool, that makes total sense.

any idea about the results I was having using your code? ex above example?

Scripts
08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
Posts
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19
Script of the Moment
Shattered 18.03.11