
CadQuery – a parametric CAD script framework - helb
https://github.com/dcowden/cadquery/blob/master/README.md
======
craigjb
This is awesome!

I’ve been using Python to generate OpenSCAD scripts, and then a half-finished
Python binding for OpenSCAD. This framework uses the natural parametric CAD
modeling primitives, like the workplane. I never got used to the OpenSCAD way.

I’m switching my stack over to this today.

~~~
robodan
I'd love to know how this works out for you. I was trying to do something
similar, but got stuck.

The core issue is that the fluent object design approach makes it very
difficult to decompose objects into reusable features. The shared state behind
the fluent approach makes creating multiple sub-objects (to then combining
them) difficult (maybe impossible). The power of Python gets limited to
thinking about only one thing at a time.

See
[https://github.com/dcowden/cadquery/issues/167](https://github.com/dcowden/cadquery/issues/167)

They are trying to fix this in 2.0, but that's still in early development.

~~~
robodan
It looks like the problem isn't where I thought it was. Still figuring out how
to get it to work, though.

------
gntech
Also check out cqparts which builds on cadquery and add the concept of parts,
assemblies and mates to cadquery

[https://github.com/fragmuffin/cqparts](https://github.com/fragmuffin/cqparts)

------
jononor
Have used the FreeCAD plugin a little bit, useful to create some parts that
are hard/tedious to do with visual constraints/operations. However I did
struggle a bit with the DSL, think I might be faster if just using the FreeCAD
Python API directly...

Jupyter Notebook support is super cool through, will give that a go for
generative/data-driven models!

------
monkmartinez
Quick question:

Why would I use this or OpenSCAD instead of Fusion 360 or TinkerCAD?

~~~
gh02t
The other answers don't quite address why you would prefer this specifically
versus Fusion 360 or TinkerCAD (or OnShape, SolidWorks etc).

Simple answer: they (cadquery and OpenSCAD) are free and open source. Fusion
360 for example is free for most hobbyist use, but it's still a proprietary
package and you're depending on AutoDesk's good will. This has historically
been a bad idea, AutoDesk has done the bait-and-switch routine many times and
are not exactly benevolent. I genuinely think Fusion 360 is probably the best
all-round CAD/CAM package available and it's nice that they currently offer it
for free, but I'd be hesitant to really go all-in on using it. AutoDesk could
pull the rug out from under free users at any moment, leaving you with the
choice of paying up or losing the ability to edit your projects. Or they could
go out of business at some point in the future; since Fusion 360 is heavily
cloud based that might leave you in quite a pickle (a bigger concern for
smaller operations like TinkerCAD).

Free is also important compared to products like SolidWorks, which is priced
way outside the price range of most hobbyists. Not to mention, most commercial
CAD packages aren't cross platform (with exceptions), while OpenSCAD and
CadQuery both run on Linux.

These are not necessarily decisive concerns depending on your priorities, but
they are significant. I use both OnShape and Fusion 360, but I also don't
really care about long term access to my designs.

~~~
marshray
There seems to be a plague of vendor schemes attempting to lock up your own
designs into their proprietary service.

While there surely are benefits to many classes of uses to having their data
accessible via a cloud service, I think the main benefit is getting that
recurring revenue on the vendors' balance sheet.

------
d--b
CadQuery is terrible naming... FluentCad or something would have made a lot
more sense...

~~~
robodan
Ya. When they named it jQuery was the new hotness.

