September 14th, 2024

OpenSCAD: The Programmer's Solid 3D CAD Modeller

OpenSCAD is a free, programming-based 3D CAD software available on Linux, Windows, and Mac OS X, offering tutorials, libraries, and community support for creating and sharing designs.

Read original articleLink Icon
FrustrationAppreciationCuriosity
OpenSCAD: The Programmer's Solid 3D CAD Modeller

OpenSCAD is a free software application designed for creating solid 3D CAD objects, compatible with Linux/UNIX, MS Windows, and Mac OS X. It offers a programming-based approach to 3D modeling, allowing users to define objects through code. The platform provides various resources, including tutorials, libraries of ready-made building blocks, and a collection of books to assist users in learning and utilizing the software effectively. OpenSCAD also has an active community, with chat options available on IRC and social media platforms like Mastodon. Users can share customizable designs through 3dcustomizer.net and find existing designs on sites like Printables and Thingiverse.

- OpenSCAD is a free, programmer-oriented 3D CAD modeling software.

- It is available on multiple operating systems, including Linux, Windows, and Mac OS X.

- The software supports a community-driven approach with resources like tutorials and libraries.

- Users can share and find designs on various online platforms.

- OpenSCAD emphasizes a coding-based method for creating 3D objects.

AI: What people are saying
The comments on OpenSCAD reveal a mix of appreciation and criticism for the software's capabilities and limitations.
  • Many users appreciate OpenSCAD for its programming-based approach, which allows for parametric design and automation.
  • Critics highlight its limitations, such as lack of advanced features found in traditional CAD software, like constraint systems and multi-threading.
  • Users express a desire for improvements and innovations in code-CAD tools, suggesting alternatives like CadQuery and Build123D.
  • There is a strong sense of community support, with users sharing resources, libraries, and personal experiences.
  • Some users have transitioned to or are exploring other CAD systems due to frustrations with OpenSCAD's rendering speed and complexity in handling certain designs.
Link Icon 33 comments
By @throwgfgfd25 - about 1 month
If you want to do code-CAD for anything substantial and you haven't yet developed a significant dependency on OpenSCAD, do your brain a favour and spend at least some time with CadQuery, Build123D or (if you prefer JS to Python) Replicad.

As impressive as NopSCADlib and BOSL2 are (and OMG they are, when you consider what they have to work with!), OpenSCAD is a one-way, declarative CSG environment that essentially only outputs mesh formats. It's really not that much better than working with three-dimensional pixels. You won't really be able to analyse, iterate over or measure your models, easily build on faces, do easy chamfers or fillets, export STEP files, make use of constraint-based designs, model assemblies, or so many other things that "CAD" means in the 21st century. All the tools that help you do this on OpenSCAD are layers and layers of task-specific hacks and clever bodges.

I totally get wanting to make models with version-controlled text files instead of GUI CAD (which can be a sort of weird battle to learn for a programmer), and I get wanting to avoid FreeCAD. I just don't really get wanting to limit oneself to such a limited concept of a 3D "model"!

The three alternative systems I mention are all based around bindings to (or in Replicad's case, cross-compilation of) OpenCASCADE, which is a bRep CAD kernel capable of much richer interactions. It is not without its faults, but arguably code-CAD spares you from some of the inscrutability that trips up FreeCAD's interactive model.

By @Rygian - about 1 month
Discovering OpenSCAD via its official tutorial:

> On the example above, the second cube sits exactly on top of the first cube. This is something that should be avoided as it’s not clear to OpenSCAD whether the two cubes form one object together. This issue can be easily solved by always maintaining a small overlap of about 0.001 - 0.002 between the corresponding objects.

This goes against the whole point of doing parametric design and should be logged as a bug. If the CAD software is unsure whether object spanning [0 to 1] and object spanning [1 to 2] are physically fused, that should be a bug. Mathematically they are fused.

By @timschmidt - about 1 month
Don't miss the https://github.com/nophead/NopSCADlib library for OpenSCAD, which includes a tremendous amount of useful shapes, functions, and the ability to produce exploded diagrams, assembly instructions, etc.
By @seveibar - about 1 month
For people interested in coding CAD in React, my team built a react fiber layer over jscad and are investing heavily into building an MIT-licensed 3d electronics library: https://github.com/tscircuit/jscad-fiber

I don't think you need a custom language to declare CAD, typescript/python have heavily invested in type systems so I hope the world moves more toward using existing languages.

The biggest limitation with code-CAD today is the lack of a constraint system (e.g. a clean way to say "these edges are 3mm apart") without X/Y coordinates everywhere. We're slowly building higher-level components that allow you to specify constraints so that you can write CAD in a way that more closely mimics the design intent, rather than a bunch of calculations.

OpenSCAD started it all so we're very grateful, but it's also time for some innovation to bring the language closer to design intent

By @bvrmn - about 1 month
I don't say it's impossible but I believe it's quite near to impossible for most of OpenSCAD users to model this relatively simple drawing[1]. It's a breeze in CAD with constraint solver. Also it's viable in code-first systems with access to shape coordinates (build123d) using only construction geometry and projections. OpenSCAD requires hard trigonometry and math skills to pull it out.

OpenSCAD has amazing community though and part libraries celebrates human ingenuity despite tool restrictions.

[1]: https://build123d.readthedocs.io/en/latest/_images/ttt-23-t-...

By @dschroer - about 1 month
For those who are interested. I have been working on a similar CAD Modeler. I think of it as a spiritual successor to OpenSCAD.

It has support for bidirectional modeling (ex: get the height and width of an object and use it later) and multi part workflows to design more complex works.

https://www.dslcad.com/

By @lowkey - about 1 month
I work out of a local Hackerspace here in Austin and we happen to have one of the core contributors to OpenSCAD here. He re-wrote much of the code in C++ to optimize the core algorithms and significantly improve performance using OpenGL.

He is actively looking for gig-work or potentially something more significant, so if anyone on HN is looking to get something 3D-cad related or even some advanced training, please reach out to me (email is on my profile). I will happily make an intro.

OpenSCAD is an ideal tool for adding flexible 3D wizardry to a website or app programatically.

By @h2odragon - about 1 month
the "manifold" renderer makes possible some stunts that couldn't be done before. for example, i made this "usa counties" outline from a png: https://www.printables.com/model/895723-usa-counties

its under the "features" preference, doesn't work for everything yet, but is worth investigating if you haven't.

By @pbronez - about 1 month
OpenSCAD has been great for simple projects. It’s very easy to get productive with if you know basic programming concepts. However, I’ve run into frustrating limitations on more complex projects. The core geometry engine is skittish.

I still use OpenSCAD, but I’m diving into the OCCT ecosystem. It has a steeper learning curve, but seems to be significantly more robust.

https://dev.opencascade.org/

By @zimpenfish - about 1 month
I've made a bunch of stuff in OpenSCAD and it can be really nice to work with but... it does have a bunch of weirdnesses like not being to find the size of a compound object, having to micro-manage your objects to avoid the spinning beach ball render, fillets/chamfers/rounded edges/etc. are dark arts, etc.

If you're basically sticking simple shapes together or cutting simple shapes out of other shapes, it's fine enough.

By @lucasoshiro - about 1 month
Nice to see OpenSCAD getting relevance.

Last January I offered a course on OpenSCAD in my university, perhaps the first one in Brazil or even in Portuguese. The lectures are available here (but it's in Portuguese, perhaps someday I'll translate it to English...): https://lucasoshiro.github.io/posts-en/2024-03-24-openscad/

By @jlarocco - about 1 month
As cool as OpenSCAD is, it's just one way of writing code to work with CAD.

The commercial CAD systems all have APIs to do the same kind of stuff, but they also have sophisticated UIs on top to make them easier to use visually. NX even lets the user record UI interactions as a function to make creating initial code faster.

In fact, there's a whole niche of CAD programming.

By @joewalnes - about 1 month
Love OpenSCAD! Here’s a little library for generating “toy brick” compatible models for a 3D printer.

Also written to be a follow along example to help understand how to think about writing OpenSCAD programs.

https://github.com/joewalnes/toybrick

By @nanolith - about 1 month
I've never been comfortable drawing or drafting with GUIs. This is true for "drawing" graphics, laying out boards, or building 3D models for printing or CNC. OpenSCAD has been invaluable to me.

Usually, I'll hand draw what I need, then work out the equations, then build the models. No need to figure out what certain icons mean or to learn accelerator commands. I've built some fairly intricate designs with OpenSCAD. CSG is quite intuitive.

By @spacecadet - about 1 month
A few years ago I worked with some fellow artist to design a rubiks cube around a large steel ball bearing using OpenSCAD. We machined the pieces out of aluminum (using a sweet 5-axis mill) and glued magnets into them. https://vimeo.com/322284709
By @WillAdams - about 1 month
One notable new development is the Python-enabled OpenPythonSCAD:

https://pythonscad.org/

which finally made it possible for me to finally have the ability to write out G-code (allowing one to use OpenSCAD as a CAM tool) and DXFs (allowing one to have fully control and to create not-closed/unconnected geometry, and to write out arcs rather than only polylines):

https://github.com/WillAdams/gcodepreview

For the current state see the latest preview of the current unit test:

https://forum.makerforums.info/uploads/default/original/3X/1...

By @dgroshev - about 1 month
If you find yourself doing a lot of OpenSCAD, you might want to check out what you're missing from more traditional CAD systems:

A few examples of simple fillets in SOLIDWORKS: https://www.youtube.com/watch?v=f78gblpqxHc

Higher level continuity: https://www.youtube.com/watch?v=h5QN40d02cw

A good example of nontrivial surfacing: https://www.youtube.com/watch?v=cujS1icUTtg (the entire channel is a goldmine of surfacing tutorials)

Not every part needs G3 smooth curves, but being able use those tools when appropriate is a superpower.

By @omeid2 - about 1 month
ImplicitCad is a competing project which I think is a lot more robust.

https://news.ycombinator.com/item?id=41545100

By @msephton - about 1 month
I'm a big fan of OpenSCAD. I first used it to model a Wii Wheel sort of thing that I could put an Apple TV remote in. But my main use of it was creating a few dozen cars for a video game. Really great fun to model things. If you know CSS and HTML you know enough to create a 3D model in next to no time. https://blog.gingerbeardman.com/tag/openscad/
By @lucasoshiro - about 1 month
OpenSCAD of course is not as powerful as other tools, but it has a lot of pros (depending on what you consider a pro):

- Free, unlike other tools such as Fusion or SolidWorks - Open Source, unlike other tools such as Tinkercad or OnShape - 100% based on a programming language: compared to others is like comparing plain HTML with HTML + JS - Parameterizable (as a consequence of being based on a programming language), makes it a lot easier to adjust the model in a second iteration - Lightweight (it runs ok in my 12 year old desktop) - It can be used in CLI to generate STL files, makes it easier to automate the model generation

But of course it has a lot of cons: - It isn't multithreaded, so, it doesn't matter if you have an 32-core CPU or a single core. It also doesn't matter if you have a GPU. So, there's no "best machine" for running it - You can't compute the size of a shape, unless you know a formula for it. It's specially bad if you are dealing with texts, as you can't predict their shapes unless you're using a monospace font - It has some bugs in visualization - Even though it's on active development (you can see that in their Git), its latest release was in 2021

By @rcarmo - about 1 month
Nice to see this here. If anyone’s interested, I collected a bunch of resources for it over the years: https://taoofmac.com/space/apps/openscad
By @_chimmy_chonga_ - about 1 month
We used openSCAD in college for our 3D printing class. I think it was a good introduction to modeling in a 3d space since you really have to know what you're doing and the math you want to do, especially for CS majors. But, making anything complex in it is a GIANT pain.

Once we got past the few introductory assignments we were allowed to chose what we wanted and at that point no one in the class was still using it.

Its great for simple things but you'll find it tedious for anything complex, unless of course you like the challenge

By @smartmic - about 1 month
What should definitely be mentioned in this series is BRL-CAD, an Oldie but Goldie in solid modeling: https://brlcad.org/
By @mglz - about 1 month
OpenSCAD is amazing, especially for highly detailed geometry. Fusion360 was crashing when I modelled a honeycomb structure of ~2000 cells, while OpenSCAD easily handeled a similar model.
By @juancroldan - about 1 month
OpenSCAD is amazing for thinking of 3d design as a coding workflow. Here's my minimal intro to it: https://jcarlosroldan.com/post/151/parametric-design-with-op...
By @lambdaone - about 1 month
OpenSCAD feels awesome to start with, but is ultimately a disappointing experience because it lacks parametric solver capacity; data flow is one way, from the script, to shape generation, to CSG operations, and you cannot do quite reasonable things like extracting dimensions from a CSG-constructed shape and feeding them back into the script.

A better system would enable true constraint-based parametric design, but I think doing so would involve an order of magnitude more complexity in the implementation, and quite probably infeasable compute times.

By @randomghost1 - about 1 month
What are people's thoughts on CAD generation with LLMs for OpenSCAD and other proprietary GUI-based softwares? I imagine soon we will also be able to "autocomplete" or "semantically edit" feature trees in SolidWorks, Fusion, etc.
By @exe34 - about 1 month
i always thought I'd love openscad, being from a more coding background, but it turns out I'm not too fond of it. I eventually used freecad after watching some YouTube videos when I needed to make something.
By @skhameneh - about 1 month
I'm wondering why I appear to be in the minority questioning how this is news and why it was shared?

I've been noticing a general increase in low effort link shares of, what I consider to be, well known projects. These shared links contain no news or anything that appears to be related to updates or recent development, just links to home pages of relatively popular projects.

By @janice1999 - about 1 month
Wow, looks like the project might still be alive. Hopefully we get a new release year.
By @thelastparadise - about 1 month
Anyone try plugging this into an LLM for text -> 3d model generation?
By @scoofy - about 1 month
I used this software over a decade ago. I loved it.
By @at_a_remove - about 1 month
I haven't touched it in years.

I didn't have problems, uh, thinking in parametrics, but lordy was the rendering slow. I might try it again.