Skip to content

jsl/symbols/switches

Package name: jsl/symbols/switches

Summary

Data Types

SwitchSymbolParams

Switch Schematic Symbol Parameterizations

Constructors

Function Description
SwitchSymbolParams (+ 1) Constructor for defstruct SwitchSymbolParams

Functions

Function Description
build-SPST-nodes
build-mom-SP-ST-glyphs
get-default-switch-symbol-params
set-default-switch-symbol-params
ToggleSPSTSymbol Create a Toggle SPST Switch Symbol Generator
build-toggle-SP-ST-glyphs
MomentarySPSTSymbol Create a Momentary SPST Switch Symbol Generator

SPSTSymbol

Single-Pull Single-Throw (SPST) Switch Schematic Symbol

Constructors

Function Description
SPSTSymbol (+ 1) Constructor for defstruct SPSTSymbol

Functions

Function Description
ToggleSPSTSymbol Create a Toggle SPST Switch Symbol Generator
MomentarySPSTSymbol Create a Momentary SPST Switch Symbol Generator

Definitions

SwitchSymbolParams

Switch Schematic Symbol Parameterizations

public defstruct SwitchSymbolParams <: SymbolParams
    line-width: Double
    node-radius: Double
    pad-ref-size: Double
    porch-width: Double

  • line-width: Double - Line width for lines drawn in the symbol Units are in symbol grid units.

  • node-radius: Double - Radius for the switch end nodes (Drawn as Circles) Units are in symbol grid units.

  • pad-ref-size: Double - Pad Ref Identifier Text Size

  • porch-width: Double - Porch Width is the "pin" length of the symbol Units are in symbol grid units.

Constructors

SwitchSymbolParams

Constructor for defstruct SwitchSymbolParams

public defn SwitchSymbolParams (porch-width:Double, line-width:Double = ?, node-radius:Double = ?, pad-ref-size:Double = ?, label-params?:Maybe<SymbolLabelParams> = ?)

SwitchSymbolParams

Constructor for defstruct SwitchSymbolParams

public defn SwitchSymbolParams ( -- porch-width:Double = ?, line-width:Double = ?, node-radius:Double = ?, pad-ref-size:Double = ?, label-params?:Maybe<SymbolLabelParams> = ?)

Functions

build-SPST-nodes

public defn build-SPST-nodes (node:SymbolNode, pitch:Double, params:SwitchSymbolParams)

build-mom-SP-ST-glyphs

public defn build-mom-SP-ST-glyphs (node:SymbolNode, pitch:Double, params:SwitchSymbolParams)

get-default-switch-symbol-params

public defn get-default-switch-symbol-params () -> SwitchSymbolParams

  • Returns SwitchSymbolParams

set-default-switch-symbol-params

public defn set-default-switch-symbol-params (v:SwitchSymbolParams) -> False

  • Returns False

ToggleSPSTSymbol

Create a Toggle SPST Switch Symbol Generator

public defn ToggleSPSTSymbol ( -- pitch:Double = ?, pin-refs:[Ref, Ref] = ?, params:SwitchSymbolParams = ?) -> SPSTSymbol

  • Returns SPSTSymbol

See SPSTSymbol for more info.

build-toggle-SP-ST-glyphs

public defn build-toggle-SP-ST-glyphs (node:SymbolNode, pitch:Double, params:SwitchSymbolParams -- is-open?:True|False = ?)

MomentarySPSTSymbol

Create a Momentary SPST Switch Symbol Generator

public defn MomentarySPSTSymbol ( -- pitch:Double = ?, pin-refs:[Ref, Ref] = ?, params:SwitchSymbolParams = ?) -> SPSTSymbol

  • Returns SPSTSymbol

See SPSTSymbol for more info.

SPSTSymbol

Single-Pull Single-Throw (SPST) Switch Schematic Symbol

public defstruct SPSTSymbol <: SymbolDefn
    glyph-func: (SymbolNode, Double, SwitchSymbolParams) -> ?
    params: Maybe<SwitchSymbolParams>
    pin-refs: [Ref, Ref]
    pitch: Double

  • glyph-func: (SymbolNode, Double, SwitchSymbolParams) -> ? - Switch Glyph Customization Function This user must provide a function that will draw the features of the switch including the circle nodes and the toggle, plunger, etc.

  • params: Maybe<SwitchSymbolParams> - Optional Overriding Parameterization for the Switch.

  • pin-refs: [Ref, Ref] - Pin Ref Identifiers This allows the user to tune how the symbol pins will be identified.

  • pitch: Double - Pitch defines the distance between the switch nodes (circles) Units are in symbol grid units.

This is a general purpose type for supporting different types of switch symbols. The user can provide the glyph-func to draw the switch symbol.

Constructors

SPSTSymbol

Constructor for defstruct SPSTSymbol

public defn SPSTSymbol (name:String, pitch:Double, pin-refs:[Ref, Ref] = ?, glyph-func:(SymbolNode, Double, SwitchSymbolParams) -> ?, params:Maybe<SwitchSymbolParams> = ?)

SPSTSymbol

Constructor for defstruct SPSTSymbol

public defn SPSTSymbol ( -- name:String, pitch:Double = ?, pin-refs:[Ref, Ref] = ?, glyph-func:(SymbolNode, Double, SwitchSymbolParams) -> ?, params:Maybe<SwitchSymbolParams> = ?)

Functions

ToggleSPSTSymbol

Create a Toggle SPST Switch Symbol Generator

public defn ToggleSPSTSymbol ( -- pitch:Double = ?, pin-refs:[Ref, Ref] = ?, params:SwitchSymbolParams = ?) -> SPSTSymbol

  • Returns SPSTSymbol

See SPSTSymbol for more info.

MomentarySPSTSymbol

Create a Momentary SPST Switch Symbol Generator

public defn MomentarySPSTSymbol ( -- pitch:Double = ?, pin-refs:[Ref, Ref] = ?, params:SwitchSymbolParams = ?) -> SPSTSymbol

  • Returns SPSTSymbol

See SPSTSymbol for more info.

Related Packages

Forwarded by packages: jsl/symbols/generators, jsl/symbols