mesh_contours_numpy

compas.datastructures.mesh_contours_numpy(mesh, levels=50, density=100)[source]

Compute the contours of the mesh.

Parameters
  • mesh (compas.datastructures.Mesh) – The mesh object.

  • levels (int, optional) – The number of contours.

  • density (int, optional) – The density of the interpolation grid.

Returns

  • list[float] – A list of levels.

  • list[list[float]] – A list of contours. The list of levels contains the z-values at each of the contours. Each contour is a list of paths, and each path is a list polygons.

Notes

The contours are defined as the isolines of the z-coordinates of the vertices of the mesh.