step-examples/12-5-units/U021.stp
Sources
- 02-caxif.md "KILO prefix on mass_unit" (UDA v1.8 Annex C.4.1)
- 06-nist-sfa.md S030 (sfa-valprop.tcl:631)
Description
Newton is `[kg·m·s⁻²]`. Each `si_unit` referenced by `derived_unit_element` for a derived SI unit must NOT carry a prefix, except when the referenced si_unit is a `mass_unit`, which MUST carry `.KILO.`. Forgetting the prefix makes Newton numerically equivalent to gram·m·s⁻², off by 1000. For SI mass overall, only `kilogram` (prefix `kilo` on base `gram`) is allowed.
Reproducer recipe
define a `force_unit` (Newton) whose `derived_unit_element` references a `mass_unit` with no prefix; or a free-standing mass unit with prefix other than `.KILO.`.
Expected kernel behavior
validate; when a derived SI unit pulls in `mass_unit`, ensure prefix is `.KILO.`; reject or auto-convert otherwise.
Notes
**See also**: U026. Synonyms: "KILO prefix missing on mass_unit", "Newton built without kilo prefix", "force_unit derived from gram instead of kg", "STEP Newton off by 1000", "mass_unit prefix wrong in derived SI".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'DERIVED_UNIT_ELEMENT')contains(b'force_unit') or contains(b'FORCE_UNIT') or contains(b'mass_unit') or contains(b'MASS_UNIT')
Tier-3 assertions
shape_null == True
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* U021: KILO prefix missing on mass_unit in FORCE_UNIT (Newton) derived unit */ 3/* Newton = kg*m*s^-2; mass_unit MUST carry .KILO. prefix per ISO spec */ 4/* DEFECT: mass_unit references SI_UNIT($,.GRAM.) -- no prefix => gram not kilogram */ 5/* Force values will be 1000x wrong: unit is gram*m*s^-2, not Newton */ 6HEADER; 7FILE_DESCRIPTION(('U021: FORCE_UNIT (Newton) with mass_unit missing .KILO. prefix'),'2;1'); 8FILE_NAME('U021.stp','2026-06-20T00:00:00',(''),(''),'cad-research-suite','',''); 9FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 10ENDSEC; 11DATA; 12/* Geometry: a simple part */ 13#1=CARTESIAN_POINT('origin',(0.,0.,0.)); 14#2=CARTESIAN_POINT('corner-x',(50.0,0.,0.)); 15#3=CARTESIAN_POINT('corner-y',(0.,50.0,0.)); 16#4=CARTESIAN_POINT('corner-z',(0.,0.,25.0)); 17#5=CARTESIAN_POINT('corner-xyz',(50.0,50.0,25.0)); 18/* Standard length/angle/solid-angle units (correct) */ 19#10=(LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.)); 20#11=(NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.)); 21#12=(NAMED_UNIT(*) SI_UNIT($,.STERADIAN.) SOLID_ANGLE_UNIT()); 22#13=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.001),#10, 23 'distance_accuracy_value','maximum model space distance between geometric entities'); 24#14=(GEOMETRIC_REPRESENTATION_CONTEXT(3) GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#13)) 25 GLOBAL_UNIT_ASSIGNED_CONTEXT((#10,#11,#12)) REPRESENTATION_CONTEXT('ctx','3D')); 26/* DEFECT: mass_unit defined as SI_UNIT($,.GRAM.) -- NO .KILO. prefix */ 27/* Should be SI_UNIT(.KILO.,.GRAM.) to represent kilograms */ 28#20=(MASS_UNIT() NAMED_UNIT(*) SI_UNIT($,.GRAM.)); 29/* SI time unit (seconds) â correct, no prefix */ 30#21=(NAMED_UNIT(*) SI_UNIT($,.SECOND.) TIME_UNIT()); 31/* SI length unit in metres for the Newton definition â correct, no prefix here */ 32#22=(LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT($,.METRE.)); 33/* DEFECT: Newton built from gram (no kilo) => off by 1000 */ 34/* Correct: DERIVED_UNIT_ELEMENT(#kg_unit, 1.) but we use #20 (gram) */ 35#23=DERIVED_UNIT_ELEMENT(#20,1.); 36#24=DERIVED_UNIT_ELEMENT(#22,1.); 37#25=DERIVED_UNIT_ELEMENT(#21,-2.); 38#26=(FORCE_UNIT() NAMED_UNIT(*) DERIVED_UNIT((#23,#24,#25))); 39/* Force validation property: 9.81 'N' but actually gram*m*s^-2 (1000x too small) */ 40#40=MEASURE_REPRESENTATION_ITEM('applied_force',LENGTH_MEASURE(9.81),#26); 41/* Model entity is GEOMETRIC_CURVE_SET â OCC returns empty shape */ 42#50=GEOMETRIC_CURVE_SET('part-with-bad-newton-unit',(#1,#2,#3,#4,#5)); 43ENDSEC; 44END-ISO-10303-21;