I am trying to select specific curves by using their area centroid, which is basically three coordinates.
Ive managed to obtain these coordinates using bounding boxes, given these curves are not sitting on cplanes.
However i cant seem to select specific curves by using just the z coordinates. Basically i can put them into lists based on length etc, but not sure how to work with coordinates. Here are my current notes
from Rhino.Commands import Result
from Rhino.DocObjects import ObjectType
import rhinoscriptsyntax as rs
from scriptcontext import doc
layer_objs = rs.ObjectsByType(4,True)
#create an empty list
for obj in layer_objs:
#find curves among the objects
#curve meets selection criteria, append to “good” list
#bBox = rs.BoundingBox(mylist)
for i in mylist:
bBox = rs.BoundingBox(i)
cent = [(bBox + bBox)/2,(bBox + bBox)/2,(bBox + bBox)/2]
newlines = rs.SelectObjects(mylist)
for line in newlines:
if abs(cent< -11):
I keep getting the error: expected an indented block.
Help would be appreciated, thank you.