Tsh244 — Within-tolerance gap but sampled-point coverage below ~50%: insufficient-overlap rejection

§12.3a shells (sub-class: edge-merging-tolerance — `sew-free-edge-gap-merge`)

P2 — spec deviation (no data loss)

topology

Sources

Description

An `OPEN_SHELL` with TWO `ADVANCED_FACE`s. Face A hosts a 10mm reference free edge E=(0,0,0)-(10,0,0). Face B hosts a 10mm candidate edge C=(9.5,1e-4,0)-(19.5,1e-4,0) — a genuine within-tolerance perpendicular gap (1e-4mm) along its whole length, but only x:[9.5,10] (5% of C's own extent) actually overlaps E's parametric span [0,10]. `EvaluateDistances` discretizes both curves at 8 points; when the cheap "betweenness" test finds fewer than half of the candidate's sample points fall between the reference's own endpoints, it falls back to an endpoint-clamped projection whose resulting max-distance metric is driven up by the largely non-overlapping candidate, and `FindCandidates` rejects the pairing (`aMaxDist <= myTolerance` fails).

Reproducer recipe

Two face-hosted free edges with a genuine within-tolerance perpendicular gap along their full parallel run, but whose parametric ranges overlap by only a small fraction (~5%) of the candidate's own length — not merely a short candidate (see Tsh243), a long candidate that's mostly *elsewhere*.

Expected kernel behavior

heal-or-reject-explicitly; a candidate edge with insufficient parametric overlap with the reference (even though a genuinely-overlapping sub-region is well within tolerance) should not be merged wholesale — either reject the pairing (current OCCT behavior) or merge only the genuinely-overlapping sub-segment.

Notes

Live-verified (this worktree's OCP/OCCT 7.8.1, runtime the sewing stage(tolerance=1.0)` scaffold — reader-default the reader does not itself invoke Sewing): `NbContigousEdges()==0` (no merge) for this fixture's 5%-overlap candidate. A control build with the SAME tolerance and gap, but the candidate repositioned to 90% overlap (x:[1,11] instead of x:[9.5,19.5]), shows `NbContigousEdges()==1` (merge succeeds) — isolating overlap fraction, not distance or length, as the deciding factor at this configuration. The overlap-vs-rejection boundary was found empirically to be tolerance-dependent and non-monotonic in a few tested configurations (a smaller operator tolerance paradoxically merged a low-overlap pair that a larger tolerance rejected, in one probe) — the specific 5%-overlap/tolerance=1.0 combination shipped here was verified to reject reliably across repeated runs, but the general "coverage threshold" boundary should be treated as empirically-mapped for this exact geometry, not as a universal linear rule.

Expected validation

occt=shape(1)/shape(1) gmsh=shape(16) 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/* Tsh244: OPEN_SHELL with TWO ADVANCED_FACEs: Face A hosts a 10mm reference free edge E=(0,0,0)-(10,0,0); Face B hosts a 10mm candidate edge C=(9,1e-4,0)-(19,1e-4,0) — genuine within-tolerance perpendicular gap along its whole length, but only 10% of C's own extent (x:9-10) actually overlaps E's parametric span, well below the ~50% sampled-point coverage BRepBuilderAPI_Sewing::EvaluateDistances requires before accepting the cheap betweenness test, forcing the endpoint-clamped fallback whose inflated max-distance rejects the pairing in FindCandidates despite the genuinely-overlapping region being well within tolerance */
3HEADER;
4FILE_DESCRIPTION(('Tsh244'),'2;1');
5FILE_NAME('Tsh244.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=CARTESIAN_POINT('',(10.0,0.0,0.0));
12#3=CARTESIAN_POINT('',(10.0,3.0,0.0));
13#4=CARTESIAN_POINT('',(0.0,3.0,0.0));
14#5=VERTEX_POINT('',#1);
15#6=VERTEX_POINT('',#2);
16#7=VERTEX_POINT('',#3);
17#8=VERTEX_POINT('',#4);
18#9=DIRECTION('',(1.0,0.0,0.0));
19#10=DIRECTION('',(0.0,1.0,0.0));
20#11=DIRECTION('',(-1.0,0.0,0.0));
21#12=DIRECTION('',(0.0,-1.0,0.0));
22#13=VECTOR('',#9,10.0);
23#14=LINE('',#1,#13);
24#15=EDGE_CURVE('',#5,#6,#14,.T.);
25#16=VECTOR('',#10,3.0);
26#17=LINE('',#2,#16);
27#18=EDGE_CURVE('',#6,#7,#17,.T.);
28#19=VECTOR('',#11,10.0);
29#20=LINE('',#3,#19);
30#21=EDGE_CURVE('',#7,#8,#20,.T.);
31#22=VECTOR('',#12,3.0);
32#23=LINE('',#4,#22);
33#24=EDGE_CURVE('',#8,#5,#23,.T.);
34#25=ORIENTED_EDGE('',$,$,#15,.T.);
35#26=ORIENTED_EDGE('',$,$,#18,.T.);
36#27=ORIENTED_EDGE('',$,$,#21,.T.);
37#28=ORIENTED_EDGE('',$,$,#24,.T.);
38#29=EDGE_LOOP('',(#25,#26,#27,#28));
39#30=DIRECTION('',(0.0,0.0,1.0));
40#31=DIRECTION('',(1.0,0.0,0.0));
41#32=AXIS2_PLACEMENT_3D('',#1,#30,#31);
42#33=PLANE('',#32);
43#34=FACE_OUTER_BOUND('',#29,.T.);
44#35=ADVANCED_FACE('',(#34),#33,.T.);
45#36=CARTESIAN_POINT('',(9.5,0.0001,0.0));
46#37=CARTESIAN_POINT('',(19.5,0.0001,0.0));
47#38=CARTESIAN_POINT('',(14.5,2.0001,0.0));
48#39=VERTEX_POINT('',#36);
49#40=VERTEX_POINT('',#37);
50#41=VERTEX_POINT('',#38);
51#42=VECTOR('',#9,10.0);
52#43=LINE('',#36,#42);
53#44=EDGE_CURVE('',#39,#40,#43,.T.);
54#45=DIRECTION('',(-0.928476690885,0.371390676354,0.0));
55#46=VECTOR('',#45,5.38516480713);
56#47=LINE('',#37,#46);
57#48=EDGE_CURVE('',#40,#41,#47,.T.);
58#49=DIRECTION('',(-0.928476690885,-0.371390676354,0.0));
59#50=VECTOR('',#49,5.38516480713);
60#51=LINE('',#38,#50);
61#52=EDGE_CURVE('',#41,#39,#51,.T.);
62#53=ORIENTED_EDGE('',$,$,#44,.T.);
63#54=ORIENTED_EDGE('',$,$,#48,.T.);
64#55=ORIENTED_EDGE('',$,$,#52,.T.);
65#56=EDGE_LOOP('',(#53,#54,#55));
66#57=AXIS2_PLACEMENT_3D('',#36,#30,#31);
67#58=PLANE('',#57);
68#59=FACE_OUTER_BOUND('',#56,.T.);
69#60=ADVANCED_FACE('',(#59),#58,.T.);
70#61=OPEN_SHELL('tsh244_low_coverage_reject_shell',(#35,#60));
71#62=SHELL_BASED_SURFACE_MODEL('',(#61));
72#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
73#9051=PRODUCT('Tsh244','Tsh244','',(#9050));
74#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
75#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
76#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
77#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
78#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
79#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
80#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
81#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
82#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
83#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#62),#9060);
84#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
85ENDSEC;
86END-ISO-10303-21;