step-examples/12-1b-header/Lh028.stp
Sources
- 16-iso-spec N036
Description
ANCHOR may reference data instances, but every `#NNN` it names must eventually resolve in some DATA section of the same file. Generators emit anchors for instances that were filtered out of the DATA section.
Reproducer recipe
`ANCHOR; <part_anchor>=#100; ENDSEC; DATA; #1=PRODUCT(..); ENDSEC;` (no `#100` defined).
Expected kernel behavior
reject as undefined reference after the two-pass declare/resolve phase; tolerant mode may keep the file but mark the anchor as broken.
Notes
Cross-oracle: pure-Python Part-21 validator rejects (reject(E_UNRESOLVED_REFS)); OCCT silently accepts (load is `empty`). OCC auto-heals a spec-level violation. Synonyms: "ANCHOR points at undefined #NNN", "anchor references missing instance", "filtered instance still in ANCHOR", "ANCHOR forward reference unresolved", "STEP anchor names ghost entity".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'ANCHOR;')matches(rb'<[^>]+>=#100;')
Tier-3 assertions
load == "ok"
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Lh028: forward reference in ANCHOR section to undefined instance #100 */ 3/* ISO 10303-21 Ed.3: every #NNN in ANCHOR must resolve in a DATA section */ 4/* DEFECT: <part_anchor>=#100; but #100 is absent from all DATA sections */ 5/* pure-Python validator rejects (E_UNRESOLVED_REFS); OCC silently accepts empty */ 6HEADER; 7FILE_DESCRIPTION(('Lh028: ANCHOR forward reference to undefined #100'),'2;1'); 8FILE_NAME('Lh028.stp','2026-06-20T00:00:00',(''),(''),'cad-research-suite','',''); 9FILE_SCHEMA(('AUTOMOTIVE_DESIGN')); 10ENDSEC; 11ANCHOR; 12/* DEFECT: #100 is not defined anywhere in the DATA section below */ 13<part_anchor>=#100; 14<valid_anchor>=#1; 15ENDSEC; 16DATA; 17#1=CARTESIAN_POINT('origin',(0.,0.,0.)); 18#2=CARTESIAN_POINT('corner',(1.,1.,0.)); 19#3=DIRECTION('xdir',(1.,0.,0.)); 20#4=DIRECTION('zdir',(0.,0.,1.)); 21#5=GEOMETRIC_CURVE_SET('anchor-ghost-shape',(#1,#2)); 22/* NOTE: #100 referenced in ANCHOR above is intentionally absent */ 23ENDSEC; 24END-ISO-10303-21;