boolean_intersection_mesh_mesh

compas_cgal.booleans.boolean_intersection_mesh_mesh(A, B)

Boolean intersection of two meshes.

Parameters:
Acompas_cgal.types.VerticesFaces

Mesh A.

Bcompas_cgal.types.VerticesFaces

Mesh B.

Returns:
compas_cgal.types.VerticesFacesNumpy

Examples

>>> from compas.geometry import Box, Sphere, Polyhedron
>>> from compas_cgal.booleans import boolean_intersection_mesh_mesh
>>> box = Box(1)
>>> sphere = Sphere(0.5, point=[1, 1, 1])
>>> A = box.to_vertices_and_faces(triangulated=True)
>>> B = sphere.to_vertices_and_faces(u=32, v=32, triangulated=True)
>>> C = boolean_intersection_mesh_mesh(A, B)
>>> shape = Polyhedron(*C)