Mesh.dual
- Mesh.dual(cls=None, include_boundary=False)[source]
Construct the dual of a mesh.
- Parameters:
- mesh
compas.datastructures.Mesh
A mesh object.
- clsType[
compas.datastructures.Mesh
], optional The type of the dual mesh. Defaults to the type of the provided mesh object.
- include_boundary: bool, optional
Whether to include boundary faces for the dual mesh If True, create faces on boundaries including all original mesh boundary vertices.
- mesh
- Returns:
compas.datastructures.Mesh
The dual mesh object.
Examples
>>> import compas >>> from compas.datastructures import Mesh >>> mesh = Mesh.from_obj(compas.get('faces.obj')) >>> mesh.delete_face(11) >>> mesh.delete_face(6) >>> mesh.delete_face(7) >>> mesh.quads_to_triangles() >>> mesh = mesh.subdivide('corner') >>> dual = mesh.dual(include_boundary=True)