ScadForge — browser-based OpenSCAD parametric CAD IDE
Find a file
hermes e16c2573c2
Some checks failed
CI / build (push) Failing after 1m35s
ci: re-run via runner pickup verification
2026-09-26 20:06:51 -07:00
.forgejo/workflows fix(project/vfs/ci): exported-param expr scope, manifest shared_params clobber, tsc gate 2026-08-10 21:29:07 -07:00
.gsd/gates chore: allow src/lib/scad/expr.ts in pre-dispatch gate and switch test to build 2026-08-03 13:58:44 -07:00
docs docs: add Constraint 2.0 spec hub pointing at issues #9–#12 2026-08-03 11:05:38 -07:00
public init: project bootstrap from archive 2026-08-03 07:36:52 -07:00
src test(#2): cover scad parser/solver/codegen/geometry + vfs path helpers 2026-09-17 14:29:41 -07:00
.gitignore chore: gitignore .kilo/ working notes (#13) 2026-09-09 08:30:47 -07:00
AGENTS.md docs(#7): add AGENTS.md for multi-agent hand-off protocol 2026-08-03 20:45:55 -07:00
components.json init: project bootstrap from archive 2026-08-03 07:36:52 -07:00
CONTRIBUTING.md docs(#7): add dev-loop, scripts, and path conventions to CONTRIBUTING.md 2026-08-03 20:48:22 -07:00
eslint.config.js docs: codify vfs.ts shared contract, add ESLint no-restricted-imports rule, create CONTRIBUTING.md 2026-08-03 14:16:50 -07:00
index.html docs(#5): explain Google Fonts preconnect choice in index.html 2026-08-03 20:50:40 -07:00
lefthook.yml chore: add pre-commit hooks to catch lint/type drift before push 2026-09-11 19:57:25 -07:00
package-lock.json Apply changes from kilo-gsd.py run for Mark/kimi_agent_openscad_parametric_gui#2 2026-09-17 14:29:41 -07:00
package.json fix(test): add test:coverage script and relax branch threshold 2026-09-17 14:29:41 -07:00
postcss.config.js init: project bootstrap from archive 2026-08-03 07:36:52 -07:00
README.md init: project bootstrap from archive 2026-08-03 07:36:52 -07:00
tailwind.config.js init: project bootstrap from archive 2026-08-03 07:36:52 -07:00
tsconfig.app.json init: project bootstrap from archive 2026-08-03 07:36:52 -07:00
tsconfig.json init: project bootstrap from archive 2026-08-03 07:36:52 -07:00
tsconfig.node.json init: project bootstrap from archive 2026-08-03 07:36:52 -07:00
vite.config.ts perf: split workbench vendor bundles 2026-08-03 14:33:31 -07:00
vitest.config.ts test(#2): cover scad parser/solver/codegen/geometry + vfs path helpers 2026-09-17 14:29:41 -07:00

ScadForge

A browser-based IDE for OpenSCAD parametric CAD.

Projects are directories. Parts are modules. Click-to-select code sync. Real .scad export.

What it does

ScadForge wraps OpenSCAD in a graphical workbench with a virtual filesystem, a CAD-aware parser, a constraint solver, and a 3D viewport — all in the browser, with project state stored in IndexedDB.

  • Module-first editing. Each .scad part is a top-level module you can select in the 3D viewport and jump to in the source editor.
  • Constraint solver. Declare dimensional relationships (equalities, inequalities, references) and let the solver adjust parameters to keep them satisfied.
  • Project filesystem. Nested directories, drag-to-move, rename, duplicate — autosaved, survives refresh.
  • Library manager. Built-in catalogs for BOSL2, MCAD, NopSCADlib, and DotSCAD, plus the ability to drop in custom libraries.
  • Real .scad export. Projects zip out as actual OpenSCAD files (preserving the directory tree) ready to feed into openscad -o model.stl.

Tech Stack

  • React 19 + TypeScript 5
  • Vite 7
  • Tailwind CSS 3 + Radix UI primitives
  • CodeMirror 6 (editor)
  • React Three Fiber + Three.js (viewport)
  • GSAP + Lenis (landing animations)
  • IndexedDB (project storage, via the custom VFS in src/lib/vfs.ts)

Getting Started

git clone https://github.com/Mark/kimi_agent_openscad_parametric_gui.git
cd kimi_agent_openscad_parametric_gui
npm install
npm run dev      # http://localhost:5173

Scripts

Command Description
npm run dev Vite dev server with HMR
npm run build Type-check + production build
npm run lint ESLint over src/
npm run preview Serve the production build locally

Project Structure

src/
  lib/
    vfs.ts                  # Virtual filesystem — SHARED CONTRACT
    scad/                   # OpenSCAD parser, solver, codegen
      parser.ts             # Tokenizer + module-tree builder
      constraints.ts        # Constraint AST
      solver.ts             # Gauss-Seidel constraint solver
      constraintCodegen.ts  # Solve → parameter substitution
      geometry.ts           # Bounding-box + shape inference
      syncStore.ts          # useSyncExternalStore-backed VFS hook
    libraries.ts            # BOSL2 / MCAD / NopSCADlib / DotSCAD catalogs
  components/
    workbench/              # CodeEditor, Viewport3D, FileTree, etc.
    ui/                     # shadcn/ui primitives
  pages/
    Home.tsx                # Marketing landing
    Workspace.tsx           # Main IDE view
    Libraries.tsx           # Library catalog browser
    Shortcuts.tsx           # Keyboard cheat-sheet
    About.tsx               # Project info

VFS Contract

src/lib/vfs.ts is the merge seam between agents. If you fork or extend this codebase, do not change those exported signatures — add new helpers in your own files instead.

License

Private — Mark/Cyguin.