MCPcopy Create free account
hub / github.com/Geode-solutions/OpenGeode / test_delete_all

Function test_delete_all

tests/mesh/test-hybrid-solid.cpp:434–459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

432}
433
434void 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
461void test()
462{

Callers 1

testFunction · 0.70

Calls 13

nb_polyhedraMethod · 0.80
delete_polyhedraMethod · 0.80
facets_builderMethod · 0.80
emptyMethod · 0.80
testFunction · 0.70
nb_verticesMethod · 0.45
is_vertex_isolatedMethod · 0.45
delete_isolated_edgesMethod · 0.45
edges_builderMethod · 0.45
nb_facetsMethod · 0.45
nb_edgesMethod · 0.45

Tested by

no test coverage detected