Generative AI for CAD Automation: Leveraging Large Language Models for 3D Modelling
Sumit Kumar, Sarthak Kapoor, Harsh Vardhan, Yao Zhao · 2025
Read Generative AI for CAD Automation: Leveraging Large Language Models for 3D Modelling by Sumit Kumar, Sarthak Kapoor, Harsh Vardhan, Yao Zhao (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2508-00843.txt.
Introduction
Sumit Kumar and co-authors let a language model drive design software in a 2025 paper. Computer-aided design is powerful but demands drafting skill, which slows prototyping. Their framework connects a large language model to the open tool FreeCAD: the model writes a design script from a plain description. The tool runs it, and error messages feed back for another try.
Across trials of rising difficulty, the loop handled simple and mid-level designs well. Highly constrained models broke down more often and needed many repair rounds. The authors blame weak memory of past attempts and brittle prompting, and they suggest hybrid methods and cloud execution as next steps. The work sketches a future where describing a part is nearly enough to build it.
Catalog record
| CREATOR | Sumit Kumar, Sarthak Kapoor, Harsh Vardhan, Yao Zhao |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 30 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2508-00843
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Generative AI for CAD Automation: Leveraging Large Language Models for 3D Modelling Sumit Kumar, Sarthak Kapoor, Harsh Vardhan, Yao Zhao Abstract . Large Language Models (LLMs) are revolutionizing industries by enhancing efficiency, scalability, and innovation. This paper investigates the potential of LLMs in automating Computer-Aided Design (CAD) workflows, by integrating FreeCAD with LLM as CAD design tool. Traditional CAD processes are often complex and require specialized sketching skills, posing challenges for rapid prototyping and generative design. We propose a framework where LLMs generate initial CAD scripts from natural language descriptions, which are then executed and refined iteratively based on error feedback. Through a series of experiments with increasing complexity, we assess the effectiveness of this approach. Our findings reveal that LLMs perform well for simple to moderately complex designs but struggle with highly constrained models, necessitating multiple refinements. The study highlights the need for improved memory retrieval, adaptive prompt engineering, and hybrid AI techniques to enhance script robustness. Future directions include integrating cloud-based execution and exploring advanced LLM capabilities to further streamline CAD automation. This work underscores the transformative potential of LLMs in design workflows while identifying critical areas for future development. 1. Introduction The use of artificial intelligence (AI) has seen exponential growth across a wide range of domains, including finance, automotive ( Kumari et al. 2024 ) , healthcare ( Kumar et al. 2023 ) , engineering design ( Vardhan et al. 2024 ) , Cybersecurity ( Kumar and Vardhan 2025 ; Neema et al. 2024 ) and beyond, revolutionizing how tasks are automated, decisions are made, and innovations are realized. Among the most transformative advancements in AI is the rise of generative AI (Gen AI), which focuses on creating new content, designs, and solutions rather than merely analyzing existing data. Gen AI has opened up unprecedented possibilities, from generating realistic images and text to automating complex design workflows. Within the realm of Gen AI, LLMs have rapidly emerged as a transformative impact across industries, reshaping how businesses operate, innovate, and compete. Organizations that have already integrated LLMs into their workflows are witnessing significant gains in efficiency, cost reduction, and scalability. Meanwhile, industries that have yet to adopt these models are actively investing in their development to remain competitive and future-proof their operations. As LLMs continue to evolve, their impact extends beyond automation, enabling new capabilities in decision-making, knowledge synthesis, and personalized user experiences. This paper explores how effectively LLMs are tackling design challenges, where their capabilities currently stand, and what the future might hold for their role in solving complex design problems. CAD is the backbone of several industries such as manufacturing, construction, engineering, and design ( Saxena and Sahay 2007 ) . We are heavily reliant on CAD for most of the development and prototyping. Sectors like mechanical engineering, aerospace, automotive, etc. use CAD to build physical objects ( Ibrahim et al. 2003 ) . CAD tools like FreeCAD, AutoCAD, and SolidWorks ( Matsson 2023 ) allow engineers to design highly precise 3D models, reducing time and costs associated with traditional prototyping. However, CAD modeling remains a complex, labor-intensive process requiring specialized expertise, particularly in scripting and parametric modeling. To operate the CAD tool, the operator should not only be proficient in design knowledge but also possess strong CAD scripting skills. CAD scripting requires a good understanding of several components, including familiarity with specific libraries such as the FreeCAD Part and Mesh modules, refining designs through trial and error, making incremental modifications, and debugging scripts. Even with strong expertise in both design principles and CAD scripting, the process remains time-consuming and iterative. Writing and debugging scripts to achieve precise parametric designs demands significant effort, often requiring multiple refinements to meet design specifications. This bottleneck not only slows down the design cycle but also limits accessibility for those without extensive programming experience. With an increasing demand for rapid prototyping, generative design, and automated manufacturing, there is a pressing need for AI-driven intelligent approaches that can automate the entire CAD modeling workflow, from design generation to validation and error correction. 2. Problem Formulation and Integration Architecture For an end-to-end execution, we integrated LLM in loop with CAD tool and error-driven refinement and prompt evolution. Next, we will explain each section. 2.1. Initial FreeCAD Script Generation Using LLMs LLMs such as GPT-4 operate as probabilistic generators of text. Given a natural language design description d and a structured prompt P_{i} , which includes constraints, syntax rules, and guidelines for FreeCAD scripting, the LLM generates an initial Python script S . Mathematically, we define the generation process as: (1) S=\mathcal{G}(P_{i},d) where: – S is the generated FreeCAD Python script. – P_{i} represents the structured initial prompt that provides constraints, best practices, and FreeCAD-specific scripting requirements. – d is the user-provided natural language design description, which defines the intended 3D model. – \mathcal{G}(\cdot) represents the function that maps text inputs to Python scripts using the trained LLM. Since LLMs operate by sampling from a probability distribution over possible sequences, the objective is to maximize the probability of generating an optimal FreeCAD script: (2) \mathcal{G}(P_{i},d)=\arg\max_{S}P(S\mid P_{i},d,\theta) where: – \theta represents the learned parameters of the LLM, encoding statistical relationships from its training data. – P(S\mid P_{i},d,\theta) is the probability distribution over all syntactically and semantically valid FreeCAD scripts. This formulation implies that the generated script S is not deterministic but rather probabilistically sampled from the most likely completions under the model’s learned weights. 2.2. Execution and Error Handling Once the FreeCAD script S is generated, it is executed in headless mode within FreeCAD to generate the corresponding 3D model. However, due to the probabilistic nature of LLMs and potential inaccuracies in FreeCAD scripting logic, errors may occur. These errors include: – Syntax Errors : Invalid Python code due to incorrect indentation, missing imports, etc. – Geometric Inconsistencies : Invalid Boolean operations, degenerate geometry. – Execution Failures : Incorrect API calls, missing object dependencies. The execution process can be mathematically represented as: (3) E=\mathcal{F}(S) where: – E is the error message returned by FreeCAD during execution. – \mathcal{F}(\cdot) represents the FreeCAD execution function, which evaluates the script and detects errors. If E=0 , the script runs successfully, and the 3D model is generated. Otherwise, iterative refinement is required. 2.3. Iterative Refinement via Error-Driven Prompt Evolution LLM APIs are stateless , meaning they do not retain memory of previous interactions unless explicitly designed to do so (e.g., using embeddings, vector databases, or session-based memory) ( Yu et al. 2023 ) . Each API call is independent, and the LLM does not "remember" past conversations unless context is explicitly provided in the request. Therefore in the refinement process we are proving the initial user request in P_{r} . When an error E is detected, the system must refine the generated script. However, directly modifying the script may introduce cascading issues (e.g., unintended changes, loss of user intent). Instead, we adopt a structured approach where the prompt itself is refined before regenerating the script. The refined prompt P_{r} is constructed as: (4) P_{r}^{(t+1)}=f(P_{i},E^{(t)}) where: – P_{r}^{(t+1)} is the updated prompt after incorporating the latest error information. – f(\cdot) is a refinement function that takes the original prompt P_{i} and the observed execution error E^{(t)} to generate