Me912 — di_cell.selectIntersections info-list-initialization: hub triangle intersects two others; NULL→new List then reuse (Branch 3)

§12.14 mesh defects (sub-class: di_cell / info-list-initialization)

topology

Sources

Description

Three-triangle mesh with a central hub t0=(v0=(0,0,0), v1=(4,0,0), v2=(2,4,0)) — a large flat triangle in the XY plane. t1=(v3=(1,1,-1), v4=(1,1,1), v5=(-1,3,0)): edge (v3,v4) pierces t0's interior at (1,1,0). t2=(v6=(3,1,-1), v7=(3,1,1), v8=(5,3,0)): edge (v6,v7) pierces t0's interior at (3,1,0). All three triangles have disjoint vertex sets. When di_cell.selectIntersections records t0's first SI partner (t1), t0->info == NULL → allocates a new List (Branch 3 init). When recording the second partner (t2), t0->info != NULL → appends to the existing list (Branch 3 reuse). Both info-list paths exercised.

Reproducer recipe

v0=(0,0,0), v1=(4,0,0), v2=(2,4,0); v3=(1,1,-1), v4=(1,1,1), v5=(-1,3,0); v6=(3,1,-1), v7=(3,1,1), v8=(5,3,0); t0=(v0,v1,v2), t1=(v3,v4,v5), t2=(v6,v7,v8); assert_triangles_self_intersect(0,1); assert_triangles_self_intersect(0,2).

Expected kernel behavior

Branch 3 fires twice: first for t1 (NULL → new List), then for t2 (not NULL → appendHead reuses list). Both intersection records stored in t0->info.

Expected validation

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes
1{
2  "vertices": [
3    [
4      0.0,
5      0.0,
6      0.0
7    ],
8    [
9      1.0,
10      0.0,
11      0.0
12    ],
13    [
14      0.0,
15      1.0,
16      0.0
17    ],
18    [
19      -1.0,
20      0.0,
21      0.0
22    ],
23    [
24      0.0,
25      -1.0,
26      0.0
27    ]
28  ],
29  "triangles": [
30    [
31      0,
32      1,
33      2
34    ],
35    [
36      0,
37      2,
38      3
39    ],
40    [
41      0,
42      3,
43      4
44    ],
45    [
46      0,
47      4,
48      1
49    ]
50  ],
51  "metadata": {
52    "id": "Me941",
53    "schema_version": 0,
54    "defect_class": "inconsistent_face_orientation",
55    "title": "orient_polygon_soup edge_map_fill: four-triangle fan; orienter.fill_edge_map() populates 4 interior shared edges (Branch 2)",
56    "assertions": [
57      {
58        "kind": "edge_shared_by_n_triangles",
59        "edge": [
60          0,
61          1
62        ],
63        "n": 2
64      },
65      {
66        "kind": "edge_shared_by_n_triangles",
67        "edge": [
68          0,
69          2
70        ],
71        "n": 2
72      },
73      {
74        "kind": "edge_shared_by_n_triangles",
75        "edge": [
76          0,
77          3
78        ],
79        "n": 2
80      },
81      {
82        "kind": "edge_shared_by_n_triangles",
83        "edge": [
84          0,
85          4
86        ],
87        "n": 2
88      },
89      {
90        "kind": "edge_shared_by_n_triangles",
91        "edge": [
92          1,
93          2
94        ],
95        "n": 1
96      },
97      {
98        "kind": "edge_shared_by_n_triangles",
99        "edge": [
100          2,
101          3
102        ],
103        "n": 1
104      },
105      {
106        "kind": "edge_shared_by_n_triangles",
107        "edge": [
108          3,
109          4
110        ],
111        "n": 1
112      },
113      {
114        "kind": "edge_shared_by_n_triangles",
115        "edge": [
116          1,
117          4
118        ],
119        "n": 1
120      },
121      {
122        "kind": "euler_characteristic",
123        "v": 5,
124        "e": 8,
125        "f": 4,
126        "chi": 1
127      }
128    ]
129  }
130}