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

Method test_chain

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

Source from the content-addressed store, hash-verified

57
58
59 def test_chain(self):
60 input_mesh = generate_box_mesh(
61 np.array([0, 0, 0]), np.array([1, 1, 1]))
62 path = np.array([
63 [0.0, 0.0, 0.0],
64 [1.0, 0.0, 0.0],
65 [1.0, 1.0, 0.0],
66 [0.0, 1.0, 0.0],
67 ])
68
69 output_mesh = minkowski_sum(input_mesh, path)
70 self.assertTrue(output_mesh.is_closed())
71 self.assertTrue(output_mesh.is_oriented())
72 self.assertEqual(1, output_mesh.num_components)
73
74 self_intersections = detect_self_intersection(output_mesh)
75 self.assertEqual(0, len(self_intersections))

Callers

nothing calls this directly

Calls 5

generate_box_meshFunction · 0.90
minkowski_sumFunction · 0.90
detect_self_intersectionFunction · 0.90
is_closedMethod · 0.45
is_orientedMethod · 0.45

Tested by

no test coverage detected