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

Method test_square_2

python/pymesh/meshutils/tests/test_cut_mesh.py:28–44  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

26 self.assertEqual(2, cutted_mesh.num_components)
27
28 def test_square_2(self):
29 vertices = np.array([
30 [ 0.0, 0.0],
31 [ 1.0, 0.0],
32 [ 0.0, 1.0],
33 [ 1.0, 1.0],
34 ], dtype=float)
35 faces = np.array([
36 [0, 1, 2],
37 [2, 1, 3],
38 ], dtype=int)
39
40 mesh = form_mesh(vertices, faces)
41 cutted_mesh = cut_mesh(mesh, [1, 1])
42
43 self.assertEqual(4, cutted_mesh.num_vertices)
44 self.assertEqual(1, cutted_mesh.num_components)

Callers

nothing calls this directly

Calls 2

form_meshFunction · 0.90
cut_meshFunction · 0.90

Tested by

no test coverage detected