26 template<
typename T >
30 std::cout << title <<
" =" << std::endl;
31 for(
auto element : container)
32 std::cout <<
" " << element << std::endl;
33 std::cout << std::endl;
51 typedef TopoHelpers::smart_ptr_mesh smart_ptr_mesh;
54 typedef TopoHelpers::face_descriptor face_descriptor;
111 TopoHelpers::link_vertex_and_edge(v1, e4, TopoHelpers::vertex_pos::FIRST);
112 TopoHelpers::link_vertex_and_edge(v2, e4, TopoHelpers::vertex_pos::SECOND);
115 TopoHelpers::link_vertex_and_edge(v7, e7, TopoHelpers::vertex_pos::FIRST);
116 TopoHelpers::link_vertex_and_edge(v8, e7, TopoHelpers::vertex_pos::SECOND);
119 TopoHelpers::link_vertex_and_edge(v4, e8, TopoHelpers::vertex_pos::FIRST);
120 TopoHelpers::link_vertex_and_edge(v10, e8, TopoHelpers::vertex_pos::SECOND);
123 TopoHelpers::link_vertex_and_edge(v0, e9, TopoHelpers::vertex_pos::FIRST);
124 TopoHelpers::link_vertex_and_edge(v3, e9, TopoHelpers::vertex_pos::SECOND);
127 TopoHelpers::link_vertex_and_edge(v4, e10, TopoHelpers::vertex_pos::FIRST);
128 TopoHelpers::link_vertex_and_edge(v5, e10, TopoHelpers::vertex_pos::SECOND);
131 TopoHelpers::link_vertex_and_edge(v5, e11, TopoHelpers::vertex_pos::FIRST);
132 TopoHelpers::link_vertex_and_edge(v0, e11, TopoHelpers::vertex_pos::SECOND);
135 TopoHelpers::link_vertex_and_edge(v1, e12, TopoHelpers::vertex_pos::FIRST);
136 TopoHelpers::link_vertex_and_edge(v5, e12, TopoHelpers::vertex_pos::SECOND);
139 TopoHelpers::link_vertex_and_edge(v1, e13, TopoHelpers::vertex_pos::FIRST);
140 TopoHelpers::link_vertex_and_edge(v0, e13, TopoHelpers::vertex_pos::SECOND);
143 TopoHelpers::link_vertex_and_edge(v6, e14, TopoHelpers::vertex_pos::FIRST);
144 TopoHelpers::link_vertex_and_edge(v2, e14, TopoHelpers::vertex_pos::SECOND);
147 TopoHelpers::link_vertex_and_edge(v0, e15, TopoHelpers::vertex_pos::FIRST);
148 TopoHelpers::link_vertex_and_edge(v2, e15, TopoHelpers::vertex_pos::SECOND);
151 TopoHelpers::link_vertex_and_edge(v3, e16, TopoHelpers::vertex_pos::FIRST);
152 TopoHelpers::link_vertex_and_edge(v11, e16, TopoHelpers::vertex_pos::SECOND);
155 TopoHelpers::link_vertex_and_edge(v11, e17, TopoHelpers::vertex_pos::FIRST);
156 TopoHelpers::link_vertex_and_edge(v1, e17, TopoHelpers::vertex_pos::SECOND);
159 TopoHelpers::link_vertex_and_edge(v12, e18, TopoHelpers::vertex_pos::FIRST);
160 TopoHelpers::link_vertex_and_edge(v3, e18, TopoHelpers::vertex_pos::SECOND);
163 TopoHelpers::link_vertex_and_edge(v0, e19, TopoHelpers::vertex_pos::FIRST);
164 TopoHelpers::link_vertex_and_edge(v12, e19, TopoHelpers::vertex_pos::SECOND);
168 TopoHelpers::link_edge_and_face(e11, f0);
169 TopoHelpers::link_edge_and_face(e12, f0);
170 TopoHelpers::link_edge_and_face(e13, f0);
173 TopoHelpers::link_edge_and_face(e4, f4);
174 TopoHelpers::link_edge_and_face(e13, f4);
175 TopoHelpers::link_edge_and_face(e15, f4);
178 TopoHelpers::link_edge_and_face(e9, f5);
179 TopoHelpers::link_edge_and_face(e13, f5);
180 TopoHelpers::link_edge_and_face(e17, f5);
181 TopoHelpers::link_edge_and_face(e16, f5);
184 TopoHelpers::link_edge_and_face(e18, f6);
185 TopoHelpers::link_edge_and_face(e9, f6);
186 TopoHelpers::link_edge_and_face(e19, f6);
189 std::cout <<
"Input mesh:\n";
194 std::cout <<
"testing is_2_manifold_vertex(v0)" << std::endl;
195 assert((TopoHelpers::is_2_manifold_vertex(v0) ==
false));
197 std::cout <<
"testing is_2_manifold_vertex(v1)" << std::endl;
198 assert((TopoHelpers::is_2_manifold_vertex(v1) ==
false));
200 std::cout <<
"testing is_2_manifold_vertex(v2)" << std::endl;
201 assert((TopoHelpers::is_2_manifold_vertex(v2) ==
false));
203 std::cout <<
"testing is_2_manifold_vertex(v3)" << std::endl;
204 assert((TopoHelpers::is_2_manifold_vertex(v3) ==
true));
206 std::cout <<
"testing is_2_manifold_vertex(v4)" << std::endl;
207 assert((TopoHelpers::is_2_manifold_vertex(v4) ==
false));
209 std::cout <<
"testing is_2_manifold_vertex(v5)" << std::endl;
210 assert((TopoHelpers::is_2_manifold_vertex(v5) ==
false));
212 std::cout <<
"testing is_2_manifold_vertex(v6)" << std::endl;
213 assert((TopoHelpers::is_2_manifold_vertex(v6) ==
false));
215 std::cout <<
"testing is_2_manifold_vertex(v7)" << std::endl;
216 assert((TopoHelpers::is_2_manifold_vertex(v7) ==
false));
218 std::cout <<
"testing is_2_manifold_vertex(v8)" << std::endl;
219 assert((TopoHelpers::is_2_manifold_vertex(v8) ==
false));
221 std::cout <<
"testing is_2_manifold_vertex(v9)" << std::endl;
222 assert((TopoHelpers::is_2_manifold_vertex(v9) ==
false));
224 std::cout <<
"testing is_2_manifold_vertex(v10)" << std::endl;
225 assert((TopoHelpers::is_2_manifold_vertex(v10) ==
false));
227 std::cout <<
"testing is_2_manifold_vertex(v11)" << std::endl;
228 assert((TopoHelpers::is_2_manifold_vertex(v11) ==
true));
230 std::cout <<
"testing is_2_manifold_vertex(v12)" << std::endl;
231 assert((TopoHelpers::is_2_manifold_vertex(v12) ==
true));
235 std::cout <<
"testing is_2_manifold_edge(e4)" << std::endl;
236 assert((TopoHelpers::is_2_manifold_edge(e4) ==
false));
238 std::cout <<
"testing is_2_manifold_edge(e7)" << std::endl;
239 assert((TopoHelpers::is_2_manifold_edge(e7) ==
false));
241 std::cout <<
"testing is_2_manifold_edge(e8)" << std::endl;
242 assert((TopoHelpers::is_2_manifold_edge(e8) ==
false));
244 std::cout <<
"testing is_2_manifold_edge(e9)" << std::endl;
245 assert((TopoHelpers::is_2_manifold_edge(e9) ==
false));
247 std::cout <<
"testing is_2_manifold_edge(e10)" << std::endl;
248 assert((TopoHelpers::is_2_manifold_edge(e10) ==
false));
250 std::cout <<
"testing is_2_manifold_edge(e11)" << std::endl;
251 assert((TopoHelpers::is_2_manifold_edge(e11) ==
false));
253 std::cout <<
"testing is_2_manifold_edge(e12)" << std::endl;
254 assert((TopoHelpers::is_2_manifold_edge(e12) ==
false));
256 std::cout <<
"testing is_2_manifold_edge(e13)" << std::endl;
257 assert((TopoHelpers::is_2_manifold_edge(e13) ==
false));
259 std::cout <<
"testing is_2_manifold_edge(e14)" << std::endl;
260 assert((TopoHelpers::is_2_manifold_edge(e14) ==
false));
262 std::cout <<
"testing is_2_manifold_edge(e15)" << std::endl;
263 assert((TopoHelpers::is_2_manifold_edge(e15) ==
false));
265 std::cout <<
"testing is_2_manifold_edge(e16)" << std::endl;
266 assert((TopoHelpers::is_2_manifold_edge(e16) ==
true));
268 std::cout <<
"testing is_2_manifold_edge(e17)" << std::endl;
269 assert((TopoHelpers::is_2_manifold_edge(e17) ==
false));
271 std::cout <<
"testing is_2_manifold_edge(e18)" << std::endl;
272 assert((TopoHelpers::is_2_manifold_edge(e18) ==
true));
274 std::cout <<
"testing is_2_manifold_edge(e19)" << std::endl;
275 assert((TopoHelpers::is_2_manifold_edge(e19) ==
false));
279 std::cout <<
"testing is_one_ring_2_manifold(v0)" << std::endl;
280 assert((TopoHelpers::is_one_ring_2_manifold(v0) ==
false));
282 std::cout <<
"testing is_one_ring_2_manifold(v1)" << std::endl;
283 assert((TopoHelpers::is_one_ring_2_manifold(v1) ==
false));
285 std::cout <<
"testing is_one_ring_2_manifold(v2)" << std::endl;
286 assert((TopoHelpers::is_one_ring_2_manifold(v2) ==
false));
288 std::cout <<
"testing is_one_ring_2_manifold(v3)" << std::endl;
289 assert((TopoHelpers::is_one_ring_2_manifold(v3) ==
false));
291 std::cout <<
"testing is_one_ring_2_manifold(v4)" << std::endl;
292 assert((TopoHelpers::is_one_ring_2_manifold(v4) ==
false));
294 std::cout <<
"testing is_one_ring_2_manifold(v5)" << std::endl;
295 assert((TopoHelpers::is_one_ring_2_manifold(v5) ==
false));
297 std::cout <<
"testing is_one_ring_2_manifold(v6)" << std::endl;
298 assert((TopoHelpers::is_one_ring_2_manifold(v6) ==
false));
300 std::cout <<
"testing is_one_ring_2_manifold(v7)" << std::endl;
301 assert((TopoHelpers::is_one_ring_2_manifold(v7) ==
false));
303 std::cout <<
"testing is_one_ring_2_manifold(v8)" << std::endl;
304 assert((TopoHelpers::is_one_ring_2_manifold(v8) ==
false));
306 std::cout <<
"testing is_one_ring_2_manifold(v9)" << std::endl;
307 assert((TopoHelpers::is_one_ring_2_manifold(v9) ==
false));
309 std::cout <<
"testing is_one_ring_2_manifold(v10)" << std::endl;
310 assert((TopoHelpers::is_one_ring_2_manifold(v10) ==
false));
312 std::cout <<
"testing is_one_ring_2_manifold(v11)" << std::endl;
313 assert((TopoHelpers::is_one_ring_2_manifold(v11) ==
false));
315 std::cout <<
"testing is_one_ring_2_manifold(v12)" << std::endl;
316 assert((TopoHelpers::is_one_ring_2_manifold(v12) ==
false));
318 std::cout <<
"Test passed.\n";