Skip to main content

Module arrows

Module arrows 

Source
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§

EdgePaintIn
Minimal shaft/head paint request (host supplies resolved route points).

Enums§

EdgePrim
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 d for 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.