3

I have a Box Mesh where I subtract another Box with Three.CSG to create a wall with a window. After doing so, there are tiny holes in the Mesh alongside the cut. They are not visible alle the time, but show up when moving around.

How to close these holes?

enter image description here

enter image description here

This is part of the code how I am creating the Mesh:

var wallBsp = new ThreeBSP( myWallMesh );
var subMesh = new THREE.Mesh( mygeo );
var subBsp  = new ThreeBSP( subMesh );
var subtract_bsp = wall_bsp.subtract( subBsp );

var result = subtract_bsp.toMesh(); 
result.material.shading = THREE.FlatShading;
result.geometry.computeVertexNormals();

Update

I have created a jsfiddle, but it is difficult to reproduce the error, I couldnt make it visible there: http://jsfiddle.net/L0rdzbej/23/

However, you can see the full application here.

Like @gaitat suggested, geometry.mergeVertices() does not look like it changes anything for me. Chandler Prall hinted at the source where precisionPoints, which is a variable inside the mergeVertices function, could solve this. Depending on the scale of the scene its value should be lower or negative, but I had no success so far.

Falk Thiele
  • 4,424
  • 2
  • 17
  • 44
  • It's be good to place part of example with this behavior on jsfiddle.net or like other. – stdob-- Jul 04 '15 at 15:59
  • `geometry.mergeVertices()` did not help? – gaitat Aug 14 '15 at 17:44
  • No, see my updated question :( – Falk Thiele Aug 16 '15 at 11:23
  • @Falk Thiele: after CSG operation are you able to apply textures to walls? The csg operation changes whole geometry. I am not able to figure out which face is which, and I have to apply different textures to different faces like, floor, roof, walls etc, – Deeps Oct 06 '17 at 14:28

0 Answers0