meshing.features.manifold_cell_incidence

meshing.features.manifold_cell_incidence(edges, grid, inside)

Group crossing edges by cell and by inside-corner component.

Uniform dual contouring places one vertex per active cell, which cannot represent two surface sheets crossing the same cell: their quads share the vertex and mesh edges end up bordered by four triangles. Following Manifold Dual Contouring, this variant splits every active cell into the connected components of its inside corners under the cell’s edge adjacency (corners connected along the twelve cell edges) and emits one incidence row per component. Each crossing edge joins the component of its inside endpoint, so a cell crossed by two sheets contributes two rows — two QEF vertices — and the quads of the two sheets stay disjoint. Cells crossed by a single sheet produce exactly the rows (and slot order) of :func:cell_edge_incidence.

Parameters

Name Type Description Default
edges CrossingEdges Crossing edges from :func:cadjoint.meshing.edge_detection.find_crossing_edges. required
grid GridSpec The sampling grid the edges were detected on. required
inside np.ndarray Boolean lattice shaped like :attr:GridSpec.lattice_shape; True where value - level < 0, matching the start_inside convention of the edge set. Only the corners of active cells are consulted. required

Returns

Name Type Description
CellIncidence Incidence rows keyed by (cell, component); cells rows may repeat
CellIncidence the same lattice cell.