trimesh_isolines

compas_libigl.trimesh_isolines(M, S, N=50)

Compute isolines on a triangle mesh using a scalarfield of data points assigned to its vertices.

Parameters
Mtuple or compas.datastructures.Mesh

A mesh represented by a list of vertices and a list of faces or by a COMPAS mesh object.

Slist

A list of scalars.

Nint, optional

The number of isolines. Default is 50.

Returns
tuple
  1. The coordinates of the polyline segments representing the isolines.

  2. The segments of the polylines.

Examples

>>> import compas
>>> import compas_libigl
>>> from compas.datastructures import Mesh
>>> mesh = Mesh.from_off(compas.get('tubemesh.off'))
>>> mesh.quads_to_triangles()
>>> M = mesh.to_vertices_and_faces()
>>> scalars = mesh.vertices_attribute('z')
>>> vertices, edges = compas_libigl.trimesh_isolines(M, scalars, 50)

To convert the vertices and edges to sets of isolines, use groupsort_isolines()