| 432 | } |
| 433 | |
| 434 | void test_delete_all( const geode::HybridSolid3D& hybrid_solid, |
| 435 | geode::HybridSolidBuilder3D& builder ) |
| 436 | { |
| 437 | std::vector< bool > to_delete( hybrid_solid.nb_polyhedra(), true ); |
| 438 | builder.delete_polyhedra( to_delete ); |
| 439 | |
| 440 | geode::OpenGeodeMeshException::test( hybrid_solid.nb_vertices() == 11, |
| 441 | "HybridSolid should have 11 vertices" ); |
| 442 | geode::OpenGeodeMeshException::test( hybrid_solid.is_vertex_isolated( 0 ), |
| 443 | "Vertices should be isolated after polyhedra deletion" ); |
| 444 | geode::OpenGeodeMeshException::test( hybrid_solid.nb_polyhedra() == 0, |
| 445 | "HybridSolid should have 0 polyhedron" ); |
| 446 | builder.edges_builder().delete_isolated_edges(); |
| 447 | builder.facets_builder().delete_isolated_facets(); |
| 448 | geode::OpenGeodeMeshException::test( hybrid_solid.facets().nb_facets() == 0, |
| 449 | "HybridSolid should have 0 facet" ); |
| 450 | geode::OpenGeodeMeshException::test( hybrid_solid.edges().nb_edges() == 0, |
| 451 | "HybridSolid should have 0 edge" ); |
| 452 | geode::OpenGeodeMeshException::test( |
| 453 | hybrid_solid.polyhedra_around_vertex( 0 ).empty(), |
| 454 | "No more polyhedra around vertices" ); |
| 455 | |
| 456 | builder.delete_isolated_vertices(); |
| 457 | geode::OpenGeodeMeshException::test( hybrid_solid.nb_vertices() == 0, |
| 458 | "[Test]HybridSolid should have 0 vertex" ); |
| 459 | } |
| 460 | |
| 461 | void test() |
| 462 | { |
no test coverage detected