Me1082 — remove_degenerate_faces adjacent_degenerate_faces_missed: three collinear triangles in chain; faces_to_visit walk expands partial range (Branch 3)

§12.14 mesh defects (sub-class: degenerate-triangle / adjacent-expansion)

topology

Sources

Description

Three collinear zero-area triangles (t0,t1,t2) sharing edges in a chain plus a clean control triangle (t3). t0=(v0,v1,v2) and t1=(v1,v2,v3) share edge (v1,v2); t0 and t2=(v0,v1,v3) share edge (v0,v1); t1 and t2 share edge (v1,v3). When repair is invoked with only t0 in the initial range (is_range_full_mesh=false), the faces_to_visit walk finds t1 and t2 as adjacent degenerate neighbors and expands the degenerate set → Branch 3 fires.

Reproducer recipe

v0=(0,0,0), v1=(1,0,0), v2=(2,0,0), v3=(3,0,0); t0=(v0,v1,v2), t1=(v1,v2,v3), t2=(v0,v1,v3); assert_triangle_area_lt(t0,t1,t2,1e-12); assert_edge_shared(v1,v2,2); assert_edge_shared(v0,v1,2); assert_edge_shared(v1,v3,2).

Expected kernel behavior

Branch 3 fires; is_range_full_mesh is false for the initial single-triangle range; faces_to_visit walk adds t1 and t2 to the degenerate set; all three are processed together.

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      2.0,
15      0.0,
16      0.0
17    ],
18    [
19      3.0,
20      0.0,
21      0.0
22    ],
23    [
24      5.0,
25      0.0,
26      0.0
27    ],
28    [
29      6.0,
30      0.0,
31      0.0
32    ],
33    [
34      5.5,
35      1.0,
36      0.0
37    ]
38  ],
39  "triangles": [
40    [
41      0,
42      1,
43      2
44    ],
45    [
46      1,
47      2,
48      3
49    ],
50    [
51      0,
52      1,
53      3
54    ],
55    [
56      4,
57      5,
58      6
59    ]
60  ],
61  "metadata": {
62    "id": "Me1082",
63    "schema_version": 0,
64    "defect_class": "degenerate_triangle",
65    "title": "remove_degenerate_faces adjacent_degenerate_faces_missed: three collinear triangles in chain; faces_to_visit walk expands partial range (Branch 3)",
66    "assertions": [
67      {
68        "kind": "triangle_area_lt",
69        "triangle": 0,
70        "lt": 1e-12
71      },
72      {
73        "kind": "triangle_area_lt",
74        "triangle": 1,
75        "lt": 1e-12
76      },
77      {
78        "kind": "triangle_area_lt",
79        "triangle": 2,
80        "lt": 1e-12
81      },
82      {
83        "kind": "edge_shared_by_n_triangles",
84        "edge": [
85          1,
86          2
87        ],
88        "n": 2
89      },
90      {
91        "kind": "edge_shared_by_n_triangles",
92        "edge": [
93          0,
94          1
95        ],
96        "n": 2
97      },
98      {
99        "kind": "edge_shared_by_n_triangles",
100        "edge": [
101          1,
102          3
103        ],
104        "n": 2
105      }
106    ]
107  }
108}