hello
I made a little script to distribute spline knots on z axis evenly between first and last knot.
But for the script works fine I need to apply it 100 times (100 was a high value but is a random value)
If anybody can explain why ? Thanks
--------------
undo on(
for cyc=1 to 100 do
(
aaa =$
LLL = getSegLengths aaa 1 cum: true byVertex:false
nb = LLL.count
LONGG = LLL[nb]
verts = numKnots aaa
DIFF = (getKnotPoint aaa 1 verts) - (getKnotPoint aaa 1 1)
kntb = getKnotPoint aaa 1 1
for i=2 to (verts - 1) do
(
knt = getKnotPoint aaa 1 i
pp1 = LLL[i-1]
SEC = ( DIFF.z * pp1)
setKnotPoint aaa 1 i [knt.x,knt.y,kntb.z + SEC]
)
)
updateShape aaa
)---undo
-------------------------------------
miauu · 2014-01-06