Skip to content

patrickiel/VariantCAD

Repository files navigation

VariantCAD

Screencast

Watch the VariantCAD screencast

Download/watch video file

VariantCAD is a hybrid CAD system for variant generation:

  • Code-first modeling and rule definition
  • A user-friendly parameters UI for guided configuration
  • A future path to generate code from UI actions

Why this matters

In traditional CAD tools, the common approach is:

  1. Build a 3D model first.
  2. Add scripts on top to modify that model.

That workflow often becomes hard to maintain as complexity grows, since you need to handle CAD template files.

VariantCAD combines both worlds:

  1. The model is created directly in code.
  2. Variant rules are embedded in that same code.
  3. Geometry and configuration logic are defined together from the start.
  4. A CAD-style UI exposes parameters for non-coders and design engineers.

Code-first + auto-generated parameters UI

VariantCAD supports annotated variables in code.
Those annotations are automatically exposed as UI controls in the Parameters panel.

This supports multiple user groups:

  • Design engineer / developer works in code (full modeling and rule logic).
  • CAD engineer / technical user works in the Parameters panel (guided configuration).
  • Future workflows can move from UI interaction back to generated code.

Users in the Parameters panel do not need CAD scripting expertise.
They can only choose predefined, valid values and valid combinations.

What this enables

  • Faster creation of product variants
  • Safer configuration with fewer invalid setups
  • A maintainable rule-based modeling workflow
  • Better collaboration between engineering and non-engineering users

Technology foundation

VariantCAD is based on the Open Cascade geometric kernel (via CadQuery).

  • Open Cascade provides the core CAD/geometry engine.
  • CadQuery provides the Python-based modeling syntax used to define parts, assemblies, and rules.

Architecture

VariantCAD uses a server-first architecture.

  • Heavy geometry computation and model generation run on the backend.
  • The frontend acts as a configuration and visualization client.
  • Parameter metadata is read from code annotations and exposed automatically as UI controls.
  • Generated outputs (for example GLB and STEP) are produced on the server and delivered through API endpoints.

Run locally (Docker)

From the repository root:

pnpm run build
pnpm run up

Services:

  • Frontend: http://localhost:5173
  • Backend API: http://localhost:8000
  • Postgres: localhost:5434

Stop services:

pnpm run down

License

This repository is proprietary and licensed under the terms in LICENSE. No permission is granted to use, copy, modify, publish, distribute, or create derivative works without prior written permission from the copyright holder.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors