Notifications
Clear all

[Closed] applyoffset only to certain splines of a shape

Hi,

I have shapes made of many closed splines.
I need to offset all those splines and only keep the new offset ones.
To do that I would need to cycle through each spline, offset it and delete the old one.

I tried using applyoffset on the whole shape. But then I don’t know how to sort what are the indexes of the old splines and the new offset ones.

Is there another way to do that ?

Maybe detach all the splines first, offset them, then reassemble the shape ?

2 Replies

the offset splines are added to the existing splines… so their index number is always higher than the highest index number -before- you offset the splines…

sooo…


myShape = $
splinesCount = myShape.numSplines
applyoffset myShape 5.0
for i = splinesCount to 1 by -1 do (
	deleteSpline myShape i
)
updateShape myShape

Except that you would loop over the shapes, instead of the static myShape assignment

Ah ! That’s so easy
Thank you very much

Such important information should be mentioned in the help