SegmentHelpers Module
Helpers to work with visual segments and nets Includes functions to remove overlapping same-net segments We can assume different-net segments never overlap.
Functions and values
Function or value | Description |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
visibleSegments wId model
Parameters:
ConnectionId
model : Model
Returns: XYPos list
|
The visible segments of a wire, as a list of vectors, from source end to target end. Note that in a wire with n segments a zero length (invisible) segment at any index [1..n-2] is allowed which if present causes the two segments on either side of it to coalesce into a single visible segment. A wire can have any number of visible segments - even 1.
|
Full Usage:
visibleSegsInNetWithVertices isDistinct source model
Parameters:
bool
source : OutputPortId
model : Model
Returns: (XYPos * XYPos) list
|
visible segments in a Net defined as a pair (start,end) of vertices. source: the source port driving the Net start is the segment end nearest the wire Source. isDistinct = true => filter visible segments so they do not overlap where segments overlap only the longest is taken ASSUMPTION: all overlaps are on segments with same starting point
|
|