A bug in Curve.IsPlanar(tolerance)?

Hi all,

There seems to be a bug with the Curve.IsPlanar(tolerance).
The sample Brep is planar with a tolerance of 1 mm (knowing the deviation is 0.89) by the test in Surface.IsPlanar(tolerance). However, the results are different in Curve.IsPlanar(tolerance) and Brep.CreatePlanarBreps(curve, tolerance). I have to increase the tolerance until 4 to make it pass the IsPlanar for the curve.

Is this a bug? if not, what is the reason/logic why the different results from IsPlanar check for the curve and surface?

I attached the model here:
IsPlanarTest.3dm (317.6 KB)
IsPlanar.gh (28.9 KB)

cc @dale

1 Like

Hi @mingo1214,

This is interesting:

The surface isn’t planar - CurvatureAnalysis shows this.

You can also DupBorder and then orient the curve about the world-xy plane. Then project it onto the plane and run CrvDeviation.

– Dale

Hi @dale, right it is not planar with the 0 tolerance, but it is planar with the tolerance of 1 or above.

Do you mean it is still not planar even with a tolerance of 2?

I am using the RhinoCommon to run these checks, if you see my GH file above, the Surface.IsPlanar returns true when I increase the tolerance from 0 to 1.