Topology Diverges Before Failure: Finding the Right Repair Point in CAD Programs
Abstract
Generated CAD programs can remain executable even after their committed construction structure diverges from the intended design, making execution feedback alone insufficient to determine where repair should begin. We introduce TopoRecover, a topology-aware framework that treats repair localization as a first-class problem before patch generation. TopoRecover replays CAD command sequences with a deterministic state-machine interpreter that records completed profiles and their source commands. By comparing these profiles with a fixed feature plan specifying the required construction structure, it maps structural mismatches to the command blocks that produced them. A Large Language Model (LLM) proposes geometry-constrained local edits, followed by downstream execution repair, while preserving compatible construction history. Repaired programs are accepted only when verifier replay satisfies the plan and independent OpenCASCADE execution produces a valid positive-volume solid. On 347 natural Text2CAD repair inputs, TopoRecover achieves 78.4% plan-conditioned repair success, compared with 64.3% for the strongest adapted baseline, and obtains the highest recovered-history score. In a matched localization study holding the patcher, fallback, validation, and budget limits fixed, topology-based localization improves repair success from 47.6% to 78.4%, with gains concentrated on executable programs that violate their plans. These results identify localization as a key bottleneck in plan-conditioned CAD repair: targeting earlier plan-inconsistent constructions improves repair success without changing the patching procedure.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.