It's a similar idea to OpenSCAD, but embedded in Python and using a better geometry kernel. Want to fillet a box in OpenSCAD? Sure, either take the convex hull of 8 spheres, or the minkowski sum of a box and a sphere. Want to fillet a box in CadQuery? .edges().fillet()
Now I'm hearing some protests about Python, but consider this example OpenSCAD code:
x = 1;
echo(x);
x = 2;
In most languages you would expect this to print "1". In OpenSCAD, the last assignment wins and it prints "2".
I certainly have my complaints about openscad (mostly that the geometry isn't something you can operate on), but as far as I'm concerned a declarative language is perfect for describing an object. I don't want your example to do what you expect. I would have preferred if it didn't compile
Errors out with "line 1: a is not defined", because the override is implemented as is the tokens were present wherever the first declaration is. (If anybody looks up me, you'll see I've made a bunch of contributions and bitched about this particular thing which really fucks up a bunch of optimizations you'd want to do)
(I recommend CQ-editor for an easy install: https://github.com/CadQuery/CQ-editor/releases/)
It's a similar idea to OpenSCAD, but embedded in Python and using a better geometry kernel. Want to fillet a box in OpenSCAD? Sure, either take the convex hull of 8 spheres, or the minkowski sum of a box and a sphere. Want to fillet a box in CadQuery? .edges().fillet()
Now I'm hearing some protests about Python, but consider this example OpenSCAD code:
In most languages you would expect this to print "1". In OpenSCAD, the last assignment wins and it prints "2".