Other question about normals

Hello I am trying to calculate the normal to a surface belonging to a solid, (a Box in my test). The calculus of the normal is done in a point belongining to an edge that belongs to the surface. Solid > Surface > Edge > Vertex. The point for me is to know how to get the orientation of the normal regarding to the box. which means is it directed inside or outside the Box ? What i tried is the following : 1) looking for edges shared by more than two faces, 2) For these faces getting the parameters of the edge regarding theface

BRepTools::UVBounds(aFace, anEdge, Umin, Umax, Vmin, Vmax); 3) I declare a Local Property Geom with the geometrical surface of the Face

GeomLProp_SLProps LPropSurf(aGeometricSurface, Umin,Vmin,1, Precision::Confusion()); 4) Finally i Get the Normal this way

Normal = LPropSurf.Normal(); 5) I finally construct an edge with the normal 6) i don't know how to test the orientation of this edge in regard with the solid ???? Can any one help me ? Thank you

Maxim ZVEREV's picture

Hello!

The rule here is the following:

When you compute normal you compute geometric normal to the surface. To know if normal is directed inside or outside the material, see the orientation of face. if Orientation is FORWARD then normal directed outside of material, if orientation is REVERSED then normal directed inside the material.

Best regards,

Maxim ZVEREV.

Msaaf Omar's picture

I am sure it will help lots of other people. Best regards Omar Msaaf