🎨 Transform text descriptions into 3D parametric CAD models
SemiShape is a hobby project that adds AI-powered CAD generation to Agent Zero. Describe what you want in plain Czech or English and get a build123d Python script and an STL file back.
⚙️ Status: Personal hobby project — actively used, actively improved. Bugs may exist.
SemiShape does not use a separate AI model. It uses whatever model you have configured as active in your Agent Zero conversation. The plugin provides:
- Structured prompts that guide the model to generate valid build123d code
- A sandboxed executor that runs the generated code safely
- STL/STEP export from the executed build123d model
- Documentation search across the bundled build123d docs
✅ Natural Language to 3D
Describe geometry in Czech or English — the active Agent Zero model generates the build123d code.
✅ Sandbox Execution
Generated code runs in an isolated subprocess with a 60-second timeout.
✅ STL and STEP Export
Outputs ready-to-print STL or CAD-interchange STEP files.
✅ build123d Documentation Search
Search 600+ bundled doc files or the web for API examples.
✅ Auto-Correction
Applies known fixes for common build123d mistakes before execution.
- Agent Zero (v1.0+)
- OpenRouter API key (used by your Agent Zero conversation model)
- Python 3.10+
-
Install the plugin in Agent Zero UI
Settings → Plugins → Install Plugin → Git →https://github.com/painter99/semishape -
Enable the plugin
Settings → Plugins → SemiShape → Enable -
Set your OpenRouter API key (if not already set in Agent Zero)
The plugin readsAPI_KEY_OPENROUTERorOPENROUTER_API_KEYfrom your environment.
@semishape_generate description="Vytvoř kvádr 50×30×10 mm s dírou uprostřed" language="cs"
@semishape_generate description="Create a 50×30×10 mm box with a centered hole" language="en"
@semishape_execute code="from build123d import *; box = Box(50, 30, 10)" export_format="stl"
@semishape_rag_search query="how to use fillet"
| Parameter | Required | Default | Description |
|---|---|---|---|
description |
✅ | — | Text description of the model |
language |
❌ | cs |
Code comments language: cs or en |
Model: Uses the currently active Agent Zero model. To change the model, switch it in your Agent Zero settings.
| Parameter | Required | Default | Description |
|---|---|---|---|
code |
✅ | — | build123d Python code to execute |
output_name |
❌ | auto | Output filename (without extension) |
export_format |
❌ | stl |
stl, step, or both |
| Parameter | Required | Default | Description |
|---|---|---|---|
query |
✅ | — | Natural language search query |
top_k |
❌ | 5 |
Number of results (1–10) |
use_web |
❌ | true |
Also search the web |
See the examples/ directory for real screenshots and parameter breakdowns.
@semishape_generate description="Vytvoř kvádr 55×35×8 mm s válcovitým otvorem průměru 30mm uprostřed
a půlkulovými nožičkami r=5mm v rozích" language="cs"
Result: 3D model, 5 912 triangles, 1.5 MB STL — see examples/.
Default settings are in default_config.yaml. You can override them per-project in
.a0proj/plugins/semishape/config.yaml.
Key settings:
cad:
default_format: stl # stl | step
execution_timeout: 60 # seconds
sandbox_enabled: trueNote: There is no separate model configuration — SemiShape uses whatever model is active in your Agent Zero conversation.
semishape/
├── plugin.yaml # Agent Zero plugin manifest
├── default_config.yaml # Default settings
├── hooks.py # Plugin lifecycle (install / uninstall)
├── initialize.py # Dependency installer
├── README.md
│
├── tools/
│ ├── semishape_generate.py # Text → CAD code
│ ├── semishape_execute.py # Execute code → STL/STEP
│ └── semishape_rag_search.py # Search build123d docs
│
├── helpers/
│ ├── tool.py # Base class for tools
│ └── semishape_client.py # Client wrapping src/
│
├── src/
│ ├── generation/ # LLM prompting and code parsing
│ ├── execution/ # Sandbox + STL/STEP export
│ └── rag/ # Documentation retrieval
│
├── data/docs/ # 600+ build123d documentation files
├── prompts/ # Tool system prompts
├── skills/ # Agent Zero skill definition
└── examples/ # Usage screenshots and walkthroughs
Plugin not visible in Agent Zero UI
Settings → Plugins → look under the Custom tab, not the Browse (hub) tab.
OpenRouter API key not found
Set API_KEY_OPENROUTER in your environment or in Agent Zero secrets.
build123d not installed
Run python initialize.py inside the plugin directory, or re-enable the plugin to trigger the installer.
Generated code fails to execute
Try rephrasing the description with explicit dimensions. The model sometimes needs clearer geometry.
This is a personal hobby project — contributions and issue reports are welcome.
- Open an issue for bugs or ideas
- PRs welcome, especially for build123d compatibility fixes
— see LICENSE.
- Agent Zero — the framework this plugin runs on
- build123d — the CAD library used for 3D modelling
- OpenRouter — API gateway for LLM models