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

Method test_face_edge_touch

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

Source from the content-addressed store, hash-verified

342 self.assertEqual(1, mesh.num_components)
343
344 def test_face_edge_touch(self):
345 mesh_1 = generate_box_mesh(
346 np.array([0, 0, 0]), np.array([1, 1, 1]))
347
348 rot = Quaternion.fromData(
349 np.array([1, 0, 1], dtype=float),
350 np.array([0, 0, 1], dtype=float))
351 mesh_2 = form_mesh(
352 np.dot(rot.to_matrix(), mesh_1.vertices.T).T +
353 np.array([0.5, 0.5, 1.0]),
354 mesh_1.faces)
355
356 mesh = boolean(mesh_1, mesh_2, "union", "igl")
357
358 self.assertEqual(17, mesh.num_vertices)
359 self.assertEqual(30, mesh.num_faces)
360 self.assertFalse(mesh.is_manifold())
361 self.assertTrue(mesh.is_closed())
362 self.assertEqual(1, mesh.num_components)
363
364 #@unittest.skip("this causes crash")
365 def test_union_with_rotated_self(self):

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