N053 — ShapeAnalysis_ShapeTolerance.AddTolerance polarity asymmetry

§12.4 (sub-class: tolerance-array-asymmetry)

spec-violation

Sources

Description

AddTolerance accumulates tolerance array myTols[0..2] with asymmetric comparisons: myTols[0] (minimum) checked with > operator (upper-bound semantics) while myTols[2] (maximum) checked with < operator (lower-bound semantics). This inverts the intended meaning of min/max boundaries, causing in-range tolerances to be rejected when the asymmetry dominates.

Reproducer recipe

Call AddTolerance on shape with edge tolerance 0.0015 and bounds [0.001, 0.002]. Asymmetric comparisons (myTols[0] > cmin vs myTols[2] < cmax) cause nondeterministic rejection despite in-range value.

Expected kernel behavior

apply symmetric comparisons consistently: both array elements checked with same directional logic relative to bounds

Expected validation

occt=shape(1)/shape(1) gmsh=shape(7) ifc=schema_n/a

Tier-3 assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes
1ISO-10303-21;
2/* N053: PLANE face with vertices at tolerance bounds 0.001 and 0.002; AddTolerance asymmetric comparisons: myTols[0]>cmin (upper-bound) vs myTols[2]<cmax (lower-bound) inverts min/max semantics */
3HEADER;
4FILE_DESCRIPTION(('N053'),'2;1');
5FILE_NAME('N053.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','','');
6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
7ENDSEC;
8DATA;
9#9000=APPLICATION_CONTEXT('mechanical design');
10#1=CARTESIAN_POINT('',(0.0,0.0,0.0));
11#2=DIRECTION('',(0.0,0.0,1.0));
12#3=DIRECTION('',(1.0,0.0,0.0));
13#4=AXIS2_PLACEMENT_3D('',#1,#2,#3);
14#5=PLANE('',#4);
15#6=CARTESIAN_POINT('',(0.0,0.0,0.0));
16#7=VERTEX_POINT('v_min_bound',#6);
17#8=CARTESIAN_POINT('',(10.0,0.0,0.0));
18#9=VERTEX_POINT('v_max_bound',#8);
19#10=CARTESIAN_POINT('',(5.0,8.66,0.0));
20#11=VERTEX_POINT('v_nominal',#10);
21#12=DIRECTION('',(1.0,0.0,0.0));
22#13=VECTOR('',#12,1.0);
23#14=LINE('',#6,#13);
24#15=EDGE_CURVE('edge_boundary',#7,#9,#14,.T.);
25#16=DIRECTION('',(-0.5,0.866,0.0));
26#17=VECTOR('',#16,1.0);
27#18=LINE('',#8,#17);
28#19=EDGE_CURVE('e2',#9,#11,#18,.T.);
29#20=DIRECTION('',(-0.5,-0.866,0.0));
30#21=VECTOR('',#20,1.0);
31#22=LINE('',#10,#21);
32#23=EDGE_CURVE('e3',#11,#7,#22,.T.);
33#24=ORIENTED_EDGE('',$,$,#15,.T.);
34#25=ORIENTED_EDGE('',$,$,#19,.T.);
35#26=ORIENTED_EDGE('',$,$,#23,.T.);
36#27=EDGE_LOOP('',(#24,#25,#26));
37#28=FACE_OUTER_BOUND('',#27,.T.);
38#29=ADVANCED_FACE('face_asymmetric_tol',(#28),#5,.T.);
39#30=OPEN_SHELL('',(#29));
40#31=SHELL_BASED_SURFACE_MODEL('',(#30));
41#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
42#9051=PRODUCT('N053','N053','',(#9050));
43#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
44#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
45#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
46#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
47#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
48#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
49#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
50#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
51#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
52#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#31),#9060);
53#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
54ENDSEC;
55END-ISO-10303-21;