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

Method test_eps_edge_intersection

python/pymesh/tests/test_boolean.py:237–252  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

235 self.assertEqual(1, mesh.num_components)
236
237 def test_eps_edge_intersection(self):
238 eps = np.finfo(np.float64).eps
239 mesh_1 = generate_box_mesh(
240 np.array([0, 0, 0]), np.array([1, 1, 1]))
241 mesh_2 = generate_box_mesh(
242 np.array([0, 1-eps, 1-eps]), np.array([1, 2, 2]))
243
244 mesh = boolean(
245 mesh_1, mesh_2,
246 "intersection", "igl")
247 bbox = mesh.bbox
248 self.assert_array_equal(np.array([0, 1-eps, 1-eps]), bbox[0])
249 self.assert_array_equal(np.array([1, 1, 1]), bbox[1])
250 self.assertTrue(mesh.is_manifold())
251 self.assertTrue(mesh.is_closed())
252 self.assertEqual(1, mesh.num_components)
253
254 def test_eps_face_intersection(self):
255 eps = np.finfo(np.float64).eps

Callers

nothing calls this directly

Calls 5

generate_box_meshFunction · 0.90
booleanFunction · 0.90
assert_array_equalMethod · 0.80
is_manifoldMethod · 0.45
is_closedMethod · 0.45

Tested by

no test coverage detected