> Yet, the code to express the same output is more bloated.
But it's trivially ready to be parameterized and reused. Model is easy to change, you could think about relations between features not absolute entities.
It's my 3rd attempt to use code-CAD to be honest. OpenSCAD -> CadQuery -> Build123d. I have past experience with SolveSpace and OnShape. GUI CAD approach with drafting in 2D and making solids as late as possible works perfectly well and you could transfer spatial thinking as-is to model coding.
I have somewhat frustrating experience with OpenSCAD and CadQuery. OpenSCAD is perfect for simple things but gap to complex parameterized models was to big for me. CadQuery looks great in examples, but I could not grasp how to use it for my tasks. State tracking is crazy hard.
There are three major factors it clicked for me with build123d.
First is explicit algebra mode. My little coder brain could not comprehend large object trees from OpenSCAD or hardcore chain dance of cadquery. But I know what an object and mutability are. Build123d is amazingly intuitive and has tight primitive set large enough for complex things and small enough to be memorized by heart. Also Build123d has nice docstrings and type hints. I mainly use IDE help instead of online docs.
Second is a good interactive visualizer. I use yet-another-cad-viewer[1]. It allows to quickly debug issues and use my favorite editor. It's crucial to have visual representation and ability to know object bindings to variable name in source code. Killer features for me are on-hand access to per-object transparency setting and selection tool to measure distances between features. It really helps during learning.
Third is I actually sat down and spent around 10h with TTT practice models[2] :))
I believe I'm already effective with Build123d on the same level as with OnShape.
There is a major weak thing with code-CADs though. It's edge selection for fillets. I think about custom filters to narrow edge location. But now it's largely a guess work with edge visualization on fail.
Looking back at your build123d code, it looks like the biggest differentiator compare to OpenSCAD and CadQuery is the expressiveness to assign shapes to variables, right?
I was able to check that box with PythonSCAD thus far, so that's "solved" for me.
Otherwise, I see a lot of vector/coordinate manipulation that isn't too different from OpenSCAD/PythonSCAD.
However, I can see there's some additional abstraction primitives with arc and tangents that looks nice. That doesn't quite exist in any OpenSCAD based or similar engine since there's no built-in way to get info out of the shapes in a reflection-like way.
Maybe I will give Build123d another go and see if I can sustain some sort of momentum.
But it's trivially ready to be parameterized and reused. Model is easy to change, you could think about relations between features not absolute entities.
It's my 3rd attempt to use code-CAD to be honest. OpenSCAD -> CadQuery -> Build123d. I have past experience with SolveSpace and OnShape. GUI CAD approach with drafting in 2D and making solids as late as possible works perfectly well and you could transfer spatial thinking as-is to model coding.
I have somewhat frustrating experience with OpenSCAD and CadQuery. OpenSCAD is perfect for simple things but gap to complex parameterized models was to big for me. CadQuery looks great in examples, but I could not grasp how to use it for my tasks. State tracking is crazy hard.
There are three major factors it clicked for me with build123d.
First is explicit algebra mode. My little coder brain could not comprehend large object trees from OpenSCAD or hardcore chain dance of cadquery. But I know what an object and mutability are. Build123d is amazingly intuitive and has tight primitive set large enough for complex things and small enough to be memorized by heart. Also Build123d has nice docstrings and type hints. I mainly use IDE help instead of online docs.
Second is a good interactive visualizer. I use yet-another-cad-viewer[1]. It allows to quickly debug issues and use my favorite editor. It's crucial to have visual representation and ability to know object bindings to variable name in source code. Killer features for me are on-hand access to per-object transparency setting and selection tool to measure distances between features. It really helps during learning.
Third is I actually sat down and spent around 10h with TTT practice models[2] :))
I believe I'm already effective with Build123d on the same level as with OnShape.
There is a major weak thing with code-CADs though. It's edge selection for fillets. I think about custom filters to narrow edge location. But now it's largely a guess work with edge visualization on fail.
[1]: https://github.com/yeicor-3d/yet-another-cad-viewer [2]: https://www.tootalltoby.com/practice/