TLDR: CADDesigner is an AI agent that uses large language models (LLMs) to simplify conceptual CAD design. It takes text and sketches, interacts with users to refine requirements, and generates high-quality CAD code using a new “Context-Independent Imperative Paradigm” (CIP). CIP improves code generation with clear operations, helpful error messages, and type annotations. The agent learns from successful designs and uses visual feedback for iterative correction, achieving state-of-the-art performance in automating CAD model creation.
Computer-Aided Design (CAD) software is essential in manufacturing, but it traditionally demands significant expertise from designers. A new research paper introduces CADDesigner, an innovative agent powered by large language models (LLMs) aimed at simplifying CAD conceptual design and boosting efficiency.
CADDesigner stands out by accepting both abstract text descriptions and freehand sketches as input. It then engages in an interactive dialogue with users to clarify and refine design requirements through a thorough analysis process. A key innovation is its “Context-Independent Imperative Paradigm” (CIP), which allows the agent to generate high-quality CAD modeling code. During this process, CADDesigner continuously improves model quality by incorporating iterative visual feedback. All successful design cases are stored in a structured knowledge base, which helps the agent learn and enhance its code generation abilities over time. Experimental results indicate that this method achieves state-of-the-art performance in CAD code generation.
Traditional CAD platforms like OnShape, AutoCAD, SolidWorks, and CATIA typically require manual modeling by highly skilled designers. However, the emergence of LLMs offers a promising path to automate CAD model generation, making design more accessible and faster. While earlier research on automatic CAD generation focused on parametric modeling, these methods were limited by data diversity and output capacity. More recent work using LLMs for CAD code generation has shown promise, but fine-tuning these models is resource-intensive, and high-quality CAD training datasets are scarce.
CADDesigner addresses these challenges by acting as an LLM-powered agent. It refines user inputs through comprehensive requirement analysis and proposes the novel CIP to enhance code generation. The agent uses visual feedback to incrementally improve model fidelity. The framework integrates tools for requirement analysis, knowledge-constrained code generation, and vision-based error correction to produce CAD scripts that match user intent.
How CADDesigner Works
CADDesigner operates using a ReAct-style agent architecture, meaning it iteratively reasons, executes tools, and integrates feedback. This flexible design allows users to intervene at any stage—adding constraints, correcting directions, or adjusting goals—creating a truly interactive design cycle.
The system employs four specialized CAD tools:
-
Requirement Analysis (T1): Transforms user inputs (text, sketches) into detailed design specifications.
-
Code Generation (T2): Translates these detailed designs into executable CAD modeling code using the CIP.
-
Model Execution (T3): Runs the generated code to produce the CAD model.
-
Visual Feedback and Refinement (T4): Generates multi-view renders of the model and checks if it meets the user’s intent. If not, it provides diagnostic feedback to guide further design generation. This loop continues until the design is satisfactory.
The Context-Independent Imperative Paradigm (CIP)
A core innovation of CADDesigner is the CIP. Unlike traditional CAD modeling languages that often rely on method chaining and implicit states, CIP ensures that each CAD operation is a self-contained, semantically clear unit. This makes it much easier for LLMs to understand and generate correct code.
CIP also features LLM-friendly error handling. Instead of raw, hard-to-interpret Python exceptions, errors in CIP trigger structured diagnostic messages that include the root cause, precise location, and suggested corrective actions. This actionable feedback significantly helps LLMs debug and repair faults.
To prevent common errors where LLMs misinterpret geometric entities, CIP uses explicit type annotations in its API naming conventions and documentation. This clarity reduces ambiguity during LLM inference, improving accuracy.
Furthermore, CADDesigner supports “self-evolving” capabilities by allowing the explicit definition and preservation of composite operations (sequences of atomic operations). This means the system can learn and reuse complex modeling strategies, such as creating screws or flanges, significantly improving the success rate of one-shot model generation.
Knowledge Base Construction
To enhance modeling accuracy and reduce repetitive failures, CADDesigner builds a structured knowledge base. This base includes function annotations (semantic descriptions of commands, parameter formats, return types) and case examples (verified code snippets). This knowledge is automatically extracted and organized from source code and documentation, providing valuable external memory for the agent during code generation.
Performance and Limitations
Experiments show that CADDesigner outperforms existing methods like Text2CAD, cadrille, and CADCodeVerify in generating CAD models from abstract text inputs, achieving superior prompt-result alignment and overall success rates. An ablation study confirmed the importance of CIP’s error handling and type annotations for improving code generation accuracy and reducing the need for retries.
Despite its strengths, CADDesigner has limitations. It currently faces challenges with models requiring precise geometric constraints, as LLMs and vision-language models (VLMs) have limited understanding of complex spatial relationships. It also underperforms in tasks involving intricate mathematical computations, such as designing involute gears.
Also Read:
- SketchAgent: Automating Diagram Creation from Hand-Drawn Ideas
- AI Agents Reshaping Software Development
Conclusion
CADDesigner represents a significant advancement in CAD conceptual design, offering a novel framework and a context-independent paradigm for generating high-quality CAD modeling scripts. It is highly effective for rapid prototyping and creating complex datasets that align text descriptions with CAD code. Future work aims to integrate learning-based methods to accept point clouds and B-rep data, and to incorporate specialized models for advanced spatial geometry reasoning to tackle more complex design challenges. You can read the full research paper here.


