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

Method test_3D

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

Source from the content-addressed store, hash-verified

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([
30 [0, 0, 0],
31 [1, 0, 1],
32 [1, 1, 1],
33 [0, 1, 0] ], dtype=float)
34 segments = np.array([
35 [0, 1],
36 [1, 2],
37 [2, 3],
38 [3, 0] ], dtype=int)
39 vertices, faces = triangulate(vertices, segments, 0.1)
40 self.assertLess(4, len(vertices))
41 self.assertLess(2, len(faces))
42 self.assert_array_almost_equal(
43 [1.0, 1.0, 1.0], np.amax(vertices, axis=0))
44 self.assert_array_almost_equal(
45 [0.0, 0.0, 0.0], np.amin(vertices, axis=0))
46
47 def test_refine(self):
48 vertices = np.array([

Callers

nothing calls this directly

Calls 2

triangulateFunction · 0.50

Tested by

no test coverage detected