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

Method test_2D

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

Source from the content-addressed store, hash-verified

8else:
9 class TriangulateTest(TestCase):
10 def test_2D(self):
11 vertices = np.array([
12 [0, 0],
13 [1, 0],
14 [1, 1],
15 [0, 1] ], dtype=float)
16 segments = np.array([
17 [0, 1],
18 [1, 2],
19 [2, 3],
20 [3, 0] ], dtype=int)
21
22 vertices, faces = triangulate(vertices, segments, 0.1)
23 self.assertLess(4, len(vertices))
24 self.assertLess(2, len(faces))
25 self.assert_array_almost_equal([1.0, 1.0], np.amax(vertices, axis=0))
26 self.assert_array_almost_equal([0.0, 0.0], np.amin(vertices, axis=0))
27
28 def test_3D(self):
29 vertices = np.array([

Callers

nothing calls this directly

Calls 2

triangulateFunction · 0.50

Tested by

no test coverage detected