Block.dual

Block.dual(cls=None, include_boundary=False)

Construct the dual of a mesh.

Parameters:
meshcompas.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.

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.subdivided("corner")
>>> dual = mesh.dual(include_boundary=True)