meshing.feature_cell_links
meshing.feature_cell_links(feature_mask, incidence, grid, *, junction_mask=None)
Link feature cells that are lattice neighbors (diagonals included).
A feature curve — a crease, a corner fan, a CSG seam — crosses cells diagonally as often as it crosses them face-to-face, so consecutive feature cells along the curve are generally not connected by a mesh edge; drawing the sharp mesh edges instead produces a staircase around the true curve. Because feature-aware vertex placement puts every feature cell’s vertex exactly on the curve, connecting neighboring feature vertices directly yields chords of the true curve.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| feature_mask | np.ndarray | Boolean mask over incidence rows selecting feature cells (creases, corners, seams). | required |
| incidence | CellIncidence | Cell-to-edge mapping whose rows the mask indexes. | required |
| grid | GridSpec | The sampling grid (for lattice strides). | required |
| junction_mask | np.ndarray | None | Optional boolean mask over incidence rows marking junction cells (corners). A link between two cells that share a junction neighbor is a shortcut across the junction — the true feature path runs through it — and is dropped. | None |
Returns
| Name | Type | Description |
|---|---|---|
| np.ndarray | Unordered incidence-row pairs shaped (link_count, 2); each pair |
|
| np.ndarray | of cells is within Chebyshev distance 1 of the other. |