top | item 24514978

OpenSCAD - The Programmers Solid 3D CAD Modeller

175 points| MrsPeaches | 5 years ago |openscad.org | reply

61 comments

order
[+] rm445|5 years ago|reply
I've been using OpenSCAD for personal projects for a couple of months, generally preparing models for 3D FDM printing. I'm a mechanical engineer by profession and a certified Solidworks professional. I'd estimate that designing in OpenSCAD - as in, modelling something up and iterating on the design as my understanding of the application develops and prototypes are trialled - takes me four to fives times as long as using commercial parametric 3D CAD that I'm already familiar with.

That's not a damning critique, but it is something I'd advise a friend or colleague who had a project to get on with. I'm still highly positive about OpenSCAD, because of its openness, its versatility, and the potential for using great programmers' tools (library code, scripting languages and version control) to make it much more powerful.

I've been working with vanilla OpenSCAD, downloading a few functions from people, and building little libraries of helper functions. Getting more familiar all along, figuring out the right way to do things. Some people have got a little further with creating scaffolding for mechanical design - projects like MCAD and OMDL. Of course, OpenSCAD is very versatile and people have many other uses for it. But I think when someone comes along and creates some really great libraries and frameworks on top of OpenSCAD - like LaTeX on top of TeX or Jupyter on top of iPython on top of Python - it would be suitable for any kind of design, competitive with the best GUI-based packages.

[+] emilecantin|5 years ago|reply
I can appreciate that point of view given your background.

However, as a programmer who dabbles in 3d printing / 2.5d CNC routing, I have the exact opposite experience. I spend a lot of time in Fusion 360 just battling the software because for some dumb reason it decided to align the top of my part with the bottom of the other when I actually wanted everything in the same plane.

OpenSCAD just makes a lot more sense to my programmer brain, and I'm often much more productive in it.

However, beyond the obvious graphical VS text interface, there's another significant difference between the two: OpenSCAD's base concept is making operations (add / subtract) on solid primitives (prisms, cylinders, spheres) whereas Fusion360 is based on 2d sketches that you extrude. That latter model works very well with a CNC router & plywood.

[+] sokoloff|5 years ago|reply
I used OpenSCAD almost exclusively for 5 years (Mech E by degree, but computer programmer by profession) and switched to Fusion360 in the last 3 months.

For me, within 6 hours Fusion was night and day more productive (even after a lot of experience in OpenSCAD). As one example, it was so much more productive that I can think of only 2 OpenSCAD designs in 5 years where I bothered to add fillets for strength and appearance. It's just too damn much trouble.

In Fusion360, I'll often have a simple part whipped up in 15 minutes and then spend 1 extra minute adding fillets and chamfers as needed. In OpenSCAD, that same part would likely be 30 minutes for the base part and the fillets another 15-30 minutes (with fairly poor performance once added).

[+] riverdroid|5 years ago|reply
Years ago, I worked at a factory that had thousands of variations of a large, heavy product, some dating back to the 60s. This product has multiple units packed for shipping on pallets and random scrap pieces of wood and then strapped down like some sort of Jenga puzzle.

I created a generic OpenSCAD model for the product, and fed in parameters derrived from more than a dozen data sources to generate a model for every variation. Then, took the 90th percentile by production numbers, and overlaid the models to show the boundaries of the variations as one model. That shape was then used to generate stack-able, vacuum-formed trays to hold the product.

I had a couple of expensive 3D CAD products at my disposal there, but OpenSCAD was the solution I needed to programatically crank out models. That's how my foray into programming started and my career shifted from Manufacturing Engineering to Software. Thanks OpenSCAD team!

[+] pi-rat|5 years ago|reply
I keep finding myself falling back on OpenSCAD when trying to 3D model after getting frustrated with steep learning curve advanced CAD programs.

Even if you don't like the OpenSCAD DSL (it got it's quirks..) there are usually other options in more familiar languages. I use it via Clojure[1]. It's pretty fun, even for small stupid things like coding up a rolling oloid[2].

[1]: https://github.com/farrellm/scad-clj

[2]: https://www.youtube.com/watch?v=wXE3L8EU5U4

[+] Pet_Ant|5 years ago|reply
> Even if you don't like the OpenSCAD DSL

I've actually been working on making the DSL language modular so that you could use it with any programming language (given bindings)

[+] Robotbeat|5 years ago|reply
I love OpenSCAD. I use it for all personal projects in 3D printing at home.

I use SolidWorks for work. The contrast between these two is incredibly striking. OpenSCAD is like a bicycle in comparison to an automobile.

It would provide literally billions (maybe tens or hundreds of billions) of dollars of value to the world if a few million dollars was spent developing an open source CAD/CAM package that was more than a mere bicycle and that wasn't terrible (sorry, FreeCAD, but we both know it's true). There needs to be an indiegogo campaign or something.

[+] rspeele|5 years ago|reply
I would check out SolveSpace for some of your personal projects. It is no SolidWorks but it is a parametric CAD program that works well, within its limitations. Very lightweight and not as crashy as FreeCAD.

If your part doesn't need lofts, NURBs, extrude-along-path, you can probably design it about as fast in SolveSpace as in SW, and with a similar mindset (vs. having to shift completely into programmer-mode for OpenSCAD).

e.g. Hood of a car? No way José, can't be done. Crankshaft and pistons? Easy.

[+] anoonmoose|5 years ago|reply
It ain't perfect, but as a software guy with a 3D printer and almost no mechanical knowledge whatsoever, it has allowed me to make some things I'm really happy with, including this project I completed fairly recently:

https://imgur.com/gallery/RpY5WEe

[+] willis936|5 years ago|reply
I think OpenSCAD is great compared to other options I've tried. My primary issue with OpenSCAD is that everything is a set of 4 sided polygons. If I want a sphere with decent resolution I need an absurd number of faces. It's slow to process/render, makes a large output file, and doesn't result in resolution I'm that happy with.
[+] 05|5 years ago|reply
Before I moved on to Fusion 360, I remember the only sane way to fillet the edges in OpenSCAD was to apply the Minkowski function. Of course, that has to be the absolutely last thing that you do with the model, because the perf after minkowski was truly horrifying, n many cases taking more time than the subsequent 3D printing. Has anything changed since?
[+] sidewndr46|5 years ago|reply
My desktop is an Intel 3700K overclocked to 4.1 GHz. So fast, but also ancient compared to modern CPUs. I have no issue designing models with many minkowski functions applied to them. The final build before export can take ~30s but that doesn't bother me.
[+] at_a_remove|5 years ago|reply
I have used OpenSCAD for a while. I should write a more thoughtful critique but ... dang, it is often hard to know which approach will just dramatically consume days of CPU time and which will not. I suppose one gets a feel for it eventually.

Modeling objects in my head parametrically is a snap.

The language is a bit clunky and counter-intuitive but I have gotten used to it. I do not mind its imperative nature; adding and subtracting material is imperative at its heart. Still, it makes more abstract reference points more difficult.

I found myself resorting to hacks like moving one object .001 into another object just to make sure they would meld smoothly.

The underlying library, last I checked, did not support multi-threading so the aforementioned CPU consumption is especially painful.

Exporting to giant .STL files is a little annoying. Sometimes the .STL files are "broken" according to Shapeways, so that is also bothersome.

[+] zbrozek|5 years ago|reply
Yeah I wanted to make a small change to Prusa's mk2/s extruder a long time ago. Rendering that design takes five or six minutes on my relatively-fast desktop, and it's an extremely simple thing. It was not clear to me why it was so slow.

In general I see OpenSCAD as a fun toy for making software-generated artwork, but not as a serious tool to make real things.

[+] droro|5 years ago|reply
When I played around with 3d printers a number of years back, I tried a few free programs such as Blender, FreeCAD and Sketchup, but I found OpenSCAD for modeling and Meshlab for post-processing to be the best pipeline for my needs. OpenSCAD is particularly effective for making replacement parts where precision is more important than aesthetics. However I did find ways to have fun with it, such as building a printable dragon fractal: https://s3.amazonaws.com/www.subalpinetech.com/images/dragon... https://s3.amazonaws.com/www.subalpinetech.com/images/dragon...
[+] maxbond|5 years ago|reply
OpenSCAD is my favourite programming language. I love the visual feedback, the quirky bugs, and the strict, functional nature of it. Learning OpenSCAD helped me really understand functional programming.

The documentation is also great. Once you have a basic grasp, this page is basically all you need.

https://www.openscad.org/cheatsheet/

Edit: Psych, you also need this:

https://en.wikipedia.org/wiki/List_of_trigonometric_identiti...

I've neglected this project, but I'm working on a library to make one's reasoning more explicit by providing math utilities.

https://github.com/MaxBondABE/batteries

[+] tsmarsh|5 years ago|reply
I started modeling in OpenSCAD. It fit really well with my programmer mentality. The language is small, the concepts simple and you can do some really amazing things with it, far more than might be obvious from the primitives... except filleting and chamfering.

The limitations caught up really quickly after that.

I echo what the other folks are saying. Its great, but there is no "I knocked this out in 10 minutes in OpenSCAD" for any part that couldn't be done in less time in TinkerCAD.

Its difficult to imagine how you could fix this elegantly. "Pick a path that follows the intersection of these two solids" is difficult to express in code, and easy to express by clicking on the vectors that represent the path.

[+] chutsu|5 years ago|reply
IMO, I think if OpenSCAD somehow had an assembly feature it would really make it more attractive for users who are programmers to switch from the likes of Fusion360 etc.
[+] brianolson|5 years ago|reply
You can make 'modules', little repeatable chunks that can be replicated or turned on or turned off etc. OpenSCAD is programming so a 'module' is a 'function' or 'procedure' in other langs. My multi-part assembly is a bunch of modules that I have in one configuration for fit designing and one configuration for printing.
[+] ungamed|5 years ago|reply
What do you mean 'assembly' feature ?
[+] londons_explore|5 years ago|reply
Years ago I kept having trouble with openscad - even relatively simple loops would seemingly hang or use massive amounts of memory or give wired errors. Changing some tiny thing in the file would suddenly fix it, only for it to break again with a totally unrelated change.

It was as if it uses some stochastic algorithm that sometimes doesn't converge...

[+] alpineidyll3|5 years ago|reply
OpenSCAD is really cool, but sadly very poorly implemented and very very slow. One can bring modern machine to it's knees for minutes rendering 10 cylinders in 10 cylinders in 10 cylinders. It's basically only appropriate for making a single parametric shape, but it's great for that job.
[+] bfieidhbrjr|5 years ago|reply
If you use openSCAD for 3d printing then you'll love hob3l

It takes OpenSCAD files and generates meshes vastly faster for complex models.

https://github.com/moehriegitt/hob3l

[+] panpanna|5 years ago|reply
This might come handy, thanks!

A lot of big name 3d printing software are really badly written and perform horribly on complex models.

[+] bartwe|5 years ago|reply
Used a whole lot of openscad to design and print my own version of the mpcnc, but recently i switched to the much simpler tinkercad because openscad was just not productive enough.