CAD-Recode: Reverse Engineering CAD Code from Point Clouds
Danila Rukhovich, Elona Dupont, Dimitrios Mallis, Kseniya Cherenkova, Anis Kacem, Djamila Aouada
2024-12-19

Summary
This paper introduces CAD-Recode, a new method for turning 3D point clouds into Computer-Aided Design (CAD) models using Python code. This process helps in reverse engineering, which means creating a digital model from real-world objects captured in 3D scans.
What's the problem?
Creating CAD models from 3D point clouds is challenging because it involves reconstructing complex shapes and operations that were originally used to make the models. Traditional methods can be inefficient and may not accurately capture all the details of the original design.
What's the solution?
CAD-Recode addresses this challenge by translating point clouds into Python code that represents the steps needed to recreate the CAD model. The method uses a small pre-trained language model to help generate this code, and it was trained on a large dataset of one million CAD sequences. This approach allows CAD-Recode to outperform existing methods significantly, requiring fewer input points and achieving better accuracy in reconstructing models.
Why it matters?
This research is important because it simplifies the process of creating digital models from physical objects, making it easier for designers and engineers to work with 3D data. By improving the efficiency and accuracy of CAD model reconstruction, CAD-Recode could have a significant impact on fields like manufacturing, architecture, and product design.
Abstract
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.