Computer-Aided Design (CAD) models are typically constructed by sequentially drawing parametric sketches and applying CAD operations to obtain a 3D model. The problem of 3D CAD reverse engineering consists of reconstructing the sketch and CAD operation sequences from 3D representations such as point clouds. In this paper, we address this challenge through novel contributions across three levels: CAD sequence representation, network design, and dataset. In particular, we represent CAD sketch-extrude sequences as Python code. The proposed CAD-Recode translates a point cloud into Python code that, when executed, reconstructs the CAD model. Taking advantage of the exposure of pre-trained Large Language Models (LLMs) to Python code, we leverage a relatively small LLM as a decoder for CAD-Recode and combine it with a lightweight point cloud projector. CAD-Recode is trained solely on a proposed synthetic dataset of one million diverse CAD sequences. CAD-Recode significantly outperforms existing methods across three datasets while requiring fewer input points. Notably, it achieves 10 times lower mean Chamfer distance than state-of-the-art methods on DeepCAD and Fusion360 datasets. Furthermore, we show that our CAD Python code output is interpretable by off-the-shelf LLMs, enabling CAD editing and CAD-specific question answering from point clouds.
翻译:计算机辅助设计(CAD)模型通常通过顺序绘制参数化草图并应用CAD操作来构建三维模型。三维CAD逆向工程问题旨在从点云等三维表示中重建草图和CAD操作序列。本文通过三个层面的创新贡献应对这一挑战:CAD序列表示、网络设计和数据集。具体而言,我们将CAD草图-拉伸序列表示为Python代码。所提出的CAD-Recode将点云转换为Python代码,执行该代码即可重建CAD模型。利用预训练大语言模型(LLMs)对Python代码的接触优势,我们采用一个相对较小的大语言模型作为CAD-Recode的解码器,并将其与轻量级点云投影器相结合。CAD-Recode仅在提出的包含一百万个多样化CAD序列的合成数据集上进行训练。在三个数据集上,CAD-Recode显著优于现有方法,同时所需输入点更少。值得注意的是,在DeepCAD和Fusion360数据集上,其平均倒角距离比现有最优方法低10倍。此外,我们证明所生成的CAD Python代码输出可被现成的大语言模型解析,从而支持从点云进行CAD编辑和CAD特定问答。