Closed FishOrBear closed 2 years ago
@FishOrBear thanks again.
OK. I did some research on this issue. Here's what I found out.
If you scale() those shapes then the subtract works fine.
g1 = transforms.scale([0.01, 0.01, 0.01], g1)
g2 = transforms.scale([0.01, 0.01, 0.01], g2)
This is reenforcing my understanding of the logic inside the boolean routines. Basically, the booleans are optimized for units of 1. The LARGE size of your shapes are pushing the precision of the math being performed, and cause polygons to ignored or removed.
I can reproduce this issue with two simple primitives, with large scale.
let shape1 = primitives.cylinder({segments: 14, height: 18, startRadius: 2123.456789, endRadius: 2123.456789})
let shape2 = primitives.cylinder({segments: 7, height: 18, startRadius: 512.3456789, endRadius: 512.3456789})
let shape3 = booleans.subtract(shape1, shape2)
I'd like to keep this issue as a BUG. Is that fine?
OK, thank you.
` Basically, the booleans are optimized for units of 1.
`
This gave me some inspiration, would it be better to write this in the document? (Before not solving the problem)
This will not be fixed. Please reopen issues at OpenJSCAD.org
ver:v0.7 or v2
test code: