Abstract
Computer-Aided Design (CAD) is essential for modern engineering but remains difficult for automated systems due to spatial reasoning requirements and data scarcity. We present BlenderLLM, a framework that bridges natural language and CAD by generating executable Blender scripts. Through a novel iterative self-improvement methodology and the introduction of the BlendNet dataset, BlenderLLM achieves state-of-the-art performance, outperforming closed-source models like GPT-4o and o1-preview in 3D modeling accuracy and syntax reliability.
Introduction
Computer-Aided Design (CAD) is the foundation of manufacturing and architecture, yet mastering its tools requires significant expertise. While Large Language Models (LLMs) have excelled in general code generation, they face two primary hurdles in the CAD domain: poor spatial reasoning and a lack of high-quality, domain-specific training data. Existing models frequently produce "hallucinated" code that fails to execute or generates objects that do not align with user intent.
BlenderLLM addresses these challenges by automating the generation of Python scripts for Blender's API (bpy). By closing the loop between code generation and visual verification, the model learns to translate complex natural language instructions into precise 3D geometries.
Methodology
The BlenderLLM optimization process consists of two primary stages: Supervised Fine-Tuning (SFT) and Iterative Self-Improvement.
Supervised Fine-Tuning
The process begins with a base model (Qwen2.5-Coder-7B) fine-tuned on a human-verified subset of the BlendNet dataset. This establishes a baseline understanding of the Blender API and basic geometric construction.
Iterative Self-Improvement and Visual Verification
The core innovation of BlenderLLM is its self-improvement loop. The model generates CAD scripts which are rendered into images via Blender. These instruction-script-image triplets are then processed through a Cascade Filter. This filter employs a "Coarse Filter" for initial screening and a "Fine Filter" (powered by GPT-4o) to validate the visual fidelity of the generated object against the original prompt. The model is iteratively retrained on these high-quality, self-generated samples.
Datasets and Evaluation
The research introduces two significant resources:
- BlendNet: A training dataset of 8,000 CAD samples, including 2,000 human-annotated pairs and 6,000 LLM-validated pairs.
- CADBench: A benchmarking suite of 700 instructions. It includes CADBench-Sim (synthetic prompts) and CADBench-Wild (real-world prompts from forums like Reddit and BlenderArtists) to evaluate performance on messy, human-centric queries.
Results
BlenderLLM demonstrates superior performance compared to both open-source and state-of-the-art closed-source models.
Quantitative Performance
On the CADBench-Sim benchmark, BlenderLLM achieved an average score of 0.748, surpassing OpenAI’s o1-preview (0.687) and GPT-4o (0.565). In real-world scenarios (CADBench-Wild), it maintained a score of 0.608, while most open-source models failed to exceed 0.400.
Visual Fidelity and Reliability
A key advantage of BlenderLLM is its syntax stability. The model reduced syntax errors to just 3.2%, a significant improvement over other models which often exhibit error rates between 15% and 38%.
Discussion and Future Work
The success of BlenderLLM highlights the importance of multi-modal verification in CAD tasks. By rendering scripts and using visual feedback, the model effectively learns spatial logic that text-only training cannot provide.
However, limitations remain. The current model is optimized for basic geometric modeling and does not yet support complex material properties or intricate mechanical assemblies. Furthermore, it operates as a single-turn generator rather than a conversational assistant. Future research will focus on multi-turn interactions and incorporating multimodal inputs, such as sketches, to further refine the design process.
Summary updated