trim_surface

ifermi.surface.trim_surface(reciprocal_cell, vertices, faces)[source]

Trim the surface to remove parts outside the cell boundaries.

Will add new triangles at the boundary edges as necessary to produce a smooth surface.

Parameters:
  • reciprocal_cell (ReciprocalCell) – The reciprocal space object.

  • vertices (ndarray) – A (n, 3) float array of the vertices in the isosurface.

  • faces (ndarray) – A (m, 3) int array of the faces of the isosurface.

Return type:

tuple[ndarray, ndarray]

Returns:

(vertices, faces) of the trimmed surface.