`IsShort()` gives false on empty initialized PolylineCurve

Hi All,

In my application I’m try to detect and throw an error if a general Curve instance is too short.
I get a weird result during unit tests: I initialize an empty PolylineCurve and I expect that ether IsValid=false or IsShort=true


while testing it with LineCurve for instance I get what expected:


Any idea or anything that I’m missing?

Thank you very much,

combine all three conditions with “and” ?

minL = 0.01
print a.isValid and a.IsShort(minL) and a.GetLength()<minL 

recommended: create a function for this.

the IsShort() for the PolylineCurve() looks like a bug to me, but maybe it is the underlying Polyline is just an array of points…just guessing

Hi Tom,

Thanks for the reply.
Workarounds are certainly possible here. I could also use a.GetLengh()<tol
But would be nice to know from mcNeel if IsValid and IsShort are then officially buggy on PolylineCurve.

i think @dale is the one who can judge this.

Thanks - I’ve logged the IsValid issue.


If the curve is not valid, IsShort will fail and return false.

– Dale


RH-65906 is fixed in Rhino 7 Service Release 12