Looking for some tips on doing this correct.
I have a chain link as a closed polysurface and a curve.
I want to array along curve the link and rotate every 2nd link 90ª .
So I can get the object and copy and rotate it. What I am wondering is the array part. I don’t see any commands on the Rhinoscript syntax page.
Here is my script for rotating the object
import rhinoscriptsyntax as rs def createLinks(): obj = rs.GetObject("Select object to rotate") if obj: bb=rs.BoundingBox(obj) # find object's bounding box center point center=rs.AddPoint.Origin=(bb+bb)/2 # rotate and copy original object cplane = rs.WorldXYPlane() xform = rs.XformRotation2 (90.0, cplane, center) link2 = rs.TransformObjects( obj, xform, True ) rs.MoveObject(link2, (2.75,0,0)) createLinks()
Would it be better to Array along curve first then rotate every second one with …
Slice notation a[low:high:increment]