LLM-Powered CAD: From Script Generation to Integrated Design

    This article examines how large language models can support CAD workflows without replacing geometry kernels. It outlines a controlled path from intent understanding and parameterized script generation to component-level editing, material and scene layout, knowledge reuse, and 2D/3D/cloud integration. It also describes a layered engineering architecture with generation, execution, validation, and feedback loops, together with data governance practices and phased deployment metrics for keeping generative design operations auditable, reversible, and verifiable.

    1. Background: CAD as the Entry Point to the Physical World and a High-Knowledge-Density System

    CAD software connects requirements, geometry, constraints, assemblies, materials, processes, and manufacturing. It is a typical entry point to the physical world. However, automation in CAD workflows has long been limited by two tensions. On one hand, design knowledge depends heavily on expert experience: requirement expressions, constraints, and modification intent are often scattered across text, drawings, images, tables, and historical models. On the other hand, geometry kernels, constraint solving, and assembly relationships demand high precision and cannot accept unverifiable “out-of-thin-air” generation.

    The value of large language models is not to directly replace geometry kernels, but to turn natural language, multimodal inputs, and industrial knowledge into executable, auditable, and rollback-capable design operations. A more reliable path is “language to script/parameters”: the model understands intent, generates controlled modeling scripts or parametric features, and then forms a closed loop through sandbox execution, constraint validation, and geometry validity checks. This can improve efficiency in asset construction, component modification, and geometry and scene layout while keeping risk within engineering guardrails.

    2. Capability Layers: From Intent Understanding to Integrated Collaboration

    1. Intent understanding and task decomposition. Inputs can include natural language, sketches, drawings, point clouds, or tables. The model should output structured design intent: target components, key dimensions, constraint relationships, material requirements, scene layout, and editable parameters, rather than directly producing inexplicable geometry. Task decomposition should retain explanations of “why this change is made” so engineers can review it.

    2. Controlled scripts and parametric generation. Through restricted APIs or domain script templates, the model can generate scripts for professional modeling tools to build basic assets, refine details, replace individual components, and adjust parameters. Scripts must pass syntax checks, whitelist validation, and parameter range validation. Parametric features should support versioning so that the same intent can be reproduced.

    3. Component-level editing and geometric reasoning. When modifying a single component, the system needs to identify the feature tree, assembly constraints, and reference relationships, assess the propagation scope of the change, and provide diff views and rollback points. The model can propose modification plans, but constraint solving and geometry validity should be confirmed by deterministic components.

    4. Materials, scenes, and layout. Material semantics, lighting, cameras, and scene layout can be handled through a combination of multimodal retrieval and rule constraints. Layout generation should satisfy space occupancy, interference checks, and annotation standards; it should not pursue visual plausibility alone.

    5. Knowledge retrieval and reuse. Industrial data, standard parts, historical models, and design specifications can enter a retrieval-augmented process. Retrieval results should carry source, version, and permission tags to avoid introducing outdated or unauthorized assets into designs.

    6. 2D + 3D + cloud-enabled integration. A unified data model, version management, review flow, and permission system are the foundation for cloud collaboration. 2D drawings, 3D models, and scene assets should share parameters and metadata to reduce information loss caused by repeated conversions.

    3. Engineering Architecture: A Closed Loop of Generation, Execution, Validation, and Feedback

    A layered architecture is recommended. The input layer receives text, images, drawings, point clouds, and tables. The semantic layer uses a large language model for planning and task decomposition. The knowledge layer provides vector retrieval, graph relationship queries, and an asset library. The generation layer outputs restricted scripts or parametric instructions. The execution layer calls geometry kernel adapters in an isolated sandbox. The validation layer checks syntax, constraint satisfaction, geometry validity, and performance overhead. The feedback layer records logs, metrics, and human corrections to form an evaluation set.

    On the deployment side, general cloud infrastructure can be used: object storage for models and assets, a container platform for sandboxes and solver services, message queues to decouple generation and execution tasks, and logging and monitoring services for auditing and alerting. For example, on a general cloud platform such as Baidu AI Cloud, these categories of capabilities can serve as part of the engineering foundation, but specific selection should still center on data security, permission isolation, and cost control.

    The following is abstract pseudocode and does not correspond to any specific product interface:

    1. function design_copilot(intent, constraints, context):
    2. plan = llm.plan(intent, constraints, context.schema)
    3. script = llm.generate_script(plan, context.allowed_api, context.templates)
    4. check = validate(script, syntax=true, whitelist=true, ranges=constraints)
    5. if not check.ok:
    6. script = llm.repair(script, check.errors, constraints)
    7. result = sandbox.execute(script, context.asset_store, context.geometry_adapter)
    8. report = check_geometry(result, constraints, interference=true, mass=true)
    9. if report.pass:
    10. diff = build_feature_diff(result, context.baseline)
    11. commit(result, diff, audit_log=true)
    12. return result
    13. else:
    14. return request_human_review(result, report, diff_candidates=true)

    The core of this process is that the model proposes plans, the system validates plans, and engineers confirm key changes. Any automatic commit should have permission control, audit logs, and rollback capability.

    4. Data Governance and Multimodal Processing

    Industrial data quality determines the ceiling. A unified metadata specification should be established to record source, version, permissions, coordinate system, units, and process tags. Drawing parsing, point cloud registration, image recognition, and text extraction need to produce traceable intermediate results. Training and evaluation data should be de-identified, and retrieval libraries should be isolated by project and role. For high-risk modifications, human approval nodes should be retained, and correction results should flow back as evaluation samples rather than being used directly for unsupervised updates.

    5. Deployment Strategy and Evaluation Metrics

    A gradual deployment approach is recommended: first build design assistants and knowledge retrieval, then controlled script generation, then open component-level editing, and finally explore scene-level layout and cloud collaboration. Evaluation metrics should include script first-pass rate, constraint satisfaction rate, geometry validity pass rate, automatic repair success rate, manual rework rate, design cycle change, asset reuse rate, and number of security violations. Large language models are not a replacement for geometry kernels but a semantic layer connecting intent, knowledge, and executable operations. Only by placing generative capabilities inside a closed loop of “controlled generation + deterministic validation + human confirmation” can they become controllable design productivity.