When I use ThreeCSG to subtract one mesh from another, I encounter a problem. The main mesh is a ring and the mesh to subtract is a diamond. Initially, the scene looks fine: Mesh fine. However, after subtracting the meshes, the ring become angular: Mesh Broken. I apply the same material/shading as before. Below is the code snippet I am using:
var ring_bsp = new ThreeBSP(ring);
var stone_bsp = new ThreeBSP(stone);
var substract_bsp = ring_bsp.subtract( stone_bsp );
var result = substract_bsp.toMesh( ringMaterial );
result.geometry.computeVertexNormals();
result.material.needsUpdate = true;
result.geometry.buffersNeedUpdate = true;
result.geometry.uvsNeedUpdate = true;
result.scale.x = result.scale.y = result.scale.z = 19;
scene.remove(ring);
scene.add(result);
Update one: Removing "result.geometry.computeVertexNormals();" makes the result look even worse: link.
Update two: I have created a jsfiddle with a minimal example
Update three: Further investigation into the issue and Wilts's latest update, I noticed that after using ThreeBSP the vertices are messed up. This issue is visible in this fiddle.
Update four: The problem appears to be related to the "fromGeometry / toGeometry" functions, as I get the same broken mesh even without performing any subtraction at all.