Skip to content

Commit aa43ce7

Browse files
committed
techniques to simplify the mesh and remove thin membrains and invalid shards.
1 parent 08733af commit aa43ce7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/main/java/com/neuronrobotics/manifold3d/CSGManifold3d.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,10 @@ public CSG difference(CSG a, CSG b) throws Throwable {
182182
MemorySegment mb = toManifold(b);
183183
try {
184184
MemorySegment result = manifold.difference(ma, mb);
185-
MemorySegment smooth = manifold.simplify(result, 0.001);
185+
MemorySegment or = manifold.asOriginal(result);
186186
manifold.delete(result);
187+
MemorySegment smooth = manifold.simplify(or,0.001);
188+
manifold.delete(or);
187189
checkResult(smooth);
188190
CSG fromManifold = fromManifold(smooth, a.getColor());
189191
manifold.delete(smooth);

0 commit comments

Comments
 (0)