I couldn’t find a solution and hope someone has an idea. I want to test if certain objects (circle in picture) are completely within a brep, not just if there is a simple collision.

I’m trying to create a parametric deep foundation and remove all objects that are not completely within the foundation.

Maybe you can create union region of the circles and the bounding rectangle of the cube, than compare the area of the region and the area of the bounding rectangle.
And please post a file to get many solutions

Thank you so much, after my post I found a solution but they was not really perfect and generate some problems in some situations and was not really so perfekt as yours.

I tried to use counting objects in the Brep/Curve intersection and it works but when a circle was nearly the edge it created only one object in list and so it didn’t works.

It is possible to scale this algorithm to work with multiple Boxes that have or don’t have Spheres inside and group all the Spheres with the Boxes that they are included in?

Thank you for the definition. However I do need to Group them, each box to be into the same group with the included spheres. So, in this example, I do need four different groups with one box and the spheres that are inside of the box.

The problem that I do need to solve it is a little bit different. I tought that this definition will solve my problem but unfortunately it dosn’t.

I do need to group the parts and the exterior edges that are touching each geometry and after that to transform them flat into the XY plane as groups of geometries, each part with his coresponding edges.