The problem at hand:
When subtracting a cube from a sphere, an interesting result occurs where the z axis maintains its volume while the y and x axes create flat disks. This peculiar outcome is puzzling to me as I utilize the typical subtraction method with threeCSG.
Code snippet:
var geometry = new THREE.CubeGeometry(100, 100, 100);
var material = new THREE.MeshLambertMaterial({color: 0xff0000, side: THREE.DoubleSide, transparent:true, opacity: .5});
var cutter = new THREE.Mesh(geometry, material);
var geometry2 = new THREE.SphereGeometry(60,32, 32);
var material2 = new THREE.MeshLambertMaterial({color: 0x00ff00, side: THREE.DoubleSide, transparent:true, opacity: .5});
var massing = new THREE.Mesh(geometry2, material2);
var cutter_bsp = new ThreeBSP(cutter);
var massing_bsp = new ThreeBSP(massing);
var new_bsp = massing_bsp.subtract(cutter_bsp);
var result = new_bsp.toMesh(material2);
result.geometry.computeVertexNormals();
result.position.y = 200;
Although using version 103, the issue persists across versions, even when testing on v77.
Question raised: Why do the resulting sides appear flat? Is there a step needed to modify the geometry before performing the subtraction operation?
View the output above the box and sphere here.