Problem with Boolean Common

I have two solids, which are effectively a closed spline tube with end caps.  I tried to do the common operator to get a shape for the region where they intersect, but the shape returned by:

BRepAlgoAPI_Common bool_operation(tube1, tube2);

bool_operation.Build();

auto bool_shape = bool_operation.Shape();

 

Includes the original spline tubes.  Using the inspector, the algorithm found the overlap of the two solids properly, but I don't understand why the original solids are included in the resulting compound shape.  Cut works as expected.  Am I misunderstanding how the algorithm works?

Eugeny's picture

Hello Keith,

1. When the two shapes are given into the constructor of BRepAlgoAPI_Common it performs the boolean operation inside, so no need to call the Build method explicitly. 

BRepAlgoAPI_Common bool_operation(tube1, tube2);
TopoDS_Shape bool_shape = bool_operation.Shape();

2. Basing on your description, the operation produces incorrect result. The original shapes may be included in the result only of one of the arguments includes the other completely. But it does not look as your case. You can report an issue in OCCT bugtracker describing the problem and providing the reproducible script.