ElkSharp — Node Slot Lattice (per-kind port metadata)

Status: Introduced by Sprint 20260420.013 (BK Phase A — port-slot lattice). Consumers: ElkOrthogonalRouter (Sprint 16+), future ElkBrandesKopfPlacement (Sprint 14+). Source: src/__Libraries/StellaOps.ElkSharp/ElkNodeSlotLattice.cs.

What is the lattice?

For every ElkNode.Kind that the Stella Ops workflow engine emits, the lattice declares a fixed set of slots on the node’s boundary. Each slot is a tuple (face, fractionAlongFace, direction) where:

The lattice is static per kind. Slot counts, positions, and direction restrictions are hard-coded; no per-instance configuration. Unknown kinds fall through to the rectangular default.

Per-kind declarations

KindFaces & slotsDirection
Start1 slot on SOUTH, centred (0.5)OutgoingOnly
End1 slot on NORTH, centred (0.5)IncomingOnly
Task, SetState, BusinessReference, TransportCall, ServiceCall, Timer, Repeat3 slots each on E/W faces (0.25, 0.5, 0.75); 5 slots each on N/S faces (0.17, 0.33, 0.5, 0.67, 0.83)Either
Decision (diamond)N tip (0.5) incoming; S tip (0.5) outgoing; E tip (0.5) and W tip (0.5) incoming-onlymixed (see column)
Fork, Join (hexagon)2 slots per N face (0.25, 0.75); 2 slots per S face (0.25, 0.75); E/W closedEither
Dummypoint — 1 slot on every face at 0.5Either

API surface

// Fetch all declared slots for a kind.
IReadOnlyList<ElkNodeSlot> ElkNodeSlotLattice.GetSlots(string kind);

// Resolve a slot to an absolute (x, y) point on a positioned node.
ElkPoint ElkNodeSlotLattice.ResolveSlotPoint(
    ElkPositionedNode node,
    ElkNodeSlot slot);

// Pick the best slot for an edge given its direction toward the other
// endpoint. Respects direction restrictions (IncomingOnly vs OutgoingOnly).
ElkNodeSlot? ElkNodeSlotLattice.ResolveSlotForEdge(
    ElkPositionedNode node,
    ElkPoint edgeDirection,
    bool isIncoming);

Consumer contract

Design notes