step-examples/12-4-tolerance/N040.stp
Sources
- 09-healing-menus H065 (Salome GEOM)
Description
Salome's "Limit Tolerance" forces the tolerance of a shape's vertices/edges/faces back down to a user-given value. When tolerances were inflated by upstream tools to hide real gaps, clamping back down re-exposes those gaps as topology defects (now-disconnected vertices, open wires). Typical file signature: two `GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT` `UNCERTAINTY_MEASURE_WITH_UNIT` entries — a bloated 1e-3 mm pre-clamp tolerance and a tight 1e-6 mm post-clamp value — together with two consecutive edges whose shared `VERTEX_POINT` coordinates differ by ~5e-4 mm (e.g. (10.0005,0,0) vs (10,0,0)), so the gap was within the bloated tolerance but exceeds the clamped one.
Reproducer recipe
STEP with bloated tolerances after multi-tool import; apply Limit Tolerance with target equal to original `uncertainty_measure_with_unit`.
Expected kernel behavior
heal cautiously; clamp tolerances; re-run validity checks; report newly-exposed gaps to the user before continuing.
Notes
**See also**: N002, N003, N039. Synonyms: "clamping tolerance re-exposes gaps", "Limit Tolerance breaks supposedly healed model", "open wires reappear after tolerance clamp", "vertices that were merged drift apart at lower tolerance".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
count_entity_def(b'UNCERTAINTY_MEASURE_WITH_UNIT') == 2contains(b'1.0E-3') and contains(b'1.0E-6')count_entity_def(b'VERTEX_POINT') == 4
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/* N040: Limit Tolerance re-exposes gap: bloated tol 1.0E-3 hides 5.0E-4 gap; clamped to 1.0E-6 gap reappears; 4 VERTEX_POINTs with separate junctions; GEOMETRIC_CURVE_SET â OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('N040'),'2;1'); 5FILE_NAME('N040.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('pa0',(0.0,0.0,0.0)); 10#2=CARTESIAN_POINT('pa1_nominal',(10.0,0.0,0.0)); 11#3=CARTESIAN_POINT('pb0_hidden_gap',(10.0005,0.0,0.0)); 12#4=CARTESIAN_POINT('pb1',(20.0005,0.0,0.0)); 13#5=VERTEX_POINT('va0',#1); 14#6=VERTEX_POINT('va1_nominal',#2); 15#7=VERTEX_POINT('vb0_with_gap',#3); 16#8=VERTEX_POINT('vb1',#4); 17#9=DIRECTION('',(1.0,0.0,0.0)); 18#10=VECTOR('',#9,10.0); 19#11=LINE('',#1,#10); 20#12=EDGE_CURVE('eA',#5,#6,#11,.T.); 21#13=DIRECTION('',(1.0,0.0,0.0)); 22#14=VECTOR('',#13,10.0); 23#15=LINE('',#3,#14); 24#16=EDGE_CURVE('eB',#7,#8,#15,.T.); 25#17=GEOMETRIC_CURVE_SET('clamp',(#12,#16)); 26#18=APPLICATION_CONTEXT('automotive_design'); 27#19=PRODUCT_CONTEXT('',#18,'mechanical'); 28#20=PRODUCT('N040','N040','',(#19)); 29#21=PRODUCT_DEFINITION_FORMATION('','',#20); 30#22=PRODUCT_DEFINITION_CONTEXT('part definition',#18,'design'); 31#23=PRODUCT_DEFINITION('','',#21,#22); 32#24=PRODUCT_DEFINITION_SHAPE('','',#23); 33#25=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 34#26=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 35#27=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 36#28=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-3),#25,'distance_accuracy_value','pre_clamp_bloated_tol'); 37#29=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-6),#25,'distance_accuracy_value','post_clamp_tight_tol'); 38#30=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#28,#29))GLOBAL_UNIT_ASSIGNED_CONTEXT((#25,#26,#27))REPRESENTATION_CONTEXT('ctx','3D')); 39#31=GEOMETRICALLY_BOUNDED_WIREFRAME_SHAPE_REPRESENTATION('',(#17),#30); 40#32=SHAPE_DEFINITION_REPRESENTATION(#24,#31); 41ENDSEC; 42END-ISO-10303-21;