route_pair
Routes a differential pair as two coupled traces along a chosen centreline, with gap held through bends and optional skew tuning.
Instructions
Route a differential pair as two coupled traces along a centreline you choose.
centreline_mm: [[x, y], ...] for the middle of the pair, from near the start pads to near the end pads; use 45-degree bends. Each trace is the centreline offset by (width + gap) / 2 with mitred corners, so the gap holds through bends, plus a short 45-degree fan-in to its pad. Which side is P is set by the start pads. If the end pads are the other way round the result says crossed=true: either approach the end pads from the other direction (no via), or pass a tail for one trace, [[x, y], {"via": [x, y]}, [x, y]], which changes layer at the via. p_head_mm / n_head_mm: explicit path from a trace's start pad to the trunk, for pins the automatic 45-degree fan-in cannot reach cleanly (e.g. through a gap in a pin row). Every 90-degree corner (typically where a trace leaves a pin) becomes two 45-degree bends, chamfer_mm along each leg (0 keeps hard corners). The shorter trace gets rounded bumps until the skew is within max_skew_mm. Nothing is written if the plan has conflicts (copper of other nets, holes, keepouts, the partner trace) or dry_run=true; the plan is returned either way.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tune | No | ||
| layer | No | top | |
| n_net | Yes | ||
| p_net | Yes | ||
| gap_mm | Yes | ||
| dry_run | No | ||
| width_mm | Yes | ||
| n_head_mm | No | ||
| n_tail_mm | No | ||
| p_head_mm | No | ||
| p_tail_mm | No | ||
| chamfer_mm | No | ||
| max_skew_mm | No | ||
| via_drill_mm | No | ||
| centreline_mm | Yes | ||
| via_diameter_mm | No |