Help select surfaces parallel with worldPlane(Oxy plane)

when I select all objects, how can I auto get 3 marked planes.
I’m try rs.IsPlaneSurface to compare then get them but not.
Please help me.

I have this from my library. Currently it selects planar surfaces and curves parallel to Word XY…
FWIW…
SelWorldHorizontal.py (2.3 KB)

1 Like

Thank you so much

#Main
if __name__=="__main__":
    msg="Select suface:"
    srf_filter=Rhino.DocObjects.ObjectType.Surface 
    rc,objrefs=Rhino.Input.RhinoGet.GetMultipleObjects(msg,False,srf_filter)
    #False to select objects on planes parallel to "plane", True for strictly in-plane
    SelParallelToPlane(objrefs,rs.WorldXYPlane(),False)
    #SelParallelToPlane(rs.WorldYZPlane(),False)
    #SelParallelToPlane(rs.WorldZXPlane(),False)

I used Rhino.DocObjects.ObjectType.Surface get all surface of Polysurface were assigned to objIDs but it didn’t working.
Message: expected UInt32, got ObjRef

On line 35 in the script, just change

objIDs=rs.ObjectsByType(4+8)

to

objIDs=rs.ObjectsByType(8)

That’s a quick hack to exclude curves…