Closed z3dev closed 6 years ago
From @kaosat-dev on March 28, 2013 20:28
FyI Rene, there are lots of issues with fixTJunctions(), I have not gotten round to actually check if there is indeed an improvement in most common cases when using it vs without, but stl's are valid either way.
From @Spiritdude on March 29, 2013 10:27
Well, my tests have shown, as I wrote above (!!), that fixTJunctions() gives in few examples bad stl, the facet normals are giving 'NaN' - in binary and ascii, example000.jscad/example000.stl for example.
From @kaosat-dev on March 29, 2013 10:53
what I meant is, stl's that do not use fixTJunctions() are still valid, although might need to be passed through an stl cleaner like netfab
From @Spiritdude on March 29, 2013 17:17
I disabled fixTJunctions() temporarely in the stl exports (binary/ascii) on web and cli now, as valid stl is right now more important than sliceable stl - but this might change and focus back on fixTJunctions() will soon come again. I really like to have a robust stl import and export and be sliceable without to use netfab or other tools.
STL (and other formats) should be immediately usable by slicers.
Or
STL (and other formats) should be "error" free, i.e. not violating format models.
From @swsnider on July 16, 2015 2:34
Incorrect. This is not the same thing as #40. Please read the entire issue before proclaiming a dupe.
From @sergerusso on December 8, 2015 21:10
CSG.polygon
calculates plane by first 3 vertices, but fixTJunction
can add some more.
Like [[0,0,0],[0,0,50],[0,50,50]]
-> [[0,0,0],[0,0,25],[0,0,50],[0,50,50]]
and it fails as we need triangle
Pull request #107 contains some changes to CSG.js and openjscad.js. I ran some tests and all issues with T-junctions were resolved after making those changes.
If you need this fixed then please make the changes manually.
closed by #34
From @Spiritdude on March 27, 2013 15:52
Right now csg.js, in more concrete fixTJunctions() in the export chain to create .stl creates (edit: in few cases) bad facet normals, e.g. 'NaN' in the ascii export (both web or cli). E.g. when csg.toSTLString() without fixTJunction() then the .stl looks fine.
It wouldn't be such a big problem as most slicers disregard the normals, but OpenJSCAD relies (at least for now) on proper set normals in order to determine the orientation of the triangles (cw vs ccw) and correct them (which means also, stl with bad normals cannot imported in general).
Copied from original issue: Spiritdude/OpenJSCAD.org#9