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: