step-examples/12-3a-shells/Tsh245.stp
Sources
- occt-coverage PARTIAL audit, `exchange/problems.json` `sew-candidate-tiebreak-reciprocity` (`BRepBuilderAPI_Sewing::FindCandidates`, `BRepBuilderAPI_Sewing.cxx:1508-1519` tie-break, `:1638-1653+` recursive reciprocal-match walk). M045 (the sole existing fixture) hits a multi-candidate scenario only incidentally
- this fixture purpose-builds both the tie-break and reciprocity-asymmetric subcases the class calls for, distinct geometry from M045 and from N149 (which the audit rejected as only two edges total, no tie to break).
Description
An `OPEN_SHELL` with SIX `ADVANCED_FACE`s in two spatially isolated (100mm apart in Y) groups. Group 1: reference edge R (y=0) has TWO candidates genuinely equidistant at 0.6mm (B above, C below) — both within a 1.0mm sewing tolerance of R, but 1.2mm apart from each other (beyond tolerance, so B and C never see each other), forcing the `arrMinDist` tie-break to pick exactly one. Group 2: D (reference), E (0.01mm from D), F (0.011mm from D, only 0.001mm from E) — D's nearest candidate is E, but E's OWN nearest candidate is F, not D, a genuine reciprocity failure.
Reproducer recipe
Six face-hosted free edges in two isolated groups: three genuinely-equidistant/near-equidistant parallel candidates for a tie-break test, and three candidates at staggered distances (D-E < D-F, but E-F < D-E) forming a reciprocity-asymmetric chain.
Expected kernel behavior
for equidistant candidates, deterministically select exactly one winner via the closest-sampled-point tie-break, never both and never neither; for a reciprocity-asymmetric configuration, only accept a pairing when it is a genuine mutual best-match, walking to the next candidate (or accepting the reciprocal pair among the OTHER edges) rather than forcing a lopsided merge.
Notes
Live-verified (this worktree's OCP/OCCT 7.8.1, runtime the sewing stage(tolerance=1.0)` scaffold): Group 1 — the tie-break resolves to a single definite winner: R merges with C (resulting shared-edge midpoint y≈-0.3, `nfaces==2`) while B (y=0.6, `nfaces==1`) is left free/unmerged (which of B/C wins is an `arrMinDist`-ordering implementation detail, not asserted directionally — the load-bearing fact is that exactly one wins, not both/neither). Group 2 — D remains free/unmerged (y=100.0, `nfaces==1`) while E and F — whose distance IS each other's mutual minimum — merge into one shared edge (y≈100.0105, `nfaces==2`), exactly the reciprocity-failure/mutual-match behavior this class targets. Group 1's non-test (triangle apex) leg edges use deliberately very different depths (3/40/-40mm) — an earlier attempt with near-equal apex depths (3/3.6/-3.6mm) let R/B/C's near-parallel leg edges spuriously chain-merge with each other via the unrelated ordinary gap-merge mechanism, contaminating the tie-break test; fixed by making the legs diverge rapidly. Synonyms: "equidistant candidate tie-break", "arrMinDist closest-point selection", "reciprocity-asymmetric candidate chain", "mutual best-match sewing candidate", "non-reciprocal nearest-neighbor edge merge".
Expected validation
occt=shape(1)/shape(1) gmsh=shape(42) ifc=schema_n/a
Byte assertions
count_entity_def(b'ADVANCED_FACE') == 6count_entity_def(b'OPEN_SHELL') == 1
Tier-3 assertions
n_faces_total == 6n_edges_total == 18
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Tsh245: OPEN_SHELL with SIX ADVANCED_FACEs in two spatially isolated groups: Group 1 (y~0) has reference edge R with TWO genuinely equidistant (0.6mm) candidates B/C on opposite sides, requiring BRepBuilderAPI_Sewing::FindCandidates' arrMinDist tie-break; Group 2 (y~100) has D/E/F at 0mm/0.01mm/0.011mm offsets forming a reciprocity-asymmetric chain (D's nearest is E, but E's own nearest is F, not D) exercising the recursive mutual-match walk */ 3HEADER; 4FILE_DESCRIPTION(('Tsh245'),'2;1'); 5FILE_NAME('Tsh245.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('',(5.0,3.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,10.0); 18#9=LINE('',#1,#8); 19#10=EDGE_CURVE('',#4,#5,#9,.T.); 20#11=DIRECTION('',(-0.857492925713,0.514495755428,0.0)); 21#12=VECTOR('',#11,5.83095189485); 22#13=LINE('',#2,#12); 23#14=EDGE_CURVE('',#5,#6,#13,.T.); 24#15=DIRECTION('',(-0.857492925713,-0.514495755428,0.0)); 25#16=VECTOR('',#15,5.83095189485); 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('',(#27),#26,.T.); 38#29=CARTESIAN_POINT('',(0.0,0.6,0.0)); 39#30=CARTESIAN_POINT('',(10.0,0.6,0.0)); 40#31=CARTESIAN_POINT('',(5.0,40.6,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,10.0); 46#37=LINE('',#29,#36); 47#38=EDGE_CURVE('',#32,#33,#37,.T.); 48#39=DIRECTION('',(-0.124034734589,0.992277876714,0.0)); 49#40=VECTOR('',#39,40.3112887415); 50#41=LINE('',#30,#40); 51#42=EDGE_CURVE('',#33,#34,#41,.T.); 52#43=DIRECTION('',(-0.124034734589,-0.992277876714,0.0)); 53#44=VECTOR('',#43,40.3112887415); 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('',(#55),#54,.T.); 66#57=CARTESIAN_POINT('',(0.0,-0.6,0.0)); 67#58=CARTESIAN_POINT('',(10.0,-0.6,0.0)); 68#59=CARTESIAN_POINT('',(5.0,-40.6,0.0)); 69#60=VERTEX_POINT('',#57); 70#61=VERTEX_POINT('',#58); 71#62=VERTEX_POINT('',#59); 72#63=DIRECTION('',(1.0,0.0,0.0)); 73#64=VECTOR('',#63,10.0); 74#65=LINE('',#57,#64); 75#66=EDGE_CURVE('',#60,#61,#65,.T.); 76#67=DIRECTION('',(-0.124034734589,-0.992277876714,0.0)); 77#68=VECTOR('',#67,40.3112887415); 78#69=LINE('',#58,#68); 79#70=EDGE_CURVE('',#61,#62,#69,.T.); 80#71=DIRECTION('',(-0.124034734589,0.992277876714,0.0)); 81#72=VECTOR('',#71,40.3112887415); 82#73=LINE('',#59,#72); 83#74=EDGE_CURVE('',#62,#60,#73,.T.); 84#75=ORIENTED_EDGE('',$,$,#66,.T.); 85#76=ORIENTED_EDGE('',$,$,#70,.T.); 86#77=ORIENTED_EDGE('',$,$,#74,.T.); 87#78=EDGE_LOOP('',(#75,#76,#77)); 88#79=DIRECTION('',(0.0,0.0,1.0)); 89#80=DIRECTION('',(1.0,0.0,0.0)); 90#81=AXIS2_PLACEMENT_3D('',#57,#79,#80); 91#82=PLANE('',#81); 92#83=FACE_OUTER_BOUND('',#78,.T.); 93#84=ADVANCED_FACE('',(#83),#82,.T.); 94#85=CARTESIAN_POINT('',(0.0,100.0,0.0)); 95#86=CARTESIAN_POINT('',(10.0,100.0,0.0)); 96#87=CARTESIAN_POINT('',(5.0,103.0,0.0)); 97#88=VERTEX_POINT('',#85); 98#89=VERTEX_POINT('',#86); 99#90=VERTEX_POINT('',#87); 100#91=DIRECTION('',(1.0,0.0,0.0)); 101#92=VECTOR('',#91,10.0); 102#93=LINE('',#85,#92); 103#94=EDGE_CURVE('',#88,#89,#93,.T.); 104#95=DIRECTION('',(-0.857492925713,0.514495755428,0.0)); 105#96=VECTOR('',#95,5.83095189485); 106#97=LINE('',#86,#96); 107#98=EDGE_CURVE('',#89,#90,#97,.T.); 108#99=DIRECTION('',(-0.857492925713,-0.514495755428,0.0)); 109#100=VECTOR('',#99,5.83095189485); 110#101=LINE('',#87,#100); 111#102=EDGE_CURVE('',#90,#88,#101,.T.); 112#103=ORIENTED_EDGE('',$,$,#94,.T.); 113#104=ORIENTED_EDGE('',$,$,#98,.T.); 114#105=ORIENTED_EDGE('',$,$,#102,.T.); 115#106=EDGE_LOOP('',(#103,#104,#105)); 116#107=DIRECTION('',(0.0,0.0,1.0)); 117#108=DIRECTION('',(1.0,0.0,0.0)); 118#109=AXIS2_PLACEMENT_3D('',#85,#107,#108); 119#110=PLANE('',#109); 120#111=FACE_OUTER_BOUND('',#106,.T.); 121#112=ADVANCED_FACE('',(#111),#110,.T.); 122#113=CARTESIAN_POINT('',(0.0,100.01,0.0)); 123#114=CARTESIAN_POINT('',(10.0,100.01,0.0)); 124#115=CARTESIAN_POINT('',(5.0,104.01,0.0)); 125#116=VERTEX_POINT('',#113); 126#117=VERTEX_POINT('',#114); 127#118=VERTEX_POINT('',#115); 128#119=DIRECTION('',(1.0,0.0,0.0)); 129#120=VECTOR('',#119,10.0); 130#121=LINE('',#113,#120); 131#122=EDGE_CURVE('',#116,#117,#121,.T.); 132#123=DIRECTION('',(-0.780868809443,0.624695047554,0.0)); 133#124=VECTOR('',#123,6.40312423743); 134#125=LINE('',#114,#124); 135#126=EDGE_CURVE('',#117,#118,#125,.T.); 136#127=DIRECTION('',(-0.780868809443,-0.624695047554,0.0)); 137#128=VECTOR('',#127,6.40312423743); 138#129=LINE('',#115,#128); 139#130=EDGE_CURVE('',#118,#116,#129,.T.); 140#131=ORIENTED_EDGE('',$,$,#122,.T.); 141#132=ORIENTED_EDGE('',$,$,#126,.T.); 142#133=ORIENTED_EDGE('',$,$,#130,.T.); 143#134=EDGE_LOOP('',(#131,#132,#133)); 144#135=DIRECTION('',(0.0,0.0,1.0)); 145#136=DIRECTION('',(1.0,0.0,0.0)); 146#137=AXIS2_PLACEMENT_3D('',#113,#135,#136); 147#138=PLANE('',#137); 148#139=FACE_OUTER_BOUND('',#134,.T.); 149#140=ADVANCED_FACE('',(#139),#138,.T.); 150#141=CARTESIAN_POINT('',(0.0,100.011,0.0)); 151#142=CARTESIAN_POINT('',(10.0,100.011,0.0)); 152#143=CARTESIAN_POINT('',(5.0,105.011,0.0)); 153#144=VERTEX_POINT('',#141); 154#145=VERTEX_POINT('',#142); 155#146=VERTEX_POINT('',#143); 156#147=DIRECTION('',(1.0,0.0,0.0)); 157#148=VECTOR('',#147,10.0); 158#149=LINE('',#141,#148); 159#150=EDGE_CURVE('',#144,#145,#149,.T.); 160#151=DIRECTION('',(-0.707106781187,0.707106781187,0.0)); 161#152=VECTOR('',#151,7.07106781187); 162#153=LINE('',#142,#152); 163#154=EDGE_CURVE('',#145,#146,#153,.T.); 164#155=DIRECTION('',(-0.707106781187,-0.707106781187,0.0)); 165#156=VECTOR('',#155,7.07106781187); 166#157=LINE('',#143,#156); 167#158=EDGE_CURVE('',#146,#144,#157,.T.); 168#159=ORIENTED_EDGE('',$,$,#150,.T.); 169#160=ORIENTED_EDGE('',$,$,#154,.T.); 170#161=ORIENTED_EDGE('',$,$,#158,.T.); 171#162=EDGE_LOOP('',(#159,#160,#161)); 172#163=DIRECTION('',(0.0,0.0,1.0)); 173#164=DIRECTION('',(1.0,0.0,0.0)); 174#165=AXIS2_PLACEMENT_3D('',#141,#163,#164); 175#166=PLANE('',#165); 176#167=FACE_OUTER_BOUND('',#162,.T.); 177#168=ADVANCED_FACE('',(#167),#166,.T.); 178#169=OPEN_SHELL('tsh245_tiebreak_reciprocity_shell',(#28,#56,#84,#112,#140,#168)); 179#170=SHELL_BASED_SURFACE_MODEL('',(#169)); 180#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 181#9051=PRODUCT('Tsh245','Tsh245','',(#9050)); 182#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 183#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 184#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 185#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 186#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 187#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 188#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 189#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 190#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 191#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#170),#9060); 192#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 193ENDSEC; 194END-ISO-10303-21;