FormDiagram.from_mesh

classmethod FormDiagram.from_mesh(mesh, **kwargs)

Construct a FormDiagram from a Mesh.

Parameters

mesh (compas.datastructures.Mesh) – The mesh to be taken as reference. The keys of the faces and vertices of the base mesh will be kept. Only the XY coordinates per vertex are stored. Z = 0.0

Returns

FormDiagram – A FormDiagram object.

Examples

>>> import compas
>>> from compas.datastructures import Mesh
>>> from compas_tna.diagrams import FormDiagram
>>> mesh = Mesh.from_obj(compas.get('faces.obj'))
>>> form = FormDiagram.from_mesh(mesh)
>>> form.plot()