Skip to content

shore.mesh.edge ​

Edge: arc descriptor for a structured block edge.

Edge dataclass ​

python
Edge(
    index: int,
    name: EdgeName,
    axis: Literal['i', 'j', 'k'] | None,
    vertex_indices: tuple[int, int],
    n_nodes: int,
    spacing: Spacing1D,
    association: Association | None = None,
    first_step: float | None = None,
    last_step: float | None = None,
)

source

One edge of a structured block.

Parameters

  • index — 0-based index within the block's edge list.
  • name — Canonical name encoding the two constant axes, e.g. "j_lo_k_lo".
  • axis — The free axis along which this edge runs ('i', 'j', or 'k'), or None for non-axis-aligned edges (future use).
  • vertex_indices — Indices of the two endpoint vertices in the block's vertex list.
  • n_nodes — Number of nodes along this edge.
  • spacing — 1D spacing law for node distribution along this edge.
  • association — Geometry this edge's nodes are projected onto (ADR 0003), or None.
  • first_step, last_step — Optional per-vertex first / last interval lengths. When set, the topology / primitive builder treats them as a C1 matching request at that endpoint of the edge: the first (or last) cell along the edge will have this physical length, with the interior shaped by spacing. When unset (None), the edge is built purely from spacing with no endpoint pinning. Setting these does not require spacing.law == 'pinned': the consumer is free to read the steps and switch laws as needed. At corners where multiple incident edges request different first/last steps, the builder applies a precedence rule (cap / body geometry wins) and emits a UserWarning naming the overridden edges.

Edge.body_projected property ​

python
body_projected: bool

source

True when associated with a whole body (legacy flag, read-only).

Edge.nodes method ​

python
nodes(block: Block) -> np.ndarray

source

Return a (n_nodes, 3) view of this edge's node coordinates.

Released under the MIT License.