TL;DR
CADForge is an agentic framework that reconstructs editable, parametric CAD models from a single 2D image by mimicking a human engineer's workflow. By decomposing objects into parts and using explicit geometric reasoning to generate executable CadQuery code, it achieves state-of-the-art reconstruction fidelity while using significantly fewer computational resources than previous agentic methods.
What Problem Does This Paper Address?
Reconstructing a 3D CAD model from a single image is a "holy grail" for digital manufacturing and industrial design. However, it is incredibly difficult because a single 2D view is inherently incomplete—parts of the object are always occluded.
Existing approaches generally fall into two camps:
- End-to-end neural networks that try to predict CAD commands directly. these often struggle with complex, multi-part objects (like furniture) and produce "hallucinated" or disconnected geometry.
- Recent LLM-based agents that generate code. While promising, these often suffer from high "token" costs (they are expensive and slow) and fail to capture the precise geometric constraints (like exact alignments or offsets) required for a valid engineering model.
CADForge aims to bridge this gap by introducing explicit geometry reasoning, ensuring that the generated models aren't just visually similar, but structurally sound and editable.
Methods
CADForge operates as a multi-stage agentic pipeline, as shown in the overview below:
The process follows four main steps:
- Component Decomposition: A Vision-Language Model (VLM) analyzes the image and breaks the object down into a sequence of "CAD-meaningful" parts (e.g., a chair is decomposed into a seat panel, legs, and back slats).
- Explicit Geometry Reasoning: This is the paper's core innovation. Instead of writing CAD code immediately, the system performs two sub-tasks:
- Geometry Observation: The agent identifies spatial relationships (e.g., "the leg is flush with the corner of the seat").
- Geometry Programming: The agent writes a small, temporary Python script to solve for the exact numerical parameters (dimensions, coordinates) needed to satisfy those observations.
- CadQuery Generation: A code generator uses these solved parameters to write executable CadQuery (a Python-based CAD library) code. To make this robust, the authors developed a Failure-guided Toolkit—a set of helper functions (like
safe_fillet) that the system "learned" to create by analyzing its own past mistakes. - Review Agent: A final agent renders the generated part and compares it side-by-side with the original image. If it detects a mismatch (e.g., "the leg is too short"), it sends targeted feedback back to the reasoning or coding stage for a "do-over."
To keep the process efficient, CADForge maintains a Parametric CAD Memory, which stores only the essential parameters of previously built parts rather than the entire code history, drastically reducing the amount of data the LLM needs to process.
Datasets
The authors evaluated CADForge on a curated set of 200 samples from three major 3D datasets:
- Objaverse: General 3D objects.
- Fusion 360: Real-world industrial CAD models.
- 3D-Future: Detailed furniture models.
They also tested the system on 30 "in-the-wild" web images to assess how well it generalizes to real-world photos. The toolkit construction was performed using a separate set of 60 cases from the Fusion 360 dataset to ensure no data leakage during evaluation.
Key Insights and Ideas
- Reasoning Before Coding: The "aha moment" here is that LLMs are better at writing a math solver than they are at guessing 3D coordinates directly. By forcing the model to write a "Geometry Program" first, the system grounds its 3D construction in logic rather than visual estimation.
- Mimicking the Human Workflow: By decomposing the object into a dependency-ordered sequence (building the frame before the slats), the system avoids the "spaghetti code" and structural failures common in one-shot generation.
- Self-Correction via Failure Mining: The authors didn't just write a library of helpers; they let the agent "mine" its own failures to identify which CAD operations (like Boolean cuts or complex fillets) were most prone to breaking, then encapsulated those into robust tools.
Key Results
CADForge consistently outperformed existing baselines like Procedura and Articraft across several metrics:
- Geometric Accuracy: It reduced the Chamfer Distance (a measure of shape error) by 8.35% compared to the best previous method.
- Efficiency: It consumed 75.4% fewer tokens than Procedura, making it significantly cheaper and faster to run.
- Validity: It achieved a 93.8% CAD Program Validity Rate, meaning the code it generates almost always results in a manifold, usable 3D shape.
- Perceptual Quality: In VLM-based preference tests, CADForge was ranked as the top reconstruction nearly 50% of the time, far outstripping the competition (see Figure 2).
Qualitatively, CADForge is much better at capturing repetitive patterns and fine details, such as the specific number of holes in a bracket or the internal shelving of a cabinet, as seen in Figure 3.
Limitations and Future Work
Despite its success, CADForge has clear areas for improvement:
- Single-View Constraints: Because it relies on one image, it can still struggle with parts that are completely hidden from view. The authors suggest extending the framework to multi-view observations in the future.
- Extreme Perspectives: The system's 3D perception degrades when the input image is taken from a very shallow or "unfavorable" angle (e.g., looking at a thin object edge-on).
- Uncertainty Modeling: Future work could involve explicitly modeling geometric uncertainty, allowing the agent to "ask" for more information or provide multiple plausible reconstructions when the visual evidence is ambiguous.
Summary updated