jsl/landpatterns/helpers¶
Package name: jsl/landpatterns/helpers
Summary¶
PadInfo¶
Helper Struct for Constructing LandpatternPad
definitions
Functions¶
Function | Description |
---|---|
instantiate-pads | Instantiate a Sequence of Pads |
General Definitions¶
Function | Description |
---|---|
PlusSymbol (+ 1) | Create a plus symbol shape |
ref-label | Reference Label Generator |
l2-norm | |
max-distance | |
make-letter-seq | Create a letter sequence from start to end |
Definitions¶
PadInfo¶
Helper Struct for Constructing LandpatternPad
definitions
public defstruct PadInfo
loc: Pose
pad-def: Pad
pad-id: Int|Ref
-
loc: Pose
-
pad-def: Pad
-
pad-id: Int|Ref
Constructors¶
PadInfo¶
Constructor for defstruct PadInfo
public defn PadInfo (pad-id:Int|Ref, pad-def:Pad, loc:Pose)
Functions¶
instantiate-pads¶
Instantiate a Sequence of Pads
public defn instantiate-pads (pad-set:Seqable<PadInfo>, offset:Pose)
pad-set: Seqable<PadInfo>
- Sequence of Pads to Generate
This is a helper function for converting the generated pad
sequence into a set of LandpatternPad
definitions inside
a pcb-landpattern
definition.
General Definitions¶
PlusSymbol¶
Create a plus symbol shape
public defn PlusSymbol ( -- line-length:Double = ?, line-width:Double = ?, pose:Pose = ?) -> Shape
line-length: Double
- Length of the horizontal or vertical segmentsline-width: Double
pose: Pose
- Pose for the plus symbol Default is 1.0mm- Returns
Shape
PlusSymbol¶
Create a plus symbol shape
public defn PlusSymbol (xc:Double, yc:Double, l:Double = ?) -> Shape
xc: Double
- X center coordinate for the plus symbolyc: Double
- Y center coordinate for the plus symboll: Double
- Length of the horizontal or vertical segments Default is 1.0mm- Returns
Shape
ref-label¶
Reference Label Generator
public defn ref-label (pose:Pose = ? -- anchor:Anchor = ?)
pose: Pose
- Pose in the current landpattern frame of reference. By default, the reference label is placed at the origin.anchor: Anchor
- alignment of the text with respect to the pose. By default, the reference label is Center C aligned.
This tool inserts a reference label into the current landpattern context.
l2-norm¶
public defn l2-norm (p:Point) -> Double
- Returns
Double
max-distance¶
public defn max-distance (p1:Point, p2:Point) -> Point
- Returns
Point
make-letter-seq¶
Create a letter sequence from start
to end
public defn make-letter-seq (start:Char, end:Char) -> String
start: Char
- Starting character in the sequenceend: Char
- Inclusive ending character in the sequence.- Returns
String
Example¶
val result = make-letter-seq('B', 'G')
println(result)
; Generates:
; "BCDEFG"
Related Packages¶
Forwarded by packages: jsl/landpatterns/framework, jsl/landpatterns