I’m new to BabylonJS, Now I want to milling a mesh, so I using CSG.subtract, just like: https://www.babylonjs-playground.com/#TS7JSQ#4
But subtraction is slowly, is there any other way to solve this need in Babylonjs? If not, what can I do to improve subratction speed?
CSG generates geometries with potentially many faces, even for simple geometries such as cubes and cylinders. Therefore, if you reuse a CSG-generated mesh to apply another CSG operation, the number of generated faces will increase rapidly.
In this PG:
There are only 5 CSG operations, and the cube grows from 12 faces to over 70000!
CSG is known to be a slow operation and should not be used in every frame. Unfortunately it is difficult to perform boolean operations on meshes in real time. It seems that some solutions exist (https://arxiv.org/pdf/2205.14151.pdf) but they are not implemented in Babylon.