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

Create solid from 2 faces

Vyacheslav Belkin's picture

I have 2 arrays of points that are flat closed profiles. I need to create solid with that profiles as bottom and top faces.

So I create 2 BRepBuilderAPI_MakePolygon's, added points to them, closed them, created TopoDS_Face using BRepFill::Shell(poly.Wire(), poly1.Wire()) and saved it in *.step.

It works correctly, but I got shell without "body" (only side walls), not solid. Code is attached (code.txt).
If I use BRepFill::Face(), it is empty and it cannot be saved (exception is occured).

How can I create closed solid in this case?
Thanks beforehand.

Vyacheslav Belkin's picture

Solved by using this code:

BRepOffsetAPI_ThruSections sect(Standard_True);