A full-stack, AI-powered parametric CAD generation platform. Type "iPhone 15 Pro case with camera cutout and USB-C port", and within seconds a fully-parametric, 3D-printable model appears in your browser — adjustable…
Test pcb 001 is an open-source printed circuit board by Aslanmatejka, from the Aslanmatejka/inventa.ai repository on GitHub. It is a 2-layer board of 60 × 40 mm with 6 parts on 2 nets, routed with 1 track and 0 vias.
Its parts include 1 IC and 1 diode.
README
README.md
🧱 CAD AI Builder — Chat-to-CAD Platform
Describe any physical product in plain English → AI generates production-quality 3D geometry → download STL/STEP instantly.
A full-stack, AI-powered parametric CAD generation platform. Type "iPhone 15 Pro case with camera cutout and USB-C port", and within seconds a fully-parametric, 3D-printable model appears in your browser — adjustable with sliders, exportable in STEP and STL, and editable with further natural language commands. Upload your own CAD files (STEP, IGES, STL, OBJ, 3MF, DXF…) and continue editing them with language.
Apply a natural language edit to an uploaded CAD file.
Request body:
json
{"buildId": "uuid",
"prompt": "Add four M3 mounting holes in the corners",
"importCode": "import cadquery as cq\nresult = cq.importers.importStep(...)\n...",
"previousDesign": null}
Returns the same shape as the /api/build/stream final result.
Scene Management Endpoints
Method
Path
Description
POST
/api/scene/create
Create a new multi-product scene
GET
/api/scene/{id}
Get scene + all products
POST
/api/scene/{id}/add-product
Add a product to a scene
PUT
/api/scene/product/{instanceId}/transform
Update position/rotation/scale
POST
/api/scene/product/{instanceId}/duplicate
Duplicate with offset
DELETE
/api/scene/product/{instanceId}
Remove from scene
POST
/api/scene/{id}/assemble
Group products into assembly
DELETE
/api/scene/assembly/{id}
Disassemble group
Project & History Endpoints (MySQL required)
Method
Path
Description
GET
/api/projects
List all saved projects
POST
/api/projects
Create project
GET
/api/projects/{id}
Get project with builds + chat messages
PUT
/api/projects/{id}
Rename / update project
DELETE
/api/projects/{id}
Delete project and all data
POST
/api/messages
Save a chat message to a project
GET
/api/history
Recent builds across all projects
Utility Endpoints
Method
Path
Description
GET
/
Health check
GET
/api/health
Detailed service status
GET
/exports/cad/{filename}
Serve generated CAD/STL/STEP files
GET
/exports/uploads/{filename}
Serve uploaded source files
GET
/api/cache/check?prompt=...
Check if a prompt has a cached result
POST
/api/convert/glb
Convert STL to GLB (trimesh, optional)
GET
/api/mesh/stats/{buildId}
Mesh vertex/face statistics
POST
/api/s3/upload
Upload model to S3 for sharing
GET
/api/s3/download/{key}
Download shared model from S3
CAD File Upload & NLP Editing
One of the platform's most powerful features: upload any supported CAD file and immediately start editing it with natural language.
Supported Formats
Format
Extension
Type
NLP Editing
STEP
.step, .stp
Solid B-Rep
✅ Full support
IGES
.iges, .igs
Solid B-Rep
✅ Full support
BRep
.brep
OpenCASCADE native
✅ Full support
DXF
.dxf
2D sketch
✅ Auto-extruded to 3D
STL
.stl
Mesh
⚠️ View & export only
OBJ
.obj
Mesh
⚠️ View & export only
3MF
.3mf
Mesh
⚠️ View & export only
PLY
.ply
Mesh
⚠️ View & export only
GLB/glTF
.glb, .gltf
Mesh
⚠️ View & export only
Tip: For full NLP editing of mesh files, convert them to STEP first using FreeCAD, Fusion 360, or any STEP exporter, then re-upload.
Editing Flow
Drag-and-drop a STEP/IGES file onto the Upload CAD file zone in the chat panel
The model appears in the 3D viewer with geometry metadata (bounding box, face/edge count, volume)
A "NLP editable" badge appears in the prompt bar
Type your edit: "add four M3 mounting holes 5mm from each corner"
Claude reads the imported geometry code as the starting point and produces modified CadQuery code
The new model replaces the old one in the viewer
Chain further edits — each iteration uses the latest code as the base
How the AI Pipeline Works
Build Pipeline (6 steps)
text
User prompt
│
├─ 1. Product Library Search
│ Searches 98+ product templates for real-world reference dimensions
│ (e.g., "iPhone 15 Pro" → exact port positions, camera island size)
│
├─ 2. Claude AI Design Generation
│ System prompt (~3000 lines) instructs Claude to return raw JSON:
│ { parameters: [...], code: "import cadquery...", explanation: {...} }
│ Adapts max_tokens (up to 16384) and temperature by complexity
│
├─ 3. Completeness Check & Enhancement
│ analyze_code_completeness() checks for missing features
│ If incomplete → enhance_incomplete_design() sends back to AI for targeted fixes
│
├─ 4. CadQuery Execution (with self-healing)
│ 7-transform preprocessing pipeline (see below)
│ exec() in sandboxed namespace
│ On error → infinite self-healing loop (5 escalating phases)
│
├─ 5. File Export
│ CadQuery → .step (editable) + .stl (printable) + _parametric.py (script)
│
└─ 6. Return result to frontend via SSE
7-Step Code Preprocessing Pipeline
Before exec(), every AI-generated code snippet goes through these transforms in order:
#
Transform
What it does
1
_strip_centered_from_non_box()
Removes centered= from .extrude(), .rect(), .circle() — only .box() supports it
2
_ensure_box_grounding()
Adds centered=(True,True,False) to the first main .box() so Z=0 is ground
3
_fix_zero_dimensions()
Replaces .extrude(0) with .extrude(0.1) to prevent zero-height geometry errors
4
_fix_negative_z_positions()
Warns and clamps features placed below Z=0
5
_ensure_result_assignment()
Auto-adds result = body if the AI forgot to assign the final workplane
6
_clamp_fillet_radii()
Injects min(r, _auto_fillet_max) guards — 15% of the smallest dimension
7
_wrap_fillets_in_try_except()
Wraps unprotected .fillet() / .chamfer() calls in try/except blocks
Self-Healing Engine
When CadQuery raises a RuntimeError or ValueError, the system never gives up. It classifies the error into one of 18 categories and retries with progressively more aggressive fixes:
Rebuilds on slider change via POST /api/rebuild — loads the saved script, replaces parameter values, re-executes the GEOMETRY section only, re-exports STL/STEP
This means parameter changes respond in 1–3 seconds with no AI usage.
product_library.py contains 98+ product templates with real-world reference dimensions. When a user prompt matches a product, its reference data is injected directly into the Claude context, ensuring accurate measurements.
recognition_features — features that distinguish this category
position_map — where specific features are located
Optional Services
All optional services degrade gracefully — the app works fully without them.
MySQL Database
When DB_PASSWORD is set, the app stores:
Projects — named workspaces
Builds — each AI generation with code, parameters, file paths
Chat messages — full conversation history per project
Without MySQL, the app runs in-memory only (data is lost on server restart).
Setup:
sql
CREATE DATABASE product_builder CHARACTER SET utf8mb4;
CREATE USER 'cad_user'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL ON product_builder.* TO 'cad_user'@'localhost';
S3 Model Sharing
With AWS credentials set, use POST /api/s3/upload to generate a shareable URL for any model, and GET /api/s3/download/{key} to restore a shared model.
GLB Export (Three.js optimized)
With trimesh installed, POST /api/convert/glb converts STL to GLB format — smaller file size and faster loading in the 3D viewer.
Celery Async Tasks
With Celery + Redis running, use POST /api/build/async to queue builds and poll GET /api/task/{taskId} for results. Useful for server deployments with multiple concurrent users.
Frontend Architecture
Panels & Layout
The UI is a 3-column CSS grid: chat | resize-handle | preview. The columns are computed by getGridColumns() based on state:
Normal: ${chatWidth}% 8px ${100-chatWidth}% — user can drag the resize handle
It measures 60 × 40 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Test pcb 001 use?
6 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Test pcb 001 KiCad files?
From the Aslanmatejka/inventa.ai repository on GitHub, at the commit this page was made from: the board is exports/pcb/test_pcb_001.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Can I use the Test pcb 001 design in my own project?
Its repository states no licence, so its author keeps all rights: ask Aslanmatejka before reusing the design.