Me664 — merge_duplicate_points_in_polygon_soup polygon_remap: w1==w4 at (1,0,0); point_index[4] remapped to 1; polygon[i]=point_index[polygon[i]] rewrites t2 and t3 (Branch 5)

§12.14 mesh defects (sub-class: near-coincident-vertex / polygon-index-remap)

topology

Sources

Description

Four triangles with 6 input vertices. w1 and w4 both sit at (1,0,0); point_index[4] is set to point_index[1] during the dedup scan. The polygon remap loop (Branch 5) then iterates every polygon and every vertex index, replacing index 4 with 1 in triangles t2 and t3. Interior edges (w1,w2), (w2,w3), (w3,w4) n=2; six outer edges n=1. Euler: V=6, E=9, F=4, chi=1.

Reproducer recipe

w0=(0,0,0), w1=(1,0,0), w2=(0.5,1,0), w3=(1.5,1,0), w4=(1,0,0) [=w1], w5=(2,0,0); t0=(w0,w1,w2), t1=(w1,w3,w2), t2=(w4,w5,w3), t3=(w4,w3,w2); interior edges n=2; outer edges n=1; vertex_pair_distance_lt(w1,w4,1e-9); vertex_pair_no_shared_triangle(w1,w4); euler V=6,E=9,F=4,chi=1.

Expected kernel behavior

Branch 5 fires; polygon_remap loop processes all 4 polygons; t2 index 4 rewritten to 1 and t3 index 4 rewritten to 1; unique polygon soup with 5 distinct coordinate entries produced.

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.5,
15      1.0,
16      0.0
17    ],
18    [
19      1.5,
20      1.0,
21      0.0
22    ],
23    [
24      1.0,
25      0.0,
26      0.0
27    ],
28    [
29      2.0,
30      0.0,
31      0.0
32    ]
33  ],
34  "triangles": [
35    [
36      0,
37      1,
38      2
39    ],
40    [
41      1,
42      3,
43      2
44    ],
45    [
46      4,
47      5,
48      3
49    ],
50    [
51      4,
52      3,
53      2
54    ]
55  ],
56  "metadata": {
57    "id": "Me664",
58    "schema_version": 0,
59    "defect_class": "near_coincident_vertex",
60    "title": "merge_duplicate_points_in_polygon_soup polygon_remap: w1==w4 at (1,0,0); point_index[4] remapped to 1; polygon[i]=point_index[polygon[i]] rewrites t2 and t3 (Branch 5)",
61    "assertions": [
62      {
63        "kind": "edge_shared_by_n_triangles",
64        "edge": [
65          1,
66          2
67        ],
68        "n": 2
69      },
70      {
71        "kind": "edge_shared_by_n_triangles",
72        "edge": [
73          2,
74          3
75        ],
76        "n": 2
77      },
78      {
79        "kind": "edge_shared_by_n_triangles",
80        "edge": [
81          3,
82          4
83        ],
84        "n": 2
85      },
86      {
87        "kind": "edge_shared_by_n_triangles",
88        "edge": [
89          0,
90          1
91        ],
92        "n": 1
93      },
94      {
95        "kind": "edge_shared_by_n_triangles",
96        "edge": [
97          0,
98          2
99        ],
100        "n": 1
101      },
102      {
103        "kind": "edge_shared_by_n_triangles",
104        "edge": [
105          1,
106          3
107        ],
108        "n": 1
109      },
110      {
111        "kind": "edge_shared_by_n_triangles",
112        "edge": [
113          3,
114          5
115        ],
116        "n": 1
117      },
118      {
119        "kind": "edge_shared_by_n_triangles",
120        "edge": [
121          4,
122          5
123        ],
124        "n": 1
125      },
126      {
127        "kind": "edge_shared_by_n_triangles",
128        "edge": [
129          2,
130          4
131        ],
132        "n": 1
133      },
134      {
135        "kind": "vertex_pair_distance_lt",
136        "pair": [
137          1,
138          4
139        ],
140        "lt": 1e-09
141      },
142      {
143        "kind": "vertex_pair_no_shared_triangle",
144        "pair": [
145          1,
146          4
147        ]
148      },
149      {
150        "kind": "euler_characteristic",
151        "v": 6,
152        "e": 9,
153        "f": 4,
154        "chi": 1
155      }
156    ]
157  }
158}