12/18/2022 0 Comments Openscad screw threads![]() More specifically, OpenSCAD is using 3D boolean operations on Nef Polyhedra, which provides extrely robust and accurate results, two welcome properties in the 3D printing hobby, but also is extremely complex and slow to run (especially with those exact underlying number abstractions). That amazing library allows for completely generic numeric types, and the type OpenSCAD is using is some voodoo magic “exact” numeric type based on the GNU Multiple Precision Arithmetic Library (GMP). CGAL Nef Polyhedra + GMP = so precise it hurts (performance)Īs it turns out, OpenSCAD is using the Computational Geometry Algorithms Library (CGAL) for its CSG operations. Slow enough to prevent me from doing what I wanted, which was to generate large, varying scalemail patterns:īut something was off: my slicer software (Cura) was able to handle 10x10 grids of my scalemail pattern without breaking a sweat, so why was OpenSCAD so slow? So after investigating alternatives (wasn’t keen to get locked in a certain popular but proprietary CAD software with huge a learning curve and high prices after its 1 year hobbyist licenses), I dove into OpenSCAD’s codebase and tried to understand what it was up to. Last year I grew fond of it to design ever more complex models, but started running into limitations: while interactive rendering was fine, the final rendering (creating the STL files to give to the 3D printing slicer) was horrendously slow. A simple declarative programming language defines Constructive Solid Geometry (CSG) operations like unions, intersections, differences, which can be parameterized with loops and variables. It’s essentially a CAD software for programmers with a minimalist UI. OpenSCAD is a popular open-source design tool for 3D printing afficionados (and others). Rewriting trees to increase laziness and parallelizability.What about multithreading? Or skipping operations altogether? □.CGAL’s other hidden gem: corefinement functions.CGAL Nef Polyhedra + GMP = so precise it hurts (performance). ![]() ![]() Note: opinions expressed here are my own. Make your models more ambitious and report issues / successes here! TL DR: OpenSCAD users: download a nightly build & enable fast-csg in settings for 10x faster render (YMMV). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |