I recently used their sister library (build123d, same devs) to build a rotary slide rule bracelet for multiplying three-digit numbers. It was a great experience and wouldn't generally be easy to do with Fusion 360. My bracelet gets quite a lot of comments when I wear it in public. :-)
Here's an IPython notebook with lots of pictures so you can see how the different operations come together: https://github.com/gcr/sliderule-bracelet/blob/main/version-...
build123d is quite different stylistically from cadquery, but this should give you the flavor of programming-oriented CAD at least.
Happy to share source if you like, but it was nothing complicated: - ask aistudio.google.com to draw a bunch of dragons - trace one to svg - make the bracelet a little smaller
Actually...
https://www.youtube.com/watch?v=DNiQJyRTs50
You would create the numbers and marks in a vector drawing program (Inkscape, Affinity Studio, Illustrator) and import that into Fusion.
This method was widely used in the pre-computer era to save time in calculations. Tables of logarithms (and slide rules) were a mathematician's best friend.
My last project involved making a cosplay helmet. I modeled the shell in blender, it was a low poly design, so I exported it to an OBJ, then put together some Python to load the OBJ, give the triangles some configurable thickness etc. Then I used it to explore how to print the helmet in such a way that the outer surface would be too clean to tell it's FDM printed, without needing to do any sanding.
Initially I explored having cadquery put a number on the back of each triangle and I'd assemble it like a puzzle, but that didn't work out. Eventually I figured out how to cut it up into parts that would also eliminate the need for painting and outer surfaces would be clean, and because it was in code, changing which part a triangle belonged to was a matter of moving the corresponding index into another list.
I probably could've managed it all in blender too, but being much more comfortable with code, it was easier for me to play with normals and manually turning each piece into a solid.
I also go for it for functional designs because, again, tweaking code is more comfortable to me than dealing with constraints and sketches and multiple planes in, say, FreeCAD.
for shapes that are hard to print with a traditional slicer, LLMs are also surprisingly good at generating gcode with fullcontrolxyz if you're specific
If I have a DXF or something of the outline of something (a PCB in this case) can I import it and build around it somehow?
Doing CAD with code seems like obviously the right move to me. The ability to just write new functions in python and do version control with git are super powerful.
The big thing that struck me as innovative with CadQuery is the design intent query part. Selecting model geometry by relation to other geometry is way more resilient to changes ealier in the model's history than the regular "that point right there" you get with just clicking a point.
That the developers acknowledge that seeing the model at various steps in the script is important, and so have the CQ-editor, is also a point in their favour.
I do have a gripe though:
Having to keep all the geometry selection stuff relating to the model in my head is hard. I want gui tools that write code.
Like if I have a complex model, and variables assigned to various parts of the geometry. I want to be able to see that geometry highlighted and labeled, so I know what's easily selectable, and I want to be able to click buttons based on my design intent and get immediate visual feedback, and have each of those button presses added as code as I do them.
Look at this example model: https://cadquery.readthedocs.io/en/latest/examples.html#a-pa...
This bit that selects some points?
# compute centers for screw holes
topOfLidCenters = (
cutlip
.faces(">Z")
.workplane(centerOption="CenterOfMass")
.rect(POSTWIDTH, POSTLENGTH, forConstruction=True)
.vertices()
)
Each of those lines should be a gui tool interaction that generates that line of code.Would it limit and hold a maximum force? Slip beyond a certain limit?
I'd be very interested if one of them compares/contrasts SolveSpace and CADQuery.
Libraries like build123d and cadquery use OpenCASCADE, a boundary representation kernel. You think in terms of the enclosed solid and perform operations - boolean add/subtract, fillet/chamfer, stamp text, etc - that return a new solid.
https://en.wikibooks.org/w/index.php?title=OpenSCAD_User_Man...
These libraries on the other hand can natively represent a sphere for instance. This means that during CAD-ing you don't need to worry about resolution, that's a consideration for export only.
Any serious manufacturing will work require a STEP (or something equivalent) which stores these parametric surfaces rather than a mesh.
Some of the differences may be in when you are trying to reference a face/edge to build off of, not just about the primitive function being used.
Try to do the following with OpenSCAD:
1. put a sphere and a torus somewhat close to each other
2. find the shortest segment between the two surfaces
3. place an infinite cylinder whose axis is aligned with the segment you just found
4. fillet the cylinder with both the torus and the sphere along its intersection curve with each surface
This is very, very hard to do with OpenSCAD.Now I am off to see if anyone has ever built an export plugin for pov-sdl, either a 3d rasterizer(g-code slicer) for 3d printing, or a boundary layer mesh generator for import into another program. language wise it is probably equivalent to or better than the openscad sdl,
One subtle advantage to using python as the sdl is that it gets access to the vast corpus of python modules out there. Most of which are probably useless. but one thing I want to try is to see if I can use sympy to define a more declarative style of constraint.
Why do you say it is better than openscad?
Python, so leverage your Python skills and existing libraries.
A nice GUI so you can build, view, tweak, review, iterate.
Will be a nice new toy...
Previous discussions:
https://news.ycombinator.com/item?id=24520014 (6 years, 49 comments)
https://news.ycombinator.com/item?id=30232344 (4 years, 43 comments)
https://news.ycombinator.com/item?id=30219940 (on Hackaday, 4 years, 28 comments)
https://news.ycombinator.com/item?id=17038257 (8 years, 16 comments)
https://news.ycombinator.com/item?id=28083578 (a Show HN from 5 years ago w/ 1 comment)
There are a lot of tools in this space, esp. these days when "Vibe Coding" allows folks to knock one out w/ a prompt. Most folks jus use OpenSCAD which with its large user base and weaknesses which are (mostly) not exposed by 3D printing is great, so long as what one wants to model is easily described using mathematics/programming techniques which are familiar to the user.
I'd really like to see an interactive opensource project follow OnShape's lead where a scripting language (for OS, FeatureScript) is used as a wrapper around the geometry kernel, then the graphical UI creates the model using that language, and one can always inspect the resultant code. It seems to me that this <i>should</i> be workable given the observation:
https://news.ycombinator.com/item?id=31471109
>Parametric CAD, in my view, is a perfect example of "visual programming", <BR> >you have variables, iteration/patterning reducing repetition, composability <BR> >of objects/sketches again reducing repetition, modularity of design though a<BR> >hierarchy of assemblies. The alignment between programming principles and <BR> >CAD modelling principles, while not immediately obvious, are very much <BR> >there. An elegantly designed CAD model is just as beautiful (in its construction) <BR> >as elegantly written code.
but these days, I'm mostly using Open(Python)SCAD (which is in the process of getting merged in to the main project).
It was fun, but I still appreciate what our mechanical designers can do.
I think I heard of cadquery before and decided against it, in favor of build123d.
Community built examples: https://modelrift.com/models
https://paulfremantleluthier.substack.com/p/gibsons-tuners-v...
Now that there is:
my hope is that this effort will begin to coalesce and focus on that tool/environment, and that further effort will be made to improve it.
Anyone has used it?
I keep my models on github[0]. Disclaimer, they are pretty niche things I needed around the house.
I'm working on a CAD kernel in Rust with a frontend either as a Blender plugin or a Blender fork (leaning towards fork at this point) It's not at all ready but I have reached first part status (before going back and rewriting a large chunk of the kernel)
Anyone curious in the writeup? I have a pretty good harness for evaluating 3d generation performance.
https://news.ycombinator.com/item?id=47803846 https://news.ycombinator.com/item?id=47803475 https://news.ycombinator.com/item?id=47802988 https://news.ycombinator.com/item?id=47803416
Such comments have become more useful recently, as a form of curated search, when standard Internet searching has started to provide an avalanche of garbage links, to Web pages that only summarize or repeat the primary sources, frequently with errors and failing to point to the original sources.
Even if inspecting the suggested alternatives may show them as worthless, finding this may still save time over using a search engine and having to filter an order of magnitude more misleading links.
Those not interested in such comments can easily skip over them and not visit any suggested links.
When I visit Wikipedia pages, the most frequent reason is for their lists of useful links. Similarly, when reading a HN comment thread, I appreciate links to more or less related content.
Today I value such sources far more than a few decades ago, when Google could easily and effortlessly find any desired information, while today you must struggle with any search engine, as they will provide you almost any kind of information, except that requested by you.
It’s not as beginner-friendly as GUI tools, but for automation, reproducibility, and generating families of parts, it feels way more scalable. Curious how others here are using CadQuery in real workflows—production or mostly prototyping?