// Introducing SketchCAD

Describe it.
Build it.
Render it.

A sketchpad for engineers. Type natural language — get real-time 3D geometry via signed distance functions. Powered by LLMs. Rendered by WebGPU.

Get Started See How It Works
sketchcad — text-to-geometry
$
✓ Generating WGSL SDF map()...
✓ Validated. Pushing to WebGPU renderer...
// Rendered in 14ms — ray-march complete
scroll
100%
Valid WGSL from top models
4.35
Peak accuracy score / 5
46
Benchmark prompts
9
Models evaluated

Four steps from
words to geometry.

SketchCAD takes your description and turns it into a raymarched 3D model in real time — no GUI, no clicking.

01
✍️

Describe your object

Write in plain language — dimensions, shape, style, relationships. No CAD knowledge required.

Natural Language
02
🧠

LLM generates WGSL

The model outputs a fn map(p: vec3f) → f32 function using SDF primitives and CSG helpers.

Qwen3-32B / vLLM
03

Validation & push

server.py runs WGSL validation, then pushes the scene live to the web viewer instantly.

Python Server
04
🖥️

WebGPU rendering

The client ray-marches the signed distance field in real time, directly in your browser.

WebGPU

Why Signed Distance
Functions?

Massively parallel rendering

SDFs are GPU-native. Ray-marching every pixel independently means near-instant feedback as you iterate.

🌀

Organic & procedural shapes

Gyroids, smooth booleans, infinite repetitions — shapes that are tedious or impossible in classical B-Rep CAD.

🤖

LLM-native syntax

Models already know WGSL SDF syntax from Inigo Quilez's tutorials. We exploit this prior for reliable generation.

🔁

Instant iteration

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);
}

How well do LLMs
design 3D geometry?

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 ⭐
100%
4.35 A
Qwen3-14B-FP8
100%
4.28 A
Qwen3-32B-FP8
100%
4.15 A
GLM-4.7-Flash-FP8
100%
4.00 A
GLM-4-32B-0414
100%
3.96 A
DeepSeek-R1-Distill-Qwen-32B
100%
3.87 A
GLM-Z1-32B-0414
67%
3.02 C
llava-v1.6-mistral-7b-hf
96%
2.37 A
llava-onevision-qwen2-7b
83%
2.15 B

// Qwen2.5-Coder-32B outperformed both Qwen3 sizes and produced genuinely creative SDF solutions.

Built for exploration.

Not a replacement for Fusion360 — a playground for creative engineers who want to move fast.

🏗️

Concept Engineering

Rapidly prototype structural forms and mechanical concepts before committing to a full B-Rep CAD model.

🌀

Organic Geometry

Design gyroids, minimal surfaces, and procedurally-generated lattice structures impossible in classical CAD.

🎓

SDF Research

Benchmark LLM geometry understanding across prompt styles and model scales. Extend the evaluation suite.

What's next.

Short Term

Expand SDF primitive library

Gears, threads, fillets, and all core mechanical CAD objects

3D vision for LLM

Point cloud or VLM integration to fix proportional errors automatically

Grammar-constrained DSL fallback

Enforce structure on weaker models via custom C++ geometry kernel

Longer Term

3D Physics Simulation

Test your geometry under real-world conditions within the viewport

Finite Element Analysis (FEA)

Structural analysis on SDF meshes for real engineering validation

Program Synthesis & Optimisation

Open-ended shape optimisation to explore the design space automatically
// Get Started

Start building
with words.

Open source. Self-hostable. Runs on vLLM.

View on GitHub Read the Docs