quickpaver.get_polygon_selection_with_dilation_3d#
- quickpaver.get_polygon_selection_with_dilation_3d(polygons: List[ndarray[tuple[Any, ...], dtype[float64]]] | List[List[Tuple[float, float]]], vertical_limits: ndarray[tuple[Any, ...], dtype[float64]] | List[List[Tuple[float, float]]], grid: RectilinearGrid, selection: ndarray[tuple[Any, ...], dtype[int64]] | None = None) ndarray[tuple[Any, ...], dtype[int64]][source]#
Extend the selections using binary dilation.
Note
Although there are for loops, this should be quite fast (>30s) even for grids with millions of meshes.
- Parameters:
polygon (Union[NDArrayFloat, List[Tuple[float, float]]]) – Coords of the exterior ring with shape (M, 2)
vertical_limits (Union[NDArrayFloat, List[Tuple[float, float]]]) – Top and bottom limits of the selections with shape (M, 2).
grid (RectilinearGrid) – The grid definition.
selection (Optional[NDArrayInt]) – An already existing selection as starting point. The default is None.