I am trying to move a simple box extrusion to random points but I keep getting this error: Message: unsupported operand type(s) for -: ‘Guid’ and ‘Point3d’.
Here is my script:
import rhinoscriptsyntax as rs
import random
#Constants
targetPoints =
for n in range(5):
…randomPoints = rs.AddPoint(random.randrange(1, 300), random.randrange(1, 300), 0)
…targetPoints.append(randomPoints)
for i in targetPoints:
…Object = rs.GetObject(“Pick your box”, rs.filter.extrusion)
…startPoint = rs.GetPoint(“Point to copy from”)
…translation = i-startPoint
…rs.CopyObject(Object, translation)