Hi everyone! Question.
We need to cut the shape of the window in the walls using a Boolean method ala Blender.
The most important thing is that we need a contour patch, which we can use for both 2D and 3D and we need to find points only on the contour of the 3D model.

That sounds really hard. I havenât really seen anything like that implemented before.
I suppose you could just look at the points in 2d like in your diagram and attempt to somehow walk the outer edge verticesâŚ but that wonât work if your objects have additional flashing like you show In your second picture.

If your objects are always convex, you might be able to compute the âconvex hullâ and use that hull mesh to punch through the wall. The convex hull is like a new mesh that shrink wraps the original meshâŚ
Here is a threejs class for computing a convex hull mesh of another mesh: https://threejs.org/docs/#examples/en/math/convexhull/ConvexHull

And here is a picture of a convex hull to explain what I mean:

Yes, youâre right about the convex. But we tried it and the problem is that we canât remove 2D patch from this figure. And we need to work with 3D and also with 2D. And it simplifies the object a lot.

There is this THREE-CSG library which seems to be for this exact purpose. Have you looked into that as well? Iâm actually trying to achieve the same thing right now, thatâs why Iâm asking.