datastructures

Mesh

The mesh is implemented as a half-edge datastructure. It is meant for the representation of polygonal “surface” meshes. A mesh can be connected or disconnected. A mesh can be closed or open. A mesh can be comprised of only vertices.

Classes

Mesh

Definition of a mesh.

Functions

mesh_adjacency_matrix

Creates a vertex adjacency matrix from a Mesh datastructure.

mesh_bounding_box

Compute the (axis aligned) bounding box of a mesh.

mesh_bounding_box_xy

Compute the (axis aligned) bounding box of a projection of the mesh in the XY plane.

mesh_connectivity_matrix

Creates a connectivity matrix from a Mesh datastructure.

mesh_contours_numpy

Compute the contours of the mesh.

mesh_contours_pymesh

mesh_degree_matrix

Creates a vertex degree matrix from a Mesh datastructure.

mesh_delete_duplicate_vertices

Cull all duplicate vertices of a mesh and sanitize affected faces.

mesh_dual

Construct the dual of a mesh.

mesh_face_adjacency

Build a face adjacency dict.

mesh_face_matrix

Construct the face matrix from a Mesh datastructure.

mesh_flatness

Compute mesh flatness per face.

mesh_flip_cycles

Flip the cycle directions of all faces.

mesh_geodesic_distances

mesh_is_connected

Verify that the mesh is connected.

mesh_isolines_numpy

Compute the isolines of a specified attribute of the vertices of a mesh.

mesh_laplacian_matrix

Construct a Laplacian matrix with uniform weights from a mesh data structure.

mesh_planarize_faces

Planarise a set of connected faces.

mesh_quads_to_triangles

mesh_smooth_centroid

Smooth a mesh by moving every free vertex to the centroid of its neighbors.

mesh_smooth_area

Smooth a mesh by moving each vertex to the barycenter of the centroids of the surrounding faces, weighted by area.

mesh_subdivide

Subdivide the input mesh.

mesh_subdivide_tri

Subdivide a mesh using simple insertion of vertices.

mesh_subdivide_corner

Subdivide a mesh by cutting croners.

mesh_subdivide_quad

Subdivide a mesh such that all faces are quads.

mesh_subdivide_catmullclark

Subdivide a mesh using the Catmull-Clark algorithm.

mesh_subdivide_doosabin

Subdivide a mesh following the doo-sabin scheme.

mesh_transform

Transform a mesh.

mesh_transformed

Transform a copy of mesh.

mesh_unify_cycles

Unify the cycle directions of all faces.

trimesh_cotangent_laplacian_matrix

Construct the Laplacian of a triangular mesh with cotangent weights.

trimesh_face_circle

Get data on circumcentre of triangular face.

trimesh_gaussian_curvature

Compute the gaussian curvature at the vertices of a triangle mesh using the angular deficit.

trimesh_mean_curvature

trimesh_remesh

Remesh until all edges have a specified target length.

trimesh_subdivide_loop

Subdivide a triangle mesh using the Loop algorithm.

trimesh_vertexarea_matrix

Compute the n x n diagonal matrix of per-vertex voronoi areas.

Network

The network is a connectivity graph. It is meant for the representation of networks of vertices connected by edges. The edges are directed. A network does not have faces. A network can be connected or disconnected. A network with vertices only is also a valid network.

Classes

Network

Definition of a network.

Functions

network_complement

Generate the complement network of a network.

network_count_crossings

Count the number of crossings (pairs of crossing edges) in the network.

network_dual

Construct the dual of a network.

network_embed_in_plane

Embed the network in the plane.

network_find_crossings

Identify all pairs of crossing edges in a network.

network_find_faces

Find the faces of a network.

network_is_connected

Verify that the network is connected.

network_is_crossed

Verify if a network has crossing edges.

network_is_planar

Check if the network is planar.

network_is_planar_embedding

Verify that a network is embedded in the plane without crossing edges.

network_is_xy

Verify that a network lies in the XY plane.

network_smooth_centroid

Smooth a network by moving each vertex to the centroid of its neighbors.

VolMesh

The volmesh is a cellular mesh. It is implemented as a half-plane, the three-dimensional equivalent of a half-edge. It can, for example, be used for the representation of subdivided/partitioned polyhedra.

Classes

VolMesh

Class for working with volumetric meshes.

Functions