Expand description
Reaction / network edge shafts in document space.
Ports the Python draw/arrows.py route cleanup + paint helpers so hosts
share one implementation (orthogonal stays axis-aligned; polyline fillets).
Structs§
- Edge
Paint In - Minimal shaft/head paint request (host supplies resolved route points).
Enums§
- Edge
Prim - One SVG-ish path or text fragment for overlays.
Constants§
- ANCHOR_
GAP - Gap from molecule viewport edge to shaft anchors (document px).
- KINK_PX
- Flatten tiny orthogonal/polyline jogs under this length (px).
- TURN_
RADIUS - Corner fillet radius for non-orthogonal (polyline) bends (px).
Functions§
- axis_
aligned - True when every segment is horizontal or vertical.
- clip_
box_ edge - Axis-aligned box around
(cx,cy)clipped toward(tx,ty). - edge_
anchors - Viewport-boundary anchors between two molecule boxes.
- edge_
primitives - Build overlay primitives for one edge given a resolved route.
- filleted_
path_ d - Polyline with quadratic fillets at corners (larger
radius→ softer turns). - shaft_
path_ d - Path
dfor a shaft: fillet polyline turns; keep orthogonal H/V sharp. - should_
fillet - Fillet soft polyline turns; keep orthogonal shafts axis-aligned.
- simplify_
route - Drop near-duplicates and flatten kinks under
kink_px.
Type Aliases§
- Pt
- Document-space point.