CADAM: Open-Source AI-Powered Text-to-CAD Web Application

CADAM is an open-source text-to-CAD web application that allows users to generate parametric 3D models using natural language descriptions and image references. By leveraging Large Language Models (LLMs) to generate OpenSCAD code, which is then rendered in the browser via WebAssembly, CADAM enables the rapid creation of everything from simple mechanical parts to complex assemblies without requiring manual CAD software installation.

Core Functionality and AI Integration

CADAM transforms plain English descriptions into functional 3D geometry. The system identifies adjustable dimensions within the generated code and automatically extracts them as interactive parametric controls (sliders), allowing users to refine the model's dimensions in real-time without needing to re-run the AI generation process.

Key Technical Capabilities

  • Natural Language Processing: Users describe models in plain English to generate initial geometry.
  • Image-Guided Generation: The application supports uploading images to guide the AI in creating more accurate 3D representations.
  • Real-time Preview: Integration with Three.js and React Three Fiber provides an instant visual feedback loop.
  • Parametric Extraction: The AI identifies key dimensions, which the application then presents as interactive sliders for precise adjustment.
  • Multi-Format Export: Models can be exported as .STL (for 3D printing), .SCAD (for OpenSCAD editing), or .DXF (for laser cutting/CNC).

Technical Architecture

CADAM is built as a modern web application utilizing a combination of high-performance rendering and scalable backend services.

The Tech Stack

  • Frontend: React 19, TypeScript, TanStack Start, and Vite.
  • 3D Rendering: Three.js and React Three Fiber.
  • CAD Engine: OpenSCAD compiled to WebAssembly (WASM), allowing the CAD engine to run entirely within the user's browser.
  • Backend: Supabase (PostgreSQL, Auth, and Storage) and TanStack Start server routes.
  • AI Orchestration: Primarily powered by the Anthropic Claude API, with support for other providers via OpenRouter, OpenAI, and Google.
  • Styling: Tailwind CSS and shadcn/ui.
  • Libraries: Support for BOSL, BOSL2, and MCAD libraries to extend geometric capabilities.

Performance Benchmarks

CADAM's capabilities range from basic parametric parts to complex mechanical assemblies. The following examples demonstrate the system's ability to handle spatial reasoning and multi-part design:

Complex Assemblies

  • V8 Engine: A complete internal combustion engine featuring two banks of cylinders, cylinder heads, intake manifolds, exhaust headers, a crankshaft, and an oil pan (utilizing 22 dimensions and 8 colors).
  • Radial Aircraft Engine: A 9-cylinder engine with a central crankcase and finned cylinders arranged in a star pattern.
  • Turbofan Jet Engine: A high-bypass turbofan including a front fan, bypass cowl, and internal core stages.
  • Axial Turbine Blisk: A bladed disk with 28 aerofoil blades twisted along their height.

Parametric Fundamentals

  • Mechanical Components: The system can generate real-threaded M12 hex bolts and nuts, herringbone planetary gear stages, and right-angle bevel gear drives.
  • Functional Parts: Examples include NACA 2412 tapered wings, centrifugal pump impellers, and honeycomb lightweight brackets.

User Experience and Practical Application

Early user feedback indicates that CADAM significantly reduces the time required to move from a concept to a printable part. Users have reported generating custom boat lift bumpers and grommet seals for aluminum pipes in minutes—tasks that would typically require manual modeling in professional CAD software like Fusion 360.

"Saw this and after 5 minutes of prompting I have four custom bumpers printing."

"Got it done in about the time it would take me to login and load Fusion."

Development and Contribution

CADAM is licensed under the GNU General Public License v3.0 (GPLv3). It is designed for local development using the Supabase CLI and ngrok for handling provider callbacks and signed storage URLs. The project is open for contributions via GitHub, where users can fork the repository and submit pull requests.

Sources