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

Function TEST_F

tests/tools/Tetrahedralization/TetGen/TetGenEngineTest.h:11–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9};
10
11TEST_F(TetGenEngineTest, simple) {
12 MatrixFr vertices(4, 3);
13 vertices << 0.0, 0.0, 0.0,
14 1.0, 0.0, 0.0,
15 0.0, 1.0, 0.0,
16 0.0, 0.0, 1.0;
17
18 MatrixIr faces(4, 3);
19 faces << 0, 2, 1,
20 1, 3, 0,
21 0, 3, 2,
22 1, 2, 3;
23
24 auto engine = TetrahedralizationEngine::create("tetgen");
25 ASSERT_TRUE(bool(engine));
26
27 engine->set_vertices(vertices);
28 engine->set_faces(faces);
29 engine->run();
30
31 const auto out_vertices = engine->get_vertices();
32 const auto out_faces = engine->get_faces();
33 const auto out_voxels = engine->get_voxels();
34
35 ASSERT_GE(out_vertices.rows(), 4);
36 ASSERT_EQ(out_vertices.cols(), 3);
37 ASSERT_GE(out_faces.rows(), 4);
38 ASSERT_EQ(out_faces.cols(), 3);
39 ASSERT_GT(out_voxels.rows(), 0);
40}
41
42TEST_F(TetGenEngineTest, cube) {
43 auto mesh = load_mesh("cube.obj");

Callers

nothing calls this directly

Calls 10

load_meshFunction · 0.85
extract_verticesFunction · 0.85
extract_facesFunction · 0.85
set_cell_sizeMethod · 0.80
set_verticesMethod · 0.45
set_facesMethod · 0.45
runMethod · 0.45
get_verticesMethod · 0.45
get_facesMethod · 0.45
get_voxelsMethod · 0.45

Tested by

no test coverage detected