meshing.cell_edge_incidence

meshing.cell_edge_incidence(edges, grid)

Group crossing edges by the grid cells they border.

Every axis-aligned edge touches up to four cells; cells outside the grid are dropped. The result covers exactly the active cells: cells with at least one crossing edge on their boundary.