Tsh222 — closed_flag_sync_failure

§12.3a

topology

Sources

Description

closed_flag_sync_failure

Reproducer recipe

Expected kernel behavior

All six faces of this box (bottom, top, front, back, left, right) share their 12 edges correctly with two faces each, and the shell is declared CLOSED_SHELL; only the top face (Z=1) carries same_sense=.F. needing a flip. Flipping a face changes which direction its EDGE_LOOP's edges are considered traversed from that face's side, so after the flip, re-derive whether the shell's edges are still all consistently doubly-shared (closed) rather than assuming the CLOSED_SHELL label authored before the fix still holds; if the flip left any edge inconsistently traversed, report the shell as no longer closed instead of keeping a stale closed flag.

Expected validation

occt=shape(1)/shape(1) gmsh=shape(26) 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/* Tsh222: CLOSED_SHELL with SIX ADVANCED_FACEs forming a box IS the closed_flag_sync_failure trigger; six faces ARE: bottom(Z=0), top(Z=1), front(Y=0), back(Y=1), left(X=0), right(X=1) — IS the box topology; all 12 box edges ARE shared between adjacent faces — IS the initial closed arrangement; one face (top, Z=1) has same_sense=False — IS the FixFaceOrientation trigger; shell IS declared CLOSED_SHELL — IS the initial Closed()==True state; after FixFaceOrientation flips top face: top edge loop orientation changes — IS the post-fix state; the flipped top face produces free edges at the top boundary — IS the free-edge defect; HasFreeEdges() returns True after fix — IS the actual open state; Closed() flag IS NOT reset after FixFaceOrientation — IS the sync-failure defect; Closed() remains True while HasFreeEdges() is True — IS the out-of-sync state; downstream solid construction checks Closed() flag — IS the solid-break dependency; fix: after FixFaceOrientation, sync Closed() with HasFreeEdges() result; emit E_CLOSED_FLAG_SYNC_FAILURE when Closed() disagrees with HasFreeEdges post-fix */
3HEADER;
4FILE_DESCRIPTION(('Tsh222'),'2;1');
5FILE_NAME('Tsh222.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=VERTEX_POINT('',#1);
12#3=CARTESIAN_POINT('',(1.0,0.0,0.0));
13#4=VERTEX_POINT('',#3);
14#5=CARTESIAN_POINT('',(1.0,1.0,0.0));
15#6=VERTEX_POINT('',#5);
16#7=CARTESIAN_POINT('',(0.0,1.0,0.0));
17#8=VERTEX_POINT('',#7);
18#9=CARTESIAN_POINT('',(0.0,0.0,1.0));
19#10=VERTEX_POINT('',#9);
20#11=CARTESIAN_POINT('',(1.0,0.0,1.0));
21#12=VERTEX_POINT('',#11);
22#13=CARTESIAN_POINT('',(1.0,1.0,1.0));
23#14=VERTEX_POINT('',#13);
24#15=CARTESIAN_POINT('',(0.0,1.0,1.0));
25#16=VERTEX_POINT('',#15);
26#17=DIRECTION('',(1.0,0.0,0.0));
27#18=VECTOR('',#17,1.0);
28#19=LINE('',#1,#18);
29#20=EDGE_CURVE('',#2,#4,#19,.T.);
30#21=DIRECTION('',(0.0,1.0,0.0));
31#22=VECTOR('',#21,1.0);
32#23=LINE('',#3,#22);
33#24=EDGE_CURVE('',#4,#6,#23,.T.);
34#25=DIRECTION('',(-1.0,0.0,0.0));
35#26=VECTOR('',#25,1.0);
36#27=LINE('',#5,#26);
37#28=EDGE_CURVE('',#6,#8,#27,.T.);
38#29=DIRECTION('',(0.0,-1.0,0.0));
39#30=VECTOR('',#29,1.0);
40#31=LINE('',#7,#30);
41#32=EDGE_CURVE('',#8,#2,#31,.T.);
42#33=DIRECTION('',(1.0,0.0,0.0));
43#34=VECTOR('',#33,1.0);
44#35=LINE('',#9,#34);
45#36=EDGE_CURVE('',#10,#12,#35,.T.);
46#37=DIRECTION('',(0.0,1.0,0.0));
47#38=VECTOR('',#37,1.0);
48#39=LINE('',#11,#38);
49#40=EDGE_CURVE('',#12,#14,#39,.T.);
50#41=DIRECTION('',(-1.0,0.0,0.0));
51#42=VECTOR('',#41,1.0);
52#43=LINE('',#13,#42);
53#44=EDGE_CURVE('',#14,#16,#43,.T.);
54#45=DIRECTION('',(0.0,-1.0,0.0));
55#46=VECTOR('',#45,1.0);
56#47=LINE('',#15,#46);
57#48=EDGE_CURVE('',#16,#10,#47,.T.);
58#49=DIRECTION('',(0.0,0.0,1.0));
59#50=VECTOR('',#49,1.0);
60#51=LINE('',#1,#50);
61#52=EDGE_CURVE('',#2,#10,#51,.T.);
62#53=DIRECTION('',(0.0,0.0,1.0));
63#54=VECTOR('',#53,1.0);
64#55=LINE('',#3,#54);
65#56=EDGE_CURVE('',#4,#12,#55,.T.);
66#57=DIRECTION('',(0.0,0.0,1.0));
67#58=VECTOR('',#57,1.0);
68#59=LINE('',#5,#58);
69#60=EDGE_CURVE('',#6,#14,#59,.T.);
70#61=DIRECTION('',(0.0,0.0,1.0));
71#62=VECTOR('',#61,1.0);
72#63=LINE('',#7,#62);
73#64=EDGE_CURVE('',#8,#16,#63,.T.);
74#65=ORIENTED_EDGE('',$,$,#20,.T.);
75#66=ORIENTED_EDGE('',$,$,#24,.T.);
76#67=ORIENTED_EDGE('',$,$,#28,.T.);
77#68=ORIENTED_EDGE('',$,$,#32,.T.);
78#69=EDGE_LOOP('',(#65,#66,#67,#68));
79#70=DIRECTION('',(0.0,0.0,-1.0));
80#71=DIRECTION('',(1.0,0.0,0.0));
81#72=AXIS2_PLACEMENT_3D('',#1,#70,#71);
82#73=PLANE('',#72);
83#74=FACE_OUTER_BOUND('',#69,.T.);
84#75=ADVANCED_FACE('',(#74),#73,.T.);
85#76=ORIENTED_EDGE('',$,$,#36,.T.);
86#77=ORIENTED_EDGE('',$,$,#40,.T.);
87#78=ORIENTED_EDGE('',$,$,#44,.T.);
88#79=ORIENTED_EDGE('',$,$,#48,.T.);
89#80=EDGE_LOOP('',(#76,#77,#78,#79));
90#81=DIRECTION('',(0.0,0.0,1.0));
91#82=DIRECTION('',(1.0,0.0,0.0));
92#83=AXIS2_PLACEMENT_3D('',#9,#81,#82);
93#84=PLANE('',#83);
94#85=FACE_OUTER_BOUND('',#80,.T.);
95#86=ADVANCED_FACE('',(#85),#84,.F.);
96#87=ORIENTED_EDGE('',$,$,#20,.T.);
97#88=ORIENTED_EDGE('',$,$,#56,.T.);
98#89=ORIENTED_EDGE('',$,$,#36,.F.);
99#90=ORIENTED_EDGE('',$,$,#52,.F.);
100#91=EDGE_LOOP('',(#87,#88,#89,#90));
101#92=DIRECTION('',(0.0,-1.0,0.0));
102#93=DIRECTION('',(1.0,0.0,0.0));
103#94=AXIS2_PLACEMENT_3D('',#1,#92,#93);
104#95=PLANE('',#94);
105#96=FACE_OUTER_BOUND('',#91,.T.);
106#97=ADVANCED_FACE('',(#96),#95,.T.);
107#98=ORIENTED_EDGE('',$,$,#28,.T.);
108#99=ORIENTED_EDGE('',$,$,#60,.T.);
109#100=ORIENTED_EDGE('',$,$,#44,.F.);
110#101=ORIENTED_EDGE('',$,$,#64,.F.);
111#102=EDGE_LOOP('',(#98,#99,#100,#101));
112#103=DIRECTION('',(0.0,1.0,0.0));
113#104=DIRECTION('',(1.0,0.0,0.0));
114#105=AXIS2_PLACEMENT_3D('',#7,#103,#104);
115#106=PLANE('',#105);
116#107=FACE_OUTER_BOUND('',#102,.T.);
117#108=ADVANCED_FACE('',(#107),#106,.T.);
118#109=ORIENTED_EDGE('',$,$,#32,.T.);
119#110=ORIENTED_EDGE('',$,$,#64,.F.);
120#111=ORIENTED_EDGE('',$,$,#48,.F.);
121#112=ORIENTED_EDGE('',$,$,#52,.T.);
122#113=EDGE_LOOP('',(#109,#110,#111,#112));
123#114=DIRECTION('',(-1.0,0.0,0.0));
124#115=DIRECTION('',(0.0,1.0,0.0));
125#116=AXIS2_PLACEMENT_3D('',#1,#114,#115);
126#117=PLANE('',#116);
127#118=FACE_OUTER_BOUND('',#113,.T.);
128#119=ADVANCED_FACE('',(#118),#117,.T.);
129#120=ORIENTED_EDGE('',$,$,#24,.T.);
130#121=ORIENTED_EDGE('',$,$,#60,.F.);
131#122=ORIENTED_EDGE('',$,$,#40,.F.);
132#123=ORIENTED_EDGE('',$,$,#56,.T.);
133#124=EDGE_LOOP('',(#120,#121,#122,#123));
134#125=DIRECTION('',(1.0,0.0,0.0));
135#126=DIRECTION('',(0.0,1.0,0.0));
136#127=AXIS2_PLACEMENT_3D('',#3,#125,#126);
137#128=PLANE('',#127);
138#129=FACE_OUTER_BOUND('',#124,.T.);
139#130=ADVANCED_FACE('',(#129),#128,.T.);
140#131=CLOSED_SHELL('',(#75,#86,#97,#108,#119,#130));
141#132=SHELL_BASED_SURFACE_MODEL('',(#131));
142#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
143#9051=PRODUCT('Tsh222','Tsh222','',(#9050));
144#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
145#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
146#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
147#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
148#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
149#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
150#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
151#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
152#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
153#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#132),#9060);
154#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
155ENDSEC;
156END-ISO-10303-21;