Interacting with Passthrough Maps
Every passthrough channel in the system. Call new() to build the map and routing context, optionally route() required hops, then resolve() to fill channel-map chains.
Columns
Columns are automatically generated when passthrough_map.new() is called. Additional columns are not supported and may result in an error when parsing.
| Column | Description |
|---|---|
from_channel_type |
channel-map from type |
from-passthrough_channel_type |
passthrough face on the same side as from |
to-passthrough_channel_type |
passthrough face on the same side as to |
to_channel_type |
channel-map to type |
requirement |
user route() step number for this passthrough-channel mapping |
satisfaction |
resolve() route() step number (always >= requirement when both set) |
is_imaginary |
TRUE if this mapping was minted because no real passthrough channel was available |
has_imaginary |
TRUE if this passthrough device has any imaginary channel mappings |
manual_map_passthrough_python_equiv |
passthrough_map.route() that would form this requirement |
Commands:
Use the following functions by first importing the module in your script like this: then use as written.
passthrough_map.new()
Create passthrough channel rows from placed-device signals lists.
Rebuilds system.passthrough_routing_context as one row per unique
(from_channel_type, to_channel_type) pair within each group_of_connected_harnesses, per
passthrough device, per directionality (1 / -1, or 0 if reversible), with an
availables count of passthrough channels that obey that directionality.
Does not route channels or fill channel-map chains (see resolve()).
passthrough_map.route(to_from_channel_device_refdes, to_from_channel_id, intended_device_refdes, intended_channel_id=None, repeat_channel_id=None, satisfaction=False)
Route a mapped channel through a passthrough device.
Looks up the mapped channel's from→to types and group_of_connected_harnesses, finds the matching
routing-context row(s), picks a free passthrough channel that obeys directionality,
records the mapping on the passthrough map, and decrements
availables on the matching context row (never below 0).
repeat_channel_id is the face the from-side arrives on. Omit it to infer.
The passthrough device must belong to the same
group_of_connected_harnesses as the mapped channel.
By default writes requirement (user route). With satisfaction=True
(used by resolve), writes satisfaction instead.
Returns 0 on a real assignment, -1 if an imaginary passthrough-map row was appended
because availables was already 0.
passthrough_map.resolve()
Complete passthrough routing for each mapped channel (channel-map order).
Uses the routing context (filtered to group_of_connected_harnesses + from→to pair) to find the
fewest passthrough channels that connect from_harness → optional ordered
requirement waypoints → to_harness. Prefers paths with remaining
availables; if none exist, allows availables == 0 (imaginaries).
Gap fills call route(..., satisfaction=True). Existing requirement rows
get a satisfaction stamp. Writes chain_of_connectors and
chain_of_harnesses on each mapped channel-map row from the resulting path.
Stamps is_imaginary / has_imaginary on the passthrough map. Prints one
warning per passthrough that needed imaginary channels to satisfy the map.
No-op when passthrough_map.new() found no harness topology (empty parent
diagram / no harness-mated connectors): there is nothing to resolve.