step-examples/12-4-tolerance/Tb016.stp
Sources
- synthesized time-bomb.
Description
A wire has 1000 consecutive edges; each pair of adjacent vertices is 1e-9 mm apart in 3D against a declared tolerance of 1e-6. Each individual gap is sub-tolerance and absorbed. But the cumulative drift end-to-end is `1000 * 1e-9 = 1e-6`, exactly equal to the declared tolerance. A kernel comparing endpoint-to-endpoint declares the wire closed (or just barely not). Whether the wire is closed depends on whether the kernel sums residuals or compares only adjacent pairs.
Reproducer recipe
Long polyline with 1000 short edges of length ~1e-3 mm each; consecutive vertices have a constant 1e-9 mm gap that always points in the same direction; closing edge declared but its 3D endpoints are at the cumulative-drifted positions.
Expected kernel behavior
tolerance budget across N-edge chains must be documented; either reject as un-closeable, or apply a global re-stitch that distributes residual back across the chain.
Notes
Searchable as "long polyline not closing", "sweep wire fails. Synonyms: "error accumulates across 1000 edges", "tolerance budget exhausted by long chain", "chained edges drift far beyond per-edge tolerance", "wire endpoints far apart due to accumulated error". to close", "cumulative tolerance error".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
count_entity_def(b'EDGE_CURVE') == 5count_entity_def(b'VERTEX_POINT') == 6contains(b'1.0E-6')
Tier-3 assertions
shape_null == True
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Tb016: 5 EDGE_CURVEs, 6 VERTEX_POINTs; each adjacent vertex pair offset 2.0E-7 mm in +y; per-edge gap sub-tolerance (1.0E-6); cumulative drift after 5 edges = 1.0E-6 = tol; end-to-end closure depends on summing vs per-pair check; OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('Tb016'),'2;1'); 5FILE_NAME('Tb016.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('p0',(0.0,0.0,0.0)); 10#2=CARTESIAN_POINT('p1',(0.001,2.0E-07,0.0)); 11#3=CARTESIAN_POINT('p2',(0.002,4.0E-07,0.0)); 12#4=CARTESIAN_POINT('p3',(0.003,6.0E-07,0.0)); 13#5=CARTESIAN_POINT('p4',(0.004,8.0E-07,0.0)); 14#6=CARTESIAN_POINT('p5',(0.005,1.0E-06,0.0)); 15#7=VERTEX_POINT('v0',#1); 16#8=VERTEX_POINT('v1',#2); 17#9=VERTEX_POINT('v2',#3); 18#10=VERTEX_POINT('v3',#4); 19#11=VERTEX_POINT('v4',#5); 20#12=VERTEX_POINT('v5',#6); 21#13=DIRECTION('',(1.0,0.0,0.0)); 22#14=VECTOR('',#13,0.001); 23#15=LINE('l01',#1,#14); 24#16=EDGE_CURVE('e01',#7,#8,#15,.T.); 25#17=LINE('l12',#2,#14); 26#18=EDGE_CURVE('e12',#8,#9,#17,.T.); 27#19=LINE('l23',#3,#14); 28#20=EDGE_CURVE('e23',#9,#10,#19,.T.); 29#21=LINE('l34',#4,#14); 30#22=EDGE_CURVE('e34',#10,#11,#21,.T.); 31#23=LINE('l45',#5,#14); 32#24=EDGE_CURVE('e45',#11,#12,#23,.T.); 33#25=GEOMETRIC_CURVE_SET('cs',(#16,#18,#20,#22,#24)); 34#26=APPLICATION_CONTEXT('automotive_design'); 35#27=PRODUCT_CONTEXT('',#26,'mechanical'); 36#28=PRODUCT('Tb016','Tb016','',(#27)); 37#29=PRODUCT_DEFINITION_FORMATION('','',#28); 38#30=PRODUCT_DEFINITION_CONTEXT('part definition',#26,'design'); 39#31=PRODUCT_DEFINITION('','',#29,#30); 40#32=PRODUCT_DEFINITION_SHAPE('','',#31); 41#33=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 42#34=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 43#35=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 44#36=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-6),#33,'distance_accuracy_value','cumulative_drift_budget'); 45#37=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#36))GLOBAL_UNIT_ASSIGNED_CONTEXT((#33,#34,#35))REPRESENTATION_CONTEXT('ctx','3D')); 46#38=GEOMETRICALLY_BOUNDED_WIREFRAME_SHAPE_REPRESENTATION('',(#25),#37); 47#39=SHAPE_DEFINITION_REPRESENTATION(#32,#38); 48ENDSEC; 49END-ISO-10303-21;