Skip to content

pedrocandeias/scadforge

Repository files navigation

OpenSCAD Studio

A browser-based, open-source 3D modelling tool for OpenSCAD — with three integrated editing modes and an AI assistant that always stay in sync.

Status: Active development — core features working, AI assistant in progress.


Three Ways to Build

🧱 Visual Editor (TinkerCAD-style)

Drag and drop primitives onto the workplane, position them with transform gizmos, snap to grid, and apply boolean operations — union, subtract, intersect. Supports 15+ primitive types including box, sphere, cylinder, cone, torus, pyramid, wedge, tube, rounded box, polygon, icosahedron, and more.

🔗 Node Graph Editor (Procedural)

Connect nodes to wire together OpenSCAD operations visually — inspired by OpenSCAD Graph Editor, Blender's Geometry Nodes, and Grasshopper. Build parametric models without writing code: expose values as parameters by connecting number nodes to inputs. Supports all OpenSCAD built-ins, math nodes, and more.

📝 Code Editor (Full OpenSCAD)

A Monaco-powered code editor with OpenSCAD syntax highlighting, inline diagnostics, autocomplete with snippet insertion, and hover documentation for all built-in functions.

✦ AI Assistant

A toggleable side panel powered by your own Claude or OpenAI API key:

  • Chat — ask questions about your model, get suggestions, request modifications
  • Generate — describe a shape in plain language → get OpenSCAD code
  • Node Graph Builder — describe a parametric model → auto-builds the node graph
  • Explain — when OpenSCAD errors occur, AI explains what went wrong and offers a fix

One Model, Three Views + AI

All three editors and the AI share the same OpenSCAD source string as canonical state. Switch modes any time — the model comes with you. AI changes are fully undoable.

Visual edit  ──►
Node edit    ──►  OpenSCAD source  ──► WASM renderer ──► 3D viewport
Code edit    ──►
AI generate  ──►

No install. No account. No backend. Runs entirely in your browser.


Feature Status

Visual Editor

Feature Status
15+ primitive types ✅ Done
Boolean ops (union / subtract / intersect / hole) ✅ Done
Snap-to-grid workplane ✅ Done
Transform gizmo (move / rotate / scale) ✅ Done
Properties panel ✅ Done
Object rename, delete ✅ Done
Color picker per object 🔄 In progress
Drag & drop from sidebar 🔄 In progress
Mirror, align, duplicate tools 🔄 In progress
Ruler / measurement tool 🔄 In progress

Node Graph Editor

Feature Status
React Flow canvas with typed ports ✅ Done
All primitive/boolean/transform nodes ✅ Done
Math / value / utility nodes ✅ Done
Node search palette (Spacebar / right-click) ✅ Done
Auto-layout (dagre.js, undoable) ✅ Done
Node deletion (keyboard + context menu) ✅ Done
Code Block node (for unsupported constructs) ✅ Done

Code Editor

Feature Status
Monaco with OpenSCAD syntax highlighting ✅ Done
WASM render on keystroke (debounced) ✅ Done
Completions with snippet insertion ✅ Done
Hover documentation ✅ Done
Inline error markers ✅ Done

AI Assistant

Feature Status
API key management (Claude + OpenAI) 🔄 In progress
Chat tab with source context 🔄 In progress
Text-to-3D generation 🔄 In progress
Node graph builder 🔄 In progress
Error explainer 🔄 In progress

General

Feature Status
Real WASM OpenSCAD renderer (CGAL) ✅ Done
Shared 3D viewport (Three.js) ✅ Done
Three-way sync (visual ↔ graph ↔ code) ✅ Done
Undo / redo across all modes ✅ Done
Export STL / OBJ / .scad ✅ Done
Open / save project folders ✅ Done
Dark / light theme ✅ Done
PWA / offline support 📋 Planned

Getting Started

git clone https://github.com/your-org/openscad-studio.git
cd openscad-studio
pnpm install
pnpm dev
# open http://localhost:5173

See docs/dev-setup.md for prerequisites and full setup.

Using the AI Assistant

  1. Click the button in the toolbar to open the AI panel
  2. Click the settings icon and enter your API key:
  3. Your key is stored locally in your browser — never sent anywhere else

Tech Stack


Contributing

See CONTRIBUTING.md. High-value areas right now:

  • New visual editor primitives and tools (Phase 6)
  • AI panel implementation (Phase 7)
  • Three.js / WebGL performance
  • OpenSCAD language expertise (LSP, AST parsing)

License

MIT

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors