Bug in SimplifyCrv

In the attached, the closed triangular object refuses to make a planar surface because it’s not considered planar - one of the sides is an “arc” with a radius of 9.08173e+06. This refuses to simplify into a line segment…

–Mitch

NoPlanarSrf.3dm (40.1 KB)

Hi Mitch- got that, thanks.
http://mcneel.myjetbrains.com/youtrack/issue/RH-28943

-Pascal

In this case the arc’s maximum distance from line segment connecting its ends is .005 and the file tolerance is .001. So I don’t think SimplifyCurve should replace the arc. However, the way it work currently the ON_ArcCurve will never get replaced with a line segment. I think we should be using tolerance to make this decision.

Greg Arden

Edit - OK, didn’t realize it was that far out… I also think that “flat” arcs that can be converted to lines within file tolerance should be.

That arc itself was a result of another simplification of an intersection… Don’t remember exactly how it got created.

Thanks, --Mitch

Hi Mitch, Pascal and Greg,

i’ve got 2 cases in V6 where _SimplifyCrv does not merge linear segments which have zero tangent difference. This also applies to RhinoCommon using Rhino.Geometry.Curve.Simplify method.

SimplifyCrv.3dm (26.1 KB)

tried different tolerances but it won’t do it. If i _Explode and _Join it works. What could be the issue ?

_
c.

Hi Clement - the seam falls on that location on both curves - if you explode and join, the seam is by chance moved to one of the corners.

-Pascal

Thank you Pascal, i did not pay attention to the seam. Maybe _SimplifyCrv needs an optional argument to include simplification of the first and last segment of the curve ?

_
c.