Tsh251 — Face-hosted gap candidate whose achieved merge tolerance exceeds a caller-declared cap: the merge is nullified, not returned out-of-spec

§12.3a shells (sub-class: sewing tolerance-budget cap — `sew-tolerance-budget-acceptance-and-cap`)

P2 — spec deviation (no data loss)

topology

Sources

Description

Two real `ADVANCED_FACE`s in one `OPEN_SHELL`: Face A hosts a 5.0mm free edge, Face B hosts a matching 5.0mm free edge offset by a genuine 0.05mm gap — comfortably inside the sewing tolerance, so the pair merges and reports an achieved tolerance proportional to the true gap. The same candidate pair, sewn again with a caller-declared tolerance cap set below that achieved value, is instead left entirely unmerged.

Reproducer recipe

`OPEN_SHELL` with two `ADVANCED_FACE`s, Face A's free edge x:[0,5],y=0 and Face B's free edge x:[0,5],y=0.05 (both length 5.0mm, gap 0.05mm).

Expected kernel behavior

accept a merge whose residual mismatch fits within a tolerance budget derived from the edge's own tolerance and the curves' precision, tightening the resulting edge's reported tolerance to the actual achieved mismatch; if a caller-declared maximum tolerance is exceeded even after that acceptance, treat it as a hard backstop and drop the merge entirely rather than return an edge whose reported tolerance is out of the caller's declared spec.

Notes

Live-verified (this worktree's OCP/OCCT 7.8.1, runtime sewing scaffold): with the operator's own cap left at its shared default, the pair merges cleanly (`NbContigousEdges()==1`), the shared edge's achieved tolerance comes back `0.0525` (gap-proportional). Re-run against the IDENTICAL geometry with an explicit tolerance cap of `0.01` (below the `0.0525` the merge would otherwise achieve) declared before the merge runs, the SAME candidate pair is instead rejected outright — `NbContigousEdges()==0`, `NbFreeEdges()==6`, both original edges remain unmerged at their default tolerance — a directly observable, reproducible before/after contrast confirming the cap nullifies the merge rather than returning an out-of-spec edge. The default STEP-read path itself does not invoke this merge mechanism at all (both healing settings report the identical, unmerged 2-face shape); the cap behavior is exercised purely by the sewing operator at verification time. Synonyms: "sewing tolerance cap nullify", "merge exceeds max tolerance rejected", "hard tolerance backstop sewing", "candidate merge dropped over cap", "tolerance budget acceptance sewing". Provenance tier: bytes-sufficient.

Expected validation

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

Byte assertions

Tier-3 assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Tsh251: OPEN_SHELL with TWO ADVANCED_FACEs: Face A hosts a 5.0mm free edge x:[0,5],y=0; Face B hosts a 5.0mm free edge x:[0,5],y=0.05 -- a genuine 0.05mm within-tolerance gap on real face boundaries -- purpose-built face-hosted candidate pair (N153's tolerance pattern rebuilt as an independent fixture) for exercising BRepBuilderAPI_Sewing::SameParameterEdge's hard MaxTolerance cap: with MaxTolerance left at the operator's own default the merge succeeds at tolerance 0.0525; with MaxTolerance explicitly set below 0.0525 the same candidate pair is instead nullified and left unmerged */
3HEADER;
4FILE_DESCRIPTION(('Tsh251'),'2;1');
5FILE_NAME('Tsh251.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','','');
6FILE_SCHEMA(('AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF { 1 0 10303 442 1 1 4 }'));
7ENDSEC;
8DATA;
9#9000=APPLICATION_CONTEXT('mechanical design');
10#1=CARTESIAN_POINT('',(0.0,0.0,0.0));
11#2=CARTESIAN_POINT('',(5.0,0.0,0.0));
12#3=CARTESIAN_POINT('',(2.5,40.0,0.0));
13#4=VERTEX_POINT('',#1);
14#5=VERTEX_POINT('',#2);
15#6=VERTEX_POINT('',#3);
16#7=DIRECTION('',(1.0,0.0,0.0));
17#8=VECTOR('',#7,5.0);
18#9=LINE('',#1,#8);
19#10=EDGE_CURVE('cap_candidate_edge_a',#4,#5,#9,.T.);
20#11=DIRECTION('',(-0.0623782861552,0.998052578483,0.0));
21#12=VECTOR('',#11,40.0780488547);
22#13=LINE('',#2,#12);
23#14=EDGE_CURVE('',#5,#6,#13,.T.);
24#15=DIRECTION('',(-0.0623782861552,-0.998052578483,0.0));
25#16=VECTOR('',#15,40.0780488547);
26#17=LINE('',#3,#16);
27#18=EDGE_CURVE('',#6,#4,#17,.T.);
28#19=ORIENTED_EDGE('',$,$,#10,.T.);
29#20=ORIENTED_EDGE('',$,$,#14,.T.);
30#21=ORIENTED_EDGE('',$,$,#18,.T.);
31#22=EDGE_LOOP('',(#19,#20,#21));
32#23=DIRECTION('',(0.0,0.0,1.0));
33#24=DIRECTION('',(1.0,0.0,0.0));
34#25=AXIS2_PLACEMENT_3D('',#1,#23,#24);
35#26=PLANE('',#25);
36#27=FACE_OUTER_BOUND('',#22,.T.);
37#28=ADVANCED_FACE('cap_face_a',(#27),#26,.T.);
38#29=CARTESIAN_POINT('',(0.0,0.05,0.0));
39#30=CARTESIAN_POINT('',(5.0,0.05,0.0));
40#31=CARTESIAN_POINT('',(2.5,-39.95,0.0));
41#32=VERTEX_POINT('',#29);
42#33=VERTEX_POINT('',#30);
43#34=VERTEX_POINT('',#31);
44#35=DIRECTION('',(1.0,0.0,0.0));
45#36=VECTOR('',#35,5.0);
46#37=LINE('',#29,#36);
47#38=EDGE_CURVE('cap_candidate_edge_b',#32,#33,#37,.T.);
48#39=DIRECTION('',(-0.0623782861552,-0.998052578483,0.0));
49#40=VECTOR('',#39,40.0780488547);
50#41=LINE('',#30,#40);
51#42=EDGE_CURVE('',#33,#34,#41,.T.);
52#43=DIRECTION('',(-0.0623782861552,0.998052578483,0.0));
53#44=VECTOR('',#43,40.0780488547);
54#45=LINE('',#31,#44);
55#46=EDGE_CURVE('',#34,#32,#45,.T.);
56#47=ORIENTED_EDGE('',$,$,#38,.T.);
57#48=ORIENTED_EDGE('',$,$,#42,.T.);
58#49=ORIENTED_EDGE('',$,$,#46,.T.);
59#50=EDGE_LOOP('',(#47,#48,#49));
60#51=DIRECTION('',(0.0,0.0,1.0));
61#52=DIRECTION('',(1.0,0.0,0.0));
62#53=AXIS2_PLACEMENT_3D('',#29,#51,#52);
63#54=PLANE('',#53);
64#55=FACE_OUTER_BOUND('',#50,.T.);
65#56=ADVANCED_FACE('cap_face_b',(#55),#54,.T.);
66#57=OPEN_SHELL('tsh251_tolerance_cap_shell',(#28,#56));
67#58=SHELL_BASED_SURFACE_MODEL('',(#57));
68#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
69#9051=PRODUCT('Tsh251','Tsh251','',(#9050));
70#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
71#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
72#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
73#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
74#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
75#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
76#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
77#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
78#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
79#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#58),#9060);
80#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
81ENDSEC;
82END-ISO-10303-21;