| 199 | } |
| 200 | |
| 201 | void test_delete_polygon( const geode::TriangulatedSurface3D& surface, |
| 202 | geode::TriangulatedSurfaceBuilder3D& builder ) |
| 203 | { |
| 204 | std::vector< bool > to_delete( surface.nb_polygons(), false ); |
| 205 | to_delete.front() = true; |
| 206 | builder.delete_polygons( to_delete ); |
| 207 | geode::OpenGeodeMeshException::test( surface.nb_polygons() == 2, |
| 208 | "TriangulatedSurface should have 2 polygons" ); |
| 209 | geode::OpenGeodeMeshException::test( |
| 210 | surface.polygon_vertex( { 0, 0 } ) == 3, |
| 211 | "TriangulatedSurface edge vertex index is not correct" ); |
| 212 | geode::OpenGeodeMeshException::test( |
| 213 | surface.polygon_vertex( { 0, 1 } ) == 2, |
| 214 | "TriangulatedSurface edge vertex index is not correct" ); |
| 215 | geode::OpenGeodeMeshException::test( |
| 216 | surface.polygon_vertex( { 0, 2 } ) == 1, |
| 217 | "TriangulatedSurface edge vertex index is not correct" ); |
| 218 | builder.edges_builder().delete_isolated_edges(); |
| 219 | geode::OpenGeodeMeshException::test( surface.edges().nb_edges() == 5, |
| 220 | "TriangulatedSurface should have 5 edges" ); |
| 221 | } |
| 222 | |
| 223 | void test_io( |
| 224 | const geode::TriangulatedSurface3D& surface, std::string_view filename ) |
no test coverage detected