gkjohnson / three-bvh-csg

A flexible, memory compact, fast and dynamic CSG implementation on top of three-mesh-bvh
MIT License
602 stars 46 forks source link

Another missing triangle #36

Closed gkjohnson closed 2 years ago

gkjohnson commented 2 years ago

image

Looks like it's due to a splitter issue, probably

gkjohnson commented 2 years ago
  // primary tri
            new THREE.Triangle(
                new THREE.Vector3( 1.0280661064290844, 0.7005784562208369, 3.265724719645617e-17 ),
                new THREE.Vector3( 0.894732761174822, 0.9315185597517207, 0.26666667064030963 ),
                new THREE.Vector3( 0.7613994357887747, 0.23869824915906943, 3.265724719645617e-17 ),
            ),

// splitting tris
            new THREE.Triangle(
                new THREE.Vector3( 0.8314695954322815, 0.5555702447891235, 1.0182566209003679e-16 ),
                new THREE.Vector3( 0.9238795042037964, 0.3826834261417389, 1.1314261121795038e-16 ),
                new THREE.Vector3( 0.9061274528503418, 0.3826834261417389, -0.1802399605512619 ),
            ),
            new THREE.Triangle(
                new THREE.Vector3( 0.8314695954322815, 0.5555702447891235, 1.0182566209003679e-16 ),
                new THREE.Vector3( 0.8154931664466858, 0.5555702447891235, 0.16221167147159576 ),
                new THREE.Vector3( 0.9238795042037964, 0.3826834261417389, 1.1314261121795038e-16 ),
            )

image

gkjohnson commented 2 years ago

Looks like this is a three-mesh-bvh issue