What Is CadHub and What Can You Do With It?
CadHub is a browser-based community hub for Code-CAD — CAD modeling done by writing code rather than dragging geometry in a graphical editor. You can try several Code-CAD packages without installing anything locally, browse parts other people have published, fork their work to modify it, and ask the original authors how they built something. It fits you if you want to test whether code-driven parametric modeling suits your workflow, or if you already write OpenSCAD/CadQuery/JSCAD and want a place to share and remix parts.
What "Code-CAD" means here
In Code-CAD, a model is a script: dimensions and shapes are expressed as variables, functions, and operations, and the geometry is generated when the script runs. That makes parts parametric by default — change a number, get a new size — and makes designs diffable and forkable like any other source file.
The excerpt on the site shows this directly. A pumpjack walking-beam module declares its own parameters at the top:
module beam(r1, r2, shr, msr){
H = 12; // Height
W = 10; // Width
e = 10; // Total added extension
...
}
The comment lines are the interface: anyone reading the part can see which values are meant to be tuned.
Which tools you can use
CadHub presents three integrations as available today, with more indicated as coming:
| Tool | Language / basis | Modeling style described on the site |
|---|---|---|
| OpenSCAD | C++-like syntax | Constructive Solid Geometry (CSG) |
| CadQuery | Python | CSG plus sketch-based modeling, "clean-feeling API" |
| JSCAD | JavaScript | CSG, based on the same tech as OpenSCAD |
| Curv | Its own language | 2D and 3D geometric modeling for art using mathematics |
The practical choice: pick OpenSCAD if you want the most mature CSG library and a large body of existing examples; pick CadQuery if you already write Python and want sketch-based workflows; pick JSCAD if you're a web developer and JavaScript is the path of least resistance; consider Curv if your goal is mathematical/artistic form rather than mechanical parts.
What you can actually do on the platform
- Try a package before committing to it. The site frames this as the main entry point: "try out Code-CAD packages to find the one that's right for you."
- Browse published projects. A project feed is shown on the page (loading state visible), with parts like the OpenSCAD pumpjack and a parametric hinge.
- Fork and remix. CadHub describes itself as a social platform: you can fork someone's work "to put your own spin on it."
- Ask the author. You can ask users how they designed a particular part — useful when a script's structure isn't obvious from reading it.
- Learn from real scripts. The hinge example on the page shows a common pattern: derive dependent values from inputs, then build the body from a profile.
hingeHalfExtrudeLength = hingeLength/2 - clearance/2;
mountingHoleMoveIncrement = (hingeLength - 2*mountingHoleEdgeOffset) /
(mountingHoleCount-1);
Reading a few of these teaches the idiom faster than a tutorial, because you see how someone else parameterized a real part.
How it differs from general CAD and from an ordinary web app
- Versus GUI CAD (Fusion, SolidWorks, etc.): the model is text, not a feature tree of mouse operations. You get version-controllable, parameter-driven designs; you give up direct manipulation and, depending on the tool, some surfacing and assembly conveniences.
- Versus a generic web application: CadHub isn't a general productivity app — it's specifically a host and community for Code-CAD scripts, with per-language integrations rather than one universal editor.
- Versus running these tools locally: the appeal is skipping installation and setup, and getting community and forking built in. The trade-off is that you're working within the platform's supported integrations and its web environment rather than your own full local toolchain.
Where to start
- Open CadHub and look at the three integrations offered.
- Pick the one whose language you already know, or the one whose modeling style matches your part (CSG-only vs. sketch-based).
- Open an existing project in that language and read the parameter block at the top — that's the part's control panel.
- Fork it, change one parameter, and re-run to confirm you understand the input → geometry relationship.
- If a design decision is unclear, ask the author; that's an intended use of the platform.
One caveat worth stating plainly: the site describes the community as "making CAD easy to learn on the web," but Code-CAD still assumes you're comfortable reading and editing code. If you've never written a script, expect a learning curve before the parametric payoff arrives.