Tsh174 — ShapeFix_Shell.FixFaceOrientation with-empty-shell-after-fix

§12.3a

topology

Sources

Description

ShapeFix_Shell.FixFaceOrientation with-empty-shell-after-fix

Reproducer recipe

Expected kernel behavior

Both faces are collinear, zero-area triangles: face_degen_a runs (0,0,0)->(1,0,0)->(2,0,0) and face_degen_b runs (0,0,0)->(-1,0,0)->(-2,0,0), each a degenerate sliver with no real area. Removing both degenerate faces from the shell is correct, but the resulting empty shell must be reported distinctly from success on a normal, non-empty shell — a repair operation that reports the same 'succeeded' status whether it fixed faces or removed every face down to none gives the caller no way to tell those two very different outcomes apart.

Expected validation

occt=shape(1)/shape(1) gmsh=shape(10) 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/* Tsh174: TWO degenerate ADVANCED_FACEs in ONE OPEN_SHELL — IS the empty-shell-after-fix mechanism; face_degen_a IS a collinear triangle (0,0,0)→(1,0,0)→(2,0,0) — zero-area degenerate face; face_degen_b IS a collinear triangle (0,0,0)→(-1,0,0)→(-2,0,0) — zero-area opposite direction; both faces ARE wired with closed EDGE_LOOPs into OPEN_SHELL — IS valid topology with invalid geometry; Perform() detects zero-area geometry and removes both faces from the shell; shell IS empty after Perform() — IS the void condition; FixFaceOrientation() runs on empty shell and reports success — IS the masked defect; success on empty shell IS indistinguishable from success on valid shell; fix: check shell face count before reporting FixFaceOrientation success; emit E_FIX_ORIENTATION_EMPTY_SHELL when face count after Perform is zero */
3HEADER;
4FILE_DESCRIPTION(('Tsh174'),'2;1');
5FILE_NAME('Tsh174.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('',(2.0,0.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,1.0);
18#9=LINE('',#1,#8);
19#10=EDGE_CURVE('',#4,#5,#9,.T.);
20#11=DIRECTION('',(1.0,0.0,0.0));
21#12=VECTOR('',#11,1.0);
22#13=LINE('',#2,#12);
23#14=EDGE_CURVE('',#5,#6,#13,.T.);
24#15=DIRECTION('',(-1.0,0.0,0.0));
25#16=VECTOR('',#15,1.0);
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.0,0.0));
39#30=CARTESIAN_POINT('',(-1.0,0.0,0.0));
40#31=CARTESIAN_POINT('',(-2.0,0.0,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,1.0);
46#37=LINE('',#29,#36);
47#38=EDGE_CURVE('',#32,#33,#37,.T.);
48#39=DIRECTION('',(-1.0,0.0,0.0));
49#40=VECTOR('',#39,1.0);
50#41=LINE('',#30,#40);
51#42=EDGE_CURVE('',#33,#34,#41,.T.);
52#43=DIRECTION('',(1.0,0.0,0.0));
53#44=VECTOR('',#43,1.0);
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=OPEN_SHELL('',(#28,#56));
67#58=SHELL_BASED_SURFACE_MODEL('',(#57));
68#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
69#9051=PRODUCT('Tsh174','Tsh174','',(#9050));
70#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
71#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
72#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
73#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
74#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
75#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
76#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
77#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
78#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
79#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#58),#9060);
80#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
81ENDSEC;
82END-ISO-10303-21;