step-examples/12-11-adversarial/Ad099.stp
Sources
- OCCT MANTIS#0026671 (OCCT MANTIS tracker 502 as of 2026-05-02)
Description
A self-intersection-detection pass on a wire whose pcurves describe a curve that revisits the same parameter range repeatedly (e.g., a small self-tangent loop) enters an infinite loop because the visited-segment map keys on segment ID, not segment + direction.
Reproducer recipe
Wire whose pcurve traverses a small loop, returning to the same parameter region multiple times. Self-intersection-fix runs forever.
Expected kernel behavior
every iteration in self-intersection-fix monotonically reduces a complexity measure (segments, intersections); if not, abort with diagnostic.
Notes
**See also**: Tsh056. **OCC behavior**: silently accepts (no diagnostic, empty result); outside catalog's allowed set ({heal}). Kernel-bug witnessed: catalog asks for healing; OCC neither heals nor rejects; the input is dropped on the floor without diagnostic. Provenance tier: bytes-only (Q5 full-corpus 2026-07-01).
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Provenance tier
bytes-only — defect not fully embodied in fixture bytes.
Byte assertions
contains(b'teardrop') or matches(rb'EDGE_CURVE\([^;]*#(\d+),#\1,')contains(b'EDGE_LOOP') and contains(b'EDGE_CURVE')
Tier-3 assertions
load == "ok"
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1ISO-10303-21; 2/* Ad099: wire whose pcurve traverses a self-tangent teardrop loop; revisits same parameter range causing self-intersection-fix to loop forever; visited-segment map keys on ID not ID+direction; fix must monotonically reduce complexity measure or abort; OCCT MANTIS#0026671; See also Tsh056; GEOMETRIC_CURVE_SET IS model entity â OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('Ad099'),'2;1'); 5FILE_NAME('Ad099.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 7ENDSEC; 8DATA; 9#1=CARTESIAN_POINT('',(0.0,0.0,0.0)); 10#2=GEOMETRIC_CURVE_SET('',(#1)); 11#3=CARTESIAN_POINT('teardrop_cusp',(0.5,0.0,0.0)); 12#4=VERTEX_POINT('',#3); 13#5=CARTESIAN_POINT('',(0.5,0.0,0.0)); 14#6=CARTESIAN_POINT('',(0.5,0.1,0.0)); 15#7=CARTESIAN_POINT('',(0.8,0.15,0.0)); 16#8=CARTESIAN_POINT('',(0.8,-0.15,0.0)); 17#9=CARTESIAN_POINT('',(0.5,-0.1,0.0)); 18#10=CARTESIAN_POINT('',(0.5,0.0,0.0)); 19#11=B_SPLINE_CURVE_WITH_KNOTS('teardrop_loop',3,(#5,#6,#7,#8,#9,#10),.UNSPECIFIED.,.F.,.T.,(4,1,1,4),(0.0,0.25,0.75,1.0),.UNSPECIFIED.); 20#12=EDGE_CURVE('teardrop_edge',#4,#4,#11,.T.); 21#13=ORIENTED_EDGE('',$,$,#12,.T.); 22#14=EDGE_LOOP('teardrop_wire_loop',(#13)); 23#15=CARTESIAN_POINT('teardrop_cusp2',(2.0,0.0,0.0)); 24#16=VERTEX_POINT('',#15); 25#17=CARTESIAN_POINT('',(2.0,0.0,0.0)); 26#18=CARTESIAN_POINT('',(2.0,0.05,0.0)); 27#19=CARTESIAN_POINT('',(2.1,0.08,0.0)); 28#20=CARTESIAN_POINT('',(2.1,-0.08,0.0)); 29#21=CARTESIAN_POINT('',(2.0,-0.05,0.0)); 30#22=CARTESIAN_POINT('',(2.0,0.0,0.0)); 31#23=B_SPLINE_CURVE_WITH_KNOTS('teardrop_loop2',3,(#17,#18,#19,#20,#21,#22),.UNSPECIFIED.,.F.,.T.,(4,1,1,4),(0.0,0.25,0.75,1.0),.UNSPECIFIED.); 32#24=EDGE_CURVE('teardrop_edge2',#16,#16,#23,.T.); 33#25=ORIENTED_EDGE('',$,$,#24,.T.); 34#26=EDGE_LOOP('teardrop_wire_loop2',(#25)); 35ENDSEC; 36END-ISO-10303-21;