Why We Separated LLM Parsing from OpenCascade Geometry Compilation for Text-to-CAD
Most AI 3D generators today output neural triangle meshes (GLB/OBJ). They work well for figurines and game assets, but they break down as soon as you need an M5 clearance hole spaced 80 mm apart or an involute spur gear that actually meshes. When building Cad Bot , we took a stricter architecture: the LLM never touches vertices or triangles . The Two-Stage Deterministic Pipeline Semantic parsing…
Most AI 3D generators today produce neural triangle meshes (such as GLB or OBJ files). These are effective for creating figurines and game assets, but they struggle when trying to generate more complex components, like M5 clearance holes spaced 80 mm apart or involute spur gears that mesh properly. To address these limitations while developing Cad Bot, we adopted a more stringent architecture: the large language model (LLM) does not interact directly with vertices or triangles.
Instead, we employed a two-stage deterministic pipeline for semantic parsing using an LLM and strict JSON DSL.
The model first processes a plain-English part prompt (for example, "slotted mounting plate 100x60x5 mm, 4x M5 clearance holes 80x40 apart, corners rounded r3") and translates it into a typed part schema. This schema is then compiled by a Python geometry container into a real B-rep solid using deterministic compilation techniques (like CadQuery or OpenCascade).
This compilation process not only produces a solid model but also verifies essential properties such as watertightness and minimum wall thickness (which must be at least 0.8 mm). The exported files include STL for 3D printing, STEP (ISO 10303) for editing in various CAD software like Fusion 360, SolidWorks, FreeCAD, and ISO A4 3-view shop drawings in DXF, AutoCAD R2000 DWG, SVG, and PDF formats.
A crucial aspect of this system is that the numeric values from the input prompt are passed directly into the OpenCascade kernel, ensuring that stated dimensions are exact from the beginning. Moreover, any post-generation dimension adjustments can be made through sliders that recompile the solid deterministically without needing to involve the LLM again. This approach guarantees precise manufacturing results, especially when choosing between meshes and parametric solids for functional prints or CNC machining.
When deciding between different export formats, it is essential to consider the end-use of the generated CAD files. STL is universally compatible with slicers when the dimensions are finalized, making it ideal for straightforward printing tasks. STEP format, on the other hand, preserves exact geometric features such as cylinders and flat faces, which is advantageous for those requiring CAD edits and CAM toolpaths.
Lastly, 3MF offers a compact mesh package that includes explicit units and multi-material metadata, providing flexibility in handling complex parts with varying materials. For more detailed comparisons and examples, we maintain dedicated reference pages on AI CAD generator workflows and specific generators such as the involute spur gear generator.
We also refuse out-of-scope geometry, such as helical or bevel gears, or multi-part assemblies, explicitly stating that these cannot be approximated.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to