Rectangle no polycurve? IsPolyCurve( rectangle ) results in False


#1

Hi…,

I wonder why a rectangle is not a polycurve? This python code results in False:

rhinoscriptsyntax.IsPolyCurve( rectangle )

Thanks

Michael
www.flexiCAD.com


#2

Because it’s a polyline? A polyline curve is considered separately from a polycurve… --Mitch


#3

Hi Mitch,

that makes sense.

Thanks

Michael
www.flexiCAD.com


#4

Sometimes these types of distinctions seem annoying, but they’re actually pretty useful, as they allow you to isolate specific types of objects better. If you’re looking for any type of multi-segment curve including polycurves and polylines, you can always program

if rs.IsPolyCurve(crv) or rs.IsPolyline(crv): 
    #do something

–Mitch