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

Function test_edges

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

Source from the content-addressed store, hash-verified

77}
78
79void test_edges( const geode::PolyhedralSolid3D& polyhedral_solid )
80{
81 geode::Point3D answer{ { 1.1, 4.8, 3.5 } };
82 const auto vertices = polyhedral_solid.edges().edge_vertices( 0 );
83 geode::OpenGeodeMeshException::test(
84 polyhedral_solid.edge_barycenter( vertices ) == answer,
85 "Wrong edge barycenter" );
86 geode::OpenGeodeMeshException::test(
87 polyhedral_solid.edge_length( vertices ) - 11.3842 < 1e-6,
88 "Wrong edge length" );
89}
90
91void test_create_polyhedra( const geode::PolyhedralSolid3D& polyhedral_solid,
92 geode::PolyhedralSolidBuilder3D& builder )

Callers 1

testFunction · 0.70

Calls 4

edge_verticesMethod · 0.80
testFunction · 0.70
edge_barycenterMethod · 0.45
edge_lengthMethod · 0.45

Tested by

no test coverage detected