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

Function test_delete_all

tests/mesh/test-polyhedral-solid.cpp:593–620  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

591}
592
593void test_delete_all( const geode::PolyhedralSolid3D& polyhedral_solid,
594 geode::PolyhedralSolidBuilder3D& builder )
595{
596 std::vector< bool > to_delete( polyhedral_solid.nb_polyhedra(), true );
597 builder.delete_polyhedra( to_delete );
598 geode::OpenGeodeMeshException::test( polyhedral_solid.nb_vertices() == 8,
599 "PolyhedralSolid should have 8 vertices" );
600 geode::OpenGeodeMeshException::test(
601 polyhedral_solid.is_vertex_isolated( 0 ),
602 "Vertices should be isolated after polyhedra deletion" );
603 geode::OpenGeodeMeshException::test( polyhedral_solid.nb_polyhedra() == 0,
604 "PolyhedralSolid should have 0 polyhedron" );
605 builder.edges_builder().delete_isolated_edges();
606 builder.facets_builder().delete_isolated_facets();
607 geode::OpenGeodeMeshException::test(
608 polyhedral_solid.facets().nb_facets() == 0,
609 "PolyhedralSolid should have 0 facet" );
610 geode::OpenGeodeMeshException::test(
611 polyhedral_solid.edges().nb_edges() == 0,
612 "PolyhedralSolid should have 0 edge" );
613 geode::OpenGeodeMeshException::test(
614 polyhedral_solid.polyhedra_around_vertex( 0 ).empty(),
615 "No more polyhedra around vertices" );
616
617 builder.delete_isolated_vertices();
618 geode::OpenGeodeMeshException::test( polyhedral_solid.nb_vertices() == 0,
619 "[Test]PolyhedralSolid should have 0 vertex" );
620}
621
622void test_texture( const geode::PolyhedralSolid3D& polyhedral_solid )
623{

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