Block.offset

Block.offset(distance=1.0)

Generate an offset mesh.

Parameters:
distancefloat, optional

The offset distance.

Returns:
compas.datastructures.Mesh

The offset mesh.

Notes

If the offset distance is a positive value, the offset is in the direction of the vertex normal. If the value is negative, the offset is in the opposite direction. In both cases, the orientation of the offset mesh is the same as the orientation of the original.

In areas with high degree of curvature, the offset mesh can have self-intersections.

Examples

>>> from compas.datastructures import Mesh
>>> from compas.geometry import distance_point_point as dist
>>> mesh = Mesh.from_vertices_and_faces([[0, 0, 0], [1, 0, 0], [1, 1, 0], [0, 1, 0]], [[0, 1, 2, 3]])
>>> mesh.offset()  
<compas.datastructures.mesh.mesh.Mesh object at ...>