Skip to content

jsl/symbols/SymbolDefn

Package name: jsl/symbols/SymbolDefn

Summary

SymbolDefn

Base Symbol Definition Type

Multis

Function Description
build-orientation Construct the preferred orientation statement for the symbol
build-all Construct the symbol definition
make-all Generator for constructing symbol pins/glyphs
build-artwork Construct the artwork for the symbol
build-params Construct any parameter text for the symbol
create-symbol
name
build-pins Construct the Pin definitions for the symbol
get-params Retrieve the Symbol Parameter for this symbol Instance

Methods

Function Description
build-orientation Default Implementation for Build Orientation
build-all Default build-all implementation

Definitions

SymbolDefn

Base Symbol Definition Type

public deftype SymbolDefn

Multis

build-orientation

Construct the preferred orientation statement for the symbol

public defmulti build-orientation (x:SymbolDefn, sn:SymbolNode)

This function implements the preferred-orientation statement which controls at what orientation the symbol will be placed on the schematic sheet.

build-all

Construct the symbol definition

public defmulti build-all (x:SymbolDefn, sn:SymbolNode)

This method will construct symbol definition by calling the build-* functions in the passed SymbolNode tree.

make-all

Generator for constructing symbol pins/glyphs

public defmulti make-all (x:SymbolDefn -- pose:Pose = ?, scale:Double = ?)

build-artwork

Construct the artwork for the symbol

public defmulti build-artwork (x:SymbolDefn, sn:SymbolNode)

This function will construct the glyphs necessary for the symbol and insert them into the SymbolNode tree.

build-params

Construct any parameter text for the symbol

public defmulti build-params (x:SymbolDefn, sn:SymbolNode)

This function constructs text for things like the resistance/capacitance/inductance value, voltage rating, designators, and any other parameters that we want to show next to the symbol in the schematic.

create-symbol

public defmulti create-symbol (x:SymbolDefn -- pose:Pose = ?, scale:Double = ?, description:String = ?) -> SchematicSymbol

  • Returns SchematicSymbol

name

public defmulti name (x:SymbolDefn) -> String

  • Returns String

build-pins

Construct the Pin definitions for the symbol

public defmulti build-pins (x:SymbolDefn, sn:SymbolNode)

This function will create the pin definitions in the SymbolNode tree.

get-params

Retrieve the Symbol Parameter for this symbol Instance

public defmulti get-params (x:SymbolDefn) -> SymbolParams

  • Returns SymbolParams

Methods

build-orientation

Default Implementation for Build Orientation

defmethod build-orientation (x:SymbolDefn, sn:SymbolNode)

By default - the function does nothing. It is up to the individual symbol implementations to provide this functionality as necessary.

build-all

Default build-all implementation

defmethod build-all (x:SymbolDefn, sn:SymbolNode)

The default implementation for build-all calls the build-* methods in the following order:

  1. build-pins
  2. build-artwork
  3. build-designator
  4. build-params

Related Packages

Forwards packages: jsl/symbols/SymbolParams, jsl/symbols/SymbolParams, jsl/symbols/SymbolParams Forwarded by packages: jsl/symbols/framework, jsl/symbols