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

Function test_delete_all

tests/mesh/test-polygonal-surface.cpp:608–628  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

606}
607
608void test_delete_all( const geode::PolygonalSurface3D& polygonal_surface,
609 geode::PolygonalSurfaceBuilder3D& builder )
610{
611 std::vector< bool > to_delete( polygonal_surface.nb_polygons(), true );
612 builder.delete_polygons( to_delete );
613 geode::OpenGeodeMeshException::test( polygonal_surface.nb_vertices() == 7,
614 "PolygonalSurface should have 7 vertices" );
615 geode::OpenGeodeMeshException::test( polygonal_surface.nb_polygons() == 0,
616 "PolygonalSurface should have 0 polygon" );
617 geode::OpenGeodeMeshException::test(
618 polygonal_surface.polygons_around_vertex( 0 ).empty(),
619 "No more polygon around vertices" );
620
621 builder.delete_isolated_vertices();
622 builder.edges_builder().delete_isolated_edges();
623 geode::OpenGeodeMeshException::test( polygonal_surface.nb_vertices() == 0,
624 "PolygonalSurface should have 0 vertex" );
625 geode::OpenGeodeMeshException::test(
626 polygonal_surface.edges().nb_edges() == 0,
627 "PolygonalSurface should have 0 edge" );
628}
629
630void test_non_manifold_surface()
631{

Callers 1

testFunction · 0.70

Calls 9

nb_polygonsMethod · 0.80
delete_polygonsMethod · 0.80
emptyMethod · 0.80
testFunction · 0.70
nb_verticesMethod · 0.45
delete_isolated_edgesMethod · 0.45
edges_builderMethod · 0.45
nb_edgesMethod · 0.45

Tested by

no test coverage detected