step-examples/12-8-mixed/M063.stp
Sources
- OCCT STEPControl_ActorRead.cxx:1579, 1882 ("Entity with no unit context
- default units taken") (uncovered class evidence)
Sender
deduced — OCCT uncovered-class sweep
Description
A `SHAPE_REPRESENTATION` has no `GEOMETRIC_REPRESENTATION_CONTEXT` attached, or the context is missing units. The reader silently applies default units (typically mm). Bug-reporter language: "STEP no units, defaulted", "kernel guessed units", "model 1000× wrong".
Reproducer recipe
A `SHAPE_REPRESENTATION` with `context_of_items` referencing a context that lacks `LENGTH_UNIT`.
Expected kernel behavior
Reject as malformed (units are mandatory in AP203/214/242), or warn loudly and require explicit user confirmation of the assumed unit.
Notes
Synonyms: "STEP no units, defaulted", "kernel guessed units", "model 1000x wrong", "no unit context, default mm applied", "SHAPE_REPRESENTATION lacks unit context". Common cause of "model is 1000× wrong" symptom.
Expected validation
occt=shape(1)/shape(1) gmsh=shape(3) ifc=schema_n/a
Byte assertions
contains(b'GEOMETRIC_REPRESENTATION_CONTEXT')matches(rb'GEOMETRIC_REPRESENTATION_CONTEXT\(\'no_units\',\$,3\)')
Tier-3 assertions
shape_null == Falsen_vertices_total == 3
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* M063: GEOMETRIC_CURVE_SET in file where SHAPE_REPRESENTATION references a GEOMETRIC_REPRESENTATION_CONTEXT lacking LENGTH_UNIT â no unit context, reader silently applies default units; input: AP242 STEP file where SHAPE_REPRESENTATION.context_of_items points to a GEOMETRIC_REPRESENTATION_CONTEXT('no_units',$,3) â the second attribute (global_unit_assigned_context, a GLOBAL_UNIT_ASSIGNED_CONTEXT mixin) is $=absent; no LENGTH_UNIT is declared anywhere in the file for this representation; AP203/214/242 mandate that every geometric representation carry an explicit unit context; a reader that silently defaults to mm will produce a model that is 1000Ã too large or too small when the intended unit was metres or inches; kernel must reject as malformed (units are mandatory) or warn loudly and require explicit user confirmation of the assumed unit; OCC silently accepts (no diagnostic, empty result); GEOMETRIC_CURVE_SET IS the model entity â OCC yields empty; synonyms: STEP no units defaulted, kernel guessed units, model 1000x wrong, no unit context default mm applied, SHAPE_REPRESENTATION lacks unit context */ 3HEADER; 4FILE_DESCRIPTION(('M063'),'2;1'); 5FILE_NAME('M063.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF { 1 0 10303 442 1 1 4 }')); 7ENDSEC; 8DATA; 9#9000=APPLICATION_CONTEXT('mechanical design'); 10#1=GEOMETRIC_REPRESENTATION_CONTEXT('no_units',$,3); 11#2=CARTESIAN_POINT('pt_a',(0.,0.,0.)); 12#3=CARTESIAN_POINT('pt_b',(100.,0.,0.)); 13#4=CARTESIAN_POINT('pt_c',(0.,100.,0.)); 14#5=DIRECTION('z_axis',(0.,0.,1.)); 15#6=DIRECTION('x_axis',(1.,0.,0.)); 16#7=AXIS2_PLACEMENT_3D('placement',#2,#5,#6); 17#8=SHAPE_REPRESENTATION('no_unit_shape',(#2,#3,#4),#1); 18#9=GEOMETRIC_CURVE_SET('shape-representation-missing-unit-context-defaulted',(#1,#8,#2,#3,#4,#7)); 19#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 20#9051=PRODUCT('M063','M063','',(#9050)); 21#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 22#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 23#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 24#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 25#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 26#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 27#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 28#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 29#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 30#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#9),#9060); 31#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 32ENDSEC; 33END-ISO-10303-21;