Hi there,
How can I select and coerce a subobject, surface edge? I would like to return the index number.
import Rhino
import scriptcontext
import rhinoscriptsyntax as rs
obj = rs.GetObject ( message=None, filter=0, preselect=False, select=False, custom_filter=None, subobjects=True)
gs = rs.coercerhinoobject(obj) # Rhino.Input.Custom.GetObject() # rs.coercerhinoobject(obj) #
gs.GeometryFilter = Rhino.DocObjects.ObjectType.Curve
gs.Get()
obj_ref = gs.Object(0)
comp_index = obj_ref.GeometryComponentIndex.Index
#edge1 = obj_ref.Brep().Edges[comp_index]
#curve3d1 = edge1 #.Duplicate()
print comp_index
2 posts - 2 participants