Tsh141 — ShapeUpgrade_ShellSewing.Apply self-sewing

§12.3a

topology

Sources

Description

ShapeUpgrade_ShellSewing.Apply self-sewing

Reproducer recipe

Expected kernel behavior

Face1 (x=[0,1], y=[0,2]) and Face2 occupy the same footprint but Face2 is authored with same_sense=.F. as a folded-back duplicate; the two faces share one true edge at x=1, and each also has a free edge at x=0 that is geometrically coincident with the other's (distance 0) but backed by separate EDGE_CURVE entities. A sewing pass must be able to pair two free edges belonging to the same shell when their endpoints coincide within tolerance, even though pairing them means the shell effectively closes on itself (self-sewing); rejecting a same-shell pairing outright because both edges originate from the same OPEN_SHELL misses this legitimate case.

Expected validation

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

Tier-3 assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes
1ISO-10303-21;
2/* Tsh141: TWO ADVANCED_FACEs forming a strip folded back on itself — IS the self-sewing mechanism wired into topology; Face1 (x=[0,1], y=[0,2]) left edge at x=0 IS a free edge candidate for self-sewing; Face2 folds back over the SAME footprint (same PLANE, same_sense=.F.) so its far edge lands EXACTLY at x=0, y=[0,2] too — a genuinely coincident (distance 0) but topologically DISTINCT free edge; shared EDGE_CURVE at x=1 IS wired into both EDGE_LOOPs (manifold seam); the two coincident free edges (Face1's e_f1_left, Face2's e_f2_left_fold) ARE the self-sewing pair; ShellSewing.Apply rejects self-pairing of free edges — silently fails; fix: allow edge-to-edge self-sewing when endpoints coincide within tolerance; emit E_SELF_SEWING_REJECTED when Apply refuses valid self-pairing */
3HEADER;
4FILE_DESCRIPTION(('Tsh141'),'2;1');
5FILE_NAME('Tsh141.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('',(1.0,0.0,0.0));
12#3=CARTESIAN_POINT('',(0.0,2.0,0.0));
13#4=CARTESIAN_POINT('',(1.0,2.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=CARTESIAN_POINT('',(0.0,0.0,0.0));
19#10=CARTESIAN_POINT('',(0.0,2.0,0.0));
20#11=VERTEX_POINT('',#9);
21#12=VERTEX_POINT('',#10);
22#13=DIRECTION('',(0.0,1.0,0.0));
23#14=VECTOR('',#13,1.0);
24#15=LINE('',#2,#14);
25#16=EDGE_CURVE('',#6,#8,#15,.T.);
26#17=DIRECTION('',(1.0,0.0,0.0));
27#18=VECTOR('',#17,1.0);
28#19=LINE('',#1,#18);
29#20=EDGE_CURVE('',#5,#6,#19,.T.);
30#21=DIRECTION('',(0.0,1.0,0.0));
31#22=VECTOR('',#21,1.0);
32#23=LINE('',#1,#22);
33#24=EDGE_CURVE('',#5,#7,#23,.T.);
34#25=DIRECTION('',(1.0,0.0,0.0));
35#26=VECTOR('',#25,1.0);
36#27=LINE('',#3,#26);
37#28=EDGE_CURVE('',#7,#8,#27,.T.);
38#29=DIRECTION('',(-1.0,0.0,0.0));
39#30=VECTOR('',#29,1.0);
40#31=LINE('',#2,#30);
41#32=EDGE_CURVE('',#6,#11,#31,.T.);
42#33=DIRECTION('',(0.0,1.0,0.0));
43#34=VECTOR('',#33,1.0);
44#35=LINE('',#9,#34);
45#36=EDGE_CURVE('',#11,#12,#35,.T.);
46#37=DIRECTION('',(1.0,0.0,0.0));
47#38=VECTOR('',#37,1.0);
48#39=LINE('',#10,#38);
49#40=EDGE_CURVE('',#12,#8,#39,.T.);
50#41=CARTESIAN_POINT('',(0,0,0.0));
51#42=DIRECTION('',(0.0,0.0,1.0));
52#43=DIRECTION('',(1.0,0.0,0.0));
53#44=AXIS2_PLACEMENT_3D('',#41,#42,#43);
54#45=PLANE('',#44);
55#46=ORIENTED_EDGE('',$,$,#20,.T.);
56#47=ORIENTED_EDGE('',$,$,#16,.T.);
57#48=ORIENTED_EDGE('',$,$,#28,.F.);
58#49=ORIENTED_EDGE('',$,$,#24,.F.);
59#50=EDGE_LOOP('',(#46,#47,#48,#49));
60#51=FACE_OUTER_BOUND('',#50,.T.);
61#52=ADVANCED_FACE('',(#51),#45,.T.);
62#53=ORIENTED_EDGE('',$,$,#32,.T.);
63#54=ORIENTED_EDGE('',$,$,#36,.T.);
64#55=ORIENTED_EDGE('',$,$,#40,.T.);
65#56=ORIENTED_EDGE('',$,$,#16,.F.);
66#57=EDGE_LOOP('',(#53,#54,#55,#56));
67#58=FACE_OUTER_BOUND('',#57,.T.);
68#59=ADVANCED_FACE('',(#58),#45,.F.);
69#60=OPEN_SHELL('',(#52,#59));
70#61=SHELL_BASED_SURFACE_MODEL('',(#60));
71#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
72#9051=PRODUCT('Tsh141','Tsh141','',(#9050));
73#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
74#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
75#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
76#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
77#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
78#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
79#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
80#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
81#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
82#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#61),#9060);
83#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
84ENDSEC;
85END-ISO-10303-21;