Header menu logo issie

BusWireRoute Module

Types

Type Description

VertDistFromBoundingBox

Functions and values

Function or value Description

changeSegment segIndex newLength segments

Full Usage: changeSegment segIndex newLength segments

Parameters:
    segIndex : int
    newLength : float
    segments : Segment list

Returns: Segment list

update the length of a segment in a list of segments

segIndex : int
newLength : float
segments : Segment list
Returns: Segment list

copySegments wire refWire numOfSegsToCopy

Full Usage: copySegments wire refWire numOfSegsToCopy

Parameters:
    wire : Wire
    refWire : Wire
    numOfSegsToCopy : int

Returns: Segment list
wire : Wire
refWire : Wire
numOfSegsToCopy : int
Returns: Segment list

ensureBothNubs

Full Usage: ensureBothNubs

Returns: Wire -> Wire
Returns: Wire -> Wire

ensureStartingNub wire

Full Usage: ensureStartingNub wire

Parameters:
Returns: Wire

add a nub and zero length segment to the start of the wire if needed

wire : Wire
Returns: Wire

findWireSymbolIntersections model wire

Full Usage: findWireSymbolIntersections model wire

Parameters:
Returns: BoundingBox list

Checks if a wire intersects any symbol within +/- minWireSeparation Returns list of bounding boxes of symbols intersected by wire.

model : Model
wire : Wire
Returns: BoundingBox list

generateEndSegments startIndex numOfSegs wire

Full Usage: generateEndSegments startIndex numOfSegs wire

Parameters:
    startIndex : int
    numOfSegs : int
    wire : Wire

Returns: Segment list
startIndex : int
numOfSegs : int
wire : Wire
Returns: Segment list

getWireVertices wire

Full Usage: getWireVertices wire

Parameters:
Returns: XYPos list
wire : Wire
Returns: XYPos list

maxVertDistanceFromBox intersectedBoxes wireOrientation pos

Full Usage: maxVertDistanceFromBox intersectedBoxes wireOrientation pos

Parameters:
Returns: VertDistFromBoundingBox option

returns the maximum vertical distance of pos from intersectedBoxes as a VertDistFromBoundingBox or None if there are no intersections

intersectedBoxes : BoundingBox list
wireOrientation : Orientation
pos : XYPos
Returns: VertDistFromBoundingBox option

smartAutoroute model wire

Full Usage: smartAutoroute model wire

Parameters:
Returns: Wire

top-level function which replaces autoupdate and implements a smarter version of same it is called every time a new wire is created, so is easily tested.

model : Model
wire : Wire
Returns: Wire

snapToNet model wireToRoute

Full Usage: snapToNet model wireToRoute

Parameters:
Returns: Wire

Finds the first reference wire in a net and keeps the same segment lengths as much as possible based on a heuristic. Snap to net only implemented for one orientation

model : Model
wireToRoute : Wire
Returns: Wire

tryMaxDistance distances

Full Usage: tryMaxDistance distances

Parameters:
Returns: VertDistFromBoundingBox option
distances : VertDistFromBoundingBox option list
Returns: VertDistFromBoundingBox option

tryShiftHorizontalSeg callsLeft model intersectedBoxes wire

Full Usage: tryShiftHorizontalSeg callsLeft model intersectedBoxes wire

Parameters:
Returns: Wire option

Recursively shift horizontal seg up/down until no symbol intersections. Limit in recursion depth defined by argument callsLeft given to initial function call. Limit needed to prevent Issie from breaking when there are physically no possible routes that achieve 0 intersections. Returns None if no route found

callsLeft : int
model : Model
intersectedBoxes : BoundingBox list
wire : Wire
Returns: Wire option

tryShiftVerticalSeg model intersectedBoxes wire

Full Usage: tryShiftVerticalSeg model intersectedBoxes wire

Parameters:
Returns: Wire option

Try shifting vertical seg (index 3) to either - wireSeparationFromSymbol or + wireSeparationFromSymbol from the edge of all the intersectedBoundingBoxes symbols. Returns None if no route found.

model : Model
intersectedBoxes : BoundingBox list
wire : Wire
Returns: Wire option

updateWire model wire reverse

Full Usage: updateWire model wire reverse

Parameters:
Returns: Wire

Returns a single re-routed wire from the given model. First attempts partial autorouting, and defaults to full autorouting if this is not possible. Reverse indicates if the wire should be processed in reverse, used when an input port (end of wire) is moved.

model : Model
wire : Wire
reverse : bool
Returns: Wire

updateWires model compIdList diff

Full Usage: updateWires model compIdList diff

Parameters:
Returns: Model

Re-routes the wires in the model based on a list of components that have been altered. If the wire input and output ports are both in the list of moved components, it does not re-route wire but instead translates it. Keeps manual wires manual (up to a point). Otherwise it will auto-route wires connected to components that have moved

model : Model
compIdList : ComponentId list
diff : XYPos
Returns: Model

Type something to start searching.