Large Models for CAD Design: Script Generation and Geometry Editing in Practice
This article explains how large models can support CAD design in three roles: converting requirements into modeling scripts, editing existing models, and interpreting multimodal engineering inputs such as drawings and sketches. It covers parametric script generation, a generate-execute-validate loop, locating components for edits, and a cloud architecture that unifies 2D and 3D data. It also reviews engineering challenges, including tolerance, execution safety, data privacy, and explainability, and suggests metrics and steps for a pilot.
1. Background: The Efficiency Bottleneck in CAD Design
CAD (computer-aided design) is widely used in mechanical engineering, architecture, electronics, and industrial equipment. Traditional modeling relies on engineers’ skill with commands, constraints, and feature trees. A part of medium complexity often requires dozens of interactive steps, and changing a single dimension can trigger a rebuild of the entire feature tree.
Design efficiency is mainly limited by three problems:
- High barrier to entry: Modeling commands and parameter systems are complex, so newcomers often need a long time before they can complete standard models on their own.
- Heavy repetitive work: Variant designs within a part family or product series are essentially changes in parameter combinations. However, they are often modeled again as separate models.
- High cost of changes: A local design change propagates through dependencies, and engineers must manually check each affected component and assembly relationship.
Large language models and multimodal models offer new ways to address these problems. They understand natural language descriptions well and can convert requirements into structured representations. When this ability is combined with a geometry kernel and a parametric modeling interface, the model can take part in the modeling process instead of serving only as a question-answering tool.
2. Three Roles of Large Models in CAD
From an engineering standpoint, models typically play three roles in the CAD workflow.
2.1 Converting requirements into modeling scripts
Users describe a part in natural language or a structured form. For example: “A flange with an outer diameter of 50 mm, an inner diameter of 30 mm, and a height of 20 mm, with six through-holes of 6 mm diameter evenly distributed around the circumference.” The model converts this description into an executable modeling script. The key is to have the model output constrained, structured code rather than free-form text.
2.2 Local editing of existing models
For an existing model, a user might request “Change the diameter of the second hole to 8 mm” or “Increase the base plate thickness by 2 mm.” The model must first locate the target component and then modify only the relevant parameters. This avoids the risks of rebuilding the whole model.
2.3 Understanding multimodal inputs
Engineering drawings, hand-drawn sketches, and photos are common design inputs. Multimodal models can identify view types, read dimension annotations and tolerance symbols, and extract structured parameters. Extracted results must be reviewed by a person, because recognition errors in drawings flow directly into the geometry.
3. Core Technical Approaches
3.1 Parametric script generation
The core idea of parametric modeling is to describe a shape as parameters plus constraints. Scripts generated by the model should follow a unified interface specification. This covers basic operations such as sketching, extrusion, revolution, Boolean operations, chamfering, and patterning. The more standardized the interface, the higher the rate at which the model’s output can be executed.
In practice, engineers usually give the model a restricted list of operations, described in the API documentation, and require it to call only functions on that list. This reduces hallucinated calls and makes static checking easier.
3.2 A generate-execute-validate loop
A single generation rarely guarantees correct geometry, so the process needs a closed loop:
Input: natural language requirement1. The model generates a modeling script from the requirement2. Run the script in a restricted sandbox to produce a geometry object3. Validate the geometry:- Check whether dimensions fall within a reasonable range- Check whether solids are closed and free of self-intersection- Check for unintended interference between features4. If validation fails, return the error information to the model for another correction round (up to a maximum number of rounds)5. If validation passes, save the version and submit it for user confirmation
The key to this loop is returning execution errors in a structured form. A model that receives specific feedback, such as “The extrusion on line 3 produced a non-closed profile,” corrects errors at a clearly higher rate than one that receives a vague error message.
3.3 Locating objects for component-level edits
Component-level edits depend on locating the target accurately. Common methods include:
- Name-based lookup: Use the component names or IDs assigned during modeling.
- Hierarchy path lookup: Use parent-child relationships in the assembly tree, for example, “Base/Mounting Plate/Second Hole.”
- Spatial lookup: Use a bounding box or coordinate range. This works for models that lack names.
- Semantic lookup: Use a functional description, for example, “the hole that mates with the motor shaft.” Semantic lookup should be combined with attribute tags. Relying on model inference alone carries higher risk.
After the target is located, the edit should change only that object’s parameters, and the affected dependencies should be recalculated. Save a snapshot before and after each edit so that changes can be rolled back.
3.4 Materials, geometry, and scene layout
Besides geometric dimensions, the model can adjust material properties, color, transparency, and the positional relationships in a scene. These changes usually carry low risk, but their values still need range checks. For example, roughness and transparency must fall within their specified intervals. Layout changes involve distances and orientations between components, so they should be run together with interference checks to prevent parts from intersecting.
4. Architecture for 2D, 3D, and Cloud Collaboration
A unified design system usually has three layers.
4.1 A unified data model
2D drawings and 3D models describe the same object, so they should share one data model. The recommended approach is to treat the 3D model as the primary data source and generate 2D views through projection and annotation. When a dimension changes, the drawing views update at the same time, which prevents the two representations from drifting apart.
4.2 Layers for computation and collaboration
A cloud architecture typically includes the following layers:
- Access layer: Handles user requests, identity authentication, and access control.
- Task layer: Receives modeling and editing tasks and schedules them asynchronously through a message queue, so long computations do not block the front end.
- Compute layer: Runs geometry computation and rendering tasks. It can be deployed on a container platform and scaled elastically with load.
- Storage layer: Uses object storage for model files and version snapshots, and a database for metadata and permission relationships.
- Observability layer: Uses a logging service and monitoring with alerts to record execution time, failure causes, and resource usage.
4.3 Version management for multi-user collaboration
When several people edit the same model at once, conflicts must be resolved. Common approaches include branch and merge based on a version tree, and fine-grained collaboration with component-level locks. Each model generation should create an independent version that records the input requirement, the generated script, and the validation results. This supports auditing and reproduction.
5. Key Engineering Challenges
5.1 Geometric precision and tolerance
Engineering parts require high precision, and model-generated dimensions may contain small deviations. In deployment, distinguish between “schematic design” and “manufacturing-grade design.” Manufacturing-grade output must pass tolerance checks and manual review before it is used for production.
5.2 Security boundaries for script execution
Model-generated code runs inside the system, which creates a risk of unauthorized access or resource exhaustion. Apply the following measures:
- Run scripts in a sandbox that restricts file system access, network access, and system calls.
- Set limits on execution time and memory.
- Expose only an approved set of interfaces.
5.3 Data privacy and intellectual property
Engineering drawings often contain a company’s core assets. The scope of use for training or fine-tuning data must be clearly defined. Data transmitted during inference should be encrypted, and access logs should be traceable.
5.4 Explainability of results
Engineers need to understand why the model made a particular change. Each change should come with a short explanation that lists the modified parameters, the scope of impact, and the validation results. Explainability directly affects how much engineers trust the tool.
6. Evaluation Metrics
To judge whether the approach works, define the following metrics during the pilot stage and base decisions on measured data:
- Script executability rate: The share of generated scripts that execute successfully on the first attempt or within the allowed number of rounds.
- Geometry validation pass rate: The share of models that pass closure, interference, and dimension range checks.
- Manual edit count: The average number of manual adjustments an engineer makes to a generated result.
- Task completion time: The average time from requirement input to a usable model.
- Fallback rate: The share of users who abandon the generated result and switch to the traditional workflow.
Track these metrics separately for each task type. Simple standard parts and complex non-standard parts often perform very differently, and combined statistics can hide problems.
7. Implementation Recommendations
To move forward with this approach, consider the following steps:
- Identify high-frequency scenarios: Start with standard parts, product-series variants, and simple structural parts. Avoid covering every modeling type at the outset.
- Establish interface specifications: Compile the list of supported modeling operations and provide clear function descriptions and parameter constraints for the model.
- Build the loop and validation: Implement sandbox execution, structured error feedback, and multi-round correction.
- Run a small pilot: Involve a small group of engineers, record the evaluation metrics, and collect failure cases.
- Expand gradually: After the metrics stabilize, introduce complex parts and multi-user collaboration.
Overall, the value of large models in CAD lies in lowering the modeling barrier, speeding up repetitive design, and simplifying change management. Realizing that value depends on placing the model inside a controlled engineering loop. Standardized interfaces, structured validation, and human review together constrain output quality.
