Open z3dev opened 7 years ago
@fischman thanks I think there was a small bug introduced last release for 2D format exports. I think this is fixed in the pending 0.5.2 release, and will try.
From @fischman on October 26, 2016 15:14
FWIW I get the same failure on openjscad.org and locally on e16c68a141437321d75b7401d48a851de2b48929
@fischman Sadly, it looks to be a issue with the CSG.js library. I'm just starting to work with this library, and will log this as a bug against CSG.js.
@fischman So, I took a look at this today.
Internally, the CAG sides are converted into CSG walls, and then CSG.unionSub() is called to do the work. The resulting CSG is then converted back to CSG sides. Deep inside CSG.unionSub() there's a problem, as the returned CSG (and therefore the CAG) are not properly closed, i.e. polygons are not clean.
This is going to take some time give that I'm now dealing with 3D math.
From @fischman on October 26, 2016 8:15
The code below generates a DXF just fine if the final statement returns either of the two CAGs, but when both are returned the DXF generation dies with: Uncaught Error: Area is not closed!
Copied from original issue: Spiritdude/OpenJSCAD.org#185