Using shape healing to change the orientation of a shape (compound)

Hi to all,
in my application i need to orient a tool withe the normal of the faces of a compound shape (IGES imported).

The problem i have by now is related to the face normal orientation.
How can I set the whole compound to have normal "inside" or "outside"?

Gerhard Hofmann's picture

I think if the parts of the compound are solids, then the orientation is already correct (normal vectors point to the outside).
Everything else (shell, face) should be sewed to build solids, with open shells or faces there is no inside or outside.

Davide Canalia's picture

What I have in the IGES file is a set of trimmed surface reppresenting the "skin" of a mold.

I use Extrema to find points on the shape and then the projection algorithm (GeomAPI_ProjectPointOnSurf) to find U V and normal.

Sometimes i get wrong normal, oriented "outside" the shape.

Do you think i have to build shells and solids? How can i do this operation? I'm using shape fix API to "heal" the compound shape. What else I should do to have a correct compound?

Thank you very musch for your help!


Gerhard Hofmann's picture

Hello Davide,

if you know all faces are close to each other or connected at their edges you could use BRepBuilderAPI.Sewing to create a shell or a solid. The all faces will be oriented in the same direction.


Davide Canalia's picture

thank you the help :)