Me1179 — triangulate_hole.main planarity_check_needed: bbox+max_squared_distance computation for CDT2 planarity test; planar pentagon hole (Branch 3)

§12.14 mesh defects (sub-class: boundary_hole / triangulate-hole-planarity)

topology

Sources

Description

A planar regular pentagon hole bordered by five hat-triangles. When use_cdt is true, Branch 3 fires as triangulate_hole.main computes the bounding box of the hole boundary and measures max_squared_distance from each vertex to the fit plane. All pentagon corners lie on z=0, so max_squared_distance=0.0, which is below any positive threshold. CDT2 is eligible. V=10, E=15, F=5, chi=0.

Reproducer recipe

Pentagon corners p0=(0,0,0), p1=(2,0,0), p2=(2.6,1.9,0), p3=(1,3.1,0), p4=(-0.6,1.9,0); five hat outer vertices; five hat tris; hole_boundary [p0,p1,p2,p3,p4]; euler V=10,E=15,F=5,chi=0.

Expected kernel behavior

Branch 3 fires; bbox computed; max_squared_distance=0 (planar boundary); CDT2 planarity check passes; 2D CDT path eligible.

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      2.6,
15      1.9,
16      0.0
17    ],
18    [
19      1.0,
20      3.1,
21      0.0
22    ],
23    [
24      -0.6,
25      1.9,
26      0.0
27    ],
28    [
29      1.0,
30      -1.2,
31      0.0
32    ],
33    [
34      3.6,
35      0.8,
36      0.0
37    ],
38    [
39      3.0,
40      3.0,
41      0.0
42    ],
43    [
44      1.0,
45      4.3,
46      0.0
47    ],
48    [
49      -1.6,
50      3.0,
51      0.0
52    ]
53  ],
54  "triangles": [
55    [
56      0,
57      5,
58      1
59    ],
60    [
61      1,
62      6,
63      2
64    ],
65    [
66      2,
67      7,
68      3
69    ],
70    [
71      3,
72      8,
73      4
74    ],
75    [
76      4,
77      9,
78      0
79    ]
80  ],
81  "metadata": {
82    "id": "Me1179",
83    "schema_version": 0,
84    "defect_class": "boundary_hole",
85    "title": "triangulate_hole.main planarity_check_needed: bbox+max_squared_distance computed for CDT2 planarity test; planar pentagon hole (Branch 3)",
86    "assertions": [
87      {
88        "kind": "edge_shared_by_n_triangles",
89        "edge": [
90          0,
91          1
92        ],
93        "n": 1
94      },
95      {
96        "kind": "edge_shared_by_n_triangles",
97        "edge": [
98          1,
99          2
100        ],
101        "n": 1
102      },
103      {
104        "kind": "edge_shared_by_n_triangles",
105        "edge": [
106          2,
107          3
108        ],
109        "n": 1
110      },
111      {
112        "kind": "edge_shared_by_n_triangles",
113        "edge": [
114          3,
115          4
116        ],
117        "n": 1
118      },
119      {
120        "kind": "edge_shared_by_n_triangles",
121        "edge": [
122          0,
123          4
124        ],
125        "n": 1
126      },
127      {
128        "kind": "hole_boundary",
129        "loop": [
130          0,
131          1,
132          2,
133          3,
134          4
135        ]
136      },
137      {
138        "kind": "edge_shared_by_n_triangles",
139        "edge": [
140          0,
141          5
142        ],
143        "n": 1
144      },
145      {
146        "kind": "edge_shared_by_n_triangles",
147        "edge": [
148          1,
149          5
150        ],
151        "n": 1
152      },
153      {
154        "kind": "edge_shared_by_n_triangles",
155        "edge": [
156          1,
157          6
158        ],
159        "n": 1
160      },
161      {
162        "kind": "edge_shared_by_n_triangles",
163        "edge": [
164          2,
165          6
166        ],
167        "n": 1
168      },
169      {
170        "kind": "edge_shared_by_n_triangles",
171        "edge": [
172          2,
173          7
174        ],
175        "n": 1
176      },
177      {
178        "kind": "edge_shared_by_n_triangles",
179        "edge": [
180          3,
181          7
182        ],
183        "n": 1
184      },
185      {
186        "kind": "edge_shared_by_n_triangles",
187        "edge": [
188          3,
189          8
190        ],
191        "n": 1
192      },
193      {
194        "kind": "edge_shared_by_n_triangles",
195        "edge": [
196          4,
197          8
198        ],
199        "n": 1
200      },
201      {
202        "kind": "edge_shared_by_n_triangles",
203        "edge": [
204          4,
205          9
206        ],
207        "n": 1
208      },
209      {
210        "kind": "edge_shared_by_n_triangles",
211        "edge": [
212          0,
213          9
214        ],
215        "n": 1
216      },
217      {
218        "kind": "euler_characteristic",
219        "v": 10,
220        "e": 15,
221        "f": 5,
222        "chi": 0
223      }
224    ]
225  }
226}