Workplane AI
Workplane AI is an AI-powered CAD generation platform that turns natural language descriptions and reference images into production-ready 3D models using Google Gemini's multi-modal capabilities.
Core trick
Gemini writes CadQuery code, executes it, and feeds tracebacks and multi-angle renders back to the model until the STL passes.
Description
Workplane AI is an AI-powered CAD generation platform that turns natural language descriptions and reference images into production-ready 3D models using Google Gemini's multi-modal capabilities. Users simply describe the part they want and optionally upload a reference image and the system generates parametric CadQuery Python code, executes it, and renders a downloadable STL file for 3D printing.
An agentic self-correction loop automatically fixes code errors and a visual review system renders the model from multiple angles, sending views back to Gemini for quality assessment and autonomous revision. The generated code is fully editable in-browser via Monaco Editor, enabling rapid manual refinement alongside AI-driven iteration. Built with Next.js, FastAPI, and React Three Fiber, the entire pipeline runs in a single web interface.
README excerpt
# Workplane AI This repository contains a working MVP for an AI-assisted CAD pipeline: - `frontend/`: Next.js + TypeScript UI for prompt entry, image upload, STL preview, code editing, and STL download. - `backend/`: FastAPI service that calls Gemini with vision input, extracts CadQuery code, executes it, retries on failure, and serves generated STL files. The core loop is: 1. Upload an image and/or enter a text prompt. 2. `POST /api/generate` sends the request to Gemini with the CAD system prompt. 3. The backend extracts the `<code>` block, executes it in a constrained CadQuery runtime, and exports an STL. 4. If execution fails, the backend sends the error traceback back to Gemini and retries up to 3 times. 5. The frontend renders the STL with React Three Fiber and shows the generated CadQuery source in an editable Monaco editor. ## Features - Vision + text generation with Google Gemini - CadQuery intermediate representation with server-side STL export - Automatic retry loop with traceback-aware self-correction - Editable code panel with `POST /api/execute` for fast iteration without another LLM call - Follow-up refinement flow that reuses the original prompt, original image, and current code - In-browser STL preview with orbit controls and grid reference - Simple ephemeral file storage in `/tmp/generated` ## Project Structure ```text . ├── backend/ │ ├── config.py │ ├── executor.py │ ├── llm.py │ ├── main.py │ ├── models.py │ ├── requirements.txt │ └──