neu_lib.mesh

A triangle mesh in nm, zyx, held as plain numpy arrays.

Classes

Mesh

Vertices in nm (zyx) and the triangles indexing them.

Module Contents

class neu_lib.mesh.Mesh

Vertices in nm (zyx) and the triangles indexing them.

normals_zyx is optional: pygfx computes flat shading without it, and a mesh read back from precomputed carries none.

classmethod from_precomputed(vertices_xyz_nm: Any, faces: Any, name: str | None = None) → Mesh

From xyz vertices, as the precomputed format stores them and neu_vol.readback.read_body_mesh returns them, flipped to zyx.

translate(offset_zyx_nm: Sequence[float]) → Mesh

A copy moved by offset_zyx_nm. Only vertices move; faces are indices and normals are directions.

property bbox: neu_lib.grid.BBox

Integer nm bounds; an empty box for an empty mesh.

faces: numpy.ndarray
name: str | None = None
normals_zyx: numpy.ndarray | None = None
vertices_zyx_nm: numpy.ndarray