What Is CadHub and How Can You Start Using Code-CAD?

CadHub is a community hub and social platform for Code-CAD — building 3D models by writing code rather than dragging a mouse. It lets you try several Code-CAD libraries in the browser, browse and fork other people's projects, and ask users how they designed a part. It suits anyone curious about code-driven modeling, from beginners who want to compare libraries to experienced users who want to share and remix work.

What "Code-CAD" actually means

In traditional CAD you sketch and extrude with a mouse. In Code-CAD, the model is a script: you describe geometry with functions, variables, and loops, then the software renders it. The CadHub homepage puts the pitch plainly — "Code is the future of CAD" — arguing that designs backed by reliable, easy-to-write code open new workflows and collaboration.

The practical difference shows up in reuse. A parametric part written as code can be re-generated at a new size by changing one number, and a collaborator can read exactly how it was built. The OpenSCAD example on the site, a "walking beam" for an oil pumpjack, defines H = 12, W = 10, and e = 10 at the top and builds the body from those values — change the numbers, get a different beam.

The Code-CAD packages CadHub supports

CadHub's stated goal is to be "the place you can try out Code-CAD packages to find the one that's right for you." The site lists these integrations:

Package Language / basis What it's known for
OpenSCAD C++-like syntax Mature library focused on Constructed Solid Geometry (CSG) modeling
CadQuery Python CSG plus sketch-based modeling, with a clean-feeling API
JSCAD JavaScript Familiar to web developers, based on the same tech as OpenSCAD
Curv Its own language A programming language for creating art using mathematics; 2D and 3D geometric modeling

CadHub describes three of these as its current integrations and says to "keep an eye out for more." If you already know Python, CadQuery is the natural first stop; if you write JavaScript, JSCAD will feel closest to home; if you want the largest body of existing examples and tutorials, OpenSCAD is the mature default.

How to start

  1. Pick a starting point. Go to the "Start Hacking" / "Choose your character" area and select one of the integrations — OpenSCAD, CadQuery, or JSCAD — to try it out.
  2. Read a real project before writing your own. Browse "See All Projects" and open something small. The hinge example on the site is a good template: it sets $fn=30 for smooth curves, defines modules like hingeBaseProfile() and hingeBodyHalf(), and composes them with difference(), union(), and linear_extrude().
  3. Fork and modify. CadHub is explicitly social — you can fork someone's work "to put your own spin on it." Change a parameter (a radius, a length, a hole count) and re-render to see what happens.
  4. Ask when you're stuck. The site invites you to "ask users how they designed a part," which is often faster than reverse-engineering a script alone.

The expected result at each step is a rendered model you can inspect and tweak — the loop is edit code, render, compare.

Common sticking points

  • Code-CAD is not a mouse-driven modeler. If you want to sculpt organic shapes interactively, this workflow will feel indirect. It rewards parametric, repeatable parts instead.
  • Syntax differs sharply between packages. OpenSCAD's C++-like style, CadQuery's Python API, and JSCAD's JavaScript are not interchangeable; a snippet from one won't run in another.
  • Small parameter changes can break geometry. In the hinge example, values like clearance and mountingHoleEdgeOffset control whether parts fit together — change them carelessly and the model renders but won't assemble.

Who it's for

CadHub fits you if you want to compare Code-CAD libraries without installing each one, learn by reading and forking working projects, or share parametric designs with a community. If you only need occasional one-off 3D models and have no interest in scripting, a conventional CAD tool will get you there faster.

cadhub.xyz
A community hub for CodeCAD parts, OpenSCAD, CadQuery, JSCAD and more