How to boolean a complex mesh

So i have this mesh, the top sides have a peak.

What im wondering is I want to remove the holes in the wall, while keeping its shape. Is there any way to do this?

I want it to that is still has its outer shape, but anything inside it without the holes. I dont want to use any other modelling software, I am just wondering if anyone knows how to do it straight from threejs?

Add a BoxGeometry that fills the hole.

For a more general solution you can look up algorithms to calculate the concave hull.

https://codesandbox.io/p/sandbox/y52tmt

if you don’t want the component abstraction use the vanilla library GitHub - gkjohnson/three-bvh-csg: A flexible, memory compact, fast and dynamic CSG implementation on top of three-mesh-bvh

the operation you want for this is an addition.

1 Like