step-examples/12-4-tolerance/N050.stp
Sources
- BRL-CAD `src/conv/step/step-g/UncertaintyMeasureWithUnit.cpp` Load stores value with no consumer
- AdvancedFace hard-codes `m_tolerance = 1e-3`
- bug-reporter language: "STEP file declares 1e-6 mm tolerance, importer uses 1e-3", "UNCERTAINTY_MEASURE_WITH_UNIT ignored", "kernel hard-codes its own tolerance ignoring the file's distance_accuracy_value".
Sender
Aerospace, optics, and metrology producers that emit `UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(<tight value>), MM, …, 'distance_accuracy_value', '')` in `GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT` to declare that they author at sub-micrometre precision.
Description
`UncertaintyMeasureWithUnit::Load` parses the file's declared tolerance (e.g. 1.0E-6 mm) into the in-memory model, but no downstream BRL-CAD consumer ever reads it back: `AdvancedFace` and the trim/edge tolerance machinery uses a hard-coded `m_tolerance = 1e-3`. This umbrellas the specific manifestation N019 (offset-surface case) into the broader rule: **every** tolerance-sensitive operation in step-g uses the same hard-coded constant, regardless of what the file says. Sub-tolerance features collapse, slivers get crushed, and tight-precision authoring intent is silently downgraded to the importer's working precision.
Reproducer recipe
`#13=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-6), #10, 'distance_accuracy_value', '');` plus `#14=(GEOMETRIC_REPRESENTATION_CONTEXT(3) GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#13)) GLOBAL_UNIT_ASSIGNED_CONTEXT((#10,#11,#12)) REPRESENTATION_CONTEXT('','3D'));`. step-g treats every edge with 1e-3 tolerance, ignoring the 1e-6 declared by the file.
Expected kernel behavior
heal-and-accept; every importer must consult the active `GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT` and pass the file's tolerance into all edge/face/healing tolerance slots; emit `W_TOLERANCE_FROM_FILE` so users can confirm the value used.
Notes
**See also**: N019, U033. Umbrella over N019 (which is the offset-surface specific manifestation). Synonyms: "STEP UNCERTAINTY_MEASURE_WITH_UNIT ignored", "importer hard-codes 1e-3 tolerance", "distance_accuracy_value not consumed", "BRL-CAD step-g ignores file uncertainty everywhere", "tight-precision authoring downgraded to working precision". **OCC behavior**: OCC loads the file and produces no shape (empty). Re-audit (2026-07-18, empty-claim re-audit): this empty is not caused by the declared defect — the fixture's only model root is topology (`EDGE_CURVE`/`VERTEX_POINT`) inside a `GEOMETRIC_CURVE_SET`, which OCC's STEP transfer never builds (control: identical GCS with bare `LINE` geometry builds an edge; with `EDGE_CURVE` topology yields empty), so the silent-empty is container/toy-driven, not a proven kernel bug.
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'UNCERTAINTY_MEASURE_WITH_UNIT')contains(b'1.0E-6') or contains(b'1e-6')
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/* N050: UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-6)) declared; BRL-CAD step-g hard-codes m_tolerance=1e-3, ignoring 1.0E-6; GEOMETRIC_CURVE_SET â OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('N050'),'2;1'); 5FILE_NAME('N050.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 7ENDSEC; 8DATA; 9#1=CARTESIAN_POINT('p_start',(0.0,0.0,0.0)); 10#2=CARTESIAN_POINT('p_end',(1.0,0.0,0.0)); 11#3=VERTEX_POINT('v_start',#1); 12#4=VERTEX_POINT('v_end',#2); 13#5=DIRECTION('',(1.0,0.0,0.0)); 14#6=VECTOR('',#5,1.0); 15#7=LINE('unit_line',#1,#6); 16#8=EDGE_CURVE('edge',#3,#4,#7,.T.); 17#9=GEOMETRIC_CURVE_SET('tight_tol_input',(#8)); 18#10=APPLICATION_CONTEXT('automotive_design'); 19#11=PRODUCT_CONTEXT('',#10,'mechanical'); 20#12=PRODUCT('N050','N050','',(#11)); 21#13=PRODUCT_DEFINITION_FORMATION('','',#12); 22#14=PRODUCT_DEFINITION_CONTEXT('part definition',#10,'design'); 23#15=PRODUCT_DEFINITION('','',#13,#14); 24#16=PRODUCT_DEFINITION_SHAPE('','',#15); 25#17=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 26#18=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 27#19=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 28#20=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-6),#17,'distance_accuracy_value','sub_micrometre_precision'); 29#21=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#20))GLOBAL_UNIT_ASSIGNED_CONTEXT((#17,#18,#19))REPRESENTATION_CONTEXT('ctx','3D')); 30#22=GEOMETRICALLY_BOUNDED_WIREFRAME_SHAPE_REPRESENTATION('',(#9),#21); 31#23=SHAPE_DEFINITION_REPRESENTATION(#16,#22); 32ENDSEC; 33END-ISO-10303-21;