TL;DR
Engineers naturally communicate mechanical systems with sketches, not walls of text. This paper tests whether Vision Language Models (VLMs) can turn a mechanical sketch directly into executable multibody simulation code. By splitting the job into two steps—first extracting a code-agnostic Intermediate Representation (IR) of the drawing, then handing it to a coder LLM—the authors double the success rate of open-weight VLMs from 23.9% to 48.0%, revealing that the real bottleneck isn't writing simulation code, it's reading the drawing.
What Problem Does This Paper Address?
Large Language Models (LLMs) can already generate white-box multibody simulation code (for tools like Exudyn) from natural-language descriptions. The catch is that as mechanical systems get more complex, textual descriptions become long, tedious, and error-prone. A simple annotated sketch, on the other hand, conveys geometry, joints, springs, and loads at a glance.
The authors ask: what happens if we swap out the text description for a sketch? Specifically, can VLMs perceive a mechanical drawing accurately enough to generate physically valid, executable simulation code—and where do they fail?
Methods
To isolate perception from coding ability, the authors design a controlled, four-stage pipeline and compare it against end-to-end baselines:
- Stage 1a (Element Pre-selection): The VLM looks at the sketch and selects which mechanical elements are present from a closed vocabulary of 11 tags (e.g.,
ground,point mass,spring damper,revolute joint,2D beam). - Stage 1b (Intermediate Representation): Using only the templates for the selected tags, the VLM extracts a code-agnostic JSON (or free-text) Intermediate Representation listing parts, positions, parameters, and gravity.
- Stage 2a & 2b (Code Generation): A fixed coder LLM (
Qwen2.5-Coder-32B-Instruct) selects the required Exudyn components from 27 options and writes the Python simulation script.
In the naive pipeline, the VLM skips the IR and writes the simulation code directly from the image. Every generated model is automatically verified against ground truth using four strict checks: executability, topology agreement (via graph isomorphism), parameter agreement, and trajectory agreement.
Datasets
The authors build an automated closed-loop benchmark of 23 parameterized mechanical models in Exudyn, ranging from single mass points and pendulums to a four-bar mechanism, a spring truss, and beam structures. Each model is instantiated with 5 random parameter sets, yielding 115 tasks, rendered as standardized 1092 × 728 pixel annotated sketches.
To test real-world robustness, they also:
- Down-scale sketches from
0.9×down to0.2×and rotate them between-45°and+45°. - Collect hand-drawn tablet sketches for 8 of the models from three different people (sets A, B, and C), varying in handwriting and annotation style.
Key Insights and Ideas
- Perception is the bottleneck, not coding: With the coder LLM held fixed, a text-only baseline achieves 94.8% success. Replacing text with a sketch drops success to 48.0% (or 78.2% when text accompanies the sketch). Once the model gets the topology and parameters right from the drawing, the simulated trajectory almost always matches.
- The magic is the checklist, not the JSON: An ablation study shows that removing Stage 1a (element pre-selection) hurts performance twice as much as switching formats. In fact, free-text IRs outperform JSON IRs. The real value of the IR stage is forcing the VLM to run through a closed-vocabulary perception checklist before extracting numbers.
- Scale and rotation limits: Sketch perception holds steady down to
0.7×scaling and within±10°rotation, but degrades sharply beyond that—dropping to 4.1% at0.2×(where text becomes illegible) and ~30% at±45°.
Key Results
Across 12 open-weight VLMs on the 115 standard sketches:
- Two-stage IR vs. Naive: Extracting an IR doubles mean overall success from 23.9% (
naive) to 48.0% (IR), improving 11 of 12 VLMs ($p = 0.003$). Top performers likeQwen3-VL-32B-Instructreach 76.5% withIR(up from 30.4%naive). - Adding text:
naive + textreaches 70.2%, whileIR + textreaches 78.2%. - Proprietary comparison: On the same tasks,
Claude Opus 5(writing code directly) scores 100.0% from text alone and 79.1% from the sketch alone. - Hand-drawn transfer: Evaluated with
Qwen3-VL-32B-Instructon the 8 hand-drawn models,IRsolves 8/8, 6/8, and 7/8 across sets A, B, and C (matching the 7/8 on generated sketches), whereasnaivesolves only 2/8 in every set. - Where errors happen: In
IR, component selection succeeds 98.1% of the time and execution 91.6%, but correct topology drops to 68.3% and correct parameters to 48.1%.
Limitations and Future Work
The authors note that the main benchmark uses cleanly rendered sketches, and while the hand-drawn study is promising, it covers only 8 models (with one set used during development). The pipeline also runs in a fixed, open-loop order: it detects failures but cannot correct them. Future work could embed this perception-first pipeline into an agentic workflow—where a critic agent inspects failed simulations and prompts the VLM to re-read the sketch—and extend the approach to flexible 3D multibody systems and commercial solvers.
Summary updated