Is there a function to check if a volume is contained in another one?

Hi all,

this is my first post on opencascade forum and my first time working with Open CASCADE, I hope I'm in the right section :)

I was wondering if Open CASCADE has a function that allows to query if a volume is contained in another one.

Another way to explain what I'm interesd in is the following:

Given two volumes A and B, I need to check if every point that belongs to A belongs to B as well.

If the answer is positive than A is contained in B.

An example can be seen in the attached picture

Any help on the subject is much appreciated,

Best regards,


Mikhail Sazonov's picture

Use Boolean operation. Cut B from A. If the result is empty the answer is positive. 

The class is BRepAlgoAPI_Cut.

veryLazyTom's picture

Oh that's neat

Thanks a lot!