Boolean operations

Hello all. I am new Open Cascade user and there is a problem I cannot solve.

Why do boolean operations sometimes make opened shapes? For instance, I have two TopoDS_Shapes: one is STEP imported and one is box. When I do BRepAlgoAPI_Common the result shape doesn't have surfaces in intersections of these two shapes. STEP file is linkrods.step from Open Cascade data directory and box coordinates are point1(4, 3, -5), point2(9, 7, 10).


jelle's picture

Hi Ivan,

What I could think of is that perhaps the box is a TopoDS_Shell rather than a TopoDS_Solid?
Boolean the step file from a box shaped shell would results in an open rather than a closed shell.


Ivan's picture

Thank you for reply!

I've used TopoDS_Shape::ShapeType() and Closed() methods to get shape type.

Box: TopAbs_SOLID, valid, not closed;
Model: TopAbs_SOLID, valid, not closed;
Result boolean shape: TopAbs_COMPOUND, not valid, not closed;

1. Why is box opened solid? I used BRepPrimAPI_MakeBox to make it.
2. What should I do to have 100% closed shape of boolean of two other shapes? I can't find any good example.