4 ms·
Benchmark: CadQuery vs. OpenSCAD for agentic CAD work
- ariwilson 22d agonot interesting as the writeup as very AI sloppish :(. i'm sad about that as I would really like to have an intuitive sense for how good the current frontier models are at coming up with interesting 3d printable parts.
- rjsw 22d agoThere was a blog post from a couple of days ago that had been initially flagged, it seemed to me to have a good overview of AI for CAD, will try to find the link.
- ____tom____ 22d agoI've been just getting started on this with Astra. Astra is one-shotting good 3D models from photographs for me. I was unable to get Sol to do this, even after multiple rounds. It's not a small change, it's from "not useful" to "pretty good"
- dofm 22d ago> Astra is one-shotting good 3D models from photographs for me. Right, but, so what? There is very little utility here. Parts that need to be useful need to be designed to spec.
- Mashimo 22d agoOnce you have the model, it's relativ easy to change the demensions / constrains later on, no?
- dofm 22d agoNot if the model has not been implemented from reasonable principles.
- Mashimo 22d agoWhat does that mean in practice?
- dofm 22d agoWhat it means is that a good CAD model is not just sticking stuff together in 3D space. Parametric flow means that a small number of measurements ripple through the design, and sketches and solids adapt. To do this right, it's easier to just understand the purpose and intent of the model, how it was manufactured, and draw from there. One of the things you get from studying CAD diagrams — like the Solidworks exercises everyone works through — is that real world parts often have surprisingly few dimensioned constraints. A lot more emerges from geometry. So you can look at a diagram and initially think "where the heck does it define this radius!?" and find that it never needs to, because that radius emerges from tangency, parallelism, perpendicularity etc., combined with fewer measurement constraints. Specifying it as a measurement would therefore be overconstraint; it might lead to solids that are difficult/impossible to manufacture or erroneous when another measurement is changed. The diagram will specify the actual driving measurements that come from the part's purpose, with the intent to adapt to different real-world requirements. Any CAD tool that works from images is going to have to approximate, which will create over-complex models with to many measurements that are more fragile with respect to changes, whereas a design that has geometrical constraints in place that are logical will be simpler and more adaptable. With functional parts, roughly, form follows function first, and manufacturability second. But you have to understand why, to be able to make a good part. Even (perhaps especially) with 3D printing. But not uniquely. For example, would this tool be able to understand why the draft angles on a plastic part were important, what determines the bend radius of a part that was made from pressed metal, etc.? I must stress that I am an amateur. But my amateur skills have come from reading and learning about CAD and learning what makes a viable design. (Sorry… this was a stupidly long answer but I am hungry and I figured I should try to blurt it out before I have to get up from my desk and cook. I've edited it a lot and cut out a bit that I will probably put in another comment later)
- roel_v 21d ago
- ____tom____ 22d agoMaybe not for you, but I'm building miniatures for custom board games. Works great.
- dofm 22d agoRight but there is no meaningful specification failure mode in creative CAD, is there? I mean, yes, image to CAD for a little miniature, I can buy that it is OK. Fun, even, especially when your use is sort of transitory. But this article is talking about functional parts. A functional part exists because of its spec, usually fails because of some combination of its material, manufacture, and spec. And the spec is chosen with that in mind. Even working from a text description of a part is error prone because language is imprecise and interpretable. I just don't understand why AI people want to race past actual proper sensible solutions to a problem just to automate generating from text.
- elwebmaster 22d agoPeople don't have time (or even mental capability / even more time) to learn CAD but they have a task at hand which they want done. If AI can generate a part which is "good enough" for the user at a cost that the user considers reasonable (I.e. zero) then AI gets used. If a part fails thats rarely a concern because these parts are just 3d printed and likely cost single digit cents in filament. User can always print a new one.
- dofm 22d agoRight, but the thing that I think sort of militates against this scenario is this: If a non-CAD person imagines a part that they need, the chances are very high indeed that either it isn't what they need, can't be made robustly or sensibly, or if it is, it already exists in some meaningful way that can be adapted, because one of tens of millions of other people already wanted it. This scenario — needing something very specific that can be described only in words and nobody else has ever needed before — is almost imaginary. Most stuff just isn't like that. Now… if someone were to design an AI CAD package that could remix objects that exist and combine them, perhaps with a GUI tool that allowed a user to identify attachment points, maybe that would be interesting. But a lot of that has been solved in non-AI GUIs already. Text-to-CAD just isn't as good an idea as it seems. You are not going to be able to magic up some novel invention from a text description without a significant amount of domain knowledge of the words needed to describe a part, and that domain knowledge usually comes from learning CAD! (Bit like getting a coding agent to write really good code) And simple parts, sorry, just don't need much CAD skill. Get a CAD package on a free plan, learn enough to make your thing. You will get so much more out of that and it will be easier to make changes. It'll probably have standard tools for adding threads, even. Even image-to-CAD for a functional part requires a significant amount of understanding of what to photograph and from which angles, etc.
- elwebmaster 22d agoWith any tool?
- dofm 22d ago[dead]
- TacticalCoder 22d ago> not interesting as the writeup as very AI sloppish I'm the target for such material for I do use OpenSCAD to model parts I then 3D-print to fix stuff around the house and enhance the cars etc. And yet the writing is totally insufferable AI slop: "All six parts came out printable. Capability turned out to be the boring part of the answer. Where the two diverge is in how they fail." Anyone who writes like this or who enjoys such kind of sentences: from the bottom of my heart, just go fuck yourself.
- dofm 22d agoNone of the "findings" here really needed an AI experiment to do it: - "CadQuery fails loudly and early... OpenSCAD fails silently and late" This should be obvious, from the documentation, from the way geometry construction works. OpenSCAD has no sense of failure where one shape means another won't work; you're just drawing the equivalent of 3D pixels in space. It will always potentially-meaninglessly succeed if the syntax is OK. - Renders caught nothing that mattered Objects with hollows are not going to show their major problems this way. - CadQuery can be interrogated, OpenSCAD cannot Isn't this explicit from the documentation of both? One works by iteratively building on top of a previous result that can be stored in a variable; the other doesn't. - OpenSCAD renders have no concept of a part edge Again — this should be explicit from the documentation, which describes no methods for operating on edges (and largely from the fact that it is declarative). - Speed favours OpenSCAD, and it barely matters Yes, being faster is no good if things are wrong. - "What decides it is verifiability rather than expressiveness, and CadQuery leads there by a wider margin than the syntax difference suggests." Yes, because the difference is semantic. Which you can get from the documentation. Building iteratively on the basis of existing geometry is inherently more verifiable, because stuff that can't work won't work. Honestly do people not try learning CAD before they try to build an AI tool to generate CAD models? This feels like yet another situation where people who have not done the foundational conceptual work seem to think that they can avoid it and just work around it with AI.
- ricardobeat 22d agoYour mistake is assuming “people” wrote this.
- dofm 22d agoI mean, people didn't write the text, but people did decide it was what they wanted it to say? I don't really get it. But then I think text-to-CAD is probably the strongest example of cart-before-horse thinking in the AI world as regards technical work compared to creative work.
- fwip 22d ago
- brcmthrowaway 22d agoThe OP seems to be shilling this tool nonstop. Modelrift just seems to be an LLM wrapper.. the original models can handle OpenSCAD just fine.
- tamimio 22d agoShould try different models and harnesses, CC and opus5 aren’t the best combo. Also, I expect soon to have models that verify the mesh and even render it not just generating the code. So we got this for mechanical engineering, cupperhead and similar for electronics, usual agents for software, what is next?
- roel_v 21d agoModels already do this, I tell them to use Blender and OpenSCAD to render previews, use tools in those packages to verify/modify meshes and otherwise it'll write its own custom software. Codex has written me thousands of lines of Blender Python over the last week to do all sorts of amazingly complicated and custom mesh inspection and cleanup that I have no idea how I would even begin doing that by hand. And render previews, which I then annotate with Paint. Like I tell it 'I marked a missed corner chamfer in red here, and the blue is where the other part should mate' and then I paste a screenshot of that Paint image and it goes off and fixes it.
- fallat 22d agosuch a garbage post for various reasons, but the ending is the kicker after making SEVERAL observations that cadquery is pretty much better overall, they say "ehhh we're going to stay with openscad".
- dofm 22d agoExactly. But then text-to-CAD projects almost all have this over-reliance on the declarative nature of OpenSCAD. Cynically it always feels to me like they are written by people who not only think end users shouldn't have to learn CAD principles, they themselves shouldn't have to either.
- jetter 22d agodo you know the WASM bundle size of Python and CadQuery? OpenSCAD has a lot of cons in terms of concept and CAD approach, but there are things where it is good - it is embeddable and sandboxable and fast. It gets the job done in simple models and that is the reason why it is popular. It reminds me a bit how everyone was bashing PHP because 'it is not a programming language' while wordpress ruled the world.
- dofm 21d agoNo, the comparison is not apt with PHP (which I use on the daily and have done for twenty years). It's a bit more like comparing CSS with a subset of JavaScript that can do the same tasks. OpenSCAD isn't, really, a proper CAD package. It's a CSG drawing library with a declarative syntax. It is like nested CSS for 3D things. Code complexity and repetition balloons with part complexity. Your thing will not scale well because OpenSCAD does not scale well. Small changes will lead to subtle flaws; changes will need to be respecified in minute detail because OpenSCAD doesn't support sketch constraints that would generate correct geometry, doesn't support edges and faces that can help make parametric designs flow. OpenSCAD is fun for making small, trivial objects, it is a good way to learn the most basic CSG operations, and it really excels at 3D representations of mathematical formulae. But it's entirely the wrong foundation for the more general CAD-replacement thing you are trying to do. CadQuery is not at all as bad a foundation (I think it's quite neat, and I think it could work). But IMO much of this article talks about "findings" that should have been obvious to you if you know enough about CAD to know what it is you are replacing. If you are continuing in this non-bRep, fast calculation approach, have you looked at generating SDF instead?
- ricardobeat 22d agoThanks, Claude!
- darkteflon 22d agoI’ve been playing in this space as a moderately experienced hobbyist - mainly for 3D printing functional parts. I’m using a single repo for all my models and Claude with build123d (plus a VS Code viz extension). Over time, I’ve built up a little folder of useful skills and I’m generally getting satisfactory results. That said, I have had my eye on CadQuery and am looking for an excuse to try it. For those in the know: how does it compare to build123d?
- dofm 22d agoThe fundamental difference is that CadQuery uses that jQuery-inspired fluent syntax, with a sort of metalanguage for some aspects, and Build123D is more pythonic with two different more procedural syntaxes. The other big difference (which I have only read about) is in the way their assembly constraints work; again Build123D takes the more procedural approach (declaring "joints" etc.) CadQuery came first; Build123D is sort of a more pythonic, robust restatement of it.
- johndoe18637 22d agoI've also been playing around in this area and starting getting somewhat useable around Opus 4.8. It has been able to generate some quite impressive designs, but for me it has been quite hard to get the model to understand what exactly I want modeled. Are you willing to share your work? Mine is available at https://jnslmk.github.io/build123d-models/?model=drill_storage https://jnslmk.github.io/build123d-models/?model=drill_stora... One of the things I've found more useful is the generation of a static site to view and download the models. With WASM you can make minor adjustments directly in browser
- jetter 22d ago"Downloading WASM: 40mb of Python and build123d" - this hurts :( This is exactly the good thing about OpenSCAD: its WASM build size is minuscule compared to Python build, and you can edit/customize a model right in the browser. https://modelrift.com/models/desktop-organizer-with-drawer https://modelrift.com/models/desktop-organizer-with-drawer
- dofm 21d ago
- hingler36 22d agoComparing OpenSCAD to CadQuery is super apples-to-oranges in the first place. CQ works directly with NURBS curves via the Cascade engine, and OS functions by performing CSG operations. Both certainly have their place, but for engineering applications NURBS are decidedly more powerful.
- jetter 22d agoSure! but, for 3d printing hobbyist who wants to create and print a cube, both are able to provide a printable cube.
- Jemm 22d agoI've been making Rapidcam.app. The file schema is open source and json format designed for AI to be able to write directly. The format is also designed for version control. The focus is 2.5D parametric mostly for 3 or 4 axis CNC.
- dofm 22d agoInteresting. I think if AI is useful at all it will be useful in a partly-GUI context, so I am encouraged. At a glance, not sure how you're approaching constraints, and what luck you've had with getting language models to be able to juggle them?
- syntaxing 22d agoHas anyone have good success using AI generated CAD parts? I’ve been trying but it’s always 95% there, but with all hardware, you need 100% right. It’s often quicker and cheaper for me to do it by hand (but I was a mechanical design engineer for about a decade prior)
- fwip 22d agoJust this morning I used OpenSCAD for the first time. I got Gemini (just the chatbot, no harness or MCP) to help me design a water-bowl holder for our senior dog (she kept knocking it over). It was probably an easy model to get right, since the only "critical" dimension was the radius of the interior. But I was able to tweak the numbers on the support length & some other details relatively easily, and I had a working solution 2 hours of print time later. (I had a CAD class in highschool, but haven't used it since). I suspect this may be another case of "LLMs are mainly good at things you're bad at."
- sixtyj 22d agoA screw can't be 99.9 percent correct—it has to be 100 percent correct. Microns matter. Claude Code: Oops, I am sorry but I was wrong. As you say it is quicker to do it by hand. Now. I certainly wouldn’t entrust this job to a general-purpose (universal) tool that gets it 99.9 percent right. But a domain-specific harness? Maybe it could work. Hardware and engineering dont tolerate hallucinations, trust-me-bro numbers, deviations.
- jetter 22d agoassemblies and tolerances are where AI generation quickly gets hard. but, for simpler things, it can be surprisingly good, especially for people who has no CAD knowledge. it certainly might feel a bit like brute-forcing through the LLM - but this also applies to vibe-coding..
- YuechenLi 22d agoOh, on this topic, I've actually built a geometric CAD kernel with GPT that I think is pretty promising and in my biased opinion, a bit more advanced than OpenSCAD or CadQuery's OCCT backend, anybody here want to clone the repo to give it a try with their Claude/GPT to see they do better on my thing? https://github.com/yuechen-li-dev/Aetheris/ https://github.com/yuechen-li-dev/Aetheris/ It's still kinda buggy but they are actively getting fixed, but Claude and GPTs seemed to work better with my current design than other CAD stacks. Still haven't added threads yet, so can't speak for T3, but generally speaking the generated parts are pretty good quality, and I also got fillets/chamfers working so that's a plus.
- coderenegade 22d agoI've been working on something similar as well, but not yet ready to be shared. It's a geometry kernel and then an authoring layer on top. The idea is that the constraints are tests that get run after the geometry is defined, so it's more programmatic. Sol was able to generate STEP files for credible turbo machinery with it, and I have Astra building out the assembly for an inline three engine idea I had. The drawings are looking credible, but that's about all I can really say. I'm just blown away at how far the models have come in the last 12 months.
- YuechenLi 21d agoHey, are you interested in collaboration? I did implement something similar to your approach of "constraints are static_asserts" inside the code CAD language and it works fairly well to assert volume/tolerance stack-up inline, but that is only half the answer, and the other half is "constraints are compile time types/requirements that are erased at runtime", as in TypeScript, which proved to be more significant. STEP roundtrip was proven months ago, so yesterday I had Codex Astra build a V8 engine assembly simulation in 3.JS last night to prove viability. https://aetheris-editable-v8.yuechenli.workers.dev/ https://aetheris-editable-v8.yuechenli.workers.dev/ Let me know, since I think we may be able get something cooking together.
- coderenegade 21d ago
- rao-v 22d agoI tried modifying the provided CadQuery skill to work with build123d with an agent (surprisingly gemini pretty good at this) and it produced very good results (possibly better than the reported CadQuery/OpenSCAD results after taking a little care to avoid leaking the benchmark pass/fail criteria). Worth a try if you are interested in this space. I like build123d simply because it can export proper STEP (like CadQuery) but has a nicely python friendly design.
- rounce 22d ago> Both toolchains shipped. The difference is in how they fail. Yuck, this style of LLM output is awful, it’s horrible to read and does a lot to say absolutely nothing.
- deleted 22d ago[deleted]
- awestroke 22d agoReplicad is another frontend to the same cad kernel. But can run in browser or via bun or whichever js runtime you want. I've found llms to be better at writing typescript than python code for things like this. Using Replicad, I've successfully iterated on a 3d printed enclosure for my electronics project. It's fantastic to get everything parameter based and version controlled from revision 1.
- rcarmo 21d agoThis was painful to read, even though the subject matter is very interesting to me. Please, ModelRift, get a human author.
- maouida 21d agoI'm going to test this with FluidCAD later. Will post the result here.