Papers › FlexCAD: Unified and Versatile Controllable CAD Generation with Fine-tuned Large...

FlexCAD: Unified and Versatile Controllable CAD Generation with Fine-tuned Large Language Models

5 Nov 2024arXiv:2411.05823archive 2025-07-28

Zhanwei Zhang, Shizhao Sun, Wenxiao Wang, Deng Cai, Jiang Bian

Recently, there is a growing interest in creating computer-aided design (CAD) models based on user intent, known as controllable CAD generation. Existing work offers limited controllability and needs separate models for different types of control, reducing efficiency and practicality. To achieve controllable generation across all CAD construction hierarchies, such as sketch-extrusion, extrusion, sketch, face, loop and curve, we propose FlexCAD, a unified model by fine-tuning large language models (LLMs). First, to enhance comprehension by LLMs, we represent a CAD model as a structured text by abstracting each hierarchy as a sequence of text tokens. Second, to address various controllable generation tasks in a unified model, we introduce a hierarchy-aware masking strategy. Specifically, during training, we mask a hierarchy-aware field in the CAD text with a mask token. This field, composed of a sequence of tokens, can be set flexibly to represent various hierarchies. Subsequently, we ask LLMs to predict this masked field. During inference, the user intent is converted into a CAD text with a mask token replacing the part the user wants to modify, which is then fed into FlexCAD to generate new CAD models. Comprehensive experiments on public dataset demonstrate the effectiveness of FlexCAD in both generation quality and controllability. Code will be available at https://github.com/microsoft/FlexCAD.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2411.05823")

Code

Syntology Ran 4 of 12 code samples harvested from 1 repository linked to this paper; 8 have no recorded run. Of those that ran: 1 ran · honoured contract; 3 ran · our draft was wrong.

By repository: official repository: 12 samples from 1 repository, 4 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

microsoft/flexcad officialmentioned in papermentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

12 samples harvested; 4 ran; 1 honoured the contract we drafted; 8 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
3ran · our draft was wrong
8unverified

Licence: 0 of the 12 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from microsoft/FlexCAD. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

count_curve microsoft/FlexCAD/finetune.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · a3fdffdcd374aabc · report
find_all_curve_end_positions microsoft/FlexCAD/finetune.py official repository ran · honoured contract MIT (permissive) · 75c80ac7bdc5c8ad · report
find_files microsoft/flexcad/utils/eval_cad.py official repository ran · our draft was wrong MIT (permissive) · 680bb1e97d16d80c · report
interleave_lists_with_zeros microsoft/FlexCAD/finetune.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 5f1a10736eedb807 · report
angle_from_vector_to_x microsoft/flexcad/utils/parser.py official repository unverified MIT (permissive) · 7e74ac9f39f00581 · report
create_curve_str microsoft/flexcad/utils/convert.py official repository unverified MIT (permissive) · 0952c03cfe81d964 · report
create_extrude_str microsoft/flexcad/utils/convert.py official repository unverified MIT (permissive) · 3281e0329f756e35 · report
create_sketch_str microsoft/flexcad/utils/convert.py official repository unverified MIT (permissive) · 49b122ae146ce330 · report
dequantize_verts microsoft/flexcad/utils/parser.py official repository unverified MIT (permissive) · 24afc5c7ff764ff4 · report
distChamfer microsoft/flexcad/utils/eval_cad.py official repository unverified MIT (permissive) · 9a578f2a671a37e4 · report
find_arc_geometry microsoft/flexcad/utils/parser.py official repository unverified MIT (permissive) · e49ee2dfad59267a · report
read_ply microsoft/flexcad/utils/eval_cad.py official repository unverified MIT (permissive) · 7ea8042cb1e765a6 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

SET

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections