|
4 | 4 | from mesh_model.mesh_struct.mesh_elements import Dart |
5 | 5 | import mesh_model.mesh_analysis as Mesh_analysis |
6 | 6 | from actions.triangular_actions import split_edge_ids |
| 7 | +from plots.mesh_plotter import plot_mesh |
7 | 8 |
|
8 | 9 |
|
9 | 10 | class TestMeshAnalysis(unittest.TestCase): |
@@ -37,10 +38,14 @@ def test_split_score(self): |
37 | 38 | nodes = [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 1.0], [2.0, 0.0]] |
38 | 39 | faces = [[0, 1, 2], [0, 2, 3], [1, 4, 2]] |
39 | 40 | cmap = Mesh(nodes, faces) |
| 41 | + plot_mesh(cmap) |
40 | 42 | split_edge_ids(cmap, 0, 2) |
41 | | - split_edge_ids(cmap, 1, 2) |
| 43 | + plot_mesh(cmap) |
| 44 | + split_edge_ids(cmap, 1, 2) # split impossible |
| 45 | + plot_mesh(cmap) |
42 | 46 | nodes_score, mesh_score, mesh_ideal_score = Mesh_analysis.global_score(cmap) |
43 | | - self.assertEqual((5, 1), (mesh_score, mesh_ideal_score)) |
| 47 | + plot_mesh(cmap) |
| 48 | + self.assertEqual((3, 1), (mesh_score, mesh_ideal_score)) |
44 | 49 |
|
45 | 50 | def test_find_template_opposite_node_not_found(self): |
46 | 51 | nodes = [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 1.0], [2.0, 0.0]] |
|
0 commit comments