Me1044 — stitch_borders non-manifold-pair-filter: manifold_halfedge_pairs filter rejects candidate that would create edge shared by 3 triangles (Branch 5)

§12.14 mesh defects (sub-class: non_manifold_edge / manifold-pair-filter)

topology

Sources

Description

Three triangles where t0=(v0,v1,v2) and t2=(v0,v6,v1) already share edge (v0,v1) making it interior (n=2). Triangle t1=(v3,v4,v5) is a coincident ghost with v3≈v0, v4≈v1, v5≈v2. A candidate stitch of t1's boundary edge (v3,v4) onto (v0,v1) would create a non-manifold edge (n=3). The manifold_halfedge_pairs filter rejects this pair. Branch 5 fires when the filter evaluates and rejects the non-manifold candidate.

Reproducer recipe

v0=(0,0,0), v1=(1,0,0), v2=(0.5,1,0), v3=(0,0,0)[=v0], v4=(1,0,0)[=v1], v5=(0.5,1,0)[=v2], v6=(0.5,-1,0); t0=(v0,v1,v2), t1=(v3,v4,v5), t2=(v0,v6,v1); assert_edge_shared(v0,v1,2); vertex_pair_distance_lt(v0,v3,1e-9); vertex_pair_distance_lt(v1,v4,1e-9).

Expected kernel behavior

Branch 5 fires; manifold_halfedge_pairs evaluates the candidate pair (h on (v3,v4), h' on (v0,v1)) and rejects it because stitching would create an edge shared by 3 triangles.

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      0.0,
20      0.0,
21      0.0
22    ],
23    [
24      1.0,
25      0.0,
26      0.0
27    ],
28    [
29      0.5,
30      1.0,
31      0.0
32    ],
33    [
34      0.5,
35      -1.0,
36      0.0
37    ]
38  ],
39  "triangles": [
40    [
41      0,
42      1,
43      2
44    ],
45    [
46      3,
47      4,
48      5
49    ],
50    [
51      0,
52      6,
53      1
54    ]
55  ],
56  "metadata": {
57    "id": "Me1044",
58    "schema_version": 0,
59    "defect_class": "non_manifold_edge",
60    "title": "stitch_borders non-manifold-pair-filter: manifold_halfedge_pairs filter rejects candidate that would create edge shared by 3 triangles",
61    "assertions": [
62      {
63        "kind": "edge_shared_by_n_triangles",
64        "edge": [
65          0,
66          1
67        ],
68        "n": 2
69      },
70      {
71        "kind": "vertex_pair_distance_lt",
72        "pair": [
73          0,
74          3
75        ],
76        "lt": 1e-09
77      },
78      {
79        "kind": "vertex_pair_distance_lt",
80        "pair": [
81          1,
82          4
83        ],
84        "lt": 1e-09
85      },
86      {
87        "kind": "vertex_pair_distance_lt",
88        "pair": [
89          2,
90          5
91        ],
92        "lt": 1e-09
93      },
94      {
95        "kind": "edge_shared_by_n_triangles",
96        "edge": [
97          3,
98          4
99        ],
100        "n": 1
101      },
102      {
103        "kind": "edge_shared_by_n_triangles",
104        "edge": [
105          4,
106          5
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          1,
122          2
123        ],
124        "n": 1
125      },
126      {
127        "kind": "edge_shared_by_n_triangles",
128        "edge": [
129          0,
130          2
131        ],
132        "n": 1
133      },
134      {
135        "kind": "edge_shared_by_n_triangles",
136        "edge": [
137          0,
138          6
139        ],
140        "n": 1
141      },
142      {
143        "kind": "edge_shared_by_n_triangles",
144        "edge": [
145          1,
146          6
147        ],
148        "n": 1
149      }
150    ]
151  }
152}