trimesh_isolines
- trimesh_isolines(M, S, N=50)[source]
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
.
- Mtuple or
- Returns:
- tuple
The coordinates of the polyline segments representing the isolines.
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()