Load mesh from file. Args: filename: file to be loaded. If `filename` is absolute, that file is loaded. If `filename` is relative, it must be relative to the test data directory (`$PYMESH_PATH/tests/data/`). Returns:
(self, filename)
| 30 | self.assertTrue(os.path.exists(self.pymesh_path)) |
| 31 | |
| 32 | def load_mesh(self, filename): |
| 33 | """ Load mesh from file. |
| 34 | |
| 35 | Args: |
| 36 | filename: file to be loaded. |
| 37 | If `filename` is absolute, that file is loaded. |
| 38 | If `filename` is relative, it must be relative to the test data |
| 39 | directory (`$PYMESH_PATH/tests/data/`). |
| 40 | |
| 41 | Returns: |
| 42 | The Mesh object. |
| 43 | |
| 44 | Examples:: |
| 45 | class A(TestCase): |
| 46 | def test_A(self): |
| 47 | # To load cube.obj from test directory. |
| 48 | mesh = self.load_mesh("cube.obj") |
| 49 | |
| 50 | # To load cube.obj from the executable directory. |
| 51 | mesh2 = self.load_mesh(os.path.abspath("./cube.msh")) |
| 52 | |
| 53 | """ |
| 54 | self.assertTrue(os.path.exists(filename)) |
| 55 | return load_mesh(filename) |
| 56 | |
| 57 | def form_mesh(self, vertices, faces, voxels=None): |
| 58 | """ Convert raw mesh data into Mesh object. """ |
nothing calls this directly
no test coverage detected