// Introducing SketchCAD
A sketchpad for engineers. Type natural language — get real-time 3D geometry via signed distance functions. Powered by LLMs. Rendered by WebGPU.
SketchCAD takes your description and turns it into a raymarched 3D model in real time — no GUI, no clicking.
Write in plain language — dimensions, shape, style, relationships. No CAD knowledge required.
Natural LanguageThe model outputs a fn map(p: vec3f) → f32 function using SDF primitives and CSG helpers.
server.py runs WGSL validation, then pushes the scene live to the web viewer instantly.
Python ServerThe client ray-marches the signed distance field in real time, directly in your browser.
WebGPUSDFs are GPU-native. Ray-marching every pixel independently means near-instant feedback as you iterate.
Gyroids, smooth booleans, infinite repetitions — shapes that are tedious or impossible in classical B-Rep CAD.
Models already know WGSL SDF syntax from Inigo Quilez's tutorials. We exploit this prior for reliable generation.
Change a line of text, see a new shape. SketchCAD is built for rapid exploration, not precision manufacturing.
// Generated from: "a gyroid lattice with // smooth-unioned spheres at each node" fn map(p: vec3f) -> f32 { let scale = 1.5; let q = p * scale; // gyroid field let g = sin(q.x)*cos(q.y) + sin(q.y)*cos(q.z) + sin(q.z)*cos(q.x); let gyroid = abs(g) - 0.3; // repeated spheres at nodes let cell = fract(p * 0.5) - 0.5; let sphere = length(cell) - 0.18; // smooth union, k=0.1 return opSmoothUnion(gyroid, sphere, 0.1); }
46 CAD prompts across 5 difficulty categories, evaluated across 9 open-weight models. Accuracy rated by Claude Opus 4.6.
| Model | Valid WGSL | Accuracy / 5 | Grade |
|---|---|---|---|
| Qwen2.5-Coder-32B-Instruct ⭐ | 4.35 | A | |
| Qwen3-14B-FP8 | 4.28 | A | |
| Qwen3-32B-FP8 | 4.15 | A | |
| GLM-4.7-Flash-FP8 | 4.00 | A | |
| GLM-4-32B-0414 | 3.96 | A | |
| DeepSeek-R1-Distill-Qwen-32B | 3.87 | A | |
| GLM-Z1-32B-0414 | 3.02 | C | |
| llava-v1.6-mistral-7b-hf | 2.37 | A | |
| llava-onevision-qwen2-7b | 2.15 | B |
// Qwen2.5-Coder-32B outperformed both Qwen3 sizes and produced genuinely creative SDF solutions.
Not a replacement for Fusion360 — a playground for creative engineers who want to move fast.
Rapidly prototype structural forms and mechanical concepts before committing to a full B-Rep CAD model.
Design gyroids, minimal surfaces, and procedurally-generated lattice structures impossible in classical CAD.
Benchmark LLM geometry understanding across prompt styles and model scales. Extend the evaluation suite.
Expand SDF primitive library
Gears, threads, fillets, and all core mechanical CAD objects3D vision for LLM
Point cloud or VLM integration to fix proportional errors automaticallyGrammar-constrained DSL fallback
Enforce structure on weaker models via custom C++ geometry kernel3D Physics Simulation
Test your geometry under real-world conditions within the viewportFinite Element Analysis (FEA)
Structural analysis on SDF meshes for real engineering validationProgram Synthesis & Optimisation
Open-ended shape optimisation to explore the design space automaticallyOpen source. Self-hostable. Runs on vLLM.