Currently, rs.IsEllipse() finds not only closed ellipses, but also open ellipse segments (elliptical arcs) and circles and circular arcs… Methinks this is not useful/selective enough…
Of course, technically, a circle is a limit case of an ellipse, but practically, with these types of functions we are most often trying to find certain specific types of objects that are different from others. So the general mathematical case may not be the most useful for the user.
IMO rs.IsEllipse() should not include either circular arcs or circles.
As to open or closed elliptical arcs, that is a good question. We already differentiate between circular arcs and circles in both base Rhino and Rhinoscript. And base Rhino already differentiates between full ellipse objects and elliptical arcs in the description in Properties.
Therefore I think Rhinoscript should do the same. IsEllipse() should find only closed ellipse objects and IsEllipticalArc() - to be added - could find open ellipse arc segments.
All of the above is already possible in scripts with the addition of a line or two of code, so it is not a horrible problem, this request is just for more clarity and consistency among the various methods.
1 post - 1 participant