A Text to CAD Web Application
- Generates parametric 3D models from natural language descriptions, with support for both text prompts and image references
- Outputs OpenSCAD code with automatically extracted parameters that surface as interactive sliders for instant dimension tweaking
- Separate agents for conversation and code generation; simple parameter tweaks bypass AI entirely using deterministic regex-based updates
- Exports as .STL or .SCAD
- Runs fully in-browser by compiling OpenSCAD to WebAssembly and integrating Three.js with React Three Fiber for 3D rendering
- Supports BOSL, BOSL2, and MCAD libraries and custom font support (Geist) for text in models
- Node.js and npm
- Supabase CLI
- ngrok (for local webhook development)
- Copy
.env.local.templateto.env.local - Update all required keys in
.env.local:VITE_SUPABASE_ANON_KEY="<Test Anon Key>" VITE_SUPABASE_URL='http://127.0.0.1:54321'
- Copy
supabase/functions/.env.templatetosupabase/functions/.env - Update all required keys in
supabase/functions/.env, including:ANTHROPIC_API_KEY="<Test Anthropic API Key>" ENVIRONMENT="local" NGROK_URL="<NGROK URL>" # Your ngrok tunnel URL, e.g., https://xxxx-xx-xx-xxx-xx.ngrok.io
CADAM uses ngrok to send image URLs to Anthropic:
-
Install ngrok if you haven't already:
npm install -g ngrok # or brew install ngrok -
Start an ngrok tunnel pointing to your Supabase instance:
ngrok http 54321
-
Copy the generated ngrok URL (e.g., https://xxxx-xx-xx-xxx-xx.ngrok.io) and add it to your
supabase/functions/.envfile:NGROK_URL="https://xxxx-xx-xx-xxx-xx.ngrok.io" -
Ensure
ENVIRONMENT="local"is set in the same file.
npm inpx supabase start
npx supabase functions serve --no-verify-jwtThis app wouldn't be possible without the work of:
This distribution is licensed under the GNU General Public License v3.0 (GPLv3). See LICENSE.
Components and attributions:
- Portions of this project are derived from
openscad-web-gui(GPLv3). - This distribution includes unmodified binaries from OpenSCAD WASM under
GPL v2 or later; distributed here under GPLv3 as part of the combined work.
See
src/vendor/openscad-wasm/SOURCE-OFFER.txt.