Mesh.thickened

Mesh.thickened(thickness=1.0, both=True)[source]

Generate a thicknened mesh.

Parameters:
thicknessfloat, optional

The mesh thickness. This should be a positive value.

bothbool, optional

If true, the mesh is thickened on both sides of the original. Otherwise, the mesh is thickened on the side of the positive normal.

Returns:
compas.datastructures.Mesh

The thickened mesh.

Raises:
ValueError

If thickness is not a positive number.

Examples

>>> from compas.datastructures import Mesh
>>> mesh = Mesh.from_vertices_and_faces([[0, 0, 0], [1, 0, 0], [1, 1, 0], [0, 1, 0]], [[0, 1, 2, 3]])
>>> mesh.thicken(mesh)
<compas.datastructures.mesh.mesh.Mesh object at 0x109eaad60>