GETTING STARTED
Run your first
CAD experiment.
cad-env gives a model a task, the current CAD state and, when needed, images. The model returns one JSON action. FreeCAD executes it and sends back the new state or an error. A separate evaluator checks the finished part.
Start with the repository
git clone https://github.com/researchim-ai/cad-env.git cd cad-env
Install FreeCAD separately. Keep geometry tools and Qwen training dependencies in separate environments. Use the repository’s CAD setup guideEN and pinned dependency files. This website shows the project and saved examples; it does not run CAD jobs.
The basic tool interface
{"op":"create_body","name":"Body"}
{"op":"sketch_rectangle","name":"Base","body":"Body","length":40,"width":30}
{"op":"pad","name":"Pad","body":"Body","profile":"Base","length":6}
{"op":"finish"}Each action refers to named objects or dimensions. Invalid actions leave the accepted CAD state unchanged. Seven basic tools are available in the agent interface; advanced solid operations use a separate interface.
Generate a small dataset
python -m cad_env.multicad generate \ --output artifacts/my-corpus \ --engines freecad cadquery \ --seeds 3 \ --python .venv-multicad/bin/python
Use the geometry environment and a fresh output directory. The generator executes reference solutions and audits the exports. That verifies the data, not the model’s ability to solve it.
How we train the model
Our recent runs use Qwen3.5-4B with BF16 LoRA. Language layers and selected vision layers are adapted; prompt and image tokens are excluded from the supervised loss. The latest drawing pilot used 1000 next-action examples and one epoch. Earlier checkpoint-500 results come from a different curriculum.
How to read the results
- Count a task as solved only when the saved part passes the full native check.
- Two views or two standards profiles of one part are still one design.
- Report construction, editing and drawing-reading tasks separately.
- Use validation for development and keep a separate final test set.
- Single-action GRPO is experimental; full multi-step RL is not available yet.
- The supported CAD backends are FreeCAD and CadQuery.
See the training notesEN, benchmark coverageEN and advanced native feature probesEN for details. The advanced operation probes check the executors, not the model’s learned skills.
See example parts