rhino3dm
rhino3dm copied to clipboard
Wrong Brep normal
Hi team,
I probably have found in a bug in how Normal is returned in rhino3dm. When I am accessing the normal of the face shown in the image below. It is returned as 0.0, 0.0, 1.0. I would expect 0.0, 0.0, -1.0 in this case.
Following are the rhino file and the script I used.
import rhino3dm
path = r"C:\Users\devan\Desktop\test.3dm"
file_3dm = rhino3dm.File3dm.Read(path)
objects = [obj for obj in file_3dm.Objects]
print(
f'Normal at center is {objects[0].Geometry.Faces[0].UnderlyingSurface().NormalAt(0.5,0.5)}')
Brep faces have a reversed flag that needs to be exposed in python and javascript. We call this property OrientationIsReversed in RhinoCommon
https://developer.rhino3d.com/api/RhinoCommon/html/P_Rhino_Geometry_BrepFace_OrientationIsReversed.htm
Thanks for your response @sbaer, Am I correct to understand that you're going to expose that?
yes, this property needs to be exposed
Just added: https://github.com/mcneel/rhino3dm/commit/5043ce81ab812dbd6ae6ad72a1d7c86a02f61b2a
This has now been added to py and js in 8.0.0-beta3