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

Function test_create_polygons

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

Source from the content-addressed store, hash-verified

201}
202
203void test_create_polygons( const geode::PolygonalSurface3D& polygonal_surface,
204 geode::PolygonalSurfaceBuilder3D& builder )
205{
206 builder.create_polygon( { 0, 1, 2 } );
207 builder.create_polygon( { 1, 3, 4, 2 } );
208 builder.create_polygon( { 1, 5, 6, 3 } );
209 geode::OpenGeodeMeshException::test(
210 !polygonal_surface.is_vertex_isolated( 0 ),
211 "Vertices should not be isolated after polygons creation" );
212 geode::OpenGeodeMeshException::test( polygonal_surface.nb_polygons() == 3,
213 "PolygonalSurface should have 3 polygons" );
214 geode::OpenGeodeMeshException::test(
215 polygonal_surface.edges().nb_edges() == 9,
216 "PolygonalSurface should have 9 edges" );
217 geode::PolygonVertices answer{ 1, 3, 4, 2 };
218 geode::OpenGeodeMeshException::test(
219 polygonal_surface.polygon_vertices( 1 ) == answer,
220 "Wrong polygon vertices list" );
221}
222
223void test_create_edge_attribute(
224 const geode::PolygonalSurface3D& polygonal_surface )

Callers 1

testFunction · 0.70

Calls 6

create_polygonMethod · 0.80
nb_polygonsMethod · 0.80
polygon_verticesMethod · 0.80
testFunction · 0.70
is_vertex_isolatedMethod · 0.45
nb_edgesMethod · 0.45

Tested by

no test coverage detected