Constructing shape from single faces and doing BooleanOperation

Hi!

I have created a list of faces, which I sewed using the BRepOffsetAPI_Sewing algorithm. The result is a TopoDS_Shape (myShape), which I shape-fixed and validated. 'myShape' is valid and seems to be closed.
Now I am trying to use BRepAlgoAPI_Cut(aShape, myShape).
This is resulting in an exception, whereas BRepAlgoAPI_Cut(myShape, aShape) is working fine (but is not what I intend to do. The two shapes do not have any faces in common. Does anyone have a clue, what is going on there? Or is there a better solution for building a closed shape from the faces?

Ming's picture

If you are sure that the faces are closed and connected, you can simply use BRepBuilder. Here is my soure that works well in my case:

BRep_Builder aBuilder;
aBuilder.MakeShell(aShell);
for(int i=1;i<=aFacesInSingle.Extent();i++)
{
TopoDS_Face F=TopoDS::Face(aFacesInSingle(i));
aBuilder.Add(aShell, F);
}

Cheers.

Ming_39674's picture

Has your problem been solved? I also met the same problem. Could you show me your code about how to get myShape from BRepOffsetAPI_Sewing?

Lucy

Ming_39674's picture

Your shape might not be closed but I don't know how to set it closed. Sigh