Constructing computer-aided design (CAD) models is labor-intensive but essential for engineering and manufacturing. Recent advances in Large Language Models (LLMs) have inspired the LLM-based CAD generation by representing CAD as command sequences. But these methods struggle in practical scenarios because command sequence representation does not support entity selection (e.g. faces or edges), limiting its ability to support complex editing operations such as chamfer or fillet. Further, the discretization of a continuous variable during sketch and extrude operations may result in topological errors. To address these limitations, we present Pointer-CAD, a novel LLM-based CAD generation framework that leverages a pointer-based command sequence representation to explicitly incorporate the geometric information of B-rep models into sequential modeling. In particular, Pointer-CAD decomposes CAD model generation into steps, conditioning the generation of each subsequent step on both the textual description and the B-rep generated from previous steps. Whenever an operation requires the selection of a specific geometric entity, the LLM predicts a Pointer that selects the most feature-consistent candidate from the available set. Such a selection operation also reduces the quantization error in the command sequence-based representation. To support the training of Pointer-CAD, we develop a data annotation pipeline that produces expert-level natural language descriptions and apply it to build a dataset of approximately 575K CAD models. Extensive experimental results demonstrate that Pointer-CAD effectively supports the generation of complex geometric structures and reduces segmentation error to an extremely low level, achieving a significant improvement over prior command sequence methods, thereby significantly mitigating the topological inaccuracies introduced by quantization error.
翻译:计算机辅助设计(CAD)模型的构建过程劳动密集,但对工程与制造至关重要。基于大语言模型(LLM)的CAD生成方法近期取得进展,其将CAD表示为命令序列。然而,这些方法在实际场景中存在局限,因为命令序列表示不支持实体选择(如面或边),从而限制了其支持倒角或圆角等复杂编辑操作的能力。此外,草图绘制与拉伸操作中连续变量的离散化可能导致拓扑错误。为解决这些局限,本文提出Pointer-CAD——一种基于LLM的新型CAD生成框架,其利用基于指针的命令序列表示,将B-rep模型的几何信息显式融入序列建模。具体而言,Pointer-CAD将CAD模型生成分解为多步骤,使每个后续步骤的生成以前序步骤生成的文本描述和B-rep为条件。当操作需要选择特定几何实体时,LLM会预测一个指针,从可用集合中选择特征最一致的候选对象。此类选择操作同时降低了基于命令序列表示中的量化误差。为支持Pointer-CAD的训练,我们开发了可生成专家级自然语言描述的数据标注流程,并据此构建了包含约57.5万个CAD模型的数据集。大量实验结果表明,Pointer-CAD能有效支持复杂几何结构的生成,并将分割误差降至极低水平,较先前的命令序列方法实现显著提升,从而大幅缓解了量化误差引起的拓扑不准确问题。