Adam Brings Open-Source AI CAD Directly to the Browser
The YC W25 project CADAM combines LLMs with WebAssembly and OpenSCAD to generate fully parametric 3D models.
Computer-Aided Design (CAD) has traditionally been dominated by heavy, proprietary desktop applications that rely on complex graphical user interfaces and steep learning curves. However, a new wave of open-source, web-native tools is beginning to challenge this paradigm by combining generative AI with code-first geometry engines.
Enter CADAM (developed by Adam, a YC W25 startup), an open-source text-to-CAD web application designed to run entirely in the browser. By leveraging Large Language Models (LLMs) to generate parametric code rather than raw 3D meshes, CADAM bridges the gap between natural language descriptions and precise, editable engineering models.
The Architecture: WebAssembly, Three.js, and OpenSCAD
At the core of CADAM's technical approach is a shift away from traditional boundary representation (B-rep) kernels, which are notoriously difficult for LLMs to output directly. Instead, the application targets programmatic CAD. It generates code written for OpenSCAD, a popular open-source, script-based 3D modeler.
To make this workflow seamless and zero-install, CADAM compiles and runs the CAD engine directly in the browser using WebAssembly (Wasm). The rendering pipeline is structured as follows:
- Code Generation: The user provides a natural language prompt or an image reference. The AI generates the corresponding OpenSCAD script.
- In-Browser Compilation: The generated script is compiled on the fly by the Wasm-ported engine.
- Real-Time Visualization: The compiled geometry is passed to Three.js for high-performance, interactive 3D rendering in the browser.
- Database & Backend: The repository structure reveals a Supabase integration, suggesting a robust backend for user sessions, model storage, and prompt management.
By targeting code generation rather than direct mesh generation, CADAM ensures that the output is not just a static, uneditable "shell" (like a typical .OBJ or .STL file generated by image-to-3D models), but a fully mathematical, parametric representation of the object.
Smart Updates and Parameter Extraction
One of the most compelling features of CADAM is its approach to model manipulation. In typical AI generation workflows, making a minor change—such as widening a bolt by 2 millimeters—requires sending a new prompt to the LLM, waiting for generation, and hoping the model doesn't hallucinate an entirely different design.
CADAM bypasses this limitation through a two-step process:
- Parameter Extraction: When the AI generates the initial OpenSCAD code, CADAM automatically identifies the key adjustable dimensions and variables within the script.
- Interactive Sliders: These extracted variables are mapped to interactive UI sliders in the browser.
This enables what the project calls Smart Updates. When a user adjusts a slider to change a dimension, the application re-runs the local WebAssembly compiler to update the 3D preview instantly. Because this process happens entirely client-side without re-invoking the LLM, it eliminates API latency and token costs while guaranteeing that the underlying topology of the model remains intact.
Leveraging Rich Geometry Libraries
Writing raw OpenSCAD code from scratch can be tedious, especially for complex mechanical components. To expand the AI's capabilities, CADAM includes built-in support for several powerful open-source libraries, including BOSL, BOSL2, and MCAD.
These libraries provide pre-defined modules for complex mathematical shapes, threads, gears, and structural components. By exposing these libraries to the LLM, CADAM can generate highly sophisticated assemblies from simple prompts.
The project's benchmarks demonstrate the breadth of geometry the system can generate from a single plain-language description:
- Complex Assemblies: A complete V8 engine (featuring 22 dimensions and 8 colors, complete with cylinder banks, crankshaft, pistons, and connecting rods) and a 9-cylinder radial aircraft engine (15 dimensions, 6 colors).
- Mechanical Components: A right-angle bevel gear drive (9 dimensions, 3 colors), a centrifugal pump impeller with backward-curved blades (10 dimensions), and a knurled control knob with a diamond-knurled grip and an M3 set-screw hole (15 dimensions).
- Aerodynamic & Structural Shapes: A tapered aircraft wing section using a real NACA 2412 airfoil (9 dimensions) and a honeycomb lightweight mounting bracket (13 dimensions).
Once generated, users can export their designs in standard formats, including .STL for 3D printing, .SCAD for further editing in desktop OpenSCAD, or .DXF for CNC routing and laser cutting.
Why This Matters for the Developer Ecosystem
For developers building in the design-tools, manufacturing, or AI-native engineering spaces, CADAM represents a highly practical blueprint. It demonstrates that the most effective way to apply LLMs to physical engineering is not to teach them to draw 3D shapes pixel-by-pixel, but to teach them to write structured, parametric code that existing compiler toolchains can execute.
By open-sourcing the codebase, the creators of CADAM are providing a valuable reference architecture for browser-based CAD compilation, real-time Wasm rendering, and LLM-driven parameter extraction.
Sources & further reading
- Launch HN: Adam (YC W25) – Open-Source AI CAD — github.com
Mariana covers the fast-moving world of machine learning and generative AI, with a particular focus on how these technologies are reshaping development workflows. When she isn't stress-testing the latest foundation models, she's usually at a local hackathon.
Discussion 0
No comments yet
Be the first to weigh in.