crop, shape, mode='full')[source]

Removes vertices that lie outside the specifed shape

  • network (dict) – Dictionary containing vert.coords and edge.conns arrays

  • shape (array_like) – The [x, y, z] shape of the domain beyond which trimming should be applied

  • mode (str) –

    Controls how vertices to be trimmed is determined. Options are:

    • ’full’:

      Any vertices lying outside the domain are trimmed

    • ’mixed’

      Vertices with at least one neighbor lying inside the domain are kept