Edit: something went wrong there…
Trying to filter lines out of the selection of planar curves and surfaces… So far not working
import rhinoscriptsyntax as rs
#planar curves plus planar surfaces - exclude lines
def cpcs_filt(rhino_object, geometry, component_index):
if geometry.IsPlanar():
if isinstance(geometry,Rhino.Geometry.Line): #or LineCurve, doesn't matter
return False
if isinstance(geometry,Rhino.Geometry.Curve):
if geometry.IsLinear: return False
return True
return False
test=rs.GetObjects("Select planar stuff",4+8+16,preselect=True,select=True,custom_filter=cpcs_filt)