You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been using CSG for geometry manipulation and it's awesome.
However, it seems there is a problem with the polygon splitting and there are missing/wrong polygons.
I have checked it with latest threeCSG.js and three.js
Also used all previously mentioned suggestions including changing EPSILON.
I have checked it with netfabb.
Here's the original and the fixed geometry pictures:
Here is a very simple code:
var boxG = new THREE.BoxGeometry(100, 100, 100, 1, 1, 1);
boxG.verticesNeedUpdate = true;
boxG.computeVertexNormals();
boxG.computeFaceNormals();
boxG.normalsNeedUpdate = true;
var holeG = new THREE.BoxGeometry(50, 50, 50, 1, 1, 1);
var holeM = new THREE.Mesh(holeG);
holeM.position.z = 50;
var holeG = new THREE.Geometry();
THREE.GeometryUtils.merge(holeG, holeM);
holeG.verticesNeedUpdate = true;
holeG.computeVertexNormals();
holeG.computeFaceNormals();
holeG.normalsNeedUpdate = true;
var boxBsp = new ThreeBSP(boxG);
var holeBsp = new ThreeBSP(holeG);
boxBsp = boxBsp.subtract(holeBsp);
var boxG = boxBsp.toGeometry();
Is this familiar and planed to be fixed?
The text was updated successfully, but these errors were encountered:
As you can see there are vertices that belong to one plane but not to another, which is regarded as holes and cannot be 3D printed (without fixing tools).
Can you please confirm if the problem is in the original CSG algorithm or the porting to three.js?
Thanks.
I have been using CSG for geometry manipulation and it's awesome.
However, it seems there is a problem with the polygon splitting and there are missing/wrong polygons.
I have checked it with latest threeCSG.js and three.js
Also used all previously mentioned suggestions including changing EPSILON.
I have checked it with netfabb.
Here's the original and the fixed geometry pictures:
Here is a very simple code:
var boxG = new THREE.BoxGeometry(100, 100, 100, 1, 1, 1);
boxG.verticesNeedUpdate = true;
boxG.computeVertexNormals();
boxG.computeFaceNormals();
boxG.normalsNeedUpdate = true;
var holeG = new THREE.BoxGeometry(50, 50, 50, 1, 1, 1);
var holeM = new THREE.Mesh(holeG);
holeM.position.z = 50;
var holeG = new THREE.Geometry();
THREE.GeometryUtils.merge(holeG, holeM);
holeG.verticesNeedUpdate = true;
holeG.computeVertexNormals();
holeG.computeFaceNormals();
holeG.normalsNeedUpdate = true;
var boxBsp = new ThreeBSP(boxG);
var holeBsp = new ThreeBSP(holeG);
boxBsp = boxBsp.subtract(holeBsp);
var boxG = boxBsp.toGeometry();
Is this familiar and planed to be fixed?
The text was updated successfully, but these errors were encountered: