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

Method test_coplanar

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

Source from the content-addressed store, hash-verified

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(
26 np.array([0, 0, 0]), np.array([1, 1, 1]))
27 path = np.array([ [0, 0, 0], [1e-12, 0, 0] ])
28
29 output_mesh = minkowski_sum(input_mesh, path)
30 self.assertTrue(output_mesh.is_closed())
31 self.assertTrue(output_mesh.is_oriented())
32 self.assertTrue(output_mesh.num_boundary_edges == 0)
33
34 input_bbox_min, input_bbox_max = input_mesh.bbox
35 output_bbox_min, output_bbox_max = output_mesh.bbox
36
37 self.assert_array_equal(input_bbox_min, output_bbox_min)
38 self.assert_array_almost_equal([1e-12, 0, 0],
39 output_bbox_max - input_bbox_max)
40
41 def test_near_coplanar(self):
42 input_mesh = generate_box_mesh(

Callers

nothing calls this directly

Calls 6

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