jsl/symbols/resistors¶
Package name: jsl/symbols/resistors
Summary¶
Data Types¶
VariableResistorSymbol¶
Variable Resistor Symbol
Constructors¶
Function | Description |
---|---|
VariableResistorSymbol (+ 1) | Constructor for defstruct VariableResistorSymbol |
ResistorStyle¶
ResistorSymbol¶
Resistor Symbol Definition
Constructors¶
Function | Description |
---|---|
ResistorSymbol (+ 1) | Constructor for defstruct ResistorSymbol |
VariableResistorSymbolParams¶
Constructors¶
Function | Description |
---|---|
VariableResistorSymbolParams (+ 1) | Constructor for defstruct VariableResistorSymbolParams |
Functions¶
Function | Description |
---|---|
get-default-variable-resistor-symbol-params | |
set-default-variable-resistor-symbol-params | |
build-variable-resistor-glyphs |
PhotoResistorSymbol¶
Photo Resistor Symbol
Constructors¶
Function | Description |
---|---|
PhotoResistorSymbol (+ 1) | Constructor for defstruct PhotoResistorSymbol |
ResistorSymbolParams¶
Resistor Symbol Parameters
Constructors¶
Function | Description |
---|---|
ResistorSymbolParams (+ 1) | Constructor for defstruct ResistorSymbolParams |
Functions¶
Function | Description |
---|---|
build-resistor-glyphs | Build a Resistor Shape in the scene graph |
set-default-resistor-symbol-params | |
get-default-resistor-symbol-params | |
to-tuple |
PhotoResistorSymbolParams¶
Constructors¶
Function | Description |
---|---|
PhotoResistorSymbolParams (+ 1) | Constructor for defstruct PhotoResistorSymbolParams |
Functions¶
Function | Description |
---|---|
get-default-photo-resistor-symbol-params | |
set-default-photo-resistor-symbol-params | |
build-photo-resistor-glyphs |
General Definitions¶
Definitions¶
VariableResistorSymbol¶
Variable Resistor Symbol
public defstruct VariableResistorSymbol <: TwoPinSymbol
Constructors¶
VariableResistorSymbol¶
Constructor for defstruct VariableResistorSymbol
public defn VariableResistorSymbol (pitch:Double, polarized?:True|False = ?, params:Maybe<VariableResistorSymbolParams> = ?)
VariableResistorSymbol¶
Constructor for defstruct VariableResistorSymbol
public defn VariableResistorSymbol ( -- pitch:Double = ?, polarized?:True|False = ?, params:Maybe<VariableResistorSymbolParams> = ?)
ResistorStyle¶
public defenum ResistorStyle <: Equalable & Hashable
ResistorSymbol¶
Resistor Symbol Definition
public defstruct ResistorSymbol <: TwoPinSymbol
This is the base-line resistor symbol definition and provides a standard implementation with sane defaults.
The user can customize the look and feel of the
resistor symbol by using the set-resistor-glyph
function.
Constructors¶
ResistorSymbol¶
Constructor for defstruct ResistorSymbol
public defn ResistorSymbol (pitch:Double, polarized?:True|False = ?, params:Maybe<ResistorSymbolParams> = ?)
ResistorSymbol¶
Constructor for defstruct ResistorSymbol
public defn ResistorSymbol ( -- pitch:Double = ?, polarized?:True|False = ?, params:Maybe<ResistorSymbolParams> = ?)
VariableResistorSymbolParams¶
public defstruct VariableResistorSymbolParams <: SymbolParams
arrow-params?: Maybe<ArrowSymbolParams>
arrow-span: Percentage
res-params?: Maybe<ResistorSymbolParams>
-
arrow-params?: Maybe<ArrowSymbolParams>
- Override the default arrow parameters with this value. We will grabget-default-arrow-symbol-params()
by default if this value isNone
. -
arrow-span: Percentage
- Set the X span of the arrow This, along with the body length of the resistor symbol, defines the shaft length of the arrow. This value is relative to theamplitude
of the resistor body. -
res-params?: Maybe<ResistorSymbolParams>
- Override the default resistor symbol parameters with this value.
Constructors¶
VariableResistorSymbolParams¶
Constructor for defstruct VariableResistorSymbolParams
public defn VariableResistorSymbolParams (res-params?:Maybe<ResistorSymbolParams>, arrow-params?:Maybe<ArrowSymbolParams> = ?, arrow-span:Percentage = ?, label-params?:Maybe<SymbolLabelParams> = ?)
VariableResistorSymbolParams¶
Constructor for defstruct VariableResistorSymbolParams
public defn VariableResistorSymbolParams ( -- res-params?:Maybe<ResistorSymbolParams> = ?, arrow-params?:Maybe<ArrowSymbolParams> = ?, arrow-span:Percentage = ?, label-params?:Maybe<SymbolLabelParams> = ?)
Functions¶
get-default-variable-resistor-symbol-params¶
public defn get-default-variable-resistor-symbol-params () -> VariableResistorSymbolParams
- Returns
VariableResistorSymbolParams
set-default-variable-resistor-symbol-params¶
public defn set-default-variable-resistor-symbol-params (v:VariableResistorSymbolParams) -> False
- Returns
False
build-variable-resistor-glyphs¶
public defn build-variable-resistor-glyphs (sn:SymbolNode, pitch:Double, x:VariableResistorSymbolParams)
PhotoResistorSymbol¶
Photo Resistor Symbol
public defstruct PhotoResistorSymbol <: TwoPinSymbol
Constructors¶
PhotoResistorSymbol¶
Constructor for defstruct PhotoResistorSymbol
public defn PhotoResistorSymbol (pitch:Double, polarized?:True|False = ?, params:Maybe<PhotoResistorSymbolParams> = ?)
PhotoResistorSymbol¶
Constructor for defstruct PhotoResistorSymbol
public defn PhotoResistorSymbol ( -- pitch:Double = ?, polarized?:True|False = ?, params:Maybe<PhotoResistorSymbolParams> = ?)
ResistorSymbolParams¶
Resistor Symbol Parameters
public defstruct ResistorSymbolParams <: SymbolParams
amplitude: Double
line-width: Double
periods: Double
porch-width: Double
style: ResistorStyle
-
amplitude: Double
- Width of the body of the resistor For triangle wave versions, this is the amplitude of the triangle wave from X=0 to X=triangle peak. For the rectangle shaped version, this is the distance from X=0 to either edge of the rectangle shape. -
line-width: Double
- Line width for the shapes drawn -
periods: Double
- Number of oscillation periods in the triangle wave. This value should typically be a whole- or half-number, otherwise, you may get strange discontinuities. This values does not apply to the rectangular shaped variants. -
porch-width: Double
- Length of the line from the pin to the start of the resistor body. -
style: ResistorStyle
These parameters define the characteristics of a triangle-wave style resistor sybmol.
TODO - Diagram here showing parameters.
Constructors¶
ResistorSymbolParams¶
Constructor for defstruct ResistorSymbolParams
public defn ResistorSymbolParams (style:ResistorStyle, porch-width:Double = ?, amplitude:Double = ?, periods:Double = ?, line-width:Double = ?, label-params?:Maybe<SymbolLabelParams> = ?)
ResistorSymbolParams¶
Constructor for defstruct ResistorSymbolParams
public defn ResistorSymbolParams ( -- style:ResistorStyle = ?, porch-width:Double = ?, amplitude:Double = ?, periods:Double = ?, line-width:Double = ?, label-params?:Maybe<SymbolLabelParams> = ?)
Functions¶
build-resistor-glyphs¶
Build a Resistor Shape in the scene graph
public defn build-resistor-glyphs (node:SymbolNode, pitch:Double, params:ResistorSymbolParams)
node: SymbolNode
- Scene graph where we want to draw the resistor symbol.pitch: Double
- Distance between the two pinsparams: ResistorSymbolParams
- The parameterization of this resistor symbol
This function constructs the shape for a canonical resistor
symbol depending on the style
parameter. defined by a triangle wave.
Triangle Wave - Coarse Example (except rotated 90 degrees):
----/\/\/----
Rectangular Shape - Coarse Example (rotated 90 degrees): ------ ----| |---- ------
TODO - we should add a diagram here that outlines the parameterization of the symbol.
Shape is computed as a Line in Symbol Grid Units
set-default-resistor-symbol-params¶
public defn set-default-resistor-symbol-params (v:ResistorSymbolParams) -> False
- Returns
False
get-default-resistor-symbol-params¶
public defn get-default-resistor-symbol-params () -> ResistorSymbolParams
- Returns
ResistorSymbolParams
to-tuple¶
public defn to-tuple (p:ResistorSymbolParams) -> [ResistorStyle, Double, Double, Double, Double]
- Returns
[ResistorStyle, Double, Double, Double, Double]
PhotoResistorSymbolParams¶
public defstruct PhotoResistorSymbolParams <: SymbolParams
arrow-angle: Double
arrow-margin: Double
arrow-params?: Maybe<ArrowSymbolParams>
arrow-pitch: Double
res-params?: Maybe<ResistorSymbolParams>
-
arrow-angle: Double
- Angle of the arrows with respect to the X-axis in Degrees -
arrow-margin: Double
- Margin between the start of the arrows and the body of the resistors -
arrow-params?: Maybe<ArrowSymbolParams>
- Override the default arrow parameters with this value. We will grabget-default-arrow-symbol-params()
by default if this value isNone
. -
arrow-pitch: Double
- Distance between the photo symbol arrows (pointing at the body) -
res-params?: Maybe<ResistorSymbolParams>
- Override the default resistor symbol parameters with this value.
Constructors¶
PhotoResistorSymbolParams¶
Constructor for defstruct PhotoResistorSymbolParams
public defn PhotoResistorSymbolParams (res-params?:Maybe<ResistorSymbolParams>, arrow-params?:Maybe<ArrowSymbolParams> = ?, arrow-margin:Double = ?, arrow-pitch:Double = ?, arrow-angle:Double = ?, label-params?:Maybe<SymbolLabelParams> = ?)
PhotoResistorSymbolParams¶
Constructor for defstruct PhotoResistorSymbolParams
public defn PhotoResistorSymbolParams ( -- res-params?:Maybe<ResistorSymbolParams> = ?, arrow-params?:Maybe<ArrowSymbolParams> = ?, arrow-margin:Double = ?, arrow-pitch:Double = ?, arrow-angle:Double = ?, label-params?:Maybe<SymbolLabelParams> = ?)
Functions¶
get-default-photo-resistor-symbol-params¶
public defn get-default-photo-resistor-symbol-params () -> PhotoResistorSymbolParams
- Returns
PhotoResistorSymbolParams
set-default-photo-resistor-symbol-params¶
public defn set-default-photo-resistor-symbol-params (v:PhotoResistorSymbolParams) -> False
- Returns
False
build-photo-resistor-glyphs¶
public defn build-photo-resistor-glyphs (sn:SymbolNode, pitch:Double, x:PhotoResistorSymbolParams)
General Definitions¶
set-default-resistor-symbol¶
public defn set-default-resistor-symbol (symb:TwoPinSymbol)
get-default-resistor-symbol¶
public defn get-default-resistor-symbol ()
set-default-photo-resistor-symbol¶
public defn set-default-photo-resistor-symbol (symb:TwoPinSymbol)
get-default-variable-resistor-symbol¶
public defn get-default-variable-resistor-symbol ()
get-default-photo-resistor-symbol¶
public defn get-default-photo-resistor-symbol ()
set-default-variable-resistor-symbol¶
public defn set-default-variable-resistor-symbol (symb:TwoPinSymbol)
Related Packages¶
Forwarded by packages: jsl/symbols/generators, jsl/symbols