@ivelin.peychev wrote:
For some reason I cannot get trimmed surfaces with
selection_settings.ObjectTypeFilter = Rhino.DocObjects.ObjectType.Surface
What is its type then? Brep?
issue_unroll.3dm (168.0 KB)
import Rhino import scriptcontext as sc import rhinoscriptsyntax as rs tol = sc.doc.ModelAbsoluteTolerance def get_all_surfs(select=False, include_lights=False, include_grips=False, include_references=False): """ modified AllObjects() method to select all selectable objects of type curve """ selection_settings = Rhino.DocObjects.ObjectEnumeratorSettings() selection_settings.IncludeLights = include_lights selection_settings.IncludeGrips = include_grips selection_settings.NormalObjects = True selection_settings.LockedObjects = False selection_settings.HiddenObjects = False selection_settings.ReferenceObjects = include_references #Select all curves selection_settings.ObjectTypeFilter = Rhino.DocObjects.ObjectType.Surface # this gets object references #.Geometry to get the geometry #.ObjectId to get the uuid e = sc.doc.Objects.GetObjectList(selection_settings) return e def TST(): surfs = get_all_surfs() list_surfs = [obj.Id for obj in surfs] print list_surfs for ID in list_surfs: print rs.ObjectType(ID) #rs.UnrollSurface(ID) if __name__=="__main__": #print UnrollSurface() TST()
Posts: 5
Participants: 2