[HN Gopher] OpenSCAD is kinda neat
___________________________________________________________________
OpenSCAD is kinda neat
Author : c0nsumer
Score : 169 points
Date : 2025-12-20 17:45 UTC (5 hours ago)
(HTM) web link (nuxx.net)
(TXT) w3m dump (nuxx.net)
| ai-christianson wrote:
| Is OpenSCAD still being maintained?
| aeonik wrote:
| Yes. https://github.com/openscad/openscad
| bdcravens wrote:
| It's worth noting they haven't had a new "release" in 4 1/2
| years, so you'll have to build it yourself or download a
| development snapshot
|
| https://openscad.org/downloads.html#snapshots
| starkparker wrote:
| More usefully,
| https://github.com/openscad/openscad/issues/3640
| c0nsumer wrote:
| The last release was 2021.01 but the GitHub repo seems to be
| recently updated. So I'd say... Maybe?
|
| That said, there are often times software gets so stable that
| not having a new release for years is fine. Maybe this is one
| of them?
|
| (I'm very new to OpenSCAD so I haven't run into bugs yet... But
| maybe it's pretty solid?)
| crazysim wrote:
| Apparently the nightlies are the one to use. At least, they
| build it for Apple Silicon in those.
| floating-io wrote:
| Yes. The "official release" is just so old as to be useless at
| this point. They should either update it or take it down and
| point people at github or something, IMO.
|
| I use the latest version all the time. The newer renderer
| ("manifold", IIRC) is _much_ faster, and there are newer
| facilities that make it possible to build 3MF files containing
| multiple objects for multi-color printing, though that takes a
| bit of thought to do correctly.
| MattRix wrote:
| Yes everything this person said is correct. The Manifold
| backend is no joke, probably 100x faster.
|
| To do multi-color printing it's pretty easy now, just turn on
| the poorly named feature in preferences called "lazy-unions".
| This will make it so that each top level object in your file
| gets exported as a separate subobject in the 3mf file.
| MattRix wrote:
| Yes, but the main downloads on the site are very old for some
| reason. Just get the nightly version instead, and then in
| Preferences -> Advanced -> Backend change it to "Manifold". It
| will make your models "render" 10x faster (or more!).
| bdcravens wrote:
| I believe that's the default now (at least in the latest
| MacOS nightly)
| coryrc wrote:
| It is for all nightly builds, starting in the last few
| months.
| overtone1000 wrote:
| I completely agree! https://overdesigned.org/shhh-dont-move-it-
| cant-see-us-if-we...
| convolvatron wrote:
| I love the model, it's nice to be able to generate things
| parametrically instead of grabbing knots with the mouse. so I use
| scad pretty often.
|
| but it has real problems - the language is weird and unfortunate.
| not anything super fatal, just the obvious product of evolution
| that would be more cohesive if it were architected wholesale
| epsilons are really unfortunate. you have to expect that after
| getting what you want in the whole, you're going to have to scan
| over the whole thing and look for cracks or collision where there
| shouldn't be performance is quite sad. here you are
| happy going back and forth between the view and text windows, but
| as you go on, it starts taking .. minutes.. to update the view
| once you have a reasonably complicated geometry high-
| level operators would also be nice. I made the mistake of using a
| thread library once, not only did that make my model
| unrenderable, there was so much noise in the model and the
| manufacturing process I had to make 3 expensive test prints in
| sintered nylon to get the fit right. (I'm thinking an annotation
| on a cylinder that says 'standard 1mm thread')
| MattRix wrote:
| It actually renders things incredibly fast if you get the
| nightly version and set the backend to Manifold. It is probably
| 100x faster (!!). In fact it renders so fast that I put a
| render() command at the top of my hierarchy so that everything
| just renders all the time, it's faster and more performant. I
| make incredibly complex models with it too, with hundreds of
| holes, complex svg files with text in them, etc.
| coryrc wrote:
| Why not just press F6 instead?
| WillAdams wrote:
| If you're inclined to use Python there is:
|
| https://pythonscad.org/
| bradfitz wrote:
| I find myself using OpenSCAD regularly to 3D print little things
| for the house. (Most recently: hooks to attach Christmas lights
| to our roof deck's glass walls)
|
| And when something gets too trick, ChatGPT is amazing at writing
| in it. Often it nails the whole design in the first try, like
| https://bsky.app/profile/bradfitz.com/post/3maelwomyw22n to mask
| off certain Raspberry Pi pins to make reassembly of projects
| easier later.
| jasonthorsness wrote:
| OpenSCAD is great! I used it to create a bunch of things to cut
| on a CNC router over the years. Best achievements were a scale
| model of Mount Rainier and some one-piece picture frames with
| text cut into them.
| charlie-83 wrote:
| Just started using OpenSCAD recently and love it. While most CAD
| tools have a million features to learn, OpenSCAD is completely
| described by a cheat sheet you could print on a piece of A4 (like
| most programming languages).
|
| I would really recommend using the git master than the latest
| release though. The last release was 2021 but they are still
| actively working on it and it's much faster now.
|
| I also have to recommend the BOSL2 library which means you don't
| have to implement all of those one million features from typical
| CAD software yourself. Its definitely got a bit of a learning
| curve but the fact that you can always default back to vanilla
| OpenSCAD and that you can actually see how stuff is implemented
| makes it much more satisfying to me to learn than learning what
| all the traditional CAD GUI buttons do.
| porkloin wrote:
| Commenting off of you since I wrote all of this and then
| realized it's basically exactly what you're saying. But to +1
| everything you just said in my own words:
|
| I love OpenSCAD. I've been 3D printing for a while, but I never
| really got to a place where I could design interesting parts
| until I started to get the precision of doing models in code.
| Sometimes it is slower, for sure.
|
| Every time I've used as a CAD GUI program I would get to this
| point where I would need to alter a single dimension by 0.25mm
| and realize that _all_ of my fastener holes, cutouts, etc have
| to be nudged with the keyboard or mouse to accommodate it. The
| input devices lack precision for that kind of task, and having
| to repeat the operation dozens of times (or bulk select) gave
| me a terrible sinking feeling, and I'd often just step away and
| give up on the design at that point out of frustration. I try
| to approach everything in OpensSCAD in a way that means I never
| have to experience that feeling again.
|
| I will also say that doing everything from scratch in OpenSCAD
| would be it's own special kind of hell. Libraries like
| [BOSL2](https://github.com/BelfrySCAD/BOSL2) provide a good set
| of core ideas and preferences that help set you on a good path.
| A good example: BOSL2 shapes tend to have a "center origin" by
| default, which is different than the OpenSCAD default, but
| makes doing transforms later way easier.
|
| Anyway, happy to see OpenSCAD getting some attention here :)
| 0_____0 wrote:
| A properly parameterized model shouldn't have the issue with
| having to nudge everything manually after a trivial change.
|
| I had the change the height of an entire enclosure to
| accommodate a taller than anticipated PCB, and simply edited
| the sketch at the top of my design tree that defined the
| overall dimensions.
|
| It took about 5 minutes to adjust the odd broken fillet and
| change some mates in assembly and it was done. No fidgety
| mouse movements. I actually do a lot of mech design on a
| laptop with a trackpad, arrow keys for view changes and
| numeric dimensioning for 95% of everything else.
| Arodex wrote:
| >Every time I've used as a CAD GUI program I would get to
| this point where I would need to alter a single dimension by
| 0.25mm and realize that _all_ of my fastener holes, cutouts,
| etc have to be nudged with the keyboard or mouse to
| accommodate it.
|
| What.
|
| This makes no sense. This isn't PowerPoint; your holes and
| cutouts are supposed to be parameterized. How are they even
| supposed to be at the proper position in the first place?
|
| As a CAD user, this is like e.g. a coder seeing someone write
| code with global variables everywhere.
| tonyarkles wrote:
| You would not believe how many CAD models are not
| parameterized. Not mine, but ones I've had to work with.
| porkloin wrote:
| I think I'm realizing that openscad was probably just the
| first time that parametric design options were given to me
| in a context where it made sense to me (in code). Maybe
| some of the software I've used has supported parametric
| positioning, but it wasn't made obvious to me. In OpenSCAD
| it's parametric by necessity. I said this in another
| comment, but the other programs I've worked with in GUI are
| most certainly not high end pieces of software: tinkercad,
| freecad, sketchup.
|
| I'm not doing complex character model designs, I'm usually
| building functional prints like enclosures or cases. It
| certainly sounds like there are features of better CAD
| software that makes parametric the default?
| jazzyjackson wrote:
| FreeCAD is definitely parametric but I hear you that the
| interface doesn't make it obvious. It might be worth
| another look particularly since it's interoperable with
| OpenSCAD and can work on CSG trees within the interface
|
| At least you've inspired me to try it and see if it's
| "worth writing home about"
|
| https://wiki.freecad.org/OpenSCAD_Workbench
| exasperaited wrote:
| I think I understand this -- I mean, OpenSCAD was my
| brief gateway to parametric CAD, and then I got to
| FreeCAD via brief stepping stones of CadQuery and other
| packages.
|
| But OpenSCAD isn't really _parametric CAD_. It 's a
| programming language; it's parametric for that reason.
| But it's not really CAD, at another level, in the sense
| that it does nothing to "aid" your design work. It has no
| interim abstraction for generated geometry; everything
| must be explicitly described.
|
| FreeCAD, though, is _profoundly_ parametric, through and
| through, and really always has been. Indeed the
| parametric aspects are the main thing that made it
| workable before the TNP mitigations were added. It is not
| a _limited_ CAD package, by any means. It 's just a
| somewhat unfriendly one with a CAD kernel that has some
| limitations. Really it's almost better understood as a 3D
| IDE with some workflow affordances.
|
| If you are stuck trying to get your head into how FreeCAD
| works, there are now three really good ways on Youtube:
| the Mango Jelly Solutions videos are incredible, the
| Shawn Hymnel/Digikey FreeCAD and 3D Printing course is
| good, and there are great recent videos by Deltahedra.
|
| But what you will be able to make with it, once you get
| your head into it, is _night and day_ different to what
| is possible with OpenSCAD. Because your parametric work
| in FreeCAD (or other CAD packages) can operate on the
| _geometry_ of the result of previous operations.
|
| Give it a try in the New Year with FreeCAD 1.1 when it is
| released.
|
| If you want another stepping stone from OpenSCAD to
| FreeCAD or any other package, I really recommend you look
| at CadQuery/Build123D. This will give you a similar
| coding approach but it will introduce you to operations
| on the true faces, edges and vertexes of the output of
| other operations.
|
| (FWIW I would not say that Sketchup is not _high end_ ,
| either. It's not to my tastes but it is quite powerful)
| abdullahkhalids wrote:
| > Every time I've used as a CAD GUI program I would get to
| this point where I would need to alter a single dimension by
| 0.25mm and realize that _all_ of my fastener holes, cutouts,
| etc have to be nudged with the keyboard or mouse to
| accommodate it.
|
| I am just starting to learn CAD and FreeCAD - also dabbled a
| bit in OpenSCAD. But I do know that FreeCAD has Spreadsheets
| [1] and Configuration Tables [2] which allows you to define
| your model parameterically and changes values as needed.
|
| How good this is, I don't know yet.
|
| [1] https://wiki.freecad.org/Spreadsheet_Workbench [2]
| https://wiki.freecad.org/Configuration_Tables
| ElCapitanMarkla wrote:
| It's a fantastic feature and works really well, my problem
| is I can never invest the required time to learn the
| interface. It all falls apart when I need to switch modes
| to move something or whatever. With scad can usually knock
| whatever I want together pretty quickly without having to
| relearn how to use the tool.
| MegaDeKay wrote:
| Spreadsheets are _really_ slow in FreeCAD. I 'd suggest you
| look into Varsets [0] if you don't need some of the fancier
| capabilities that spreadsheets provide.
|
| [0] https://wiki.freecad.org/Std_VarSet/en
| exasperaited wrote:
| Yes, VarSets are definitely better (more granular
| dependency recalculations).
|
| The little-known Configuration Tables aspect of
| Spreadsheets is _absolutely_ worth using, though, and has
| no equivalent in the VarSets scheme at this point. Once
| you get that set up it is great fun.
| zargon wrote:
| > Every time I've used as a CAD GUI program I would get to
| this point where I would need to alter a single dimension by
| 0.25mm and realize that _all_ of my fastener holes, cutouts,
| etc have to be nudged with the keyboard or mouse to
| accommodate it.
|
| There seems to be some fundamental misunderstanding of CAD
| here. I can't imagine how you could even design something in
| CAD in a way that you would end up in this situation.
| dcminter wrote:
| I wonder if he's using TinkerCAD or something similar? I
| often use that, 'cos it's quick for simple things that are
| one-offs, but it has exactly this issue as it's not at all
| parametric, just primitives and booleans (though it does
| have some basic sketch capabilities now)
|
| When I'm doing something more sophisticated I use
| SolveSpace, but I'm a lot slower with that.
| porkloin wrote:
| yeah, op here: it's exactly that. I've used most of the
| free or open source software options and it seemed like
| none of them are parametric. I know I could buy fusion or
| something like that, but I found OpenSCAD before I got to
| that point and feel like it fits the bill for me.
| sfifs wrote:
| Fusion is free for personal use and in my experience at
| least was much faster experience than OpenSCAD.
| girvo wrote:
| > I would get to this point where I would need to alter a
| single dimension by 0.25mm and realize that _all_ of my
| fastener holes, cutouts, etc have to be nudged with the
| keyboard or mouse to accommodate it
|
| Thats surprising! Last time I used software like this
| (Inventor, back in ~2005-2006) constraints meant that I
| didn't need to do this at all
| moebrowne wrote:
| > I would really recommend using the git master than the latest
| release though.
|
| This. The master version is so much further ahead of the last
| tagged version. The render time can be orders of magnitude
| faster for more complex models.
| jasongill wrote:
| It appears that regularly-updated builds are available here:
| https://openscad.org/downloads.html#snapshots
|
| or with Homebrew you can do `brew install --cask
| openscad@snapshot` to install the latest snapshot version.
|
| Or, browse all the snapshot builds here:
| https://files.openscad.org/snapshots/
|
| (as of this comment, the last snapshot build is from
| yesterday)
| cm2187 wrote:
| Agree but you quickly run into its limitations. Like if you 3d
| print something, you need to eliminate when possible sharp
| edges. That's not fun to do with OpenSCAD.
| m4rtink wrote:
| BOSL2 can help with that:
|
| https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad
|
| https://github.com/BelfrySCAD/BOSL2/wiki/Tutorial-
| Rounding_t...
| m4rtink wrote:
| BOSL2 is SO nice and powerful, can also highly recommend it! :)
| exasperaited wrote:
| OpenSCAD isn't a CAD tool, IMO. It does nothing at all to _aid_
| your design. It barely even helps describe it in any abstract
| way.
|
| It is a useful tool for programmatically describing either very
| simple or heavily geometric objects. For everything else it's
| the wrong tool.
| Robdel12 wrote:
| OpenSCAD has become my go to with my 3-D printer for dumb little
| things. And the best part is LLMs are getting decent / pretty
| good with it!
|
| My favorite thing I've printed is a little downsize coupler for
| the cool shirt system I built for my spec miata. It's realllly
| silly & small thing, but it saved me!
| yehoshuapw wrote:
| worth also looking at cadquery, build123d and similar
|
| https://github.com/gumyr/build123d
| anfractuosity wrote:
| It's super useful, been using with my 3D printer to print things
| such as an adapter to connect a Canon EF lens to night vision
| tube and parts to link motorised linear stages together.
|
| Currently I'm playing with a gear library which is part of BOSL2
| (https://github.com/BelfrySCAD/BOSL2/wiki/gears.scad), to make
| something to rotate a polariser in my microscope.
| constantcrying wrote:
| OpenSCAD is very cool, but completely unusable once you
| understand how great state of the art CAD Software like Fusion or
| Onshape is.
|
| The big distinction is that those work _implicitly_ , while
| OpenSCAD requires you to be implicit.
| d_silin wrote:
| excplicitely, you mean?
| WillAdams wrote:
| The thing is, I've crashed-and-burned every time I've tried to
| do traditional 3D CAD --- the closest I've come to success was
| making it all the way through the tutorial for Dune 3D:
|
| https://news.ycombinator.com/item?id=37979758
|
| https://news.ycombinator.com/item?id=40228068
|
| OpenSCAD "just works", even on quite limited hardware, and if
| one has trouble modeling something, well, arriving at a
| solution is just a matter of learning the appropriate
| mathematics.
| constantcrying wrote:
| To be honest, I found Fusion 360 and Onshape very intuitive
| to learn.
|
| >and if one has trouble modeling something, well, arriving at
| a solution is just a matter of learning the appropriate
| mathematics.
|
| Which is the terrible thing about OpenSCAD. YOU need to
| derive the equations. In a modern CAD program you define the
| constraints on the object and the equations are derived for
| you.
| culi wrote:
| I'm a programmer. I once had an idea stuck in my head for a 3d
| model that I just needed to get down somewhere. I tried
| learning the basics of AutoCAD but after 2 days of tutorials I
| still felt overwhelmed.
|
| I looked into alternatives and learned about OpenSCAD. The
| immediate visual feedback makes picking up the language a
| breeze. Within an hour of downloading I familiarized myself
| with the language and had manifested my idea into a 3d model
|
| I think that's a perfect example of a use-case where OpenSCAD
| shines. It's extremely easy to pick up if you have programming
| experience and it might even be a good thing to learn _before_
| moving onto more professional CAD software. From a teaching
| perspective, being able to have almost immediately-useful
| output is priceless
| WillAdams wrote:
| The BlockSCAD folks are hoeing that row quite effectively to
| my mind:
|
| https://www.blockscad3d.com/editor/
|
| I just wish that they'd add the balance of the language/fix
| some bugs.
| constantcrying wrote:
| I think that modern CAD software, like Onshape or Fusion 360
| is quite easy to learn. I have no doubt that AutoCAD is
| difficult to grasp, but it is not a good representative of
| what is possible.
|
| >It's extremely easy to pick up if you have programming
| experience and it might even be a good thing to learn before
| moving onto more professional CAD software.
|
| No, it definitely is not. OpenSCAD makes you think exactly
| the wrong way about CAD, because it forces you to reason
| explicitly about your model, when that is something which you
| need to let the CAD Software do for you. Modern Parametric
| CAD works by the user defining constraints, which the
| Software uses to derive the shape of the model, this is not
| something which conceptually exists in OpenSCAD.
|
| >From a teaching perspective, being able to have almost
| immediately-useful output is priceless
|
| Which is something which modern CAD does just as well.
| elcapitan wrote:
| For me as a casual 3d-modeler, my favorite thing about OpenSCAD
| is that I don't have to learn a new application the size of
| Photoshop with everything hidden 7 levels deep in some menu that
| is probably intuitive for some people who learned CAD in the 80s.
|
| Instead it's basically like graphics programming, with a couple
| of basic primitives, some linear transformations and a bit of set
| theory. When I do a model a month and get back to previous work,
| I read a few lines of code and know exactly how I achieved the
| result.
| unbelievably wrote:
| I was once a big OpenSCAD user myself but I'm really skeptical
| that there are many use cases where it's actually more
| intuitive than a traditional CAD program, even if you're a
| programmer. It's true CAD programs have a huge amount of
| features but the basic sketch, extrude, revolve, and loft tools
| aren't conceptually difficult and are basically the same
| between Onshape, Fusion, Solidworks, etc. Those tools are
| sufficient to make 99.99% of OpenSCAD models I'm seeing.
|
| I also have the opposite experience about understanding
| previous scripts. Unless it's dead simple I'm usually thinking
| why the hell did I multiply this thingy by sqrt(3)/2 plus this
| other thing. Maybe a documentation problem, but it's
| inescapable that sometimes you need a lot of math for what are
| trivial constraints in an interactive sketch. A real CAD
| program will let you roll back to any feature to figure out how
| it's constructed step by step so there's really nothing to
| decipher.
| WillAdams wrote:
| I've been trying to model joints for woodworking, and in
| traditional tools, the shapes I wish to arrive at verge on
| nightmarish, while I was able to knock them out in OpenSCAD
| in pretty short order --- except that when I sent a 1" x 2" x
| 1" test joint to a CAM program, it took some 18 minutes and
| generated a ~140MB G-code file, hence my working on:
|
| https://github.com/WillAdams/gcodepreview
| IshKebab wrote:
| Yeah I agree. OpenSCAD is good for highly parametric
| modelling: fasteners, gears, generative art, ... that's about
| it. Most things aren't like that, and a traditional
| parametric CAD program is 10x easier.
| rcpt wrote:
| I haven't tried the latest models but for at least a year LLMs
| have been mostly able to generate openscad to match my
| descriptions.
|
| It's neat that I can tell the computer what I want in words and
| then have that object come out of the 3D printer
| WillAdams wrote:
| The great thing about OpenSCAD is that it makes it easy to 3D
| model things which may be described using spheres, cylinders, and
| cubes which are stretch, and/or rotated, and arranged in 3D
| space.
|
| The awful thing about OpenSCAD is that what one can model in 3D
| is limited by one's ability to mathematically stretch, rotate,
| and/or arrange spheres, cylinders, and cubes in 3D.
|
| For folks who want "real" (read mutable in normal terms of scope)
| variables there is a Python-enabled fork (which should become
| part of the main release presently:
|
| https://pythonscad.org/
| M_bara wrote:
| Or perhaps take a look at cadquery? It's also pretty neat -
| http://cadquery.readthedocs.io/
| culi wrote:
| There's also OpenJSCAD. Which, being JavaScript ofc, can run in
| the browser
|
| https://openjscad.xyz/
|
| https://github.com/jscad/OpenJSCAD.org
| spwa4 wrote:
| Don't people think this is one tool that would greatly
| benefit from using the very fastest languages available?
| Where's the C++, Rust, maybe even FORTRAN version?
| htgb wrote:
| This is only the language for describing the volumes.
| That's not heavy, rather the importance is that you can
| express the ideas you want. The heavy lifting of rendering
| and computing how volumes interact etc is already
| implemented in native code.
| WillAdams wrote:
| My understanding is that the core of OpenSCAD is done using
| C++.
|
| If you wish to use Rust for 3D modeling directly there is:
|
| https://fornjot.app/
|
| (the developer of which is actually working on a BREP
| kernel)
| rafabulsing wrote:
| Re: JS based CAD, there's also replicad, which I've used
| previously and found to be really good.
|
| https://replicad.xyz/
| xixixao wrote:
| From my testing, the CSG operations, with post-processing,
| don't produce watertight meshes. And being focused on
| printing, it doesn't support different colors for the CSG
| operands. My use case is animation/games, so I'm
| reimplementing the CSG with a watertight b-rep.
| IgorPartola wrote:
| Not just that but it also positions everything in absolute
| coordinates and does not have the ability to reason about
| solids, just surfaces. Basically if you want to model something
| like a bolt you need to create a cylinder for the shaft, a
| separate head of the bolt, and then a thread profile you can
| rotate around the cylinder. You must ensure there is enough
| overlap between these three separate parts so the resultant
| object is a single surface and not three separate ones.
|
| You can use modules to create a semblance of relative
| measurements but you still cannot do things like "attach this
| surface of object A to that surface of object B)". In practice
| this means that if you want to create something like a spacer
| or a bracket you can do that easily enough. But if you want to
| make a part that matches some real world design you are stuck
| doing a lot of caliper measurements and math to try to create a
| part that lines up correctly. The you 3D print it and find that
| you positioned some hole based on its edge and not center and
| so nothing quite fits.
|
| OpenSCAD is easy to start but difficult to scale because of
| these limitations and because once you hard-code any
| measurement you are stuck with it. The "proper" way to do this
| is to give everything a variable but honestly that makes
| reasoning about how to line things up even more difficult.
| "Does base_width include the width of the vertical walls? What
| about the margin to make the parts fit together?"
|
| I have never been able to understand how things like FreeCAD
| lay out their UI. TinkerCAD is relatively simple but clearly a
| lot less powerful. I did try cadquery which solved a lot of
| OpenSCAD's issues by having all offsets be relative by default
| but also introduces a few issues of its own.
|
| One tip I will give about OS: grab a copy of the latest
| beta/dev release. The renderer is several orders of magnitude
| faster.
| coryrc wrote:
| BOSL2 allows attaching when you define attachment points or
| something with attachment points defined for you (most
| everything in BOSL2).
|
| Manifold backend also eliminates the need to avoid coincident
| faces.
| IgorPartola wrote:
| Can you explain this a bit more? Might be the after effects
| of the COVID/flu vaccine I got yesterday but I am not
| picking up what you mean.
| somat wrote:
| > but you still cannot do things like "attach this surface of
| object A to that surface of object B)"
|
| Sure you can, but openscad is an imperative language so you
| need to do it in an imperative manner.
| a_cube_loc = [10, 5, 5]; a_cube_size = [2, 4, 1];
| b_cube_loc = [a_cube_loc[0], a_cube_loc[1] + a_cube_size[1],
| a_cube_loc[2] ]; b_cube_size = [2, 4, 1];
| translate(a_cube_loc) cube(a_cube_size);
| translate(b_cube_loc) cube(b_cube_size);
|
| It would be nice to have more declarative constraints. The
| solvespace file format is plain text and it almost feels like
| you could write it by hand, but that would be a lot of manual
| record keeping. and you would loose all that imperative
| goodness. Perhaps you could have an imperative layer(say
| python or lisp or forth) that outputs the declarative
| layer(solvespace) and then solvespace renders(picture or stl)
| the declarative layer.
| WillAdams wrote:
| I think a text input option for Solvespace which was
| optimize for readability and usability would be _very_
| interesting approach, esp. if Solvespace was able to write
| back out to the same format, and it allowed
| math/variables/parameters and supported the same in the UI.
| m4rtink wrote:
| Let me introduce to the awesomness of the BOSL2 screw module:
|
| https://github.com/BelfrySCAD/BOSL2/wiki/screws.scad
| IgorPartola wrote:
| This is amazing but the first time I needed to make a screw
| I needed to make one that used the NPT standard which this
| module still does not cover :)
| NortySpock wrote:
| I ended up adding the https://github.com/BelfrySCAD/BOSL2
| library to OpenSCAD and it had some reasonable options for some
| gear and rack-and-pinion modeling that I needed to do.
|
| (3D printing a sacrificial gear for a seat position adjustment
| mechanism)
| ai-christianson wrote:
| I've had really good luck with
| https://github.com/SolidCode/SolidPython
| RobotToaster wrote:
| > The great thing about OpenSCAD is that it makes it easy to 3D
| model things which may be described using spheres, cylinders,
| and cubes which are stretch, and/or rotated, and arranged in 3D
| space.
|
| It also has hulls and minkowski sums, which are powerful once
| you understand them.
| WillAdams wrote:
| Aren't hulls just a direct connection of the edges of two
| shapes (which could be simulated by a series of duplications)
| while Minkowski is "just" a matter of putting spheres along
| the edges of an object to round the straight edges?
|
| So, spheres and cylinders and cubes placed, rotated,
| stretched and placed mathematically.
| JoshTriplett wrote:
| Another interesting option is FreeCAD, which is scriptable in
| Python but its primary interface is a GUI. So you can use a
| script to create things programmatically, edit graphically, or
| both.
| criddell wrote:
| FreeCAD sounds great but in practice it's sooo slow.
|
| If you are coming from SolidWorks, Fusion360, Inventor, or
| OnShape, it won't take long before you start finding that
| there are a lot of things missing from it.
| zihotki wrote:
| I'm coming from Fusion, advanced hobbyist, I can't find
| anything missing. </anecdata>
|
| There is a problem though - sometimes what you want
| requires deep understanding. It's less user friendly,
| polished, and documented. That's also relevant to the
| performance - it's easy to cause performance issues. But I
| remember the same was also applicable to Fusion.
| Animats wrote:
| Of course FreeCAD is less user friendly, polished, and
| documented. It's open source. Open source people do not
| get GUIs. They think command line. It's taken _decades_
| for artists and graphic designers to nag the GIMP and
| Blender people into usable interfaces, and they 're still
| inferior to Photoshop and Maya.
| coryrc wrote:
| Also you can use the new backend by writing C++:
| https://github.com/elalish/manifold
|
| Which avoids using the OpenSCAD language, but also means you
| can't use BOSL2. Might as well use FreeCAD.
| pca006132 wrote:
| It has many language bindings, including python and js.
| Though the js backend is not parallel because it uses wasm,
| and we had problem with mimalloc memory usage with pthread
| enabled.
| jandrese wrote:
| You can also make more complex shapes if you're willing to
| define points, even on a 2D plane that you can then extrude.
| Downside is that it's basically a MENSA test to define all of
| the points in the correct order. I've done it a few times, but
| it's never fun.
| JonathanRaines wrote:
| Also check out CADQuery and or build123d (python equivalents)
| alhirzel wrote:
| +1 for CADQuery - it lets you easily specify surfaces as the
| basis for manipulation, and results in much less fragile
| designs than OpenSCAD.
| Ccecil wrote:
| If you are a programmer OpenSCAD is likely for you. It certainly
| has benefits in things that are repeating patterns (gears and
| such)...and if your mind is good at visualizing things in "code"
| things will likely go a lot faster.
|
| I personally do better with CAD software such as fusion or
| freecad since my mind doesn't work in the code realm since I have
| more of a hardware mindset. Translating the picture in my head to
| code is more difficult than drawing it using the standard CAD set
| of tools.
|
| My opinion on OpenSCAD is that it is a very useful piece of
| software which many have used to make some very interesting
| things. If you have a background in code I recommend giving it a
| go. I largely view it as "the coder's CAD".
| shmeeed wrote:
| I was just about to say the same: OpenSCAD is CAD for
| programmers. It's very different from what's generally
| considered "CAD".
|
| That's not necessarily a bad thing; there's a clientele for it,
| especially here on HN. But as a mechanical engineer who's used
| quite a few industry standard CAD systems, I'm sorry to say I
| wouldn't touch it with a ten foot pole.
|
| Funnily, just a few days ago I tried FreeCAD, and found it to
| be better than I had expected.
| ThrowawayTestr wrote:
| FreeCAD feels like blender before the UI revamp. I can tell
| it's powerful but the UI is opaque to me.
| fcpk wrote:
| openscad is quite nifty for small geometric projects.
| unfortunately it lacks some Features that make most bigger cad
| programs really useful... for example: - the ability to select
| faces/paths from a render, which can be hugely helpful when
| modifying complex models. - the ability to do constrained
| sketching in both 2d and 3d - caching at intermediate render
| levels - nested Projects and joining parts with mechanical
| constraints. it's still pretty nifty but very niche. I personally
| would dream of having the tools of a tool like fusion 360 or
| Catia, but in a gilly textual progemmatic way, while keeping the
| ability to select objects from the rendrr view.
| coryrc wrote:
| It does have caching, but you are otherwise correct. I would
| also add that it can't do arcs; any curve is discretized
| immediately upon creation.
| WillAdams wrote:
| If you want arcs in a DXF (or G-code), I've been working on
| that in:
|
| https://github.com/WillAdams/gcodepreview
| khufiya wrote:
| I've been experimenting with using Claude Code and the Gemini CLI
| to generate OpenSCAD with the renderer in the loop.
|
| https://github.com/rahulgarg123/openscad-mcp
|
| It's still strictly worse than what these models are capable of
| for general-purpose coding, but for simple tasks where precision
| isn't the bottleneck, it's surprisingly decent.The "aha" moment
| for me was an image-to-object workflow: found a geometric design
| on the web --> generated OpenSCAD to match the image --> 3D
| printed it. Going from seeing a JPEG to holding the physical
| object in a few hours.
| timonoko wrote:
| I have solved the only problem OpenSCAD ever had and that is
| total lack of interactivity.
|
| https://youtu.be/eG5lhLYvihQ?si=ehet5COZhiNrcK9b
| timonoko wrote:
| Now they say newest version of OpenSCAD has this functionality
| builtin. It took only a year.
| xixixao wrote:
| This is important and should be a given. But the more
| interesting challenge is to highlight the object you're
| editing (where your cursor is). It's not clear even how to
| exactly visualize it (it could be inside subtract of union of
| subtract etc).
| timonoko wrote:
| It moves or grows or whatever. What other indication you
| want?
|
| I have not yet invented any other improvement.
|
| I tried decimal points, but that was stupid, you just add
| "/100" if you want micrometer accuracy.
| ifndbdb wrote:
| The OpenSCAD kernel is significantly overrated in my opinion.
| Many operations take ages to compute or are not possible at all
|
| Ok if you want to generate a couple of cubes, but if you want
| anything advanced the kernel quickly falls apart
| coryrc wrote:
| It's switched to a new backend
| https://github.com/elalish/manifold
|
| Which you can also use directly instead by writing C++. Trivial
| operations are two orders of magnitude faster and complex ones
| every faster.
| timonoko wrote:
| The openscad-nightly is lightning-fast, but makes occasional
| occlusion errors.
|
| Assuming you make all the necessary adjustements in
| preferences.
| seamossfet wrote:
| How does this compare to something like Zoo?
| cpeth wrote:
| Check out https://zoo.dev/
|
| I went from OpenSCAD -> cadquery/build123d -> Zoo/KCL
|
| It still is early days, and it needs some more helper functions
| but it's really nice having two-way capabilities (not just code
| -> model, but also the reverse).
|
| Of course having Text-to-model as a first class citizen is also
| nice.
| dbuxton wrote:
| I have played with this but been underwhelmed. However I do
| think probably on the right track.
|
| I know the ecosystem not-at-all (sum total knowledge of the CAD
| ecosystem is that my kids got a Bambu printer for Hanukkah) but
| it feels to me that current LLMs should be able to generate
| specs for something like
| https://partcad.readthedocs.io/en/latest/, which can then be
| sliced etc.
|
| Curious to know what others think? I come at this from the
| position of zero interest in developing the fine design skills
| needed to master but wanting to be able to build and tweak
| basic functional designs.
| bob778 wrote:
| I want to like Zoo but the rendering engine is so buggy
| currently that it's not really usable for more than simple
| shapes. The text-to-CAD feature they highlight is slow and
| error-prone, so much so that they explicitly use a "prebuilt"
| version in the tutorial, and each time I tried it, it gave tool
| errors or took so long I just did it manually.
| bilsbie wrote:
| FYI I've had really surprising success using AI to generate
| openscad code.
|
| And even if it's not perfect it saves a lot of time looking up
| the documentation and generally gets the relationships between
| objects right.
| WillAdams wrote:
| There is at least one blind designer who has been using this
| approach to surprisingly good effect:
|
| https://makerworld.com/en/models/2040939-accessible-christma...
| cmrdporcupine wrote:
| I came here to ask how good LLMs are at working with this. I
| wonder if a person could take it a step further with some MCP
| tools that the agent could use to verify and work with the
| design.
| zihotki wrote:
| Mind you, it can't export to step file. That makes it impossible
| to re-use the models in other CADs to make assimblies. Also it's
| tedious to use for 3d printing when you want to include modifier
| objects with your model. Otherwise it's great and good enough for
| part modeling
| fogleman wrote:
| It is kinda neat, but OpenSCAD's limitations are the main thing
| that motivated me to write this Python library to generate 3D
| meshes used signed distance functions:
|
| https://github.com/fogleman/sdf
|
| One big plus to doing it this way is that it's "just" Python and
| you can use arbitrary logic to help construct your model.
|
| You can even load an existing 3D mesh and operate on it as an
| SDF. Great for hollowing, chopping, eroding/dilating, etc.
| existing models.
|
| I should probably do more with this project. I think there's a
| lot of interest in this space.
| JonathanRaines wrote:
| I've used your library and really like it!
| jandrese wrote:
| > You can even load an existing 3D mesh and operate on it as an
| SDF. Great for hollowing, chopping, eroding/dilating, etc.
| existing models.
|
| This has my instant interest. Multiple times I have wanted to
| take an existing .STL file and cut a hole on it or add another
| object to it and have never had success.
|
| I've tried things like Meshlab, but while the interface has
| what appears to be a hundred different functions, attempting to
| use anything returns some error code that requires a PhD to
| understand and none of the "repair" functions seem to help.
|
| I mean seriously: Mesh inputs must induce a piecewise constant
| winding number field.
|
| How the hell am I supposed to accomplish that on a STL file?
| kesor wrote:
| OpenSCAD can load STLs and cut holes in them.
| fogleman wrote:
| That feature requires getting pyopenvdb installed, which can
| be a headache, and I never really updated the README with
| examples, but it does work. There is one example script:
|
| https://github.com/fogleman/sdf/blob/main/examples/mesh.py
|
| You basically just say:
|
| f = Mesh.from_file(path).sdf(voxel_size=0.25, half_width=1)
|
| Then you can operate on `f`.
| dekhn wrote:
| Blender also has a high learning curve but you typically
| don't need a PhD to understand the errors (instead you just
| watch youtube videos and copy what they do).
|
| Removing faces from an STL and adding other objects is quite
| straightforward. Previously, Autodesk had Meshmixer and 123D,
| I guess Meshmixer is still available: https://meshmixer.org/
| and I found it to be great for quick editing of the type
| you're describing.
| btbuildem wrote:
| Tinkercad is a very low-barrier-to-entry option here
| vhanda wrote:
| Could you please elaborate on how this is different than the
| other python based modeling tools - build123d[0] and
| CadQuery[1].
|
| I recently also got annoyed with OpenSCAD and its limitations
| and therefore started experimenting with Build123d. I'm very
| much a beginner in the CAD space and would love to understand
| what inspired you to build sdf.
|
| My basic understanding is that STL files are essentially like
| Bitmap images and store a list of triangles and their
| positions, whereas STEP files are more like Vector art where
| there is a list of instructions on how to build the model. Most
| CAD GUI programs also operate on a similar model to vector art
| where they record a list of operations one on top of another.
| It's why STEP files are a standardized format and can be
| imported / exported from most GUI based CAD builders. I think.
|
| Given that SDF also seems like it builds only STL files (I
| could be wrong), wouldn't learning build123d or CadQuery work
| better if one cares about compatibility with existing GUI based
| CAD modeling software?
|
| Additionally, atleast build123d offers a similar conceptual
| model to using Fusion360 and FreeCad - I have limited
| experience here - but essentially you sketch something in 2D on
| a particular plane, and then apply some operations to convert
| it to 3d in a particular manner - the simplest being extruding.
| This means the mental modeling of how to construct something is
| very similar across both GUI based CAD programs and Build123d,
| and that makes it easier for me to jump between GUI based and
| code based CAD modelling.
|
| I'd love to understand your point of view, and learn more.
|
| [0] - https://github.com/gumyr/build123d
|
| [1] - https://github.com/CadQuery/cadquery
| zimpenfish wrote:
| Bless you for your service, sir! I have used `sdf` to create a
| whole bunch of stuff (buttons for my mother, tealight holders,
| etc.) and `gg` gets used in a bunch of places (including a
| couple of bots).
|
| > I should probably do more with this project.
|
| I, for one, would be glad.
| jacquesm wrote:
| It is amazing. I spend more time in OpenSCAD than in any other
| program I use and I'm amazingly productive with it. 3 to 4 cycles
| / day, the longest time is waiting for the printer to cough up
| the next iteration, then it is building debugging and improving
| again.
|
| The power of parametric cad is such that I wouldn't be a 10th as
| productive using an interactive cad system. And because it is
| effectively software you are writing (even if it compiles into
| physical objects) you can use all of the goodies that you can use
| to manage software. Diff files, git, kompare, branching, merging.
| It is nothing short of amazing, it is like I have a design team
| and a prototype injection molding facility in one. And the
| turnaround time is something you'd have killed for in the 90's.
| echoangle wrote:
| > The power of parametric cad is such that I wouldn't be a 10th
| as productive using an interactive cad system.
|
| This sounds like parametric and interactive CAD are polar
| opposites. Normal CAD software is generally parametric too.
|
| The other points about the advantage of text files still
| applies though.
| jacquesm wrote:
| 'Normal' cad software is parametric in an entirely different
| sense. You don't normally build up from entities just like
| you would in software, which you can then manipulate
| symbolically.
|
| There are cad packages that can do this but unlike OpenSCAD
| the main interaction there is the 3D window, not the text
| editor.
|
| Though AutoCAD of course had this with AutoLISP since 1986.
|
| Interestingly, I'm not sure which has the steeper learning
| curve, OpenSCAD or AutoLISP. OpenSCAD is really great once it
| clicks but most people give up long before then.
| jazzyjackson wrote:
| Iirc autolisp applies to 2D drawings, so it's not a
| competitor for generating meshes
|
| Mathematica however is Lispy enough and has a lot of
| helpful geometry primatives and can export STL
| arjie wrote:
| Oh I had no idea that OpenSCAD was a programmatic toolkit. I
| recently bought a 3D printer and I don't model so much as
| describe to Claude Code how to write a Python script that will
| generate the required STL that I then rescale or whatever in
| Bambu Studio. LLMs are great at code-oriented stuff so I've
| stayed away from traditional modeling tools because I assumed
| you'd have to point and click and so on and I don't really want
| to learn the ins and outs of their interface. I just need the
| right mesh made.
|
| The chatbots kept recommending I try using OpenSCAD but I
| resisted without even giving it a look. The results I had with
| just the Python script are quite adequate for the tasks I had.
| You can just ask the LLM to add a fillet to a vertical pin on a
| plane or to chamfer some edge and it is pretty good at doing it.
|
| https://wiki.roshangeorge.dev/w/Blog/2025-12-01/Grounding_Yo...
| if you want to roughly see the workflow.
|
| I'm going to try using OpenSCAD for things in the future. Does
| anyone else use exclusively an LLM with OpenSCAD (I used Claude
| Code and Codex) and if you do what did you do to make it more
| effective? The Python script wouldn't always generate printable
| meshes so I had to give it a check script to operate on.
| ThrowawayTestr wrote:
| Fusion 360 is free for hobbyists and it's not too hard to learn
| for basic stuff
| arjie wrote:
| Maybe I should suck it up and just give it a crack. Thank you
| for the recommendation.
| dvh wrote:
| I rage-quited every other CAD program. Then I found OpenSCAD. Now
| I'm looking forward to work in it every time I need to do some 3d
| modeling (usually new part model for kicad or some other
| project).
| exasperaited wrote:
| Neat-ish.
|
| I don't really see why that code is better, more logical, more
| readable or more robust than the equivalent quite trivial
| parametrics in more or less any GUI CAD program, and I think the
| geek discourse is really harmed by people who don't understand
| the value of the things that OpenSCAD can't ever offer.
| haberman wrote:
| A long time ago I read that CadQuery has a fundamentally more
| powerful geometry kernel than OpenSCAD, so I dropped any attempt
| to try OpenSCAD.
|
| Years later, I never actually got the hang of CadQuery, and I'm
| wondering if it was a mistake to write off OpenSCAD.
|
| I am pretty new to CAD, so I don't actually know when I would run
| into OpenSCAD's limitations.
| WillAdams wrote:
| The notable limitations for OpenSCAD are:
|
| - functional programming model --- some folks find not having
| traditionally mutable variables limiting
|
| - output is as an STL, or DXF using polylines
|
| - native objects are spheres, cylinders, cubes, with functions
| for hull and Minkowski, so filleting and other traditional CAD
| operations can be difficult
| gunalx wrote:
| Once had a complex model that would fully crash and lockup
| fusion, but once redone in openscad rendered after a little
| while. (badly designed + slow pc at tye time)
| tylervigen wrote:
| I've used OpenSCAD for 3D printing random objects for years. It's
| the perfect tool for designing super simple geometric objects,
| because it giant demands that you remember hardly anything about
| his the interface works. Contrast with Fusion 360 or any other
| more powerful tool, which are fantastic if you use them daily but
| a slog of you only boot them up a few times a year.
|
| Also with OpenSCAD, you can feed the documentation to your
| favorite LLM and ask it for a starter design of whatever you are
| building. (Or you can skip the documentation; it is in the
| trading data after all.) Maybe in the future that SVG Pelican on
| a bike test will be a 3D model in OpenSCAD.
___________________________________________________________________
(page generated 2025-12-20 23:00 UTC)