It's software that allows you to define 3D CAD models with code. It's a niche popular amongst software devs for obvious reasons — it gives you parametric models almost by default and it's easy to maintain and extend models within a team over time when paired with git. The coding nature of it allows teams to build their own abstraction for re-use and quick prototyping. The Cadhub homepage has a good breakdown of the potential of the Code-CAD paradigm. Code-CAD is not to be confused with 3d geometry libraries, Code-CAD instead has opinionated abstractions for quickly developing mechanical parts.
I recommend reading through the entire list below to see if one chimes with you and your needs, beyond that I can make the following recommendation and points:
My main recommendation is to use one of the packages that wrap OpenCascade (a mature C++ CAD library). Packages that do so are CadQuery, CascadeStudio, DeclaraCAD and pythonOCC. My reasons for recommending these are as follows:
OpenSCAD is tried and true, with lots of examples and tutorials floating around the internet. It also has a very intuitive syntax that many people without prior programming experience have been able to quickly pick up. However, some reasons you might want to look elsewhere are:
Check out the birdhouse example, while anecdotal, seeing the same part made with three different tools might help you decide which syntax you like the most.
You might want to simply pick a tool based on your language of choice. Clojure, Go, Haskell, Lisp, Javascript and Python are all represented below.
If you want to make 3D art, Curv is specifically trying to hit that niche.
No matter which one is your tool of choice, if you're here and you love Code-CAD and you'll want to checkout Cadhub. Think of it as Codepen crossed with a thing repository, and it's our love letter to the Maker community. Currently, CascadeStudio is the only Code-CAD integration, but we're working on more. Site, repo.
The rest of the packages are in alphabetical order, but OpenScad gets a special mention because it's the OG. Many of the projects below were inspired by OpenScad and is the most well-known choice. If you're new to code-cad this is the safest choice. The syntax is easy to pick up and there lots of guides around the internet.
It's a c++ library that a number the projects below wrap. OpenCascade uses a Boundary representation (B-rep) kernel, which is a powerful way representing solid geometry, this is a point of difference for some many of the other projects that use a polygon mesh.
There are a couple of ways you can help:
AngelCAD aim to do two things:
AngelCAD is capable of running OpenSCAD script for interoperability and has features like text support and DXF import coming soon.
A community hub for sharing code-cad projects. Currently integrates with the excellent CascadeStudio. Built and maintained by yours truly.
CadQuery is a Python library that wraps and extends OpenCascade. It has a philosophy of capturing design intent. The API has been designed to be as close as possible to how you’d describe the object to a human. An example of this is its ability to "select" parts of the model's geometry to run operations on, such as the following code that selects only the edges running along the Z-axis and fillets them.
result = cq.Workplane("XY" ).box(3, 3, 0.5).edges("|Z").fillet(0.125)
A javascript wrapper for OpenCascade that runs in the browser. (OpenCascade can run in the browser when compiled to web-assembly). CadHub integrates with CascadeStudio.
Curv is a programming language for creating art using mathematics. It’s a 2D and 3D geometric modelling tool that supports full colour, animation and 3D printing. It was inspired by OpenScad and shadertoy.
FreeCad is a more traditional CAD package that supports python scripting, Both for modelling as well as controlling the FreeCAD GUI itself. Not only that it has a built in OpenScad workbench as well as an external CadQuery workbench, making it the best in this list at interoperability. FreeCAD uses OpenCascade under-the-hood.
Inspired by OpenScad with a very similar language, implemented in Haskell and includes the ability to write definitions in Haskell, instead of just OpenSCAD, and is part of an 'almost stack' of tools including ExplicitCAD (for a GUI), and HSlice (for an STL slicer).
A declarative parametric 3D modelling program built using OpenCASCADE and enaml.
Formerly OpenJsCad, also inspired by OpenScad. The project is close to a v2.0 release. Implemented in javascript allowing it to be modelled directly within a browser.
Libfive is a software library and set of tools for solid modelling, especially suited for parametric and procedural design. Lisp based language, (so (you (((((can expect ) lots of parentheses))))).
Python-based, Also uses OpenCascade.
Another project inspired by OpenScad. The author considers key differences to be procedural vs functional programming language style, (i.e variables can be modified) and the use of arbitrary precision arithmetic throughout (meaning there are no unexpected double/float rounding errors). There is a handy feature matrix between RapCAD, OpenScad and ImplicitCad.
OpenSCAD DSL in Clojure. Functions generally mirror OpenSCAD, with a couple of notable exceptions.
Same author as scad-cji, he likes functional programming languages clearly.
Go-based Code-CAD package that uses a signed distance functions (SDFs) kernel. Is capable of doing fillets and chamfering. The repo includes a standard-library.
Python-based library that wraps OpenScad, i.e. it outputs OpenScad code.
Tovero is a binding of Libfive to Common Lisp, including a standalone REPL-based viewer. Tovero can be integrated with Clive, a Common Lisp scene graph and 3D GUI, to build more complex modelling applications.
Not quiet Code-Cad, but they do embody much of the same thought process.
Look unmaintained.
Dynamo is, quite literally, what you make it. Working with Dynamo may include using the application, either in connection with other Autodesk software or not, engaging a Visual Programming process, or participating in a broad community of users and contributors. Works with FreeCad
Add-on for blender. Sverchok is a powerful parametric tool for architects, allowing geometry to be programmed visually with nodes.
Something I missed? Open an issue on Github