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

Method test_simple

python/pymesh/tests/test_minkowski_sum.py:8–22  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6
7class MinkowskiSumTest(TestCase):
8 def test_simple(self):
9 input_mesh = generate_box_mesh(
10 np.array([0, 0, 0]), np.array([1, 1, 1]))
11 path = np.array([ [0, 0, 0], [1, 1, 1] ])
12
13 output_mesh = minkowski_sum(input_mesh, path)
14 self.assertTrue(output_mesh.is_closed())
15 self.assertTrue(output_mesh.is_oriented())
16 self.assertTrue(output_mesh.num_boundary_edges == 0)
17
18 input_bbox_min, input_bbox_max = input_mesh.bbox
19 output_bbox_min, output_bbox_max = output_mesh.bbox
20
21 self.assert_array_equal(input_bbox_min, output_bbox_min)
22 self.assert_array_equal([1, 1, 1], output_bbox_max - input_bbox_max)
23
24 def test_coplanar(self):
25 input_mesh = generate_box_mesh(

Callers

nothing calls this directly

Calls 5

generate_box_meshFunction · 0.90
minkowski_sumFunction · 0.90
assert_array_equalMethod · 0.80
is_closedMethod · 0.45
is_orientedMethod · 0.45

Tested by

no test coverage detected