Find if mesh face normals are inverted


#1

Hi,

I have helper function that lofts two polylines into closed mesh.

Sometimes mesh face normals are inverted.
(red) color

Is there anyway to find which mesh is with inverted normals in order to flip it?

In one example I saw Dale was using similar thing in RhinoCommon to determine if brep face normals are flipped.
I am wondering if something similar exists for meshes


(Dale Fugier) #2

Hi @Petras_Vestartas,

Like the Brep class, the Mesh class has a SolidOrientation method.

if (-1 == mesh.SolidOrientation())
  mesh.Flip(true, true, true);

– Dale


#3

Thanks