cad—env
View repository
CAD TOOLS FOR LANGUAGE AND VISION MODELSPROJECT IN DEVELOPMENT

BUILD A PART. CHECK THE RESULT.

Teach agents
to build
in CAD.

Give a model a drawing and CAD tools. cad-env runs its actions in FreeCAD, checks the finished part and records the steps for training.

FreeCADCadQueryIn development
MODEL SPACEFREECAD / TRAINING EXAMPLE
◈ Reference partHow an episode works.FCStd
FEATURE HISTORY
  1. create_body
  2. sketch_circles
  3. pad
— × — × — mm
WORLD COORDINATES / mm
PART_001Bolt flangeFreeCAD · validated reference mesh
DRAG TO ORBIT · SCROLL TO ZOOM
THE MODEL BUILDS. FREECAD CHECKS.
Language + vision→JSON actions→CAD execution→ Result check

LATEST / 09 NOV 2026

Drawings the model can work from.

One CAD part, paired ISO and GOST drawing profiles. We now generate views, sections and feature schedules, then turn them into image inputs and reference action sequences.

Read the update and open the drawings

DRAWING PROFILES · FULL CONFORMANCE NOT CONFIRMED

Read the training report

Bearing cartridge — ISOISO · A3

Drawing pilot: results after SFT

Same 20 held-out parts in both profiles. Before: our previous CAD-tuned checkpoint. After: one epoch on 1000 next-action examples. A task passes only when the complete part is correct.

ISO: 0 → 3 of 20GOST: 0 → 6 of 20

The main remaining failures are missing counterbores and object-name collisions. These results are separate from the earlier checkpoint-500 experiment below.

Download the recorded pilot results ↘

00 / ONE EPISODE

Give it a task.
Let it build.

The model chooses an action. FreeCAD applies it and returns the updated state. Repeat until the model finishes or runs out of steps.

Read about the interface
STEP THROUGH THE INTERFACEEXPLANATORY EXAMPLE
ENV → AGENT01 / 04

OBSERVATION → ACTION → NEW STATE

01 / CAD BACKENDS

Two engines.
One set of tools.

FreeCAD is our main environment. CadQuery runs the same basic actions through its own geometry backend. We execute every reference solution before adding it to a dataset.

01
FC

FreeCAD

Editable sketches and features, solid geometry checks, and saved FCStd models.

PRIMARY ENVIRONMENT
02
CQ

CadQuery

Solid modeling with OCCT, STEP export and replayable action sequences.

ADDITIONAL BACKEND
WHAT THE AGENT CAN DO

The shared tool set covers basic construction and parameter edits. The advanced solid-modeling probes use a separate interface. Assembly workflows and unrestricted CAD APIs are outside the current agent benchmark.

02 / EXAMPLE PARTS

How the environment works.

These three parts come from the training set. Choose one to inspect its geometry and the reference sequence that built it.

↑ INSPECT IN 3D VIEWER
REFERENCE ACTION SEQUENCE
Loading verified example…
REFERENCE MODELTRAINING EXAMPLE · BUILT BY THE GENERATOR
7 BASIC ACTIONScreate_bodysketch_rectanglesketch_circlespadpocketset_parameterfinish

03 / EARLIER EXPERIMENT

The environment validates the part,
as well as the model’s response.

An earlier checkpoint-500 experiment on the basic tool curriculum. Both starting and final checkpoints had already received CAD training. These are not results for an untouched model or for the new ISO/GOST drawing benchmark.

QWEN3.5–4B
EARLIER RUN / CHECKPOINT 500
FULLY CORRECT PARTSBEFORE → AFTER
Previous CAD-tuned checkpoint After 500 more SFT steps
DOWNLOAD THIS EXPERIMENT’S DATA ↘

Each backend was evaluated on 66 validation tasks from 33 part designs. The two backends share those designs. Their scores should not be counted as independent tests.

Retention checks for this earlier run are complete.
4,352V5 visual tasks
2,560V6 tasks with unit variations
0Rejected reference solutions
in these two visual corpora

Generated and checked.
These are earlier datasets; checkpoint-500 did not train on all of them.

04 / TRAINING

Learning to finish the job.

We train on reference actions, then inspect the model’s own runs. Missing features and failed tool calls tell us which examples the next dataset needs.

01 / REFERENCE SOLUTIONS

Supervised fine-tuning

A drawing, the current CAD state and the next action. LoRA adapts the language model and selected vision layers; the loss is calculated on the answer tokens.

USED IN COMPLETED RUNS
02 / RECOVERY

Recover after a mistake

Collect failed steps from real model runs and verify the corrected continuation in FreeCAD. The collector works, but coverage is still small.

SMALL PILOT DATASET
03 / REINFORCEMENT LEARNING

Reward from the CAD result

Single-action visual GRPO has been tested. We have not established a quality gain from it, and full multi-step policy-gradient training is not implemented yet.

EXPERIMENTAL
CHECKPOINT-500 TRAINING SETUPQwen3.5-4BLoRA r1615.4M trainable parameters1.024M visual parametersRTX 3090

05 / GET STARTED

Build your
own experiment.

The repository includes the environment, data generators, training scripts and experiment reports. Start with a small native run before generating a larger dataset.

Explore the repository
START WITH THE SOURCE
git clone https://github.com/researchim-ai/cad-env.git
cd cad-env
Setup guide FreeCAD and CadQuery setup ENTraining notes and known limitations EN