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

Is this library fixed THREE-CSG when dealing with LatheGeometry/ConeGeometry return incorrect result issue? #89

Closed AsDeadAsADodo closed 1 year ago

AsDeadAsADodo commented 1 year ago

I see benchmark/lib include THREE-CSGMesh This issue is added before in intersecting a box with a cone results in a slice of the surface of the cone instead of a solid object I did not test cone , only test LatheGeometry.

CSG.toMesh(
    CSG.fromMesh(A).intersect(CSG.fromMesh(B)),
    A.matrix,
    A.material
 );

giladdarshan suggest change Line #73 to

return CSG.fromPolygons(polys.filter(p=>!isNaN(p.plane.normal.x)));

This issue still exists , subtract and union both return partial of the LatheGeometry , intersect returns something close to A-A∩B but not exactly A-A∩B Is this library fixed THREE-CSG when dealing with LatheGeometry/ConeGeometry return incorrect result issue?

gkjohnson commented 1 year ago

You'll have to test the case yourself - I have not used the library with lathe geometry.

AsDeadAsADodo commented 1 year ago

You'll have to test the case yourself - I have not used the library with lathe geometry.

Is this lib based on THREE-CSGMesh ?

gkjohnson commented 1 year ago

It's not - this is a new implementation that enables the performance improvements but there are still quirks.

AsDeadAsADodo commented 1 year ago

It's not - this is a new implementation that enables the performance improvements but there are still quirks.

OK , thanks