mosaic.utils.cull_mesh

Contents

mosaic.utils.cull_mesh#

mosaic.utils.cull_mesh(ds_base, cells_to_cull)#

Cull cells from a mesh using a cell mask

The function removes cells based on the cells_to_cull mask, where a True value means the cell will be culled.

Parameters:
  • ds_base (Dataset) – Input mesh dataset, with zero-based connectivity arrays

  • cells_to_cull (ndarray) – Mask of cells to be culled (True where cells should be culled).

Returns:

A culled mesh dataset, where indexToCellID, indexToEdgeID, and indexToVertexID arrays have been added, which act as lookup tables for data array from the base (ie. unculled) mesh

Return type:

Dataset