用分层图结构提升文本转CAD的精度与稳定性
Learning Hierarchical and Geometry-Aware Graph Representations for Text-to-CAD
- 构建分层几何图作为中间表示,显式建模零件层级与几何约束
- 在12K数据集上实现更高几何保真度和约束满足率
- 适合需要高精度工业设计生成的工程师与研究者
文本到CAD代码生成是一项长序列任务,将文本指令转化为相互依赖的操作序列。现有方法通常直接将文本解码为可执行代码(如bpy),未显式建模装配层次或几何约束,导致搜索空间扩大、局部错误累积,并在复杂装配中引发级联失败。为此,我们提出一种分层且几何感知的图结构作为中间表示,将多层级部件与组件建模为节点,显式编码几何约束为边。框架不直接从文本映射代码,而是先预测结构与约束,再据此生成动作序列与代码,从而提升几何保真度与约束满足率。我们进一步引入结构感知的渐进式课程学习策略,通过受控结构编辑构建分级任务,探索模型能力边界,并合成边界样本用于迭代训练。此外,我们构建了一个包含12,000条指令、分解图、动作序列与bpy代码的数据集,以及基于图与约束的评估指标。大量实验表明,该方法在几何保真度与几何约束准确满足方面均持续优于现有方法。
原文摘要 · Abstract (English)
Text-to-CAD code generation is a long-horizon task that translates textual instructions into long sequences of interdependent operations. Existing methods typically decode text directly into executable code (e.g., bpy) without explicitly modeling assembly hierarchy or geometric constraints, which enlarges the search space, accumulates local errors, and often causes cascading failures in complex assemblies. To address this issue, we propose a hierarchical and geometry-aware graph as an intermediate representation. The graph models multi-level parts and components as nodes and encodes explicit geometric constraints as edges. Instead of mapping text directly to code, our framework first predicts structure and constraints, then conditions action sequencing and code generation, thereby improving geometric fidelity and constraint satisfaction. We further introduce a structure-aware progressive curriculum learning strategy that constructs graded tasks through controlled structural edits, explores the model's capability boundary, and synthesizes boundary examples for iterative training. In addition, we build a 12K dataset with instructions, decomposition graphs, action sequences, and bpy code, together with graph- and constraint-oriented evaluation metrics. Extensive experiments show that our method consistently outperforms existing approaches in both geometric fidelity and accurate satisfaction of geometric constraints.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。