Rhino3dm planar surface bug

Hi all,

I have one surface in the attached file and rhino3dm thinks that the surface is not planar. Is this a bug?

import rhino3dm

path = r"C:\Users\devan\Desktop\test.3dm"
file_3dm = rhino3dm.File3dm.Read(path)

for obj in file_3dm.Objects:
    print(obj.Geometry.Surfaces[0].IsPlanar())

Output
False

test.3dm (42.7 KB)

Hi @Devang_Chauhan,

How about this?

import rhino3dm

model = rhino3dm.File3dm.Read('/Users/Dale/Downloads/test.3dm')
tol = model.Settings.ModelAbsoluteTolerance
geometry = model.Objects[0].Geometry
if isinstance(geometry, rhino3dm.Brep):
    print(geometry.Surfaces[0].IsPlanar(tol))

– Dale

Wow! Thanks for this quick help. I should not have missed that.

Hi @dale,
Can you please try the surface in the attached file? It does not work even after using tolerance.
test.3dm (43.7 KB)

Hi @Devang_Chauhan,

Although the surface appears planar, it is not (at least within the model’s absolute tolerance).

– Dale

Learned something new today. Thank you for the help!