Tsh242 — Post-merge leftover free-boundary wire loop of negligible extent, collapsed by sewing

§12.3a shells (sub-class: sewing post-merge degenerate-wire collapse — `sew-degenerate-free-wire-collapse`)

P2 — spec deviation (no data loss)

topology

Sources

Description

An `OPEN_SHELL` with THREE `ADVANCED_FACE`s. Face A (10x10mm square, x:[0,10]) and Face B (10x10mm square, x:[10.00001,20.00001]) are genuine independent-`EDGE_CURVE` gap-merge candidates (1e-5mm gap, same magnitude as the known-good Tfa020 precedent) whose merge under sewing IS the "main pass" this class's post-merge free-wire scan runs after. Face C is a geometrically negligible (5e-7mm side) quadrilateral, offset 50mm away in Z, whose FOUR edges are each a genuine, independently-defined `LINE` segment (not a degenerate back-and-forth duplicate) forming a real closed 4-edge wire by vertex-sharing; none of Face C's edges has any merge candidate anywhere in the shape, so all four remain free after the main pass.

Reproducer recipe

`OPEN_SHELL` with two 10mm-scale coplanar squares whose facing edges sit ~1e-5mm apart (genuine independent `EDGE_CURVE` gap-merge candidates), plus a third, spatially separate, ~5e-7mm-scale quadrilateral face whose 4 edges never find a merge candidate.

Expected kernel behavior

heal; after resolving all genuine gap-merges, scan the REMAINING free-boundary edges for closed loops whose overall geometric extent is negligible relative to the sewing tolerance, and collapse each such loop's edges to degenerate sections rather than emitting them as spurious "real" free-boundary geometry.

Notes

Live-verified (this worktree's OCP/OCCT 7.8.1): plain the reader().TransferRoots()/.OneShape()` does NOT itself invoke the sewing stage (confirmed: reading this file back gives 3 separate faces / 12 edges, no merge — `occt=shape(1)/shape(1)` with `shape_counts` unmodified from the raw translation). The mechanism is demonstrated via a runtime scaffold that explicitly constructs the sewing stage(tolerance)` over the translated shape and calls `Perform()`: at `tolerance=0.01`, `NbContigousEdges()==1` (confirms Face A/B's main gap-merge succeeded) AND `NbDegeneratedShapes()==4` (confirms Face C's 4-edge loop was collapsed) — both counters live-observed together in one `Perform()` call, exactly the "post-merge leftover loop collapsed after the main merge pass" sequence this class targets. A control build with Face C's edge scale raised to 1e-3mm (1000x larger) produces `NbDegeneratedShapes()==0` at the same tolerance, confirming the collapse is driven by genuine sub-tolerance extent, not merely "any small face." Face C's edges were also empirically bounded below: a 1e-9mm scale gets silently voided by OCCT's own read-time precision handling BEFORE any sewing scaffold runs (the whole face degenerates into a garbage untrimmed infinite plane, `area~8e100`) — 5e-7mm was the smallest scale found to survive plain translation as a genuine non-degenerate small face while still being sub-tolerance for the sewing scaffold. Synonyms: "post-merge free wire loop collapse", "leftover sliver boundary after sewing", "negligible free-boundary loop degenerate collapse", "sewing residual tiny wire loop", "sub-tolerance post-merge boundary collapse".

Expected validation

occt=shape(1)/shape(1) gmsh=shape(27) 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/* Tsh242: OPEN_SHELL with THREE ADVANCED_FACEs: Face A (10x10 square, x:0-10) and Face B (10x10 square, x:10.00001-20.00001) are genuine independent-EDGE_CURVE gap-merge candidates (1e-5mm gap) whose merge IS the 'main pass' this class's post-merge scan runs after; Face C is a geometrically negligible (1e-9mm side) quadrilateral whose 4 real, independently-defined free edges form their own closed wire loop with no merge candidate anywhere in the shape — a genuine post-merge leftover free-boundary loop of negligible extent, distinct from Sw003's pre-merge single-face back-and-forth pattern */
3HEADER;
4FILE_DESCRIPTION(('Tsh242'),'2;1');
5FILE_NAME('Tsh242.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,10.0,0.0));
13#4=CARTESIAN_POINT('',(0.0,10.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,10.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,10.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=CARTESIAN_POINT('',(0.0,0.0,0.0));
40#31=DIRECTION('',(0.0,0.0,1.0));
41#32=DIRECTION('',(1.0,0.0,0.0));
42#33=AXIS2_PLACEMENT_3D('',#30,#31,#32);
43#34=PLANE('',#33);
44#35=FACE_OUTER_BOUND('',#29,.T.);
45#36=ADVANCED_FACE('',(#35),#34,.T.);
46#37=CARTESIAN_POINT('',(10.00001,0.0,0.0));
47#38=CARTESIAN_POINT('',(10.00001,10.0,0.0));
48#39=CARTESIAN_POINT('',(20.00001,10.0,0.0));
49#40=CARTESIAN_POINT('',(20.00001,0.0,0.0));
50#41=VERTEX_POINT('',#37);
51#42=VERTEX_POINT('',#38);
52#43=VERTEX_POINT('',#39);
53#44=VERTEX_POINT('',#40);
54#45=VECTOR('',#10,10.0);
55#46=LINE('',#37,#45);
56#47=EDGE_CURVE('',#41,#42,#46,.T.);
57#48=VECTOR('',#9,10.0);
58#49=LINE('',#38,#48);
59#50=EDGE_CURVE('',#42,#43,#49,.T.);
60#51=VECTOR('',#10,10.0);
61#52=LINE('',#40,#51);
62#53=EDGE_CURVE('',#44,#43,#52,.T.);
63#54=VECTOR('',#9,10.0);
64#55=LINE('',#37,#54);
65#56=EDGE_CURVE('',#41,#44,#55,.T.);
66#57=ORIENTED_EDGE('',$,$,#47,.F.);
67#58=ORIENTED_EDGE('',$,$,#56,.T.);
68#59=ORIENTED_EDGE('',$,$,#53,.T.);
69#60=ORIENTED_EDGE('',$,$,#50,.F.);
70#61=EDGE_LOOP('',(#57,#58,#59,#60));
71#62=AXIS2_PLACEMENT_3D('',#30,#31,#32);
72#63=PLANE('',#62);
73#64=FACE_OUTER_BOUND('',#61,.T.);
74#65=ADVANCED_FACE('',(#64),#63,.T.);
75#66=CARTESIAN_POINT('',(0.0,0.0,50.0));
76#67=CARTESIAN_POINT('',(5.0E-07,0.0,50.0));
77#68=CARTESIAN_POINT('',(5.0E-07,5.0E-07,50.0));
78#69=CARTESIAN_POINT('',(0.0,5.0E-07,50.0));
79#70=VERTEX_POINT('',#66);
80#71=VERTEX_POINT('',#67);
81#72=VERTEX_POINT('',#68);
82#73=VERTEX_POINT('',#69);
83#74=VECTOR('',#9,5.0E-07);
84#75=LINE('',#66,#74);
85#76=EDGE_CURVE('',#70,#71,#75,.T.);
86#77=VECTOR('',#10,5.0E-07);
87#78=LINE('',#67,#77);
88#79=EDGE_CURVE('',#71,#72,#78,.T.);
89#80=VECTOR('',#11,5.0E-07);
90#81=LINE('',#68,#80);
91#82=EDGE_CURVE('',#72,#73,#81,.T.);
92#83=VECTOR('',#12,5.0E-07);
93#84=LINE('',#69,#83);
94#85=EDGE_CURVE('',#73,#70,#84,.T.);
95#86=ORIENTED_EDGE('',$,$,#76,.T.);
96#87=ORIENTED_EDGE('',$,$,#79,.T.);
97#88=ORIENTED_EDGE('',$,$,#82,.T.);
98#89=ORIENTED_EDGE('',$,$,#85,.T.);
99#90=EDGE_LOOP('tsh242_negligible_free_wire_loop',(#86,#87,#88,#89));
100#91=CARTESIAN_POINT('',(0.0,0.0,50.0));
101#92=AXIS2_PLACEMENT_3D('',#91,#31,#32);
102#93=PLANE('',#92);
103#94=FACE_OUTER_BOUND('',#90,.T.);
104#95=ADVANCED_FACE('',(#94),#93,.T.);
105#96=OPEN_SHELL('tsh242_shell',(#36,#65,#95));
106#97=SHELL_BASED_SURFACE_MODEL('',(#96));
107#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
108#9051=PRODUCT('Tsh242','Tsh242','',(#9050));
109#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
110#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
111#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
112#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
113#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
114#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
115#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
116#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
117#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
118#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#97),#9060);
119#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
120ENDSEC;
121END-ISO-10303-21;