With the ability to change one number and regenerate everything
That's exactly how I use Solidworks (and similar parametric CAD software) all the time. It takes some discipline, but the key is for all your geometry and relations to be driven from sketches and equations. Then you just change a value (sketch dimension or global constant), hit rebuild, and everything regenerates fairly reliably.
Don't get me wrong, this is a great project and I love seeing efforts like this, OpenSCAD, etc. add more options in the landscape of parametric CAD.
But I do find the graphical interface very natural for doing creative design work. In fact, sometimes I wish I could literally step into my design in VR and grab and move vertices around in 3 dimensions (eg. when fine tuning non-planar splines).
"I do find the graphical interface very natural for doing creative design work"
As do I!
I don't think there is any correct single answer. People, their workflows, and requirements are different.
It seems we are living in CAD renaissance which is great! So many new promising new companies and free tools popping up.
Personally I would prioritize data stability and visual accessibility. These give user a creative workspace that is intuitive and forgiving. That's why I started doing my own modeler as a side project:
The data model is fully immutable and would enable doing _proper_ model branching when I get there. For now all the user gets is a super robust undo and not needing to save (the model is streamed to disk persistently).
But eventually I would like it to be a visual, robust workbench where you can iterate fast, save versions when feel like it, etc.
(I worked for a decade on various CAD offerings at Trimble including SketchUp so know fairly well what I'm doing but it's still super early)
I'm with you. What I've learned from all those "programmatic CAD" threads is that some people just really prefer code over anything else. They also build only simple parts, so it's not an issue for them.
As the author says:
"I wanted to write my parts the way I write firmware. In Rust. With types. With version control."
Even as some who would generally prefer graphical CAD software in most cases, sometimes for simple parts like the examples in the linked article code really is just easier.
Sometimes it’s the same when I’m working on texturing for 3D models and I want to combine some texture maps in a specific way, I really don’t want to open Photoshop or similar for something that could be expressed in just a few lines of code. ImageMagick can probably do it, whatever it is, but then I need to learn the incantation.
I am trying to do something similar but inside a GUI - https://lilicad.com/
This is still very basic. Also 100% vibe coded and therefore not as robust as I would like it to be.
You can do parametric for games too. Building an entire scene using code/data can be very productive when you are trying to tune complex concerns like travel time between arbitrary points on the map (balance). Parametric also makes things like [LLM] automation way more feasible because it's using editor APIs rather than exercising piecemeal scene tools. 1000 lines of c# can do a hell of a lot more damage than a bucket of calls like GetObject, SetComponentProperty, etc. This also allows for much deeper integration and iteration over non-geometric concerns like lighting systems, materials and physics.
> But I do find the graphical interface very natural for doing creative design work. In fact, sometimes I wish I could literally step into my design in VR and grab and move vertices around in 3 dimensions
Agree, it's really hard to do work where you leverage "feels right" together with code, because even if the iteration loop is really tight ("change a bit of code > look at the results"), it's still loose compared to just clicking and dragging, feels like the mental load is a lot less.
Environment art really changed and became a lot easier with VR, I think maybe it's mostly a perspective thing, adjusting with controllers and dragging a moving is great, but the perspective it gives you really has no comparison and makes it all a lot simpler to get right. I can't wait for the tooling to mature more.
To add to this, constructive solid geometry systems like OpenSCAD seem to be practically incapable of doing anything related to surfacing, even if it's just G2 fillets or G2 continuity (much less more advanced work with splines and patches).
I think it's partially a positive feedback loop: the "hacker" tools (OpenSCAD) influence the aesthetic (blocky/square brackets, like in the post), which in turn influences the tools. When creating a simple fillet or a chamfer is an annoying exercise in constructive geometry rather than five mouse clicks, there'll be fewer fillets, chamfers, and flowing surfaces, even when they make mechanical or manufacturing sense; but then that becomes "the look", and people don't even think about fillets.
If anyone is interested, you can try EngineeringSketchPad (https://acdl.mit.edu/ESP/) which is very similar but much more mature. It also supports simple geometric primitives and boolean operations via a scripting language, but also more general rational curves and surfaces (i.e. BREPs). It has other nice features like differentiation, application-specific views (think structural vs CFD), and an attention to water-tightness/correctness.
What's nice about this is that it allows for programmatic CAD, enabling things like web applications that can download an .stl file based on user input. I hope I can find a weekend or two to play with it.
BTW: I spent a few weekends playing with Microcad (https://microcad.xyz/). It was cool, and had a similar rust feel. I just, for the life of me, couldn't figure out how to do 3d ellipses.
The opening paragraph is very telling; the author doesn't seem to understand typical pro-level parametric CAD programs available on the market:
> I keep designing physical parts for our robots. Motor mounts, sensor brackets, wheel hubs. Every time, the workflow is the same: open a GUI CAD program, click around for an hour, export an STL, realize the bolt pattern is 2mm off, repeat.
This doesn't make sense. When you realize the bolt pattern is 2mm off, you just edit that dimension and let the CAD program recalculate. You don't need to click around for an hour again. That's the beauty of contstraint-based parametric modeling as opposed to, say, modeling in Blender.
The author's program is akin to writing vim to replace Publisher. They're solving entirely different problems. Not to mention, this code-as-model paradigm already exists: OpenSCAD
> That's the beauty of constraint-based parametric modeling as opposed to, say, modeling in Blender.
I was thinking the same thing. This looks more like an API that makes 3d modeling look closer to CAD, but without realizing that CAD is about constraints, parametrizing, and far more.
> but without realizing that CAD is about constraints, parametrizing, and far more
Constraints and parametrizing are the trivial parts of CAD, something you can now implement in a weekend with Claude Code, the MINPACK/SolveSpace test suite, and OpenCascade as an oracle. The hard part is a geometric kernel that can express boundary representations for complex shapes (sketches, chamfers, fillets, etc) and boolean operations while somewhat handling the topographical naming problem without driving the user insane (which existing kernels are still all shit at).
We've started a 2D geometric constraint solver at https://github.com/endoli/fiksi doing the constraint part of this in Rust. We're using it internally and so far it works well, though it's still experimental. More constraints and especially better behavior around failure are needed. The latter will likely entail at least doing more with degree of freedom counting, though there's some of that already.
This is something I don't get about the code-based CAD tools. They don't let you specify declarative geometric constraints.
Constraints are useful beyond just designing parts. If you have a parallel mechanism there are only two ways to solve the kinematics/dynamics for it: Constraint solving for rigid contacts or iterative solving by approximating the model with non-rigid contacts via internal springs.
If you like OpenSCAD, you should check https://modelrift.com which is an OpenSCAD browser-based IDE which uses LLM to generate .scad and instantly shows the .stl 3d model result via 3d model viewer. Since AI models are still not good at openscad, the useful feature of modelrift is the "screenshot-powered" iteration where human annotates visual problems and sends it back to AI assistant to fix, all using hotkey shortcuts.
The pull request is to delete the project and open SOLIDWORKS or FreeCAD.
But don't actually delete it. It looks like a nice alternative to OpenSCAD. But like OpenSCAD it's really a niche thing for designs that are highly parametric like fasteners, gears, 3D printed boxes, etc.
Like OpenSCAD using it for normal "irregular" CAD is going to be extremely frustrating. Like editing an SVG in notepad instead of Inkscape.
I still feel like there's a unexplored space where you combine the benefits of both somehow though. Like a code-based CAD but it also has a GUI editor that stays in sync and avoids the need to type in coordinates by hand. That would be extremely difficult though.
> Every render in this post was made that way. Claude generated the geometry with vcad, imported each STL/GLB into Blender via MCP, set up studio lighting, and rendered to PNG. No human touched Blender.
This seems a bit wasteful to me. Why do you need an LLM to do the part of controlling Blender? Can't normal code be used to automate this instead? And save a scary amount of electricity in the process...
I really like the idea of openscad, or this, or the many alternatives. But when I say a shape with these and these dimensions, the next shape should attach to it somewhere. And then I want to say: chamfer all outside edges. But in all these programs, it's me redoing the math in my code, computing where the shape goes. As for chamfers, I just give up ...
FreeCAD can do this. So can all of the proprietary parametric CAD programs I've ever used, some of which (PTC OnShape, Siemens Solid Edge, Autodesk Fusion) have usable free tiers available.
If you are a programmer OpenSCAD is easier to learn. However you will quickly run into limits. Just a few hours of a FreeCAD tutorial and I was already seeing how I could do things I'd never attempt in OpenSCAD. FreeCAD has a reputation of not being great, but I'm not far enough into it to learn the limits - things I can't figure out feel like things I could learn, in OpenSCAD the things I couldn't figure out where because they were too complex - I could but the code wouldn't be readable so there was no point (not to mention math errors).
FreeCAD is designed for the things real designers really do. OpenSCAD is designed for the things mathematicians do.
I had a lot of fun playing around with antimony (also from Keeter) a few years ago, but unfortunately it has been mostly abandoned. I heard libfive is supposed to be the next generation, but I haven't experimented with it yet.
Is anyone else put off by the AI-sounding text? Two things that give it away for me are the excessive use of punctuation-emphasized sentence fragments ex:
> No clicking. No undo. Just recompile.
> That's our mascot. Entirely CSG.
> No garbage collection pauses. No floating point surprises from a scripting layer.
My whole CAD experience is with OpenSCAD, which apparently uses the same kernel; Honest question -- what is the alternative? I would assume the vast majority of 3D model processing relies on triangle meshes...
Meshes are an output, not a source, and not a good internal representation.
Meshes are only a lossy approximation of the actual geometry, and the errors accumulate as features reference off of earlier features.
A simple example is a line tangent to an arc. The line will only be the correct distance from the center of the arc at one point (one angle) per segment.
In openscad you don't notice the problem because since it's code and you have variables and programming ways of expressing relationships, you would usually not try to derive one thing from another by geometry, instead both things would reference a common ancestor variable. But that's a technical implimentation detail that works around the problem by just not doing a thing that doesn't work. The problem is still there that a valid geometry constraint would produce invalid results.
I've built something very similar (also based on triangle meshes, but in TS), and while it wouldn't work for say 3D printing, my target is game object modeling. I guess people have specific use cases in mind when referring to "CAD".
I've been doing a similar thing using GhostSCAD[1], which is a relatively thin wrapper around OpenSCAD in Go. Not as typesafe, but my language of choice.
SketchUp was my go to for a while but I'm done with parametric personally, trying to fix meshes for 3D printing... time I grow up and use something like Fusion360 seems like or onshape. Still it was good/simple enough for non-round shapes in SketchUp except they have some kind of memory leak/bug at least for the 2017 version. But I guess quit being cheap and buy a modern copy on my part.
Edit: oh I guess sketchup is a surface modeler weird thought it was parametric this whole time, lol someone else said it's a polygon modeler
Yeah I don't know what parametric modeling is apparently, I use a mouse/calipers to model stuff not parameters
There is a solid validator plugin you use before you export an STL to make sure the mesh is closed/a manifold
It's using a constructive solid geometry system. You can add and subtract volumes. Making a hole is subtracting a volume. This has classically been numeric roundoff hell, where points that should coincide and surfaces which should touch don't get handled properly due to numerical error.
The geometry engine is Manifold, which guarantees watertight meshes from boolean operations.
Ah. That's what's doing the constructive solid geometry. Here's the 2009 PhD thesis behind the object merge and difference algorithms inside Manifold. Nice. At last, soundness.
This is a long-standing problem. And now there's an open source implementation. Manifold itself is in C++, not Rust, though.
None of this is parametric. That's a different problem. That's where you put in constraints such as A is perpendicular to B, B is 100mm from C, etc., and the constraint solver tries to satisfy all the constraints. Change a dimension and everything adjusts to preserve the constraints. Parametric CAD is all about constraint solving and expressing conflicts to the user. Autodesk Inventor, Fusion, etc. have good constraint solvers.
Just because you type dimensions in doesn't mean it's parametric. If you're manually patching meshes, you're almost certainly not doing parametric CAD! (This does match with my memories of SketchUp, beck when it was owned by Google. I had to fix holes and overlapping geometry by editing the .STL files in Blender before any of the primitive slicer programs could process them.)
OnShape and Fusion360 are fully parametric CAD programs. Another free-tier closed-source one is Siemens Solid Edge (the "Hobbyist" edition). FLOSS parametric CAD programs that are reasonably usable are FreeCAD (complicated but powerful) and SolveSpace (an 80/20 sort of tool -- nowhere near as powerful, but vastly easier to use).
I've found LLMs perform surprisingly well here if you target CSG or OpenSCAD. It seems to frame the 3D modeling challenge as a logic and syntax problem rather than a spatial one, which plays to the model's strengths. You avoid the spatial hallucinations common in image generation because it's effectively just writing code.
Amazing work! This is what I was looking for, I thought of this few months ago and didn't have the time to create it myself. Thanks will explore it and give my feedback!
I'm about as into formal methods as you can get, with a deep background in Haskell and such. Rust is wonderful and all that, but sometimes I think the optimism is misplaced and doesn't come from a place of full knowledge. Statements like this make me scared:
> The geometry engine is manifold, which guarantees watertight meshes from boolean operations. The Rust bindings give us zero-cost abstractions over the C++ core — the operator overloads compile down to direct manifold calls. No garbage collection pauses. No floating point surprises from a scripting layer.
Floating point is incredibly surprising. People seem to believe that a typed programming language eliminates floating point error. Scripting and interpretability has nothing to do with why floating point is hard. Floating point arithmetic is as deterministic in Python as C++ or Rust. The issue is whether people understand the rules. The type system has nothing to do with this, as floating point errors are almost always value errors, not type errors. The only way to avoid floating point errors using formal methods is an actual theorem prover. Rust is nowhere close to being a theorem prover.
That is actually not so bad a reason. I use build123d, but want it in haskell, enough to look at how hard it would be to create something similar.
(I also totally agree about the gui being worth having sometimes, and would have loved the ability to fully mix. Code as the main driver, but gui to help choose it. For example to figure out faces and other attachment stuff)
I suspect that Moment of Inspiration and Rhinoceros 3D are something along those lines, but I'm not aware of an opensource tool which hoes that row.
One thing in particular which it would be nice to see would be a facility where one could draw a piece of geometry, then all the coordinates/values which describe it could be displayed in a pane where they could then be named or re-arranged, or the values changed, or even the values changed into formulae.
definitely learn solidworks or something in that vein first
that, and as a prior skill, learn to draw by hand on paper orthogonal and isometric views of 3d objects.
cad is another theory building excercise, but instead of being about processes, its about objects. you want to start from a strong manual/first principles base
If you're more interested int the result than the process, Onshape or Fusion are great, free (with use restrictions) parametric CAD. And both support scripting, to some extent.
Has there been any work on it to make it usable w/ touch or a stylus or a trackpad?
I'm on the verge of breaking down and buying a license for Moment of Inspiration 3D since it was designed for use on tablet computers (which is my preferred sort of hardware).
Or Blender, pen and paper, bag of LEGO, etc. Text in context of geometric object is more or less an abstract classification tool, barely a descriptive one.
Everyone knows what a `dice` is. But that's a taxonomical label, not a definition of one. Anyone reading this can probably draw a representative `dice` using only standard stationery supplies in under a minute. Now describe one in English with such rigor and precision that it readily translates to a .gcode file to be printed. That requires a good amount of useful neurodivergence to pull off at all.
I wouldn't call a FOSS project that you compare to some 2,620 USD/year software a dead-end. It's good enough for simple modeling, especially when it comes to scripting, and has been for 10 years already.
I am constantly designing parts myself. I just wish that instead of having many unfinished, unpolished products we had something with the level of Solidworks / Onshape / whatever.
FreeCad is getting somewhere but it is still way behind. The last thing I care about is what language was it implemented with.
Not to crap on this project too much, but this, and most of the other small CAD projects that get posted here, always have a condescending, "Look how easy I've made this" vibe to them, and then they're always light years behind modern CAD software.
If you're doing serious CAD work, like designing a whole machine, or working with multiple vendors to get parts manufactured, then it really is worth paying for a commercial CAD system and learning how to use it. All of the commercial CAD systems today support parametric modelling where later operations are updated automatically when the earlier operations are changed by the user.
If you insist on writing code, then even entry level systems like SolidWorks have APIs to do everything from creating the part geometry, defining geometric tolerances and PMI, running simulations, doing different types of analysis, creating machine/tooling instructions (G-code, etc.), exporting to various formats, and a million other things.
And they have workbenches for manufacturing techniques other than 3D printing, like sheet metal, CNC machining, cable routing, injection molding, welding, etc. And most of them have libaries of standard and off the shelf parts, like screws, bolts, nuts, washers, cables and housings, etc. in various standardized sizes so you don't have to model those at all.
For testing, on the higher end, the CAD systems integrate with metrology hardware and they're able to actually measure the manufactured parts and compare against the model to validate that they have the correct shape and meet all of the tolerances. Not as a virtual unit test running in CI, but by actually measuring the physical part.
> Types prevent you from passing a radius where a diameter was expected. CAD files should be code. Code has tests, reviews, diffs, and CI. An STL file has... bytes.
GP perhaps did not say it in a polite manner, but their criticism is valid.
Please have a check on a different monitor and browser than you are currently using, as most of the article is unreadable. Code blocks are nigh unreadable, and the screenshots are washed out as if they were HDR with improper tone mapping (I tested both with Firefox on Linux and Safari on iOS).
It's a shame, because it made me gloss over the article.
Oh, and the screenshots have the same issue both on the blog post and on the main vcad.io website. Funnily enough, code snippets on vcad.io have proper readable colors as opposed to your blog (they're still too dim to be comfortable though, but they're readable).
With the ability to change one number and regenerate everything
That's exactly how I use Solidworks (and similar parametric CAD software) all the time. It takes some discipline, but the key is for all your geometry and relations to be driven from sketches and equations. Then you just change a value (sketch dimension or global constant), hit rebuild, and everything regenerates fairly reliably.
Don't get me wrong, this is a great project and I love seeing efforts like this, OpenSCAD, etc. add more options in the landscape of parametric CAD.
But I do find the graphical interface very natural for doing creative design work. In fact, sometimes I wish I could literally step into my design in VR and grab and move vertices around in 3 dimensions (eg. when fine tuning non-planar splines).
"I do find the graphical interface very natural for doing creative design work"
As do I!
I don't think there is any correct single answer. People, their workflows, and requirements are different.
It seems we are living in CAD renaissance which is great! So many new promising new companies and free tools popping up.
Personally I would prioritize data stability and visual accessibility. These give user a creative workspace that is intuitive and forgiving. That's why I started doing my own modeler as a side project:
https://github.com/AdaShape/adashape-open-testing/releases/t...
The data model is fully immutable and would enable doing _proper_ model branching when I get there. For now all the user gets is a super robust undo and not needing to save (the model is streamed to disk persistently).
But eventually I would like it to be a visual, robust workbench where you can iterate fast, save versions when feel like it, etc.
(I worked for a decade on various CAD offerings at Trimble including SketchUp so know fairly well what I'm doing but it's still super early)
I'm with you. What I've learned from all those "programmatic CAD" threads is that some people just really prefer code over anything else. They also build only simple parts, so it's not an issue for them.
As the author says:
"I wanted to write my parts the way I write firmware. In Rust. With types. With version control."
It depends. I use Solidworks all the time but I think OpenSCAD was a great choice to make this part:
https://github.com/settinger/selectric_typeballs
A bit like how you can edit images in MS Paint, Python, or Photoshop. None of these is or should be a one size fits all solution.
Even as some who would generally prefer graphical CAD software in most cases, sometimes for simple parts like the examples in the linked article code really is just easier.
Sometimes it’s the same when I’m working on texturing for 3D models and I want to combine some texture maps in a specific way, I really don’t want to open Photoshop or similar for something that could be expressed in just a few lines of code. ImageMagick can probably do it, whatever it is, but then I need to learn the incantation.
I am trying to do something similar but inside a GUI - https://lilicad.com/ This is still very basic. Also 100% vibe coded and therefore not as robust as I would like it to be.
You can do parametric for games too. Building an entire scene using code/data can be very productive when you are trying to tune complex concerns like travel time between arbitrary points on the map (balance). Parametric also makes things like [LLM] automation way more feasible because it's using editor APIs rather than exercising piecemeal scene tools. 1000 lines of c# can do a hell of a lot more damage than a bucket of calls like GetObject, SetComponentProperty, etc. This also allows for much deeper integration and iteration over non-geometric concerns like lighting systems, materials and physics.
> But I do find the graphical interface very natural for doing creative design work. In fact, sometimes I wish I could literally step into my design in VR and grab and move vertices around in 3 dimensions
Agree, it's really hard to do work where you leverage "feels right" together with code, because even if the iteration loop is really tight ("change a bit of code > look at the results"), it's still loose compared to just clicking and dragging, feels like the mental load is a lot less.
Environment art really changed and became a lot easier with VR, I think maybe it's mostly a perspective thing, adjusting with controllers and dragging a moving is great, but the perspective it gives you really has no comparison and makes it all a lot simpler to get right. I can't wait for the tooling to mature more.
To add to this, constructive solid geometry systems like OpenSCAD seem to be practically incapable of doing anything related to surfacing, even if it's just G2 fillets or G2 continuity (much less more advanced work with splines and patches).
I think it's partially a positive feedback loop: the "hacker" tools (OpenSCAD) influence the aesthetic (blocky/square brackets, like in the post), which in turn influences the tools. When creating a simple fillet or a chamfer is an annoying exercise in constructive geometry rather than five mouse clicks, there'll be fewer fillets, chamfers, and flowing surfaces, even when they make mechanical or manufacturing sense; but then that becomes "the look", and people don't even think about fillets.
Surprised no one is mentioning BRL-CAD. This is exactly how BRL-CAD works! https://brlcad.org/
If anyone is interested, you can try EngineeringSketchPad (https://acdl.mit.edu/ESP/) which is very similar but much more mature. It also supports simple geometric primitives and boolean operations via a scripting language, but also more general rational curves and surfaces (i.e. BREPs). It has other nice features like differentiation, application-specific views (think structural vs CFD), and an attention to water-tightness/correctness.
The certificate just expired, so mobile Safari is not willing to let me see it. :(
I should have shared this more recent page directly on the manual with examples to begin with: https://flexcompute.github.io/EngineeringSketchPad/EngSketch...
What's nice about this is that it allows for programmatic CAD, enabling things like web applications that can download an .stl file based on user input. I hope I can find a weekend or two to play with it.
BTW: I spent a few weekends playing with Microcad (https://microcad.xyz/). It was cool, and had a similar rust feel. I just, for the life of me, couldn't figure out how to do 3d ellipses.
Here's an ellipsoid in build123d using geometric transformation of a sphere:
Also, FYI build123d now runs in the browser thanks to OCP.wasm. Example playground here https://jojain.github.io/build123d-sandbox/
build123d isn't Microcad
If you are using build123d, probably the easiest way is to sketch an ellipse and revolve it.
1 reply →
The opening paragraph is very telling; the author doesn't seem to understand typical pro-level parametric CAD programs available on the market:
> I keep designing physical parts for our robots. Motor mounts, sensor brackets, wheel hubs. Every time, the workflow is the same: open a GUI CAD program, click around for an hour, export an STL, realize the bolt pattern is 2mm off, repeat.
This doesn't make sense. When you realize the bolt pattern is 2mm off, you just edit that dimension and let the CAD program recalculate. You don't need to click around for an hour again. That's the beauty of contstraint-based parametric modeling as opposed to, say, modeling in Blender.
The author's program is akin to writing vim to replace Publisher. They're solving entirely different problems. Not to mention, this code-as-model paradigm already exists: OpenSCAD
> That's the beauty of constraint-based parametric modeling as opposed to, say, modeling in Blender.
I was thinking the same thing. This looks more like an API that makes 3d modeling look closer to CAD, but without realizing that CAD is about constraints, parametrizing, and far more.
> but without realizing that CAD is about constraints, parametrizing, and far more
Constraints and parametrizing are the trivial parts of CAD, something you can now implement in a weekend with Claude Code, the MINPACK/SolveSpace test suite, and OpenCascade as an oracle. The hard part is a geometric kernel that can express boundary representations for complex shapes (sketches, chamfers, fillets, etc) and boolean operations while somewhat handling the topographical naming problem without driving the user insane (which existing kernels are still all shit at).
8 replies →
We've started a 2D geometric constraint solver at https://github.com/endoli/fiksi doing the constraint part of this in Rust. We're using it internally and so far it works well, though it's still experimental. More constraints and especially better behavior around failure are needed. The latter will likely entail at least doing more with degree of freedom counting, though there's some of that already.
A C++-library to be aware of is SolveSpace's slvs: https://github.com/solvespace/solvespace/tree/e74c2eae54fdd9....
This is something I don't get about the code-based CAD tools. They don't let you specify declarative geometric constraints.
Constraints are useful beyond just designing parts. If you have a parallel mechanism there are only two ways to solve the kinematics/dynamics for it: Constraint solving for rigid contacts or iterative solving by approximating the model with non-rigid contacts via internal springs.
1 reply →
If you like OpenSCAD, you should check https://modelrift.com which is an OpenSCAD browser-based IDE which uses LLM to generate .scad and instantly shows the .stl 3d model result via 3d model viewer. Since AI models are still not good at openscad, the useful feature of modelrift is the "screenshot-powered" iteration where human annotates visual problems and sends it back to AI assistant to fix, all using hotkey shortcuts.
You're correct, I'm completely uneducated! Pull requests welcome :)
The pull request is to delete the project and open SOLIDWORKS or FreeCAD.
But don't actually delete it. It looks like a nice alternative to OpenSCAD. But like OpenSCAD it's really a niche thing for designs that are highly parametric like fasteners, gears, 3D printed boxes, etc.
Like OpenSCAD using it for normal "irregular" CAD is going to be extremely frustrating. Like editing an SVG in notepad instead of Inkscape.
I still feel like there's a unexplored space where you combine the benefits of both somehow though. Like a code-based CAD but it also has a GUI editor that stays in sync and avoids the need to type in coordinates by hand. That would be extremely difficult though.
21 replies →
Read a bit before critisizing:
> One thing I care about that most CAD tools don't: vcad is designed to be used by AI coding agents.
AI coding agents are notoriously bad at anything that involves spatial awareness.
2 replies →
For that there’s openscad
3 replies →
[dead]
> Every render in this post was made that way. Claude generated the geometry with vcad, imported each STL/GLB into Blender via MCP, set up studio lighting, and rendered to PNG. No human touched Blender.
This seems a bit wasteful to me. Why do you need an LLM to do the part of controlling Blender? Can't normal code be used to automate this instead? And save a scary amount of electricity in the process...
I really like the idea of openscad, or this, or the many alternatives. But when I say a shape with these and these dimensions, the next shape should attach to it somewhere. And then I want to say: chamfer all outside edges. But in all these programs, it's me redoing the math in my code, computing where the shape goes. As for chamfers, I just give up ...
> chamfer all outside edges
FreeCAD can do this. So can all of the proprietary parametric CAD programs I've ever used, some of which (PTC OnShape, Siemens Solid Edge, Autodesk Fusion) have usable free tiers available.
If you are a programmer OpenSCAD is easier to learn. However you will quickly run into limits. Just a few hours of a FreeCAD tutorial and I was already seeing how I could do things I'd never attempt in OpenSCAD. FreeCAD has a reputation of not being great, but I'm not far enough into it to learn the limits - things I can't figure out feel like things I could learn, in OpenSCAD the things I couldn't figure out where because they were too complex - I could but the code wouldn't be readable so there was no point (not to mention math errors).
FreeCAD is designed for the things real designers really do. OpenSCAD is designed for the things mathematicians do.
BOSL2 is a great library to use with Openscad. It provides a bunch of primitives shapes functions with chamfer/rounding parameters.
Math doesn't go away tho
Build123d can do chamfers. You can also do relative positioning by selecting positions from the first shape. (there's various ways to do that)
Note that there's an existing CAD-in-Rust project, Fornjot, which has been quietly developing since 2020: https://www.fornjot.app/
Neither Fornjot nor Truck are ready for general use as a BREP CAD kernel.
Also Truck https://github.com/ricosjp/truck
This sounds a lot like Fidget (https://github.com/mkeeter/fidget) and libfive (https://github.com/libfive/libfive) by the amazing Matt Keeter!
I had a lot of fun playing around with antimony (also from Keeter) a few years ago, but unfortunately it has been mostly abandoned. I heard libfive is supposed to be the next generation, but I haven't experimented with it yet.
Do you know how it compares?
Hadn't ran into these, thanks!
Is anyone else put off by the AI-sounding text? Two things that give it away for me are the excessive use of punctuation-emphasized sentence fragments ex:
> No clicking. No undo. Just recompile.
> That's our mascot. Entirely CSG.
> No garbage collection pauses. No floating point surprises from a scripting layer.
And worst of all, the dreaded "and/but honestly":
> But honestly, the main reason is the toolchain.
Am I misreading things?
> Am I misreading things?
Probably not.
There's also this at the bottom.
> One thing I care about that most CAD tools don't: vcad is designed to be used by AI coding agents.
Thanks for the feedback
Yeah I hate it. Why should I read something you didn't bother to write?
Unfortunately, using a geometry kernel [1] that operates on triangle meshes means this is a no-go for serious CAD usage.
[1]: https://github.com/elalish/manifold
My whole CAD experience is with OpenSCAD, which apparently uses the same kernel; Honest question -- what is the alternative? I would assume the vast majority of 3D model processing relies on triangle meshes...
Meshes are an output, not a source, and not a good internal representation.
Meshes are only a lossy approximation of the actual geometry, and the errors accumulate as features reference off of earlier features.
A simple example is a line tangent to an arc. The line will only be the correct distance from the center of the arc at one point (one angle) per segment.
In openscad you don't notice the problem because since it's code and you have variables and programming ways of expressing relationships, you would usually not try to derive one thing from another by geometry, instead both things would reference a common ancestor variable. But that's a technical implimentation detail that works around the problem by just not doing a thing that doesn't work. The problem is still there that a valid geometry constraint would produce invalid results.
Breps. Nearly all commercial cad packages operate on boundary representations of objects.
3 replies →
SolveSpace is available in library form. It uses NURBS to represent surfaces, with triangles as a fallback.
https://solvespace.com/library.pl
1 reply →
OpenCASCADE?
https://dev.opencascade.org/
2 replies →
libfive
I've built something very similar (also based on triangle meshes, but in TS), and while it wouldn't work for say 3D printing, my target is game object modeling. I guess people have specific use cases in mind when referring to "CAD".
In my mind, cad that you’re not going to manufacture is “modeling”. Not sure if that’s a common verbal distinction.
3 replies →
This is not parametric CAD. Not useful anyway. You need much more complicated engine.
This approach is explored by OpenSCAD. No need to reinvent the wheel. But parametric CAD is much more than that.
Note that one of the co-authors of the source is "Claude"
I've been doing a similar thing using GhostSCAD[1], which is a relatively thin wrapper around OpenSCAD in Go. Not as typesafe, but my language of choice.
[1]: https://github.com/ljanyst/ghostscad
SketchUp was my go to for a while but I'm done with parametric personally, trying to fix meshes for 3D printing... time I grow up and use something like Fusion360 seems like or onshape. Still it was good/simple enough for non-round shapes in SketchUp except they have some kind of memory leak/bug at least for the 2017 version. But I guess quit being cheap and buy a modern copy on my part.
Edit: oh I guess sketchup is a surface modeler weird thought it was parametric this whole time, lol someone else said it's a polygon modeler
Yeah I don't know what parametric modeling is apparently, I use a mouse/calipers to model stuff not parameters
There is a solid validator plugin you use before you export an STL to make sure the mesh is closed/a manifold
It's using a constructive solid geometry system. You can add and subtract volumes. Making a hole is subtracting a volume. This has classically been numeric roundoff hell, where points that should coincide and surfaces which should touch don't get handled properly due to numerical error. The geometry engine is Manifold, which guarantees watertight meshes from boolean operations.
Ah. That's what's doing the constructive solid geometry. Here's the 2009 PhD thesis behind the object merge and difference algorithms inside Manifold. Nice. At last, soundness. This is a long-standing problem. And now there's an open source implementation. Manifold itself is in C++, not Rust, though.
None of this is parametric. That's a different problem. That's where you put in constraints such as A is perpendicular to B, B is 100mm from C, etc., and the constraint solver tries to satisfy all the constraints. Change a dimension and everything adjusts to preserve the constraints. Parametric CAD is all about constraint solving and expressing conflicts to the user. Autodesk Inventor, Fusion, etc. have good constraint solvers.
[1] https://github.com/elalish/manifold/blob/master/docs/RobustB...
Manifold (which is doing the heavy lifting in this) uses triangles, which are an approximation.
This is never going to have the accuracy seen in higher-end CAD circles, which use b-Reps: highly accurate mathematic representation.
Manifold is good for visualization, but to use it as an engine for manufacturing .. its limits will be hit.
1 reply →
Just because you type dimensions in doesn't mean it's parametric. If you're manually patching meshes, you're almost certainly not doing parametric CAD! (This does match with my memories of SketchUp, beck when it was owned by Google. I had to fix holes and overlapping geometry by editing the .STL files in Blender before any of the primitive slicer programs could process them.)
OnShape and Fusion360 are fully parametric CAD programs. Another free-tier closed-source one is Siemens Solid Edge (the "Hobbyist" edition). FLOSS parametric CAD programs that are reasonably usable are FreeCAD (complicated but powerful) and SolveSpace (an 80/20 sort of tool -- nowhere near as powerful, but vastly easier to use).
SketchUp uses direct modelling, not parametric modelling. I think they even got some patents on direct modelling.
Curious to how well LLM's work in this context! (mentioned as one of the reasons to embed CAD in Rust)
I only know of another text -> STL AI model, I'm quite a bit more excited about this idea.
Does someone have experience with this?
I've found LLMs perform surprisingly well here if you target CSG or OpenSCAD. It seems to frame the 3D modeling challenge as a logic and syntax problem rather than a spatial one, which plays to the model's strengths. You avoid the spatial hallucinations common in image generation because it's effectively just writing code.
I wish there was a JSON representation of the geometry, so we don't have to code and compile. :P
Amazing work! This is what I was looking for, I thought of this few months ago and didn't have the time to create it myself. Thanks will explore it and give my feedback!
This reminds me of PoVRay... in a good way.
Note that OpenSCAD came about as a result of Art of Illusion.
I'm about as into formal methods as you can get, with a deep background in Haskell and such. Rust is wonderful and all that, but sometimes I think the optimism is misplaced and doesn't come from a place of full knowledge. Statements like this make me scared:
> The geometry engine is manifold, which guarantees watertight meshes from boolean operations. The Rust bindings give us zero-cost abstractions over the C++ core — the operator overloads compile down to direct manifold calls. No garbage collection pauses. No floating point surprises from a scripting layer.
Floating point is incredibly surprising. People seem to believe that a typed programming language eliminates floating point error. Scripting and interpretability has nothing to do with why floating point is hard. Floating point arithmetic is as deterministic in Python as C++ or Rust. The issue is whether people understand the rules. The type system has nothing to do with this, as floating point errors are almost always value errors, not type errors. The only way to avoid floating point errors using formal methods is an actual theorem prover. Rust is nowhere close to being a theorem prover.
Great work! Please consider adding a RSS/Atom Feed to your site. I would like to include it in my Tech Content Platform: https://insidestack.it
Done, thanks for the kind words!
Great, I already added you!
Based on a geometry engine written in C++ ...
https://github.com/elalish/manifold
Why not use OpenSCAD?
Because it is not written in Rust, I suppose.
Anyway, I think using only code for designing 3D objects is a poor design choice. You really need something that is between pure code and pure GUI.
That is actually not so bad a reason. I use build123d, but want it in haskell, enough to look at how hard it would be to create something similar.
(I also totally agree about the gui being worth having sometimes, and would have loved the ability to fully mix. Code as the main driver, but gui to help choose it. For example to figure out faces and other attachment stuff)
I would really like to see someone work that up.
I suspect that Moment of Inspiration and Rhinoceros 3D are something along those lines, but I'm not aware of an opensource tool which hoes that row.
One thing in particular which it would be nice to see would be a facility where one could draw a piece of geometry, then all the coordinates/values which describe it could be displayed in a pane where they could then be named or re-arranged, or the values changed, or even the values changed into formulae.
I get the sense that this author is looking for a DSL (domain specific language) and landed quite close.
I had Google Gemini 3 write me a part using human language about 3 weeks ago for a 3D printing project.
I specifcally had it spit out a FreeCAD macro, which is basically Python that looks like what you've made.
Interesting, because I am trying to learn OpenSCAD for some simple modeling.
definitely learn solidworks or something in that vein first
that, and as a prior skill, learn to draw by hand on paper orthogonal and isometric views of 3d objects.
cad is another theory building excercise, but instead of being about processes, its about objects. you want to start from a strong manual/first principles base
I liked CATIA, but can't afford it at the moment.
If you're more interested int the result than the process, Onshape or Fusion are great, free (with use restrictions) parametric CAD. And both support scripting, to some extent.
Both have really great documentation/examples.
for simple learning, I invite you to consider SolveSpace
Has there been any work on it to make it usable w/ touch or a stylus or a trackpad?
I'm on the verge of breaking down and buying a license for Moment of Inspiration 3D since it was designed for use on tablet computers (which is my preferred sort of hardware).
Note: This is probably a dead-end; it is not on the same level as SolidWorks, Fusion etc.
Or Blender, pen and paper, bag of LEGO, etc. Text in context of geometric object is more or less an abstract classification tool, barely a descriptive one.
Everyone knows what a `dice` is. But that's a taxonomical label, not a definition of one. Anyone reading this can probably draw a representative `dice` using only standard stationery supplies in under a minute. Now describe one in English with such rigor and precision that it readily translates to a .gcode file to be printed. That requires a good amount of useful neurodivergence to pull off at all.
1 reply →
I wouldn't call a FOSS project that you compare to some 2,620 USD/year software a dead-end. It's good enough for simple modeling, especially when it comes to scripting, and has been for 10 years already.
1 reply →
You're probably right, OpenSCAD seems to be limited both in speed and in exactness of the surfaces.
However purely programmatic interface allows doing surprising things which might be hard to achieve with a mouse.
How could I make it better?
1 reply →
I am constantly designing parts myself. I just wish that instead of having many unfinished, unpolished products we had something with the level of Solidworks / Onshape / whatever.
FreeCad is getting somewhere but it is still way behind. The last thing I care about is what language was it implemented with.
OpenSCAD is quite polished (for a programmatic mesh modeler).
There is a soft-fork which adds Python:
https://pythonscad.org/
which I've found quite useful: https://github.com/WillAdams/gcodepreview in particular, working up a facility to write out DXFs w/ arcs
Not to crap on this project too much, but this, and most of the other small CAD projects that get posted here, always have a condescending, "Look how easy I've made this" vibe to them, and then they're always light years behind modern CAD software.
If you're doing serious CAD work, like designing a whole machine, or working with multiple vendors to get parts manufactured, then it really is worth paying for a commercial CAD system and learning how to use it. All of the commercial CAD systems today support parametric modelling where later operations are updated automatically when the earlier operations are changed by the user.
If you insist on writing code, then even entry level systems like SolidWorks have APIs to do everything from creating the part geometry, defining geometric tolerances and PMI, running simulations, doing different types of analysis, creating machine/tooling instructions (G-code, etc.), exporting to various formats, and a million other things.
And they have workbenches for manufacturing techniques other than 3D printing, like sheet metal, CNC machining, cable routing, injection molding, welding, etc. And most of them have libaries of standard and off the shelf parts, like screws, bolts, nuts, washers, cables and housings, etc. in various standardized sizes so you don't have to model those at all.
For testing, on the higher end, the CAD systems integrate with metrology hardware and they're able to actually measure the manufactured parts and compare against the model to validate that they have the correct shape and meet all of the tolerances. Not as a virtual unit test running in CI, but by actually measuring the physical part.
> Types prevent you from passing a radius where a diameter was expected. CAD files should be code. Code has tests, reviews, diffs, and CI. An STL file has... bytes.
Fucking A Right!
[dead]
Yet another rewrite-it-in-rust-just-because project. I'll stick with OpenSCAD
Absolutely atrocious and piss-poor contrast. Can barely read a thing.
Are you feeling alright?
GP perhaps did not say it in a polite manner, but their criticism is valid.
Please have a check on a different monitor and browser than you are currently using, as most of the article is unreadable. Code blocks are nigh unreadable, and the screenshots are washed out as if they were HDR with improper tone mapping (I tested both with Firefox on Linux and Safari on iOS).
It's a shame, because it made me gloss over the article.
Oh, and the screenshots have the same issue both on the blog post and on the main vcad.io website. Funnily enough, code snippets on vcad.io have proper readable colors as opposed to your blog (they're still too dim to be comfortable though, but they're readable).
Yes, I am alright, the website attempts to support dark-mode but does such a poor job of it that renders it completely useless.
https://i.ibb.co/VppSx4mc/pisspoor.png
2 replies →