I accidently found out STL files are much smaller when exported from the UI than when created from the CLI.
Using Windows, OpenSCAD 2021.01 // sample code, lots of detail for bigger STL demo $fn=180; sphere(10);From UI, I press F6, then F7. From CLI, I use: openscad.com -o from-cli.stl stl-test.scadResults: from-ui.stl = 1,619,884 bytes in STL file Parsing design (AST generation)... Compiling design (CSG Tree generation)... Rendering Polygon Mesh using CGAL... Geometries in cache: 1 Geometry cache size in bytes: 2315672 CGAL Polyhedrons in cache: 0 CGAL cache size in bytes: 0 Total rendering time: 0:00:00.047 Top level object is a 3D object: Facets: 32042 Rendering finished.from-cli.stl = 6,594,615 bytes in STL file Geometries in cache: 1 Geometry cache size in bytes: 2315672 CGAL Polyhedrons in cache: 0 CGAL cache size in bytes: 0 Total rendering time: 0:00:00.015 Top level object is a 3D object: Facets: 32042From what I see, the UI STL file is great. So I have two questions.
Sent from the OpenSCAD mailing list archive at Nabble.com. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Maybe a clue here? https://github.com/openscad/openscad/issues/1555 On 02/04/2021 15:27, Adje wrote:
I accidently found out STL files are much smaller when exported from the UI than when created from the CLI. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
In reply to this post by Adje
On 2021-04-02 16:27, Adje wrote:
> I accidently found out STL files are much smaller when exported from > the UI than when created from the CLI. There are 2 kinds of STL files: Binary and ASCII. Binary is smaller and better, but the ASCII variant will be ok in most cases. I am guessing you get ASCII STL with CLI (but I have not checked). Carsten Arnholm _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Ah, indeed ASCII vs binary. After attempting to read a STL file a long time ago, I assumed they would all be binary. So I'll fiddle around with admesh as per the hint from mondo. And there are already open issues considering this point, so no need to add more. Thanks Carsten and mondo! Sent from the OpenSCAD mailing list archive at Nabble.com. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
On 02.04.21 17:24, Adje wrote:
> And there are already open issues considering this point, so > no need to add more. There is nothing to consider, both GUI and command line allow to export both now. For compatibility the command line export continues defaulting to ASCII so not to break peoples automations that might rely on that fact. GUI defaults to binary now as we considered this should have a minimal risk of breaking things, you can still revert to ASCII via Preferences if you need to. Command line --export-format supports "stl" = using the default which is ASCII or force a specific format using either "binstl" or "asciistl". Just run openscad --help as a reminder of allowed values. ciao, Torsten. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email]
-- Torsten
|
Thank you Torsten for the additional pointers. Issue 1555 was some time ago, so great that it's addressed.
The manual page still has the old openscad --help output, so that threw me off there. And those preferences... Once somebody tells you where to look, you can find it. As you saw from my original question, I had no idea that was what I was looking for.
Sent from the OpenSCAD mailing list archive at Nabble.com. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Free forum by Nabble | Edit this page |