hi i wrote this code which do offset a selected spline twice and delete the two new segmets that connects them here is the code :
aao = $ w = 3.5 fn deleteoffset spl = ( convertToSplineShape spl subobjectLevel = 2 todel = numSegments spl 1 todel2= todel/2 sel = #() setSegSelection spl 1 #() for i = 1 to todel2 do ( append sel i ) append sel todel setSegSelection spl 1 sel splineOps.delete spl updateshape spl ) aa = copy aao spl = getSplineSelection aa allspl = numSplines aa for i = allspl to 1 by -1 do ( if i != spl do ( deleteSpline aa i ) ) applyOffset aa w select aa deleteoffset aa aa2 = copy aa applyOffset aa2 (w *-1) select aa2 deleteoffset aa2
here is the result :
this is when things get strange if i add two parentheses at the last section of the code :
( applyOffset aa w select aa deleteoffset aa aa2 = copy aa applyOffset aa2 (w *-1) select aa2 deleteoffset aa2 )
this is the result :
can anybody explain it and suggest a fix ? i want to add this code to a forloop or inside a macroscript.