MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / TEST

Function TEST

tests/tools/MeshUtils/VoxelUtilsTest.h:7–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <TestBase.h>
6
7TEST(VoxelUtilsTest, simple) {
8 using namespace PyMesh;
9 MatrixFr vertices(4, 3);
10 vertices << 0.0, 0.0, 0.0,
11 1.0, 0.0, 0.0,
12 0.0, 1.0, 0.0,
13 0.0, 0.0, 1.0;
14 MatrixIr tets(3, 4);
15 tets << 0, 1, 2, 3, // Positive
16 0, 0, 1, 2, // Degenerate
17 0, 1, 3, 2; // Inverted
18
19 auto orientations = VoxelUtils::get_tet_orientations(vertices, tets);
20 ASSERT_EQ(3, orientations.size());
21 ASSERT_LT(0, orientations[0]);
22 ASSERT_EQ(0, orientations[1]);
23 ASSERT_GT(0, orientations[2]);
24}
25
26TEST(VoxelUtilsTest, delaunay) {
27 using namespace PyMesh;

Callers

nothing calls this directly

Calls 3

get_tet_orientationsFunction · 0.85
is_delaunayFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected