step-examples/12-1b-header/Lh017.stp
Sources
- 07-stepcode-ifcopenshell T014
Description
ISO 10303-21 §11 reserves names beginning with `!` for user-defined entities. Schema-driven readers whose keyword regex is `[A-Z][0-9A-Z_]*` reject them outright instead of treating them as opaque user types.
Reproducer recipe
`#12=!MYCURVE(0.0,0.0,0.0,1.0,$,$,$);`
Expected kernel behavior
lex `!`-prefixed identifiers as keywords; reject by schema validation OR pass through as a generic-entity placeholder.
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: "bang-prefixed entity in DATA section", "user-defined entity rejected by regex", "!FOO entity in DATA", "schema reader rejects ! prefix", "STEP entity name with exclamation mark".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
matches(rb'#\d+\s*=\s*!')matches(rb'#\d+\s*=\s*!\w+\(')
Tier-3 assertions
shape_null == True
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Lh017: user-defined entity with ! prefix in DATA section */ 3/* ISO 10303-21 §11: ! prefix designates user-defined entity types */ 4/* DEFECT: schema readers with regex [A-Z][0-9A-Z_]* reject ! identifiers */ 5/* Cross-oracle: pure Python rejects E_UNRESOLVED_REFS; OCCT silently accepts */ 6HEADER; 7FILE_DESCRIPTION(('Lh017: user-defined entity with ! prefix in DATA section'),'2;1'); 8FILE_NAME('Lh017.stp','2026-06-20T00:00:00',(''),(''),'cad-research-suite','',''); 9FILE_SCHEMA(('AUTOMOTIVE_DESIGN')); 10ENDSEC; 11DATA; 12#1=CARTESIAN_POINT('origin',(0.,0.,0.)); 13#2=CARTESIAN_POINT('corner',(1.,1.,0.)); 14#3=DIRECTION('xdir',(1.,0.,0.)); 15#4=DIRECTION('zdir',(0.,0.,1.)); 16/* DEFECT: !MYCURVE uses the ! prefix for user-defined entity â breaks schema readers */ 17#12=!MYCURVE(0.0,0.0,0.0,1.0,$,$,$); 18#5=GEOMETRIC_CURVE_SET('bang-prefixed-entity-shape',(#1,#2)); 19ENDSEC; 20END-ISO-10303-21;