gkjohnson / three-bvh-csg

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

csg operation error #204

Closed czc98 closed 8 months ago

czc98 commented 8 months ago

const brush1 = new Brush(geometry1); brush1.updateMatrixWorld(); const brush2 = new Brush(geometry2); brush2.updateMatrixWorld(); const evaluator = new Evaluator(); const result = evaluator.evaluate(brush1, brush2, ADDITION); console.log(result);

image TypeError: Cannot read properties of undefined (reading 'array') It is meaning that the brush geometry not be two-manifold?

gkjohnson commented 8 months ago

Please provide a working example of the problem. There's no way to say what the issue is with the information you provided.

czc98 commented 8 months ago

stl_models.zip I just do simple operation of this two stl meshes, but i not work. if the reason that error is the model not require the two-manifold?

gkjohnson commented 8 months ago

stl_models.zip

This is not a working example. I'm sorry but I cannot take the time to try to recreate your issue. Please provide a useable example with something like jsfiddle or codesandbox that shows the error.

if the reason that error is the model not require the two-manifold?

There is no detection for two manifold geometry in the project. It is the applications responsibility to enforce this.

gkjohnson commented 8 months ago

Closing until we have a reproduction case.