Research
NURBGen: High-Fidelity Text-to-CAD Generation through LLM-Driven NURBS Modeling
Overview Research area: Computer vision and 3D generative modeling, specifically text-to-CAD generation using large language models and NURBS (Non-Uniform Rational B-Spline) surface representations. T
- arXiv
- 2511.06194
- Published
- 2025-11-09
- Authors
- Muhammad Usama, Mohammad Sadil Khan, Didier Stricker, Muhammad Zeshan Afzal
AI summary
Overview
- Research area: Computer vision and 3D generative modeling, specifically text-to-CAD generation using large language models and NURBS (Non-Uniform Rational B-Spline) surface representations.
- Technical level: Advanced. The paper assumes familiarity with BRep topology, NURBS mathematics (control points, knot vectors, degrees, weights), LLM supervised fine-tuning, and geometric evaluation metrics.
- Scope: The paper introduces NURBGen, the authors' claimed first framework for generating editable 3D CAD models directly from natural language as structured NURBS parameters, supported by a new 300k-part dataset (partABC) and a hybrid NURBS-plus-analytic-primitive encoding.
What This Paper Is About
Existing text-to-CAD systems either output meshes or depend on "design-history" representations (sequences of sketches and operations like extrusions) that are trainable only on small, low-complexity datasets such as DeepCAD. The large ABC dataset (over one million CAD models) instead stores geometry as BRep surfaces, mostly NURBS, which lacks design history and text captions, so it has been largely unused for text-conditioned generation. NURBGen's goal is to fine-tune a large language model so that a free-form text prompt is translated into JSON encoding NURBS surface parameters that can be converted directly into a valid BRep.
Key Contributions
- NURBGen framework: The authors present NURBGen, described as the first LLM-driven, NURBS-based text-to-CAD framework, fine-tuning Qwen3-4B to map text captions to structured NURBS surface parameters serialized as JSON and convertible to BRep using Python.
- partABC dataset: A large-scale multi-modal dataset built from the ABC dataset, containing approximately 300k part-level CAD models with NURBS annotations and high-quality captions produced by an automated annotation pipeline.
- Hybrid representation: A symbolic format combining untrimmed NURBS surfaces with analytic primitives (lines, circles, B-splines, ellipses, parabolas, hyperbolas) to model trimmed and degenerate faces more robustly while reducing token complexity.
- Empirical evaluation: Experiments comparing NURBGen against Text2CAD, DeepCAD, and GPT-4o using geometric metrics, human expert preference, GPT-4o preference, and invalidity ratio, plus an ablation on the hybrid representation and a caption-quality audit.
Main Findings
- Geometric fidelity: On 7,500 test samples with 8,192 uniformly sampled points normalized in a unit cube, NURBGen reports CD 4.43, HD 0.25, JSD 57.94, and MMD 2.14, where CD, JSD and MMD are multiplied by 10^2 in Table 1. For comparison, Text2CAD reports CD 9.66, HD 0.42, JSD 85.27, MMD 4.54; DeepCAD reports CD 10.28, HD 0.45, JSD 89.77, MMD 4.43; GPT-4o reports CD 7.2, HD 0.36, JSD 72.87, MMD 4.17.
- Preference studies: Table 1 reports NURBGen at 64.1 (human, 1k samples) and 61.6 (GPT-4o, 5k samples); the prose in the Results paragraph instead states 60.8% top-1 human preference and 63.7% GPT-4o preference. The "Undecided" row is 2.7 (human) and 3.2 (GPT-4o). Human evaluation used five CAD designers of varying expertise with majority voting.
- Invalidity ratio: NURBGen has the lowest invalid B-Rep conversion rate in Table 1 at 0.018; the prose describes it as 0.01. Text2CAD is 0.05, GPT-4o 0.17, and DeepCAD 0.32 in Table 1 (prose calls DeepCAD's rate 0.3).
- Hybrid representation ablation: Fine-tuning Qwen3-4B on untrimmed NURBS only, without analytic-primitive fallback, produces artifacts near holes and sharp transitions; the hybrid-trained model scores 72% by human evaluation and 79% by GPT-4o.
- Face-level representation split: About 70% of faces are modeled with NURBS and 30% fall back to analytic primitives, using a Chamfer Distance threshold of epsilon = 6 × 10^-4 to decide when a NURBS fit is acceptable.
- Caption quality: A random sample of 1,000 automatically generated captions, verified by GPT-4o against six rendered views and CAD metadata, yields an estimated accuracy of approximately 85%.
- Reported limitations: Failures occur on complex prompts (the example given is "Two-story house with gabled roof"), on self-intersections and topological inconsistencies, and on prompts requiring engraved text.
Methodology in Plain English
The authors start from the ABC dataset, which holds CAD models as BRep geometry but has no captions and no design history. They limit preprocessing to 200k of the 1M+ models, then programmatically split assemblies into individual parts using PythonOCC, yielding 3M part-level instances.
Each part is normalized into a 2×2×2 bounding box centered at the origin. Faces are converted into untrimmed NURBS via BRepBuilderAPI_NurbsConvert, and the surface parameters (poles, weights, knot vectors, knot multiplicities, u/v degrees, periodicity flags) are extracted and stored as JSON. Where an untrimmed NURBS reconstruction deviates from the original face by more than the Chamfer Distance threshold of 6 × 10^-4 (thin regions around holes and fillets are the typical failures), the face is instead stored as an analytic primitive such as a line, circle, ellipse, Bezier curve, or B-spline curve. This mix is the hybrid representation, and it makes the serialized geometry shorter and more token-efficient.
To create training text, each BRep is turned into a textureless triangle mesh and rendered from six viewpoints at 512×512 in Blender, with the Freestyle renderer adding silhouette and edge contours. Alongside the images, the pipeline computes geometric metadata that a vision-language model cannot easily infer: length, width, height (via an axis-aligned bounding box using OpenCascade's Bnd_Box), surface area and volume (via brepgprop VolumeProperties and SurfaceProperties), and the genus (number of topological through-holes) from the Euler characteristic chi = V − E + F and g = 0.5 × (2 − chi). InternVL3-13B then receives the six views plus the metadata-augmented prompt and produces a shape-centric caption.
Because many extracted parts are trivially simple, the authors apply complexity-aware filtering with a weighted score combining token count, through-hole count, a surface-area-to-volume ratio, and bounding-box diagonal length, with weights l1 = 0.35, l2 = 0.3, l3 = 0.25, l4 = 0.1 chosen empirically on 100 samples. Parts are bucketed as simple (≤ 0.12), moderate (0.12–0.23), and complex (> 0.23); the final partABC keeps 10% simple, 50% moderate, and 40% complex parts for roughly 300k samples.
Fine-tuning uses Qwen3-4B with AdamW, a learning rate of 5 × 10^-5, linear warm-up, and LoRA with rank 64 and alpha 128, for 180k steps at batch size 1 on 4× H200 GPUs over 3 days. The training context window is 8192 tokens and inference uses 14k tokens at temperature 0.3; on an RTX 3090 the model generates roughly 800 tokens per second. Training/validation/test split is 95%–2.5%–2.5%, control point coordinates are rounded to 6 decimal places, and weights are compressed with a (value, frequency) scheme to shorten sequences.
Why This Matters
- Research impact: The paper positions NURBS-based symbolic generation as an alternative to design-history-based text-to-CAD, opening the large ABC dataset to text-conditioned generative modeling and framing CAD generation as a language modeling problem over surface parameters rather than as mesh or operation-sequence prediction. The accompanying partABC dataset and release of code and dataset are offered as resources for follow-up work.
- Real-world applications (implied by the formulation, not separately evaluated in the paper):
- Mechanical part design where an engineer describes a component in text and receives an editable parametric model.
- Rapid concept iteration, producing an initial BRep that a designer refines in professional CAD software.
- Engineering education, where students can move from a description to a parametric model without mastering CAD tooling first.
- Simulation and analysis pipelines that require BRep/NURBS geometry rather than meshes.
- Industry relevance: CAD authoring is described as labor-intensive and dependent on expert knowledge of tools like Onshape or AutoCAD, while design-history datasets are small and skewed toward simple shapes. A direct NURBS-to-BRep text interface, if reliable, targets the professional drafting bottleneck and the shortage of diverse public parametric data in industrial workflows.
Future Directions
- Long-context and larger assemblies: The current model is constrained by an 8192-token context window; the authors state future work will explore long-context training, which matters for the assembly-level models whose JSON exceeded 100k tokens and were excluded.
- Multimodal extensions: The authors mention multimodal extensions as a planned direction beyond text-only prompting.
- Complex-prompt and fine-structure handling: Failure cases include multi-part architectural prompts, self-intersections and topological inconsistencies, and engraved text, all of which remain open problems.
- Scalable data coverage: Only 200k of the 1M+ ABC models were preprocessed to produce the roughly 300k-sample partABC, and caption accuracy is estimated at about 85%, leaving room to expand coverage and improve annotation reliability.
Target Audience
This paper is most useful to researchers in 3D generative modeling and CAD/geometry processing who already understand BRep representations and LLM fine-tuning; to practitioners building text-to-CAD or parametric design tools; and to dataset builders interested in automated captioning pipelines for engineering geometry. Readers without background in NURBS or LLM training will find the method sections demanding, though the contributions and evaluation results are readable at a higher level.
Authors’ abstract
Generating editable 3D CAD models from natural language remains challenging, as existing text-to-CAD systems either produce meshes or rely on scarce design-history data. We present NURBGen, the first framework to generate high-fidelity 3D CAD models directly from text using Non-Uniform Rational B-Splines (NURBS). To achieve this, we fine-tune a large language model (LLM) to translate free-form texts into JSON representations containing NURBS surface parameters (\textit{i.e}, control points, knot vectors, degrees, and rational weights) which can be directly converted into BRep format using Python. We further propose a hybrid representation that combines untrimmed NURBS with analytic primitives to handle trimmed surfaces and degenerate regions more robustly, while reducing token complexity. Additionally, we introduce partABC, a curated subset of the ABC dataset consisting of individual CAD components, annotated with detailed captions using an automated annotation pipeline. NURBGen demonstrates strong performance on diverse prompts, surpassing prior methods in geometric fidelity and dimensional accuracy, as confirmed by expert evaluations. Code and dataset will be released publicly.