erjiang 2 hours ago

Be aware that the way OpenSCAD works (CSG) makes a lot of things difficult compared to "normal" CAD programs. A lot of common operations, such as arbitrary fillets on various edges, are simply hard to express or do.

The more powerful option is something built on the open-source Open Cascade geometry kernel: FreeCAD, cadquery, or build123d. This also gives you interop with the broader CAD ecosystem by enabling you to import and export STEP files. (Your favorite LLM can advise you on or drive these options as well.)

  • Palomides 2 hours ago

    to be a bit tautological, openscad is nice but only for the things openscad is nice for. I prefer freecad for almost everything except highly parametric shapes. Plus you can do openscad inside of freecad.

    • WillAdams 2 hours ago

      The great thing about OpenSCAD is that it makes modeling using cubes, spheres, cylinders, and placing or stretching them mathematically easy.

      The awful thing about OpenSCAD is that one's capabilities in it are bounded by one's fluency in using math to place or stretch cubes, spheres, and cylinders.

      • RobotToaster 1 hour ago

        On the bright side it refreshed my knowledge of trigonometry...

      • jacquesm 1 hour ago

        I suck at math but I can do pretty neat stuff with OpenSCAD that would take me 10x longer with 'the usual suspects' in CADland. It took me a while to get the hang of it though, I think the bigger issue with using OpenSCAD is a shift of perspective. From the outside it looks like solid modeling with primitives, but once you 'get it' the method changes completely, it is probably easier to explain with an example:

        If you want to make a complex gear that has to mate with another gear you can do this in two ways: you can start with two discs intersecting at the right angle and then to chop out the teeth so the resulting object will be a gear and then you could subtract via a similar operation from the other disc to end up with two mating gears.

        The - in my view much more effecient - alternative is to start off with just the supports as the discs and then to parametrically add the gear teeth onto the supports taking into account all of the clearances and the contact faces. This will get you much better gears because you are parametrically describing the surfaces that really matter and it will allow you to do nice things such as small fillets on everything to make the object far closer to what eventually will roll out of your manufacturing process (machining, 3D printing). It is a bit more work to define all of the parameters but the end result is much better and far less likely to have imperfections because you are generating what you want, not removing what you don't want. OpenSCAD can be used for sculpting, but that's not the best way of using it.

    • iririririr 2 hours ago

      i did ton of projects in open scad in the past (8+yrs ago), even having access to freecad and solidworks. I was even sending patches to some 2d features on freecad.

      but what made me use scad was reliability. i knew the time i put writting in vim would translate (heh) into a viable stl file i could send to manufacturing. while with both other options half the time was dealing with bugs and crashes and bad exports.

      but how did i miss some convenience tools indeed. most could be solved with opensource methods (e.g. bevel, joiners with easing, threads)

  • the__alchemist 2 hours ago

    Concur. It's worth explaining this, as someone new to CAD would get the impression the various tools in CAD are on even ground, and may assume "I know programming, so OpenSCAD sounds like the right choice". I would love some day for programmatic and/or free/cheap CAD to be competitive, but we're not there. Solidworks, Fusion, Inventor etc still outclass FreeCAD, which outclasses OpenSCAD.

    • MegaDeKay 1 hour ago

      I agree with your ordering of the various programs out there but FreeCAD 26.3 is now available as a release candidate with a wonderful collection of improvements. I'd think for many people, FreeCAD is now "good enough" for a lot of things. I'm building a virtual pinball cabinet and the whole thing is modeled in FreeCAD.

      Mango Jelly's overview of some of the biggest new features: https://www.youtube.com/watch?v=WdTyFHY-5r4

      • the__alchemist 1 hour ago

        Ty! I will give it a shot. I last did 2 years ago.

      • happyPersonR 1 hour ago

        The mcp integration may be seen as both a blessing and a curse but tbh, it’s very interesting :) and hopefully as folks post and comment on more models that are generated with it, we can get a better training set.

        I actually still use the freecad gui because it’s cheaper but I can totally see how someone new might just wanna use the MCP.

  • jacquesm 1 hour ago

    That's because you are thinking in the way you would with conventional cad systems, you are doing your operations sequentially a bit like a sculptor would: take a blank and then remove bits piece by piece. The trick to working effectively with OpenSCAD is to generate what you want, not to iteratively chip away at something.

    • jeffbarr 1 hour ago

      I have found that a combination of the two approaches works best for me. In some cases it is easiest and most practical to combine (union) shapes to get to what you want, and in others it easiest to subtract (difference or intersect).

      • jacquesm 1 hour ago

        But then you won't be able to bevel complex shapes at all, which means that you won't be able to describe the object that you will end up with. "Good" CAD means that the representation in the computer is as close to the object you want to produce as you can make it. This makes it possible for downstream systems to accurately select nozzles and toolheads to get you what you want. If you produce an impossible object then your slicer or path computer will give you an approximation. That can be fine in some cases but usually your objects need to mate and if you mate two approximations you'll find quickly that that does not really work.

  • YuechenLi 1 hour ago

    To be fair, arbitrary fillets/blends on edges is a hard problem in general for Parasolid/ACIS because you are trying to mutate arbitrary topology, essentially guessing vertices/edges/faces and trying to stitch the back together.

    • WJW 15 minutes ago

      This is true, but in things like OnShape I can do it with two clicks whereas in OpenSCAD it's always at least 20 minutes of thinking and trying out.

      OpenSCAD is super cool and my go-to for simple things, but for anything more involved than a cube or cylinder with some cutouts I tend to revert to "normal" CAD programs.

stateoff 22 minutes ago

I tried OpenSCAD but it ends up being too abstract and hard to maintain for me and like others it does not solve fillets/procedural selection well.

So here is my shameless plug "sograph": https://imgur.com/a/u1n2Grg

I should consider a Show HN instead, but it is too early to release yet.

jacquesm 2 hours ago

The one you want is the experimental build, it is way faster to the point that 'preview mode' should be disabled. I use OpenSCAD a lot, it ties right into my workflow and plays nice with versioning and re-using modules from one project to another. Over time I've built up a nice library of parts that I can quickly customize for whatever it is that I'm building. Latest project: pick-and-place machine modification for Prusa MK3 3D printers (an interesting challenge, to put it mildly), now working on some robotics stuff.

The most important thing about OpenSCAD for programmers to remember is that it looks as if you are programming but really you are describing geometry and objects so things like variables and such do not quite work in the way you would expect from a programmers point of view.

  • RobotToaster 1 hour ago

    > The most important thing about OpenSCAD for programmers to remember is that it looks as if you are programming but really you are describing geometry and objects so things like variables and such do not quite work in the way you would expect from a programmers point of view.

    To put it another way, it's a purely functional language in a very strict way that takes some getting used to.

  • Ccecil 52 minutes ago

    Look into OpenPNP. Most of the PnP work is already done (vision, motion, feeders, etc). Just a matter of making the Prusa frame react to the commands.

    • jacquesm 10 minutes ago

      That's what I'm running.

YuechenLi 1 hour ago

Oh, since this came up, for people who like code CAD and want to try something more powerful than OpenSCAD:

https://github.com/yuechen-li-dev/Aetheris/

Not an OpenCascade wrapper, it's based off my own experimental BREP geometry kernel. So, fillets/chamfers work, booleans works fairly robustly, surfacing, sheet metal, etc all works decently, it exports STEP AP242 by default.

Haven't had time to get the AIs to write a more up to date documentation and polish the language server. Not the easiest thing to use right now, so, using it through Codex/Claude Code or CLI is probably the easiest way to get started.

Still working on the webUI currently, in case someone want to DIY the UI. Note that the WASM compilation path is still unoptimized and way slower than the RyuJIT C# compilation though.

https://github.com/yuechen-li-dev/helioscad

  • SOLAR_FIELDS 1 hour ago

    Not even two years ago writing your own BREP kernel was considered to be out of reach for even the most determined dedicated hardcore engineering teams that weren't extremely well funded. Now, it seems tractable and may finally get us out of the dependence on proprietary kernels that has plagued this industry for decades.

    • YuechenLi 1 hour ago

      Yeah, I know. I started this project earlier this year because of my own frustration with the software ecosystem and that the major CAD vendors is charging thousands of dollar to add STEP 242 support and because of proprietary lock-in and locking everything behind cloud, and was trying to see if I can accomplish this with AI.

      I'm not going to pretend this is easy: I actually quit multiple times for this project because I ran into the same walls that everyone else ran to: arbitrary 3D boolean operations is HARD,(Surprisingly, I actually didn't have that much trouble with fillets/chamfers because I kept them pretty bounded) and the approach I've finally taken to solve it is pretty insane. Essentially, the final architecture is more like "LLVM for 3D objects" compiler stack than it is traditional BREP kernel. Would love to talk about the technical deep dives if people want to hear it.

      Also, feel free to write UI wrappers around it, because I'm pretty bad at UI design myself.

      • rao-v 1 hour ago

        Given modern capabilities how hard would it be to make a really high quality stl to STEP converter that works well on CAD models that have been converted to STL?

        It doesn’t need to be perfect on edge cases just translate back “reasonable” models.

        Should be something that is fairly easy to eval etc.

        • YuechenLi 50 minutes ago

          Near impossible to do it robustly without AI, since a mesh is a blob of triangles and vertices, it doesn't really know if something is a "face" or an "edge", and mesh STL -> BREP STEP is akin to decompilation from binary than it is a simple translation. So, the most robust approach is to get a human/LLM to reconstruct the STEP file from the STL/OBJ/glTF file with a BREP kernel.

          I wish there was an easier way, but I've spent weeks during the course of the project working on and failing to solve a similar problem (SDF to BREP) and concluded finally that there just isn't an easier way to do this fully automated without AI.

          You can ask your LLM to try it with one of the OCCT wrappers or with my thing, I think Aetheris is slightly better because we added more STEP diagnostic tools like ray query depth detection and SVG sectional view during the course of development.

jeffbarr 1 hour ago

I have been using OpenSCAD to create cool geometric designs for 3D printing on fabric, with great results. The functional model is likely unfamiliar to most developers, but I have found that I can be efficient and productive with it.

Check out my repos of OpenSCAD objects at https://github.com/jeffbarr/OpenSCADObjects and Truchet Tilings at https://github.com/jeffbarr/TruchetTilings .

My code kind of looks like the C that I wrote in the 1980s, with lots of braces and careful indenting -- not sure if that is a bug or a feature.

As another commenter noted, use the latest nightly build for best results.

maouida 46 minutes ago

Shamelss plug:

I have built FluidCAD[1] to overcome the issues of CAD by code, less mental effort to design by providing visual guidance. Slowly it became more of a hybrid CAD experience (mouse or code driven), almost all features now can be done by mouse and the code is generated for you. It'll pick the right selection filters for you.

https://github.com/Fluid-CAD/FluidCAD

https://fluidcad.io/

tylermarques 1 hour ago

I've been using Opus 5.5 to write openscad models for me for the past week, with great success. I wanted to expand the project Open Source Watch Winder [0] to have 8 watches, with gears instead of pulleys, and in little back and forth I have a version I've started printing. [1]

[0] https://github.com/mwood77/osww [1] https://imgur.com/a/bWent0K

WillAdams 1 hour ago

One of my favourite tools.

As noted, use the Nightly builds from: https://openscad.org/downloads.html#snapshots

When working with kids, it's well worth keeping: https://www.blockscad3d.com/editor/ in mind, or for folks who like to draw connections: https://github.com/derkork/openscad-graph-editor

Eventually, someone will note that its programming model limits variables and so forth --- for folks who want a more traditional language choice there are a number of options, notably for Python:

https://pythonscad.org/

TGower 2 hours ago

It would be interesting to see a head to head comparison of frontier LLMs building models with OpenSCAD, Blender scripting, and Fusion MCP. My intuition would be that blender winds up the best for the immediate result due to training data prevalence and RL tuning, but the concise nature of OpenSCAD could help.

I'll have to add this to my backlog of experiments to try when I have unused tokens near a reset...

  • kevin_thibedeau 2 hours ago

    Blender gives you a mesh that isn't parameterized. Not particularly useful for making dimensional changes outside of eyeballing everything. An LLM isn't going to reliably hit your dimension targets so tweaks will be necessary.

    • TGower 2 hours ago

      Yeah, that's what I meant by "immediate result", if you need to edit the generated model by hand it will be hard to beat having the model and timeline available in Fusion after using Fusion MCP.

      If you just need to tweak the dimensions in the script, or are satisfied with describing the changes to the LLM and having it modify the script, there isn't much difference in practice between a generated OpenSCAD script and a Blender python script.

  • exitb 1 hour ago

    I created an (unpublished) MCP for a CAD that didn’t have one before and LLMs are just fine at it. It looks like they can apply their higher level training across interfaces.

dvh 2 hours ago

I use openscad for all my kicad 3d models via scad->off->obj->(manually edit in mm3d to add colors)->wrl->kicad

It's not as bad as it looks, it's all automatic except adding colors which takes about 2 minutes.

bee_rider 1 hour ago

How does OpenSCAD type stuff play with simulation, in general. (If at all?)

I’m thinking of something like finite element analysis… but, I guess since the shapes in OpenSCAD are defined through this constructive geometry system, can things be better/more mathematically defined general purpose “discretize the PDEs over my mesh” type solutions?

  • dranudin 27 minutes ago

    Normal finite elemts does not care. The mesh ist just put on your 3d body that can be an stl or a step or whatever. The FEM only knows the nodes and nothing else. The mesh geometry is completely separate from the CAD file.

    Now there is a method called Isogeometric Analysis (IGA) that was meant to improve this. It uses NURBS functions (just like CAD) for the shape functions of traditional FEM. The idea was that now, if you have NURBS describing the CAD geometry you can skip meshing and just directly calculate on the real geometry. But it did not catch on. The reason being basically, as far as I remember, was that most CAD geometries of interest are not pure NURBS. But they are operations of NURBS (think cube minus some other cube - trimmed surfaces). And IGA has problems with that.

    This is a problem that openSCAD will probably also not be able to overcome. Maybe at times it might be easier to create NURBS geometries without trimmed surfaces. But most probably that cannot be done in most cases of real world significance.

looofooo0 2 hours ago

Yes, also have a look at build123d which has a vscode plugin.

  • kelchm 2 hours ago

    I second this -- I much prefer build123d to OpenSCAD.

RobotToaster 2 hours ago

Note that the current release version is very old, I strongly recommend downloading the nightly version and turning on the manifold geometry solver in settings as it's much faster.

matthova 2 hours ago

I love OpenSCAD. Have been a power user for years. It's so great asking LLMs to make 3d models in openscad.

I made a rust-implementation of openscad called openrscad (https://openrscad.com). It still has some rough edges, but runs quite fast both on desktop and in the browser

  • cm2187 4 minutes ago

    Seconded. OpenSCAD is a bit tedious to use from scratch but claude is pretty decent at generating the code. It can't render the script though so it tends to make silly mistakes

joewalnes 2 hours ago

Wrote a tutorial:

https://github.com/joewalnes/toybrick

LLMs are excellent at building OpenSCAD models. The tutorial (written in the before-times) will help understanding of the key concepts of OpenSCAD: primitives, transformations, and constructive solid geometry.

aeonik 1 hour ago

BOSL2 library combined with LLMs really make me fly with my creations.

kennywinker 2 hours ago

If you want openscad without the abomination that is the openscad language - check out jscad

TacticalCoder 2 hours ago

OpenSCAD is amazing for those who know nothing about 3D but know about programming.

I bought a 3D printer (which is basically simpler and more reliable than a 2D inkjet printer by now: it's send the file, put the filament, and 3D print and it just works) recently and already fixed shitload of stuff around the house with 3D printed parts.

I even did "print in place" pieces where you add a pause a a certain layer, insert "stuff" (like say a 3D metal angle) into your print, then finish your print. Effectively creating parts that are both plastic and metal.

Now the language itself in OpenSCAD is kinda really bad: you can define variables inside of other functions and then use them everywhere. You can redefine already defined variables and you'll get zero warning. The language itself is really pretty WTF.

But you get modelling for free as a programmer. And LLMs are okay'ish at it for simple stuff.

I'd recommend people to use the BOSL2 library for OpenSCAD:

https://github.com/BelfrySCAD/BOSL2/wiki

It's really not hard.

If you love programming and like to DIY stuff around the house, buying a 3D printer and learning some OpenSCAD is a no-brainer.

OpenSCAD ain't the only option: many people like Fusion (for example). But as I'm a dev, OpenSCAD just feels natural to me.

  • kens 2 hours ago

    As a programmer, I second this. Systems like Blender are inscrutable to me, but in OpenSCAD I just write some loops. I get what I want and it's easy to tweak.

pdntspa 2 hours ago

The nightly builds for this are so much better. When are they going to merge the nightlies into a new mainline release? The last one showing 2021 isn't the best look...

asmodeuslucifer 1 hour ago

I barely know openscad (used Fusion 360 before autodesk enshitified it) but gemini is very good at creating code I can paste into openscad.