For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

reversing a face normal (by modifying the geometry)

Mauro Mariotti's picture

Hello all,

Given a stand-alone face (that is, not inside a shell) I need to reverse it, but not the easy way (changing the topological orientation of the TopoDS_Face).
I have to modify its surface, e.g. by calling Geom_Surface::UReverse(), so that if one gets the surface from the face and evaluates its normal, without considering the face's topological orientation., the normal will be reversed.
This implies that the p-curves and vertexes must be re-computed.

Any suggestions?

A long way could be:
1) Geom_Surface::UReverse()
2) Mirror the p-curves inside the edges with respect to a vertical axis (which can be u = 0 or something else, depending on the surface, I am afraid)
3) Mirror the u parameters inside the vertexes
4) Create a new face from the modified geometries

Maybe another way is to use BRepTools_Modifier, by defining an appropriate BRepTools_Modification, but I am not sure it manages this sort of changes in the p-curves and vertexes.

Thanks a lot.