RLCAD: Reinforcement Learning Training Gym for Revolution Involved CAD Command Sequence Generation

Xiaolong Yin, Xingyu Lu, Jiahang Shen, Jingzhe Ni, Hailong Li, Ruofeng Tong, Min Tang, Peng Du · 2025

Read RLCAD: Reinforcement Learning Training Gym for Revolution Involved CAD Command Sequence Generation by Xiaolong Yin, Xingyu Lu, Jiahang Shen, Jingzhe Ni, Hailong Li, Ruofeng Tong, Min Tang, Peng Du (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2503-18549.txt.

Introduction

Xiaolong Yin and co-authors build a training ground for AI that designs 3D parts step by step, in a 2025 paper. CAD models are built from sketches plus steps like pushing, spinning, and cutting shapes. Past methods covered sketches and simple steps, but not spinning. That left many real shapes out of reach.

Their gym sits on a real CAD engine. An agent proposes one command at a time. The gym builds the shape so far and feeds it back to the agent. Rewards reflect how close the shape is to the target. Training in the loop lets the agent learn long command chains. Support for the spin step widens the range of parts the agent can design.

Catalog record

CREATORXiaolong Yin, Xingyu Lu, Jiahang Shen, Jingzhe Ni, Hailong Li, Ruofeng Tong, Min Tang, Peng Du
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE52 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2503-18549

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

RLCAD: Reinforcement Learning Training Gym for Revolution Involved CAD Command Sequence Generation Xiaolong Yin, Xingyu Lu, Jiahang Shen, Jingzhe Ni, Hailong Li, Ruofeng Tong, Min Tang, Peng Du Abstract A CAD command sequence is a typical parametric design paradigm in 3D CAD systems where a model is constructed by overlaying 2D sketches with operations such as extrusion, revolution, and Boolean operations. Although there is growing academic interest in the automatic generation of command sequences, existing methods and datasets only support operations such as 2D sketching, extrusion, and Boolean operations. This limitation makes it challenging to represent more complex geometries. In this paper, we present a reinforcement learning (RL) training gym specifically designed for CAD model generation, along with an RL-based algorithm that generates command sequences from boundary representation (B-Rep) geometry within this training gym. Given an input B-Rep, the policy network of the RL algorithm first outputs an action. This action, together with previously generated actions, is processed within the gym to produce the corresponding CAD geometry, which is then fed back into the policy network. Rewards, computed by the difference between the generated and target geometries within the gym, are used to update the RL network. Our method supports operations beyond sketches, Boolean, and extrusion, including revolution operations. With this training gym, we achieve state-of-the-art (SOTA) quality in generating command sequences from B-Rep geometries. 1 Introduction Figure 1: Demonstration of various CAD models generated by our novel CAD model generation algorithm. Including revolution operation enables the generation of more complex geometric shapes, such as the battery, nuts, flanges, etc. In our daily lives and industrial production, objects ranging from small items like cups to large structures like airplanes are designed using a series of 2D and 3D modeling operations in computer-aided design (CAD) software. The process of recording these parametric operations results in a command sequence that encapsulates domain expert knowledge by precisely defining a sequence of modeling steps to generate CAD geometries. However, obtaining the command sequence directly is often not feasible. Instead, we should generate the corresponding command sequence using other modalities, such as boundary representation, meshes, or point clouds. Over the past few years, generative models have flourished, demonstrating immense potential. Representative approaches include diffusion models [ 10 ] , GANs [ 25 ] , autoencoders [ 18 ] , large language models (LLMs) [ 37 , 9 ] , and vision-language models (VLMs) [ 7 ] . These methods have been extensively applied in generating CAD models, such as boundary representation (B-Rep) autoregressive encoder BrepGen [ 43 ] , end-to-end point cloud-to-command sequence generation model CADSIGNet [ 16 ] , text-to-command sequence generation model Text2CAD [ 17 ] , multi-modal command sequence generation model CAD-MLLM [ 41 ] , B-Rep to command sequence generation model Fusion 360 Gallery [ 39 ] , voxel-to-command sequence generation model SECAD-Net [ 23 ] and SfmCAD [ 22 ] , autoregressive command sequence generation models HNC-CAD [ 42 ] , SkexGen [ 44 ] , and DeepCAD [ 40 ] , as well as LLM based CAD code generation algorithm [ 3 ] and platform Zoo.dev [ 47 ] . Despite their success, most of these methods support only basic operations like 2D sketch, extrusion, and Boolean operations. Traditional CAD geometry generation algorithms rely on CAD geometric engines, which provide essential functionalities such as validity checks and constraint solving – capabilities that supervised learning alone cannot achieve. Meanwhile, SOTA large language models such as DeepSeek R1 [ 13 ] and OpenAI o1 [ 14 ] employ reinforcement learning (RL) techniques to enhance text generation quality and model reasoning capabilities. In bionic robotics, RL-based simulation training has also yielded impressive results in robot motion control [ 46 ] and manipulation [ 11 ] . Inspired by these advancements, we present the first RL training gym tailored to parametric CAD command sequence generation on exact B-Rep geometry. We provide a high-level Python interface wrapper and support parallel environment sampling, enabling efficient interaction with multiple CAD environments. In this framework, first we represent the B-Rep as a face-adjacency graph, then employ a graph neural network based feature extractor to encode the B-Rep, and finally use a policy network to predict an action. Each action is described by four elements—the start face, end face, operation type (newbody, intersection, union, or subtraction), and action type (extrude or revolve), where the start and end faces differ for extrusion but coincide for revolution—which is executed in the gym to produce the corresponding CAD geometry. The resulting geometry is then fed back into the policy network to compute rewards and update the network parameters. Our approach supports operations beyond sketches, Boolean, and extrusion, including revolution operations. As shown in Figure 1 , including revolution operation enables the generation of more complex geometric shapes, such as the battery, nuts, chess pieces, etc. Technical contributions We present a CAD-focused RL training gym and an RL-driven CAD model generation algorithm that converts B-Rep models into command sequences within the training gym. Our approach features a multi-modal policy network that integrates multiple common CAD operations with cross-modal feature extractors. To further enhance generation quality, we introduce a set of hybrid reward functions, including geometric similarity and neural similarity, which jointly guide the learning process and help better distinguish models in both geometric and semantic aspects. We construct an RL-oriented dataset based on the ABC dataset [ 19 ] , applying filtering and de-duplication to obtain a curated set of 20k CAD models that contain both extrusion and revolution operations, together with their ground-truth command sequences. Unlike existing extrusion-dominated CAD benchmarks, our dataset expands the operational repertoire and is intended to support future research on general CAD command-sequence generation. 2 Related Work We review related work in four aspects: CAD datasets, CAD model generation, B-Rep to command sequence generation, and RL training gyms. 2.1 CAD Datasets Current parametric CAD models typically are stored as B-Rep [ 5 ] or command sequence [ 30 ] . B-Rep includes the analytical representation of the surface and curves of a 3D shape, while command sequences record the historical construction process of the shape. B-Rep models consist of trimmed parametric surfaces along with topological information describing their adjacency relationships. The ABC dataset [ 19 ] is the most widely used B-Rep dataset in academia, containing one million CAD models. DeepCAD [ 40 ] cleaned 170,000 pairs of B-Rep and command sequences from the ABC dataset. Text2CAD [ 17 ] constructed hierarchical descriptions for the DeepCAD dataset, ranging from coarse to fine granularity, using LLMs and VLMs, adding text descriptions to the command sequences. CAD-MLLM [ 41 ] , using a method similar to DeepCAD, extracted 185,000 models from the ABC dataset and generated corresponding text descriptions, multi-view images, and point clouds for these models. However, these datasets primarily contain 2D sketches, such as lines, arcs, and circles, along with extrusion and Boolean operations. 2.2 CAD Model Generation CAD model generation involves generating a B-Rep model or command sequence from inputs such as B-Rep models, multi-view images, textual descriptions, or point clouds. CAD reconstruction remains a challenging problem because it requires reasoning over continuous parameters (e.g., dimensions of basic solids) and discrete operations (e.g., Boolean and extrusion

Read the complete text