Me901 — orient_triangle_soup_with_reference_triangle_soup closest_face_search: three-sector fan; AABB closest_point_and_primitive returns valid reference face for each query centroid (Branch 2)

§12.14 mesh defects (sub-class: orientation-alignment / closest-face-search)

topology

Sources

Description

Three non-degenerate query triangles in a fan from hub=(0,0,0); three matching non-degenerate reference triangles at z=−1 with clear 1-to-1 spatial proximity. For each query triangle the centroid lies closest to the corresponding reference face; tree.closest_point_and_primitive returns a valid primitive → Branch 2 fires three times. Interior hub-spoke edges each n=2; three boundary outer edges n=1; Euler V=4, E=6, F=3, chi=1.

Reproducer recipe

hub=(0,0,0), a=(2,0,0), b=(-1,1.732,0), c=(-1,-1.732,0); r_hub=(0,0,-1), r_a=(2,0,-1), r_b=(-1,1.732,-1), r_c=(-1,-1.732,-1); t0=(hub,a,b), t1=(hub,b,c), t2=(hub,c,a); ref_t0=(r_hub,r_a,r_b), ref_t1=(r_hub,r_b,r_c), ref_t2=(r_hub,r_c,r_a); assert_edge_shared(hub,a,2), (hub,b,2), (hub,c,2); boundary outer edges n=1; euler V=4,E=6,F=3,chi=1.

Expected kernel behavior

Branch 2 fires for each of the three query triangles; closest_point_and_primitive returns a valid primitive (non-empty AABB result) and the corresponding reference normal is extracted for orientation comparison.

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      2.0,
10      0.0,
11      0.0
12    ],
13    [
14      1.0,
15      2.0,
16      0.0
17    ],
18    [
19      -1.0,
20      2.0,
21      0.0
22    ]
23  ],
24  "triangles": [
25    [
26      0,
27      1,
28      2
29    ],
30    [
31      0,
32      2,
33      3
34    ],
35    [
36      0,
37      3,
38      1
39    ]
40  ],
41  "metadata": {
42    "id": "Me650",
43    "schema_version": 0,
44    "defect_class": "orphaned_edge",
45    "title": "removeEdges list_head_initialization: non-empty mesh; E.head() initialises traversal pointer at first edge (Branch 1)",
46    "assertions": [
47      {
48        "kind": "edge_shared_by_n_triangles",
49        "edge": [
50          0,
51          1
52        ],
53        "n": 2
54      },
55      {
56        "kind": "edge_shared_by_n_triangles",
57        "edge": [
58          0,
59          2
60        ],
61        "n": 2
62      },
63      {
64        "kind": "edge_shared_by_n_triangles",
65        "edge": [
66          0,
67          3
68        ],
69        "n": 2
70      },
71      {
72        "kind": "edge_shared_by_n_triangles",
73        "edge": [
74          1,
75          2
76        ],
77        "n": 1
78      },
79      {
80        "kind": "edge_shared_by_n_triangles",
81        "edge": [
82          2,
83          3
84        ],
85        "n": 1
86      },
87      {
88        "kind": "edge_shared_by_n_triangles",
89        "edge": [
90          1,
91          3
92        ],
93        "n": 1
94      },
95      {
96        "kind": "euler_characteristic",
97        "v": 4,
98        "e": 6,
99        "f": 3,
100        "chi": 1
101      }
102    ]
103  }
104}