step-examples/12-6-assembly/P004.stp
Sources
- catalog claim (P-series defect curation)
Description
The `GEOMETRIC_REPRESENTATION_CONTEXT` declares `LENGTH_UNIT(SI_UNIT(.MILLI.,.METRE.))` but the `CARTESIAN_POINT` coordinates are authored at metre scale (values like `500.0` where `0.5` mm was intended), producing geometry that is 1000× too large when parsed with the declared unit. A robust kernel must detect or heal the unit/scale disagreement rather than silently accepting a part that is a thousand times too big.
Reproducer recipe
Author a standard product chain with `GEOMETRIC_REPRESENTATION_CONTEXT` declaring millimetre `LENGTH_UNIT`, but emit `CARTESIAN_POINT` coordinates at metre scale (e.g., 500.0 instead of 0.5). The shape will load successfully but be 1000× larger than the producer intended.
Expected kernel behavior
detect the unit/coordinate-scale disagreement and either reject the file or apply a corrective scaling; emit a diagnostic that surfaces the scale mismatch to the consumer.
Notes
Synonyms: "unit declaration disagrees with coordinate scale", "metre coordinates in millimetre context", "1000× scale mismatch on unit context", "LENGTH_UNIT and CARTESIAN_POINT scale disagreement", "STEP file 1000x too large from unit/value mismatch".
Expected validation
occt=shape(1)/shape(1) gmsh=shape(4) ifc=schema_n/a
Byte assertions
contains(b'LENGTH_UNIT')contains(b'MILLI')contains(b'NEXT_ASSEMBLY_USAGE_OCCURRENCE')
Tier-3 assertions
shape_null == False
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* P004: LENGTH_UNIT context declares SI_UNIT(.MILLI.,.METRE.) but CARTESIAN_POINT coordinates are in metres (500.0 not 0.5 mm); 1000x scale mismatch between declared unit and actual coordinate values; NEXT_ASSEMBLY_USAGE_OCCURRENCE scaffolding present for §12.6 lint; GEOMETRIC_CURVE_SET IS model entity â OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('P004'),'2;1'); 5FILE_NAME('P004.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 7ENDSEC; 8DATA; 9#9000=APPLICATION_CONTEXT('mechanical design'); 10#1=CARTESIAN_POINT('',(0.0,0.0,0.0)); 11#2=CARTESIAN_POINT('',(500.0,0.0,0.0)); 12#3=CARTESIAN_POINT('',(500.0,500.0,0.0)); 13#4=CARTESIAN_POINT('',(0.0,500.0,0.0)); 14#5=GEOMETRIC_CURVE_SET('',(#1,#2,#3,#4)); 15#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 16#9051=PRODUCT('P004','P004','',(#9050)); 17#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 18#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 19#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 20#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 21#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 22#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 23#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 24#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 25#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 26#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#5),#9060); 27#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 28#9063=PRODUCT_CONTEXT('sub',#9000,'mechanical'); 29#9064=PRODUCT('UnitMismatch','UnitMismatch','',(#9063)); 30#9065=PRODUCT_DEFINITION_FORMATION('','',#9064); 31#9066=PRODUCT_DEFINITION('design','',#9065,#9053); 32#9067=NEXT_ASSEMBLY_USAGE_OCCURRENCE('1','unit_mismatch_instance','',#9054,#9066,$); 33ENDSEC; 34END-ISO-10303-21;