# Difference doesn't work, either.

4 messages
Open this post in threaded view
|

## Difference doesn't work, either.

 (This may be the same bug as the intersection bug.) This code works correctly: difference() { cube(size = [10, 10, 10], center = true); multmatrix([[1, 0, 0, 0], [0, 0, -1, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -50], [0, 0, 0, 1]]) cube(size = [100, 100, 100], center = true); } But this code doesn't work: difference() { cube(size = [10, 10, 10], center = true); multmatrix([[-1, 0, 0, 0], [0, -1, 0, 0], [0, 0, -1, 0], [0, 0, 0, 1]]) multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -50], [0, 0, 0, 1]]) cube(size = [100, 100, 100], center = true); } _______________________________________________ OpenSCAD mailing list [hidden email] http://rocklinux.net/mailman/listinfo/openscadhttp://openscad.org - https://flattr.com/thing/121566
Open this post in threaded view
|

## Re: Difference doesn't work, either.

 Administrator On 2013-06-27, at 12:17 , Henry Baker wrote: > (This may be the same bug as the intersection bug.) > > But this code doesn't work: > […] > multmatrix([[-1, 0, 0, 0], [0, -1, 0, 0], [0, 0, -1, 0], [0, 0, 0, 1]]) I think this is the culprit. When inverting something, CGAL implicitly also inverts what is inside and what is outside, and eventually something gets confused. It looks like an off number of inversions cause this to happen. The same symptoms can be seen when using mirror(). Ideas on how to fix this are welcome :)  -Marius _______________________________________________ OpenSCAD mailing list [hidden email] http://rocklinux.net/mailman/listinfo/openscadhttp://openscad.org - https://flattr.com/thing/121566