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

Method test_square

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

Source from the content-addressed store, hash-verified

8
9class CutMeshTest(TestCase):
10 def test_square(self):
11 vertices = np.array([
12 [ 0.0, 0.0, 0.0],
13 [ 1.0, 0.0, 0.0],
14 [ 0.0, 1.0, 0.0],
15 [ 1.0, 1.0, 0.0],
16 ], dtype=float)
17 faces = np.array([
18 [0, 1, 2],
19 [2, 1, 3],
20 ], dtype=int)
21
22 mesh = form_mesh(vertices, faces)
23 cutted_mesh = cut_mesh(mesh, [0, 1])
24
25 self.assertEqual(6, cutted_mesh.num_vertices)
26 self.assertEqual(2, cutted_mesh.num_components)
27
28 def test_square_2(self):
29 vertices = np.array([

Callers

nothing calls this directly

Calls 2

form_meshFunction · 0.90
cut_meshFunction · 0.90

Tested by

no test coverage detected