Drawing2CAD:基于序列到序列学习的矢量图CAD生成
Drawing2CAD: Sequence-to-Sequence Learning for CAD Generation from Vector Drawings
August 26, 2025
作者: Feiwei Qin, Shichao Lu, Junhao Hou, Changmiao Wang, Meie Fang, Ligang Liu
cs.AI
摘要
计算机辅助设计(CAD)生成建模正在推动工业应用领域的重大创新。近期研究在从点云、网格和文本描述等多种输入创建实体模型方面取得了显著进展。然而,这些方法与传统工业流程存在根本性差异,后者通常始于二维工程图纸。从这些二维矢量图纸自动生成参数化CAD模型的研究仍显不足,尽管这是工程设计中的关键步骤。为填补这一空白,我们的核心见解是将CAD生成重新定义为序列到序列学习问题,其中矢量绘图基元直接指导参数化CAD操作的生成,在整个转换过程中保持几何精度和设计意图。我们提出了Drawing2CAD框架,包含三个关键技术组件:一种保留精确几何信息的网络友好型矢量基元表示方法,一种解耦命令类型和参数生成同时保持精确对应关系的双解码器Transformer架构,以及一种适应CAD参数固有灵活性的软目标分布损失函数。为训练和评估Drawing2CAD,我们创建了CAD-VGDrawing数据集,包含成对的工程图纸和参数化CAD模型,并通过全面实验验证了方法的有效性。代码和数据集可在https://github.com/lllssc/Drawing2CAD获取。
English
Computer-Aided Design (CAD) generative modeling is driving significant
innovations across industrial applications. Recent works have shown remarkable
progress in creating solid models from various inputs such as point clouds,
meshes, and text descriptions. However, these methods fundamentally diverge
from traditional industrial workflows that begin with 2D engineering drawings.
The automatic generation of parametric CAD models from these 2D vector drawings
remains underexplored despite being a critical step in engineering design. To
address this gap, our key insight is to reframe CAD generation as a
sequence-to-sequence learning problem where vector drawing primitives directly
inform the generation of parametric CAD operations, preserving geometric
precision and design intent throughout the transformation process. We propose
Drawing2CAD, a framework with three key technical components: a
network-friendly vector primitive representation that preserves precise
geometric information, a dual-decoder transformer architecture that decouples
command type and parameter generation while maintaining precise correspondence,
and a soft target distribution loss function accommodating inherent flexibility
in CAD parameters. To train and evaluate Drawing2CAD, we create CAD-VGDrawing,
a dataset of paired engineering drawings and parametric CAD models, and conduct
thorough experiments to demonstrate the effectiveness of our method. Code and
dataset are available at https://github.com/lllssc/Drawing2CAD.