Tsh252 — Partial-overlap (80%-coverage) gap candidate: achieved merge tolerance tracks the inset distance, not the true perpendicular gap

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

P2 — spec deviation (no data loss)

topology

Sources

Description

Two real `ADVANCED_FACE`s in one `OPEN_SHELL`, both 5.0mm-scale free edges with a genuine TRUE perpendicular gap of only 0.0001mm — well within sewing tolerance — but the candidate edge is symmetrically inset 0.5mm from each end relative to the reference edge's full span (an 80%-coverage interior candidate, a substantially larger inset than the roughly 1% insets used elsewhere in this corpus). A parameter sweep holding the true gap fixed and varying only the inset shows a sharp, reproducible split: insets from 1% to 14% of the span all produce an achieved tolerance that scales with the INSET distance rather than the true gap (off by up to five orders of magnitude), while a full-span candidate (zero inset) recovers the tight, gap-proportional value.

Reproducer recipe

`OPEN_SHELL` with two `ADVANCED_FACE`s, the reference edge x:[0,5],y=0 and the candidate edge x:[0.5,4.5],y=0.0001 (an 80%-coverage interior span, true perpendicular gap 0.0001mm).

Expected kernel behavior

whichever tolerance-estimation path a partial-overlap candidate takes, the reported achieved tolerance should still reflect the true geometric deviation between the two curves, not an unrelated quantity such as the longitudinal inset distance between the candidate's endpoints and the reference's own endpoints.

Notes

Live-verified (this worktree's OCP/OCCT 7.8.1, runtime sewing scaffold): the pair merges (`NbContigousEdges()==1`) and the shared edge's achieved tolerance comes back `0.525` — essentially the 0.5mm inset distance scaled by roughly 1.05, having nothing to do with the 0.0001mm true gap (off by roughly 5000x). A controlled sweep over the inset distance (0.05mm through 0.7mm, true gap fixed at 0.0001mm) reproduces the SAME pattern every time — achieved tolerance is consistently ≈1.05×inset — while a full-span candidate (zero inset, endpoints coincide with the reference's own endpoints) recovers the tight, correct `0.000105`. This qualitative split (tight-and-correct at zero inset vs. inset-scaled-and-wrong across a broad range of partial-overlap configurations) is consistent with a distinct, cruder estimation path engaging specifically when a candidate only partially overlaps its reference's own span, matching the class's last-resort-estimate citation; it was independently confirmed not to depend on curve type (an equivalent all-line construction and a construction using an explicit B-spline basis both reproduce the identical `0.525` value at the same inset). Synonyms: "sewing tolerance tracks inset not gap", "partial overlap tolerance estimate wrong", "discretized sampling fallback tolerance", "last resort tolerance estimate sewing", "candidate coverage affects achieved tolerance". 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/* Tsh252: OPEN_SHELL with TWO ADVANCED_FACEs: Face REF hosts a 5.0mm free edge x:[0,5],y=0; Face INSET hosts a 4.0mm free edge x:[0.5,4.5],y=0.0001 -- an 80%-coverage, symmetrically-inset interior candidate with a TRUE perpendicular gap of only 0.0001mm -- purpose-built to isolate BRepBuilderAPI_Sewing::SameParameterEdge's last-resort tolerance-estimate fallback: live-verified, the merge succeeds but reports an achieved tolerance of 0.525 (essentially the 0.5mm INSET distance, not the 0.0001mm true gap) -- an order-of-magnitude-worse estimate than the tight, gap-proportional tolerance a small-inset or full-span candidate pair achieves */
3HEADER;
4FILE_DESCRIPTION(('Tsh252'),'2;1');
5FILE_NAME('Tsh252.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('inset_reference_edge',#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('inset_reference_face',(#27),#26,.T.);
38#29=CARTESIAN_POINT('',(0.5,0.0001,0.0));
39#30=CARTESIAN_POINT('',(4.5,0.0001,0.0));
40#31=CARTESIAN_POINT('',(2.5,-39.9999,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,4.0);
46#37=LINE('',#29,#36);
47#38=EDGE_CURVE('inset_candidate_edge',#32,#33,#37,.T.);
48#39=DIRECTION('',(-0.0499376169439,-0.998752338878,0.0));
49#40=VECTOR('',#39,40.049968789);
50#41=LINE('',#30,#40);
51#42=EDGE_CURVE('',#33,#34,#41,.T.);
52#43=DIRECTION('',(-0.0499376169439,0.998752338878,0.0));
53#44=VECTOR('',#43,40.049968789);
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('inset_candidate_face',(#55),#54,.T.);
66#57=OPEN_SHELL('tsh252_inset_tolerance_shell',(#28,#56));
67#58=SHELL_BASED_SURFACE_MODEL('',(#57));
68#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
69#9051=PRODUCT('Tsh252','Tsh252','',(#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;