Curated Code CAD (2020)
learn.cadhub.xyz
learn.cadhub.xyz
Troubleshooting issues is tricky though. If something doesn't work debugging is nearly impossible and the (C++) docs are very challenging.
OpenCascade is very powerful, but the ergonomics of the API aren't great. Writing a simple FP-style immutable wrapper around it has proven very fruitful and we can now describe relatively complicated models with a bare minimum of TypeScript code. Lot's of fun!
[1] https://github.com/gabrielcuvillier/opencascade-emscripten-p...
Very basic stuff, but still useful to quickly change your model in code and have your domain specific sims pick up on it automatically.
Additional advantage is the ease of building custom UIs to configure your model and scenes.
Basic things like 'hollow this object out, leaving a 3mm shell' are nearly impossible.
Anything non-trivial takes minutes or hours to compile, making debugging really hard.
Are these newer tools better?
As rough as OpenSCAD is, I find myself coming back to it, because CAD-as-code is just so useful (including leaving comments). For bashing out quick, fairly simple models I still like it. The various OpenSCAD DSLs can help, but also not when they get superseded or get in your way. I think the review on the posts blog summarizes it well [0].
FreeCAD is apparently capable, but the UI defeats me. IMO, it tries to do too many things and doing none well.
The post doesn't really do a good job of comparing how mature the others are, so I'm not sure. But if CadQuery works as well as OpenSCAD or better, I may just be sold.
Though dunno about UX using it, probably not as streamlined as OpenSCAD, though maybe more powerful?
Last I tried, I didn't manage to find the control. I assume it exists, but the UI was simply to painful to navigate.
This is the crux of why you've come to this conclusion: FreeCAD is frustrating to work with compared to other CAD platforms.
- proper fillets
- proper chamfers
- surface-surface intersection
It is also limiting because it can only generate triangle meshes and can indeed be slow when models get bigHowever, for many situations, especially for prototyping, it is good enough and a really great tool.
It is definitely the first tool I turn to when I want to model a simple part quickly.
Yeah, I think that's a consequence of how they're constructing the objects. But things like signed distance fields make that easier* because it'd just be "expand the SDF by 3mm" - https://github.com/fogleman/sdf has `shell` for this.
* if you can wrap your head around the math/geometry, I guess
I'm sure I'm missing some, let me know if you know of any.
One project that's not on there and frankly it's too early to list but I'm hopeful for is KittyCAD [1]
Getting funding behind one of these projects could go a long way.
- https://github.com/nickc92/ViewSCAD
- Matt Keeter's stuff (listed here https://www.mattkeeter.com/projects/, including https://github.com/mkeeter/antimony and https://www.mattkeeter.com/projects/ao/, though I see you have libfive)
- https://solvespace.com/index.pl
- https://mirmik.github.io/zencad/en/
- https://github.com/fogleman/sdf
This is from a list entitled "migrate away from OpenSCAD", but somehow I can never manage to do that...Thanks for this site!
OpenCASCADE, contraints engine lifted from FreeCAD, Python bindings that map 1:1 with the GUI (like Blender). A criminally underrated tool.
I use openscad because its fast and easy, but I can feel its limitations.
I want to love CadQuery (cq-editor GUI), because I do a lot of Python work, but something is wonky with the renderer (projection? the edge of a box further from the screen is wider than the edge close to it! like they got the matrix inverted or something)
and something else is wonky with the camera controls compared to... every other 3D application.
I try it again every 6mo to see if it feels good yet, they're still working on it.
Nevertheless, i suspect when they get it right, it's a tool that will eventually be like turbocharging my workflow.
In modern CAD software one already does 'programming' by specifying geometric constraints. For a great example of the power of this approach, see Ivan Sutherland's sketchpad. Specifying geometry using equations as one often does in code CAD is a much more difficult process than specifying geometric constraints. For example, specifying that a hole is some distance from the edge of a part is quite difficult with code CAD.
In addition, there are already multi-user CAD approaches for doing CAD design as part of a team. BYU's multi-user CAD system is a great example of this. I can't find a video, but it claims to be google docs for CAD, allowing users to edit the same CAD model in parallel using extended versions of commercial CAD software.
Honestly, I think the only reason why code CAD is popular at all is that no good open source CAD software exists, so manual use of CAD kernels is filling the void. Although, FreeCAD is continuing to improve so this may change.
BREP is not necessarily futureproof too. At the current time we can manufacture more complicated parts than we can design. With additive manufacturing we can make very, very complicated parts. [0] gives a great example of some. At the current time there are printers which can make centimeter scale parts with micrometer-scale geometry and there's good reason to believe that the same printing process can be scaled up. Describing a 1 meter cube with a micrometer scale lattice structure using triangle based formats takes something like 500 TB.
Additive manufacturing is also capable of printing multiple materials too. In some cases you can even mix material together, to say have a gradient going from soft to hard material. So there is now a need to describe material composition and be able to describe how that material composition changes in 3d space. Things get particularly weird if bring composites into the mix too. There are number of very different approaches to solving these problems. Some proposals include voxels with 3d textures, volumetric-representations, and even some approaches based on functional programming[1].
[0]https://www.researchgate.net/publication/317614395_Nanolatti... [1]https://www.sciencedirect.com/science/article/abs/pii/S00104...
But the code/textual format is a boon for me personally: version control, Thingiverse's customizer, and easy re-use. You can grab geometry or constructs from other projects. Whether or not those properties are incompatible with a visual approach - I'm not sure?
deadsy built some rather sophisticated models, be sure to check out the renderings in the github README!
So after reading this, I went and tried cadquery ... it's really nice, but it is very, very unfortunately tied at the hip with anaconda, which is a monstrosity.
I'm not sure why they would tie such a ball and chain to an otherwise super nice CAD scripting tool.
There is luckily a docker based solution [1] that cleanly lets you wrap and try the whole cancerous thing without it spilling all over your system.
[1] https://github.com/RubenRubens/cq-containers/tree/master/cq-...
I confess to having not kept a very detailed track of the headaches conda has caused me over the years, but here are my recollections:
- conda plain and simple failing to install with a cryptic error message after downloading multiple gigabytes of crap only to test a small piece of software. Back then (slow download / disk writes / CPUs), easily an hour wasted.
- conda ruining my existing pip install and silently overwriting apt-get managed packages.
- conda unilaterally grafting bash code in my .bashrc, a practice I find - to remain polite - distasteful, not to mention the (IIRC) creation of a giant turd of a repo in my home directory.
- conda, when used to run tensorflow based packages on my NVidia linux box completely wrecking the existing NVidia drivers installs to the point of it booting in "safe mode" or giving me a black screen.
- post conda install, some binaries didn't want to run anymore because conda-installed libs were newer.
To be fair these grievances are old: I've avoided conda like the plague for - easily - the last 5 years, and they might have cleaned up their act.However, I still find the notion of having to install 2 gigs worth of stuff on my machine only to try a simple CAD package for a few hours a rather offending proposition. Call me an old curmudgeon if you have to.
To be fair to the cadquery folks: they seem to have realized the issue and they now offer what looks like a somewhat self contained binary dowload of the cq-editor package [2].
Finally, I'll leave you with this, taken from the cadquery homepage itself [1] (note the use of the word "polluting" in there, looks like I'm not the only one feeling this way):
For those unfamiliar (or uncomfortable) with Anaconda, it is probably best to install Miniconda to a local directory and to avoid running conda init. After performing a local directory installation, Miniconda can be activated via the [scripts,bin]/activate scripts. This will help avoid polluting and breaking the local Python installation. In Linux, the local directory installation method looks something like this
[1] https://github.com/CadQuery/cadquery#alternative-anaconda-in...In this sense:
> software that allows you to define 3D CAD models with code
Fair enough, but:
1. IIRC the engine is original (eg not relying on OpenCascade or somesuch) and high quality code.
2. Adding some sort of Python API to it would be fairly simple given the file format: if you open a solvespace model file [1], it's almost already a script (ascii, with clear commands).
Great, as soon as they add some sort of API or script input, I will notify author of article about this. BTW, ascii based file is not a script, STL file is also ascii.