Viyan

Viyan AI

LLMs Add Semantic Priors to CAD Surface Fitting

The LASP framework uses LLMs to convert procedural modeling histories into B-spline priors, providing geometric solvers with informed starting conditions.

The LASP (Language-Augmented Semantic Priors) framework inserts an LLM-based reasoning layer into CAD geometric kernels to guide B-spline surface fitting. Traditional CAD solvers rely on heuristic initialization to approximate surfaces from geometric data. LASP instead reads procedural modeling histories to provide structured B-spline parameters that solvers use as an inductive bias before they begin their optimization routines. By translating raw modeling histories into textual descriptions of design intent, the system provides a more robust starting point than purely geometric heuristics.

Feature Traditional CAD Fitting LASP-Enhanced Fitting
Initialization Heuristic/Deterministic LLM-predicted priors
Design Intent Ignored Encoded via modeling history
Solver Role Primary actor Guided by semantic priors
Outcome Mathematically optimized Semantically consistent

How the Mechanism Works

LASP acts as a middleware layer. It does not replace the geometric kernel, which performs the computationally intensive optimization of the B-spline surfaces. The model is trained first on command sequences and then fine-tuned on the resulting B-spline control points. This two-stage approach allows the model to learn the association between specific operations and the final geometric surface representation.

During inference, the LLM processes the textualized history. When the model encounters a sequence of commands—such as a specific sequence of sketch constraints or transformation operations—it uses this context to predict the B-spline control points. These predicted points are essentially initial parameters passed to the geometric kernel. The bridge between the LLM output and the kernel is a transformation layer that maps the model's output logits to the coordinate space of the control points. This gives the geometric solver a head start, positioning the surface near the target geometry before the refinement process begins. This reduces the number of iterations required to reach convergence and prevents the solver from diverging into configurations that are mathematically valid but semantically incorrect.

The Role of Design Intent

Consider an automated fillet operation between two complex surfaces. A heuristic solver might default to a simple circular blend, which can lead to unsightly ridges or curvature discontinuities. LASP uses the history to recognize the designer intended a specific transition. The connection between history and geometry is established during the supervised training phase. The model is trained on large datasets where each sequence of commands is explicitly linked to the resulting geometry defined by specific B-spline control point configurations. Because the model sees these pairs repeatedly, it learns the mapping between specific CAD operations and the necessary B-spline structure required to maintain curvature continuity. The LLM does not perform the B-spline math itself. It provides a starting point that aligns with the intended geometry, leaving the final refinement to the kernel. This method successfully bridges the gap between high-level engineering decisions and low-level geometry, turning abstract modeling history into concrete mathematical constraints for downstream solvers.

Sources