U026 — `derived_unit` / non-SI unit handling incomplete (BRL-CAD step-g)

§12.5 (sub-class: dimensional-exponents)

units

Sources

Description

`derived_unit` (e.g. `kg·m/s²`) and unusual conversion bases are not normalized; unit lookup falls through and the kernel uses the value as identity (scale = 1).

Reproducer recipe

file with `DERIVED_UNIT((DERIVED_UNIT_ELEMENT(#k,1.0)))` referenced from a geometric quantity (force/density).

Expected kernel behavior

walk the `derived_unit_element` list and compute SI scale factor by multiplying each base si_unit's prefix factor raised to its exponent; never silently treat as identity.

Notes

**See also**: U021. **OCC behavior**: silently treats unsupported `DERIVED_UNIT` constructs as identity scale with no diagnostic; kernel mishandling; the catalog above forbids silent identity-substitution. Synonyms: "derived_unit treated as identity scale", "BRL-CAD step-g derived unit TODO", "kg.m/s^2 derived unit unsupported", "DERIVED_UNIT lookup falls through", "non-SI derived unit identity-scale bug".

Expected validation

occt=empty/empty gmsh=empty ifc=schema_n/a

Byte assertions

Tier-3 assertions

Cross-references

U021

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* U026: DERIVED_UNIT entities (Newton, density) cause identity-scale fallthrough */
3/* BRL-CAD step-g silently treats unresolved DERIVED_UNIT as scale=1 */
4/* Kernel must walk DERIVED_UNIT_ELEMENT list and compute SI scale factor */
5HEADER;
6FILE_DESCRIPTION(('U026: DERIVED_UNIT treated as identity scale in BRL-CAD step-g'),'2;1');
7FILE_NAME('U026.stp','2026-06-20T00:00:00',(''),(''),'cad-research-suite','','');
8FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
9ENDSEC;
10DATA;
11/* Geometry: simple part with mm coordinates */
12#1=CARTESIAN_POINT('origin',(0.,0.,0.));
13#2=CARTESIAN_POINT('corner-x',(50.0,0.,0.));
14#3=CARTESIAN_POINT('corner-y',(0.,50.0,0.));
15#4=CARTESIAN_POINT('corner-z',(0.,0.,25.0));
16#5=CARTESIAN_POINT('corner-xyz',(50.0,50.0,25.0));
17/* Standard SI units for geometry context */
18#10=(LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.));
19#11=(NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.));
20#12=(NAMED_UNIT(*) SI_UNIT($,.STERADIAN.) SOLID_ANGLE_UNIT());
21#13=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.001),#10,
22  'distance_accuracy_value','maximum model space distance between geometric entities');
23#14=(GEOMETRIC_REPRESENTATION_CONTEXT(3) GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#13))
24  GLOBAL_UNIT_ASSIGNED_CONTEXT((#10,#11,#12)) REPRESENTATION_CONTEXT('ctx','3D'));
25/* Base SI units needed for DERIVED_UNIT elements */
26#20=(MASS_UNIT() NAMED_UNIT(*) SI_UNIT(.KILO.,.GRAM.));
27#21=(LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT($,.METRE.));
28#22=(NAMED_UNIT(*) SI_UNIT($,.SECOND.) TIME_UNIT());
29/* DEFECT: DERIVED_UNIT for Newton (kg*m*s^-2) */
30/* BRL-CAD step-g does not resolve this; falls through to identity scale */
31#30=DERIVED_UNIT_ELEMENT(#20,1.);
32#31=DERIVED_UNIT_ELEMENT(#21,1.);
33#32=DERIVED_UNIT_ELEMENT(#22,-2.);
34#33=(FORCE_UNIT() NAMED_UNIT(*) DERIVED_UNIT((#30,#31,#32)));
35/* DEFECT: DERIVED_UNIT for density (kg*m^-3) */
36#40=DERIVED_UNIT_ELEMENT(#20,1.);
37#41=DERIVED_UNIT_ELEMENT(#21,-3.);
38#42=DERIVED_UNIT((#40,#41));
39/* Force measure using the DERIVED_UNIT Newton */
40#50=MEASURE_REPRESENTATION_ITEM('applied_force',LENGTH_MEASURE(9.81),#33);
41/* Density measure using the DERIVED_UNIT density */
42#51=MEASURE_REPRESENTATION_ITEM('material_density',LENGTH_MEASURE(7850.),#42);
43/* Model entity is GEOMETRIC_CURVE_SET — OCC returns empty shape */
44#60=GEOMETRIC_CURVE_SET('derived-unit-identity-fallthrough',(#1,#2,#3,#4,#5));
45ENDSEC;
46END-ISO-10303-21;