Header menu logo issie

CanvasExtractor Module

Functions and values

Function or value Description

addStateToLoadedComponents openFileName (arg2, arg3) loadedComponents

Full Usage: addStateToLoadedComponents openFileName (arg2, arg3) loadedComponents

Parameters:
Returns: LoadedComponent list

add given name,state to loadedcomponent list as a loaded component (overwriting existing if needed)

openFileName : string
arg1 : Component list
arg2 : Connection list
loadedComponents : LoadedComponent list
Returns: LoadedComponent list

compareCanvas tolerance (arg2, arg3) (arg4, arg5)

Full Usage: compareCanvas tolerance (arg2, arg3) (arg4, arg5)

Parameters:
Returns: bool

Robust comparison of two schematics. Tolerance determines how similar counts as equal. cannot use equality because float vertices may not be identical use to detemine whether schematic needs to be saved NB for electrical circuit comparison use extractReducedState.

tolerance : float
arg1 : Component list
arg2 : Connection list
arg3 : Component list
arg4 : Connection list
Returns: bool

compareComps tolerance comps1 comps2

Full Usage: compareComps tolerance comps1 comps2

Parameters:
Returns: bool

Are two lists of components identical

tolerance : float
comps1 : List<Component>
comps2 : List<Component>
Returns: bool

compareConns tolerance conns1 conns2

Full Usage: compareConns tolerance conns1 conns2

Parameters:
Returns: bool

Are two lists of connections identical

tolerance : float
conns1 : List<Connection>
conns2 : List<Connection>
Returns: bool

compareIOs ldc1 ldc2

Full Usage: compareIOs ldc1 ldc2

Parameters:
Returns: bool

Compare the name and IOs of two sheets as loadedcomponents For backups, if these change something major has happened

ldc1 : LoadedComponent
ldc2 : LoadedComponent
Returns: bool

compsAreEqual comp1 comp2

Full Usage: compsAreEqual comp1 comp2

Parameters:
Returns: bool
Modifiers: inline
comp1 : Component
comp2 : Component
Returns: bool

compsAreEqualExInputDefault comp1 comp2

Full Usage: compsAreEqualExInputDefault comp1 comp2

Parameters:
Returns: bool
Modifiers: inline
comp1 : Component
comp2 : Component
Returns: bool

connsAreEqual conn1 conn2

Full Usage: connsAreEqual conn1 conn2

Parameters:
Returns: bool
Modifiers: inline
conn1 : Connection
conn2 : Connection
Returns: bool

debugChangedConnections

Full Usage: debugChangedConnections

Returns: ConnectionId list

evil mutable for debugging only allows easy access to specific connections - so it can be highlighted in GUI

Returns: ConnectionId list

extractLoadedSimulatorComponent (arg1, arg2) name

Full Usage: extractLoadedSimulatorComponent (arg1, arg2) name

Parameters:
Returns: LoadedComponent

extract the fields compared to check circuit equality

arg0 : Component list
arg1 : Connection list
name : string
Returns: LoadedComponent

extractReducedState (arg1, arg2)

Full Usage: extractReducedState (arg1, arg2)

Parameters:
Returns: ReducedCanvasState

Transform the CanvasState into an f# data structure, with layout data removed (for checking electrically significant changes). Components and connections are sorted to make them order-invariant - selecting components alters order.

arg0 : Component list
arg1 : Connection list
Returns: ReducedCanvasState

getOrderedCompLabels compType (arg2, arg3)

Full Usage: getOrderedCompLabels compType (arg2, arg3)

Parameters:
Returns: (string * int) list

get sheet I/O labels in correct order based on position of components

compType : ComponentType
arg1 : Component list
arg2 : Connection list
Returns: (string * int) list

getStateAndDependencies diagramName ldcs

Full Usage: getStateAndDependencies diagramName ldcs

Parameters:
Returns: string * CanvasState * LoadedComponent list

the inverse of addStateToLoadedConponents The loadedComponent list does NOT include diagramName

diagramName : string
ldcs : LoadedComponent list
Returns: string * CanvasState * LoadedComponent list

loadedComponentIsEqual ldc1 ldc2

Full Usage: loadedComponentIsEqual ldc1 ldc2

Parameters:
Returns: bool

Is circuit (not geometry) the same for two LoadedComponents? They must also have the same name

ldc1 : LoadedComponent
ldc2 : LoadedComponent
Returns: bool

loadedComponentIsEqualExInputDefault ldc1 ldc2

Full Usage: loadedComponentIsEqualExInputDefault ldc1 ldc2

Parameters:
Returns: bool

Is circuit (not geometry) the same for two LoadedComponents? They must also have the same name

ldc1 : LoadedComponent
ldc2 : LoadedComponent
Returns: bool

loadedComponentIsSameAsProject (arg1, arg2) ldc p

Full Usage: loadedComponentIsSameAsProject (arg1, arg2) ldc p

Parameters:
Returns: bool

Returns true if project exists and ldc is electrically identical to same sheet in project canvasState must be the project currently open state.

arg0 : Component list
arg1 : Connection list
ldc : LoadedComponent
p : Project option
Returns: bool

logConnId id

Full Usage: logConnId id

Parameters:
Returns: string

Formats a ConnectionId for logging purposes

id : ConnectionId
Returns: string

parseDiagramSignature (arg1, arg2)

Full Usage: parseDiagramSignature (arg1, arg2)

Parameters:
Returns: (string * int) list * (string * int) list

Extract the labels and bus widths of the inputs and outputs nodes as a signature. Form is inputs,outputs

arg0 : Component list
arg1 : Connection list
Returns: (string * int) list * (string * int) list

printConnErrors connFixedOffset

Full Usage: printConnErrors connFixedOffset

Parameters:
    connFixedOffset : XYPos

Returns: (Connection * Connection) list -> (Connection * Connection) list
connFixedOffset : XYPos
Returns: (Connection * Connection) list -> (Connection * Connection) list

referenceEquality a1 a2

Full Usage: referenceEquality a1 a2

Parameters:
    a1 : obj
    a2 : obj

Returns: bool

access javascript reference equality

a1 : obj
a2 : obj
Returns: bool

sortQBy byFun ids

Full Usage: sortQBy byFun ids

Parameters:
    byFun : 'a -> 'b
    ids : 'a list

Returns: 'a list
byFun : 'a -> 'b
ids : 'a list
Returns: 'a list

stateIsEqual (arg1, arg2) (arg3, arg4)

Full Usage: stateIsEqual (arg1, arg2) (arg3, arg4)

Parameters:
Returns: bool

Is circuit (not geometry) the same for two CanvasStates? fast comparison

arg0 : Component list
arg1 : Connection list
arg2 : Component list
arg3 : Connection list
Returns: bool

stateIsEqualExInputDefault (arg1, arg2) (arg3, arg4)

Full Usage: stateIsEqualExInputDefault (arg1, arg2) (arg3, arg4)

Parameters:
Returns: bool
arg0 : Component list
arg1 : Connection list
arg2 : Component list
arg3 : Connection list
Returns: bool

verticesAreSame fixedOffset tolerance conns1 conns2

Full Usage: verticesAreSame fixedOffset tolerance conns1 conns2

Parameters:
    fixedOffset : XYPos
    tolerance : float
    conns1 : (float * float * bool) list
    conns2 : (float * float * bool) list

Returns: bool

Are two lists of vertices are very similar.

fixedOffset : XYPos
tolerance : float
conns1 : (float * float * bool) list
conns2 : (float * float * bool) list
Returns: bool

Type something to start searching.