Forum archiveIssue archiveModeling Data and Algorithms

Archived discussion

BRepAlgoAPI_Common tools appear to behave differently when broken down to subshapes

Modeling Data and AlgorithmsWed, 09/08/2021 - 15:460 replies

Browse this forum
QuestionAuthor

Hello,

We are having difficulty, in some cases, using BRepAlgoAPI_Common to find intersections of shapes.

The step file attached shows one of these problems and I've attached a screenshot explaining the issue (please ignore the mini-axis arrows on the hoop)

The shapes labelled F40 and F38 both intersect the Orange hooped shape.

If I run BRepAlgoApi_Common using the basic shapes as they are, for example (we're using a C-Sharp wrapper)

var bRep = new BRepAlgoAPI_Common(F40, Hoop);
bRep.Build();

var shape = bRep.Shape();

or

var bRep = new BRepAlgoAPI_Common(F38, Hoop);
bRep.Build();

var shape = bRep.Shape();

The resulting shape is the expected common volume. If I set the tools to be the compound hoop shape, the result works too.

For some of our shapes we've found it necessary to decompose the original compound into its sub-shapes before uses BRepAlgoAPI_Common.

However, if we decompose the hoop into its 8 Solid Subshapes and set these as the 'tools' on BRepAlgoAPI_Common, the intersection on the left (F40) is found, but the intersection on the right
(F38) is a compound shape with zero elements and no volume.

We get the subshapes using TopExp_Explorer on our underlying TopoDS_Shape (Attached screenshot 'Decomposed.png' shows a step build from the decomposed subshapes)

Can you help us understand this?

BasicShapes.7z - the three basic shapes that are intersecting (and a step file)

SubShapeTools.7Z - the Decomposed hoop shapes that, when used as tools, cause the intersection with F38 to be missed.

Many thanks,
Author

Discussion

No archived replies

Posts are displayed in their archived order.