Tsh189 — ShapeAnalysis_Shell.BadEdges uninitialized compound

§12.3a shells (sub-class: initialization-order)

topology

Sources

Description

BadEdges() returns compound from uninitialized myBad without validation. Calling before Perform() completes exposes lazy-init violation. Shell contains degenerate zero-length edge to trigger analysis path.

Reproducer recipe

Expected kernel behavior

the shell holds one face with a zero-length edge — two of its vertices sit at the same point. Two requirements: the degenerate edge must be reported as bad, and a query for the bad-edge set must never return an empty default when the analysis behind it has not been run. An empty result that means "not computed yet" is indistinguishable from one that means "nothing wrong", and a caller cannot tell the difference; the query must run the analysis or refuse.

Notes

initialization-order; lazy-init; myBad.Extent; TopoDS_Compound

Expected validation

occt=shape(1)/shape(1) gmsh=shape(1) 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/* Tsh189: CLOSED_SHELL with ONE ADVANCED_FACE containing ZERO-LENGTH EDGE IS the BadEdges defect trigger; va and vb are COINCIDENT VERTICES at (0,0,0) — IS the zero-length edge source; e_zero IS EDGE_CURVE from va to vb at same point — IS the degenerate edge; e_bc IS edge from vb=(0,0,0) to vc=(1,0,0) — IS the second edge; e_ca IS edge from vc=(1,0,0) back to va=(0,0,0) — IS the third edge; triangle collapses: zero-length e_zero causes Perform() to halt early — IS the trigger path; BadEdges() returns myBad before population — IS the uninitialized compound defect; returned compound IS empty or uninitialized instead of containing e_zero — IS the defect; fix: BadEdges() must guard against pre-Perform call; Perform() must mark myBad before halt; emit E_BAD_EDGES_UNINITIALIZED when BadEdges() called before analysis completion */
3HEADER;
4FILE_DESCRIPTION(('Tsh189'),'2;1');
5FILE_NAME('Tsh189.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('',(0.0,0.0,0.0));
13#4=VERTEX_POINT('',#3);
14#5=CARTESIAN_POINT('',(1.0,0.0,0.0));
15#6=VERTEX_POINT('',#5);
16#7=DIRECTION('',(1.0,0.0,0.0));
17#8=VECTOR('',#7,0.0);
18#9=LINE('',#1,#8);
19#10=EDGE_CURVE('',#2,#4,#9,.T.);
20#11=DIRECTION('',(1.0,0.0,0.0));
21#12=VECTOR('',#11,1.0);
22#13=LINE('',#3,#12);
23#14=EDGE_CURVE('',#4,#6,#13,.T.);
24#15=DIRECTION('',(-1.0,0.0,0.0));
25#16=VECTOR('',#15,1.0);
26#17=LINE('',#5,#16);
27#18=EDGE_CURVE('',#6,#2,#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=CLOSED_SHELL('',(#28));
39#30=SHELL_BASED_SURFACE_MODEL('',(#29));
40#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
41#9051=PRODUCT('Tsh189','Tsh189','',(#9050));
42#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
43#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
44#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
45#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
46#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
47#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
48#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
49#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
50#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
51#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#30),#9060);
52#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
53ENDSEC;
54END-ISO-10303-21;