Me582 — Basic_TMesh.createSubMeshFromSelection no_seed: NULL seed triggers global FOREACHTRIANGLE scan; two disconnected visited components collected (Branch 3)

§12.14 mesh defects (sub-class: selection / no-seed-global-scan)

topology

Sources

Description

Two disconnected triangle pairs (Component A and Component B), all 4 triangles IS_VISITED. Component A: v0-v3 with tA0=(v0,v1,v2), tA1=(v3,v0,v2), interior edge (v0,v2) n=2. Component B: v4-v7 with tB0=(v4,v5,v6), tB1=(v7,v4,v6), interior edge (v4,v6) n=2. The caller passes NULL as the seed; Branch 3 fires. FOREACHTRIANGLE collects all 4 visited triangles regardless of connectivity. v1 and v5 (from different components) share no triangle, confirming disconnection. Euler: V=8, E=10, F=4, chi=2 (two separate open disks).

Reproducer recipe

Component A: v0=(0,0,0), v1=(1,0,0), v2=(0.5,1,0), v3=(-1,0,0); tA0=(v0,v1,v2), tA1=(v3,v0,v2). Component B: v4=(10,0,0), v5=(11,0,0), v6=(10.5,1,0), v7=(9,0,0); tB0=(v4,v5,v6), tB1=(v7,v4,v6). Interior edges n=2; all outer edges n=1; vertex_pair_no_shared_triangle(v1,v5); euler V=8,E=10,F=4,chi=2.

Expected kernel behavior

Branch 3 fires (t0==NULL); FOREACHTRIANGLE visits all 8 triangles in mesh order; the 4 IS_VISITED ones (all 4) are appended to sT; sub-mesh contains both disconnected components.

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.0,
20      0.0,
21      0.0
22    ],
23    [
24      10.0,
25      0.0,
26      0.0
27    ],
28    [
29      11.0,
30      0.0,
31      0.0
32    ],
33    [
34      10.5,
35      1.0,
36      0.0
37    ],
38    [
39      9.0,
40      0.0,
41      0.0
42    ]
43  ],
44  "triangles": [
45    [
46      0,
47      1,
48      2
49    ],
50    [
51      3,
52      0,
53      2
54    ],
55    [
56      4,
57      5,
58      6
59    ],
60    [
61      7,
62      4,
63      6
64    ]
65  ],
66  "metadata": {
67    "id": "Me582",
68    "schema_version": 0,
69    "defect_class": "mesh_selection",
70    "title": "createSubMeshFromSelection no_seed: NULL seed triggers global FOREACHTRIANGLE scan; two disconnected visited components both collected into sub-mesh (Branch 3)",
71    "assertions": [
72      {
73        "kind": "edge_shared_by_n_triangles",
74        "edge": [
75          0,
76          2
77        ],
78        "n": 2
79      },
80      {
81        "kind": "edge_shared_by_n_triangles",
82        "edge": [
83          0,
84          1
85        ],
86        "n": 1
87      },
88      {
89        "kind": "edge_shared_by_n_triangles",
90        "edge": [
91          1,
92          2
93        ],
94        "n": 1
95      },
96      {
97        "kind": "edge_shared_by_n_triangles",
98        "edge": [
99          0,
100          3
101        ],
102        "n": 1
103      },
104      {
105        "kind": "edge_shared_by_n_triangles",
106        "edge": [
107          2,
108          3
109        ],
110        "n": 1
111      },
112      {
113        "kind": "edge_shared_by_n_triangles",
114        "edge": [
115          4,
116          6
117        ],
118        "n": 2
119      },
120      {
121        "kind": "edge_shared_by_n_triangles",
122        "edge": [
123          4,
124          5
125        ],
126        "n": 1
127      },
128      {
129        "kind": "edge_shared_by_n_triangles",
130        "edge": [
131          5,
132          6
133        ],
134        "n": 1
135      },
136      {
137        "kind": "edge_shared_by_n_triangles",
138        "edge": [
139          4,
140          7
141        ],
142        "n": 1
143      },
144      {
145        "kind": "edge_shared_by_n_triangles",
146        "edge": [
147          6,
148          7
149        ],
150        "n": 1
151      },
152      {
153        "kind": "vertex_pair_no_shared_triangle",
154        "pair": [
155          1,
156          5
157        ]
158      },
159      {
160        "kind": "euler_characteristic",
161        "v": 8,
162        "e": 10,
163        "f": 4,
164        "chi": 2
165      }
166    ]
167  }
168}