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

Related pages

Invert direction of a TopoDS_Face

Gabriele Cuccolini's picture

Hi, I have a TopoDS_Face that rapresents a trimmed surface and I want to invert its normal direction.

TopoDS_Face trim_face; 

At the begin I convert to Geom_BSplineSurface with this code:

Handle(Geom_Surface) mySurface = BRep_Tool::Surface(trim_face);
Handle(Geom_BSplineSurface) myBSplSurface = GeomConvert::SurfaceToBSplineSurface(mySurface);

With the ExchangeUV() function I change its direction


Now I want to create a new TopoDS_Face from the inverted one so I write:

TopoDS_Face topo_inv_face = BRepBuilderAPI_MakeFace(myBSplSurface, 0.001);

If I display the surface I visualize the surface without the trim. 

I also tried with the version the uses TopoDS_Wire of the unique external boundary that I have.
BRepBuilderAPI_MakeFace faceMaker(myBSplSurface, wire, TRUE);

topo_inv_face = faceMaker.Face();

In this case I only visualize the wire curves in the plane. 

The TopoDS_Wire must be in 3D space or in parametric space?