BlockHelpers Module
Types and nested modules
| Type/Module | Description |
Functions and values
| Function or value | Description |
Full Usage:
addLengthToPos position orientation length
Parameters:
XYPos
orientation : Orientation
length : float
Returns: XYPos
Modifiers: inline |
|
|
|
|
|
|
The copied symbols in the order SymbolUpdate.pasteSymbols creates new symbols from them. This ordering is load-bearing: pasteSymbols returns the new component ids in this order, and pasteWires pairs old with new by position in the two lists to find the equivalent ports. Both sides must therefore agree - they did not between July 2025 (when the sort below was added to pasteSymbols alone, the two having previously shared plain Map order) and the fix that added this function, during which pasting connected components could attach a wire to the wrong component or drop it.
|
|
|
|
|
|
|
|
|
Full Usage:
foldOverNonZeroSegs folder state wire
Parameters:
XYPos -> XYPos -> 'a -> Segment -> 'a
-
The function to update the state given the segment start and end positions, current state and segment itself.
state : 'a
-
The initial state.
wire : Wire
-
The wire containing the segment list we are folding over.
Returns: 'a
The final state value
Modifiers: inline Type parameters: 'a |
This is used in cases where absolute segment positions are required. These positions are computed on the fly and passed to the folder function.
|
Full Usage:
foldOverSegs folder state wire
Parameters:
XYPos -> XYPos -> 'a -> Segment -> 'a
-
The function to update the state given the segment start and end positions, current state and segment itself.
state : 'a
-
The initial state.
wire : Wire
-
The wire containing the segment list we are folding over.
Returns: 'a
The final state value
Modifiers: inline Type parameters: 'a |
This is used in cases where absolute segment positions are required. These positions are computed on the fly and passed to the folder function.
|
|
|
Full Usage:
getCompId model portId
Parameters:
Model
portId : string
Returns: ComponentId
Modifiers: inline |
|
|
|
|
|
Full Usage:
getFilteredAbsSegments includeSegment wire
Parameters:
Orientation -> Segment -> bool
wire : Wire
Returns: ASegment list
|
|
Full Usage:
getInputPortIdStr portId
Parameters:
InputPortId
Returns: string
Modifiers: inline |
|
Full Usage:
getInputPortOrientation model portId
Parameters:
Model
portId : InputPortId
Returns: Edge
Modifiers: inline |
|
|
|
Full Usage:
getOutputPortIdStr portId
Parameters:
OutputPortId
Returns: string
Modifiers: inline |
|
Full Usage:
getOutputPortOrientation model portId
Parameters:
Model
portId : OutputPortId
Returns: Edge
Modifiers: inline |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
getSymbolPos symbolModel compId
Parameters:
Model
compId : ComponentId
Returns: XYPos
|
|
|
|
|
|
|
|
|
|
Full Usage:
getWiresInBox box model
Parameters:
BoundingBox
model : Model
Returns: (Wire * int) list
|
|
Full Usage:
groupWiresByNet conns
Parameters:
Map<ConnectionId, Wire>
Returns: Wire list list
|
|
Full Usage:
inMiddleOf a x b
Parameters:
float
x : float
b : float
Returns: bool
Modifiers: inline |
|
Full Usage:
inMiddleOrEndOf a x b
Parameters:
float
x : float
b : float
Returns: bool
Modifiers: inline |
|
|
|
|
|
|
|
Full Usage:
isWireInNet model wire
Parameters: Returns: (OutputPortId * (ConnectionId * Wire) list) option
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
overlap1D (arg1, arg2) (arg3, arg4)
Parameters:
float
arg1 : float
arg2 : float
arg3 : float
Returns: bool
|
|
|
|
|
|
Full Usage:
partitionWiresIntoNets model
Parameters:
Model
Returns: (OutputPortId * (ConnectionId * Wire) list) list
|
|
|
|
|
|
|
|
Full Usage:
segmentIntersectsBoundingBox box segStart segEnd
Parameters:
BoundingBox
segStart : XYPos
segEnd : XYPos
Returns: float option
|
|
|
|
|
|
|
|
Full Usage:
switchOrientation orientation
Parameters:
Orientation
Returns: Orientation
Modifiers: inline |
|
|
|
|
|
|
|
|
|
|
Type extensions
| Type extension | Description |
|
Extended Type:
|
|
Extended Type:
|
|
Extended Type:
|
|
Extended Type:
|