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

Method test_eps_face_intersection

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

Source from the content-addressed store, hash-verified

252 self.assertEqual(1, mesh.num_components)
253
254 def test_eps_face_intersection(self):
255 eps = np.finfo(np.float64).eps
256 mesh_1 = generate_box_mesh(
257 np.array([0, 0, 0]), np.array([1, 1, 1]))
258 mesh_2 = generate_box_mesh(
259 np.array([0, 0, 1-eps]), np.array([1, 1, 2]))
260
261 mesh = boolean(
262 mesh_1, mesh_2,
263 "intersection", "igl")
264 bbox = mesh.bbox
265 self.assert_array_equal(np.array([0, 0, 1-eps]), bbox[0])
266 self.assert_array_equal(np.array([1, 1, 1]), bbox[1])
267 self.assertTrue(mesh.is_manifold())
268 self.assertTrue(mesh.is_closed())
269 self.assertEqual(1, mesh.num_components)
270
271 def test_edge_edge_touch_with_different_length(self):
272 mesh_1 = generate_box_mesh(

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