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

Method test_face_corner_touch

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

Source from the content-addressed store, hash-verified

302 self.assertEqual(0, mesh.num_components)
303
304 def test_face_corner_touch(self):
305 mesh_1 = generate_box_mesh(
306 np.array([0, 0, 0]), np.array([1, 1, 1]))
307
308 rot = Quaternion.fromData(
309 np.array([1, 1, 1], dtype=float),
310 np.array([0, 0, 1], dtype=float))
311 mesh_2 = form_mesh(
312 np.dot(rot.to_matrix(), mesh_1.vertices.T).T +
313 np.array([0.5, 0.5, 1.0]),
314 mesh_1.faces)
315
316 mesh = boolean(mesh_1, mesh_2, "union", "igl")
317
318 self.assertEqual(16, mesh.num_vertices)
319 self.assertEqual(26, mesh.num_faces)
320 self.assertFalse(mesh.is_manifold())
321 self.assertTrue(mesh.is_closed())
322 self.assertEqual(1, mesh.num_components)
323
324 def test_face_corner_touch_off_center(self):
325 mesh_1 = generate_box_mesh(

Callers

nothing calls this directly

Calls 7

generate_box_meshFunction · 0.90
form_meshFunction · 0.90
booleanFunction · 0.90
fromDataMethod · 0.80
to_matrixMethod · 0.80
is_manifoldMethod · 0.45
is_closedMethod · 0.45

Tested by

no test coverage detected