| 20 | }; |
| 21 | |
| 22 | TEST_F(MeshSeparatorTest, single_surface_component) { |
| 23 | Mesh::Ptr mesh = load_mesh("cube.obj"); |
| 24 | const auto faces = MatrixUtils::reshape<MatrixIr>(mesh->get_faces(), |
| 25 | mesh->get_num_faces(), mesh->get_vertex_per_face()); |
| 26 | MeshSeparator separator(faces); |
| 27 | size_t num_comps = separator.separate(); |
| 28 | ASSERT_EQ(1, num_comps); |
| 29 | |
| 30 | auto comp = separator.get_component(0); |
| 31 | ASSERT_EQ(mesh->get_num_faces(), comp.rows()); |
| 32 | assert_sources_are_correct(faces, comp, separator.get_sources(0)); |
| 33 | } |
| 34 | |
| 35 | TEST_F(MeshSeparatorTest, single_volume_component) { |
| 36 | Mesh::Ptr mesh = load_mesh("cube.msh"); |
nothing calls this directly
no test coverage detected