strange BRepAlgoAPI_Fuse behavior


I have two quite complex shapes resulting from a serie of operations over primitives. Both shapes are valid according to the BRepCheck_Analyzer:

BRep_Builder builder;

TopoDS_Shape shape1;
BRepTools::Read(shape1, "shape1.brep", builder);
BRepCheck_Analyzer analyzer1(shape1);

TopoDS_Shape shape2;
BRepTools::Read(shape2, "shape2.brep", builder);
BRepCheck_Analyzer analyzer2(shape2);

TopoDS_Shape fuse = BRepAlgoAPI_Fuse(shape1, shape2);
BRepCheck_Analyzer analyzer3(fuse);

When I try to merge them using BRepAlgoAPI_Fuse() I receive an unexpected result (see attached picture). You can see there is a face missing between the selected edges of the shape1. According to the BRepCheck_Analyzer even the resulting fuse shape is valid.

Any subsequent BRepAlgoAPI_Fuse() operations on the fuse shape finally leads to the Standard_ConstructionError being thrown.

Can anything else be wrong with the source shapes shape1 and shape2 even the BRepCheck_Analyzer reports them as valid?

Or is it a bug of the BRepAlgoAPI_Fuse()?

Or something else what I am missing there?

Petr Matousek's picture

Source shape1.brep and shape2.brep files.

Forum supervisor's picture

Dear Petr,
It looks like a bug.
At OCC6.8.0 it doesn't give the missing face, but gives self-intersection of faces:
Draw[5]> bopcheck r
F/F: x3 x74
I suggest you to register the issue in Mantis BugTracker Bugtracker which is available via the Collaborative portal -

Best regards

Petr Matousek's picture

Dear FSR, thank you for your response. Issue was reported as a bug #25755. Petr