jsl/landpatterns/VirtualLP¶
Package name: jsl/landpatterns/VirtualLP
Summary¶
Data Types¶
VirtualPad¶
Helper Struct for Constructing Virtual Landpattern definitions
Methods¶
Function | Description |
---|---|
make-landpattern | Generator to create a pad statement for this VirtualPad instance |
Functions¶
Function | Description |
---|---|
print-pads | |
as-VirtualPad | |
VirtualPad | |
append-all | Add a multiple pads to the virtual landpattern |
get-pad-by-ref | Find a virtual pad with the given reference |
pose | |
get-pad-by-ref! | Forcefully find a virtual pad with the given reference |
pad | |
ref | |
get-pads-by-column | Retrieve the pads in the specified column |
get-pads | Attempts to mimic the pads function from jitx/commands |
get-layers | Function to mimic layers from jitx/commands on VirtualPad |
append | Add a pad to the virtual landpattern |
get-layer | Function to mimic layer from jitx/commands on VirtualPad |
get-pads-by-row | Retrieve the pads in the specified row |
get-first-pad | Find the earliest virtual pad in the given landpattern by comparing pad references |
VirtualElement¶
Base Type for the Elements of the Virtual Landpattern Tree
Multis¶
Function | Description |
---|---|
make-landpattern | Landpattern Content Generator Function |
Functions¶
Function | Description |
---|---|
as-VirtualPad | |
as-VirtualLP | |
as-VirtualArtwork | |
find-by-class | Find all virtual landpattern elements with the given class |
elements | Local Elements for this Virtual Landpattern |
as-VirtualCopper | |
find-by-name | Find all virtual landpattern elements with the given name |
VirtualArtwork¶
Functions¶
Function | Description |
---|---|
to-layer-shape | |
as-VirtualArtwork | |
get-silkscreen-outline! | Retrieve the silkscreen outline shape as a VirtualArtwork object. |
VirtualArtwork | |
append | Add a VirtualArtwork instance to the landpattern |
get-artwork | |
get-silkscreen-outline | Retrieve the Silkscreen outline if present |
append-all | Add multiple VirtualArtwork instances to the landpattern. |
VirtualCopper¶
Functions¶
Function | Description |
---|---|
get-copper | |
get-coppers | |
VirtualCopper | |
as-VirtualCopper | |
append | Add a virtual copper statement to virtual landpattern |
append-all | Add multiple virtual copper statements to virtual landpattern |
VirtualLP¶
Virtual LandPattern Node
Methods¶
Function | Description |
---|---|
make-landpattern | Recursively generate the pads and layer artwork for this virtual landpattern |
Functions¶
Function | Description |
---|---|
add-reference-designator | Create a reference designator in the current virtual landpattern |
get-coppers | |
add-copper (+ 1) | Add a copper geometry to the landpattern on a particular layer index. |
add-artwork (+ 1) | |
create-child | Create a new Virtual Landpattern that is a child of this node |
get-silkscreen-outline | Retrieve the Silkscreen outline if present |
as-VirtualLP | |
find-by-class | Find all virtual landpattern elements with the given class |
get-pads-by-column | Retrieve the pads in the specified column |
get-pads | Attempts to mimic the pads function from jitx/commands |
get-layers | Attempts to mimic the layers function from jitx/commands |
append (+ 3) | Add a VirtualArtwork instance to the landpattern |
get-layer | Attempts to mimic the layer function from jitx/commands |
get-pads-by-row | Retrieve the pads in the specified row |
get-child! | |
add-silkscreen-outline | Construct artwork for the package outline in the silkscreen layer. |
identify-pad-columns | Identify the unique columns of pads in this land pattern |
get-child | Retrieve a child node by name from the parent virtual land pattern |
find-by-name | Find all virtual landpattern elements with the given name |
append-all (+ 2) | Add multiple VirtualArtwork instances to the landpattern. |
get-layer-all | Get all shapes on the specified layer - including pad defined shapes |
get-pad-by-ref | Find a virtual pad with the given reference |
VirtualLP | Construct a VirtualLP Root Node |
get-copper | |
add-thermal-pad | Add a Thermal Pad to the Virtual LandPattern Scene Graph |
get-pad-by-ref! | Forcefully find a virtual pad with the given reference |
identify-pad-rows | Identify the unique rows of pads in this land pattern |
get-silkscreen-outline! | Retrieve the silkscreen outline shape as a VirtualArtwork object. |
elements | Local Elements for this Virtual Landpattern |
pad-interior-bounds | Construct the interior bounds for the pads of a component |
add-cutout (+ 1) | Add cutouts to the landpattern based on specified shapes. |
is-root? | Check if this is the root node in a Virtual Landpattern Tree |
get-artwork | |
add-keepout (+ 1) | Add keepout regions to the landpattern based on specified shapes. |
get-first-pad | Find the earliest virtual pad in the given landpattern by comparing pad references |
General Definitions¶
Function | Description |
---|---|
compare-pad-id | Compare two pad references |
build-vpad-classes | Construct a set of class strings for VirtualPad creation. |
Definitions¶
VirtualPad¶
Helper Struct for Constructing Virtual Landpattern definitions
public defstruct VirtualPad <: VirtualElement :
loc: Pose
pad-def: Pad
pad-id: Int|Ref
side: Side
-
loc: Pose
-
pad-def: Pad
-
pad-id: Int|Ref
-
side: Side
Methods¶
make-landpattern¶
Generator to create a pad
statement for this VirtualPad
instance
defmethod make-landpattern (p:VirtualPad, offset:Pose = ?)
p: VirtualPad
- Selfoffset: Pose
- Extra offset to apply to the pad definition. This is often used for translating an entire landpattern.
Functions¶
print-pads¶
public defn print-pads (o:OutputStream, pds:Seqable<VirtualPad>)
as-VirtualPad¶
public defn as-VirtualPad (e:VirtualElement) -> VirtualPad
- Returns
VirtualPad
VirtualPad¶
public defn VirtualPad (pad-id:Int|Ref, pad-def:Pad, loc:Pose -- name:String = ?, class:Seqable<String>|String = ?, side:Side = ?) -> VirtualPad
- Returns
VirtualPad
append-all¶
Add a multiple pads to the virtual landpattern
public defn append-all (vp:VirtualLP, ps:Seqable<VirtualPad>) -> False
- Returns
False
get-pad-by-ref¶
Find a virtual pad with the given reference
public defn get-pad-by-ref (vp:VirtualLP, r:Ref|Int) -> Maybe<VirtualPad>
- Returns
Maybe<VirtualPad>
pose¶
public defn pose (p:VirtualPad) -> Pose
- Returns
Pose
get-pad-by-ref!¶
Forcefully find a virtual pad with the given reference
public defn get-pad-by-ref! (vp:VirtualLP, r:Ref|Int) -> VirtualPad
- Returns
VirtualPad
pad¶
public defn pad (p:VirtualPad) -> Pad
- Returns
Pad
ref¶
public defn ref (p:VirtualPad) -> Ref
- Returns
Ref
get-pads-by-column¶
Retrieve the pads in the specified column
public defn get-pads-by-column (vp:VirtualLP, column:Int) -> Seq<VirtualPad>
vp: VirtualLP
- VirtualLP SceneGraphcolumn: Int
- Identifies the column of pads to retrieve. Must be >= 0.- Returns
Seq<VirtualPad>
- Sequence ofVirtualPad
objects. If no column with indexcolumn
is present, then an empty sequence will be provided.
get-pads¶
Attempts to mimic the pads
function from jitx/commands
public defn get-pads (vp:VirtualLP) -> Tuple<VirtualPad>
- Returns
Tuple<VirtualPad>
- A Tuple of VirtualPad, 1 for each of the virtual pads invp
. For any children - theloc:Pose
of theVirtualPad
will be updated so that returned VirtualPad is correctly situated in the parent frame of reference. That means that the VirtualPad objects returned by this function are not necessarily the same as the parent definition.
This function is recursive over all of the nodes of the virtual land pattern scene graph.
get-layers¶
Function to mimic layers
from jitx/commands on VirtualPad
public defn get-layers (p:VirtualPad) -> Tuple<LayerShape>
- Returns
Tuple<LayerShape>
append¶
Add a pad to the virtual landpattern
public defn append (vp:VirtualLP, p:VirtualPad) -> False
- Returns
False
get-layer¶
Function to mimic layer
from jitx/commands on VirtualPad
public defn get-layer (p:VirtualPad, ls:LayerSpecifier) -> Tuple<Shape>
- Returns
Tuple<Shape>
get-pads-by-row¶
Retrieve the pads in the specified row
public defn get-pads-by-row (vp:VirtualLP, row:Int) -> Seq<VirtualPad>
vp: VirtualLP
- VirtualLP SceneGraphrow: Int
- Identifies the row of pads to retrieve. Must be >= 0.- Returns
Seq<VirtualPad>
- Sequence ofVirtualPad
objects. If no row with indexrow
is present, then an empty sequence will be provided.
get-first-pad¶
Find the earliest virtual pad in the given landpattern by comparing pad references
public defn get-first-pad (vp:VirtualLP) -> VirtualPad
- Returns
VirtualPad
VirtualElement¶
Base Type for the Elements of the Virtual Landpattern Tree
public deftype VirtualElement <: Classable
This type provides an interface for the elements to provide the name/class labeling that will later be used for filtering.
Multis¶
make-landpattern¶
Landpattern Content Generator Function
public defmulti make-landpattern (v:VirtualElement, pose:Pose = ?)
v: VirtualElement
- VirtualElement (self)pose: Pose
- Optional transform to apply to the elements's content
This function is a generator for creating the content of this
element into the pcb-landpattern
definition.
Functions¶
as-VirtualPad¶
public defn as-VirtualPad (e:VirtualElement) -> VirtualPad
- Returns
VirtualPad
as-VirtualLP¶
public defn as-VirtualLP (e:VirtualElement) -> VirtualLP
- Returns
VirtualLP
as-VirtualArtwork¶
public defn as-VirtualArtwork (e:VirtualElement) -> VirtualArtwork
- Returns
VirtualArtwork
find-by-class¶
Find all virtual landpattern elements with the given class
public defn find-by-class (vp:VirtualLP, cls:String) -> Seqable<VirtualElement>
- Returns
Seqable<VirtualElement>
elements¶
Local Elements for this Virtual Landpattern
public defn elements (vp:VirtualLP) -> Seqable<VirtualElement>
- Returns
Seqable<VirtualElement>
This does not search recursively into the children, it just reports the elements of this node.
as-VirtualCopper¶
public defn as-VirtualCopper (e:VirtualElement) -> VirtualCopper
- Returns
VirtualCopper
find-by-name¶
Find all virtual landpattern elements with the given name
public defn find-by-name (vp:VirtualLP, name:String) -> Seqable<VirtualElement>
- Returns
Seqable<VirtualElement>
VirtualArtwork¶
public defstruct VirtualArtwork <: VirtualElement :
layer-spec: LayerSpecifier
shape: Shape
-
layer-spec: LayerSpecifier
-
shape: Shape
Functions¶
to-layer-shape¶
public defn to-layer-shape (art:VirtualArtwork, pose:Pose = ?) -> LayerShape
- Returns
LayerShape
as-VirtualArtwork¶
public defn as-VirtualArtwork (e:VirtualElement) -> VirtualArtwork
- Returns
VirtualArtwork
get-silkscreen-outline!¶
Retrieve the silkscreen outline shape as a VirtualArtwork
object.
public defn get-silkscreen-outline! (vp:VirtualLP) -> VirtualArtwork
- Returns
VirtualArtwork
This function looks for a VirtualArtwork
object with class outline
.
If it finds a single object meeting this description - it will be
returned. Otherwise it throws a ValueError
This function will search recursively through the passed vp
node
and all child nodes for the outline
artwork.
VirtualArtwork¶
public defn VirtualArtwork (layer-spec:LayerSpecifier, shape:Shape -- name?:Maybe<String> = ?, class:Seqable<String>|String = ?) -> VirtualArtwork
- Returns
VirtualArtwork
append¶
Add a VirtualArtwork
instance to the landpattern
public defn append (vp:VirtualLP, va:VirtualArtwork) -> False
- Returns
False
get-artwork¶
public defn get-artwork (vp:VirtualLP, ls:LayerSpecifier) -> Seqable<VirtualArtwork>
- Returns
Seqable<VirtualArtwork>
get-silkscreen-outline¶
Retrieve the Silkscreen outline if present
public defn get-silkscreen-outline (vp:VirtualLP) -> Maybe<VirtualArtwork>
vp: VirtualLP
- Virtual Landpattern SceneGraph- Returns
Maybe<VirtualArtwork>
- If nooutline
present, then this function returnsNone()
If an artwork of classoutline
is present, we return one. - Throws
ValueError
- if multipleoutline
elements are found.
This function looks for a VirtualArtwork
object with class outline
.
append-all¶
Add multiple VirtualArtwork
instances to the landpattern.
public defn append-all (vp:VirtualLP, vas:Seqable<VirtualArtwork>) -> False
- Returns
False
VirtualCopper¶
public defstruct VirtualCopper <: VirtualElement :
layer-index: LayerIndex
shape: Shape
-
layer-index: LayerIndex
-
shape: Shape
Functions¶
get-copper¶
public defn get-copper (vp:VirtualLP, li:LayerIndex) -> Tuple<VirtualCopper>
- Returns
Tuple<VirtualCopper>
get-coppers¶
public defn get-coppers (vp:VirtualLP) -> Tuple<VirtualCopper>
- Returns
Tuple<VirtualCopper>
VirtualCopper¶
public defn VirtualCopper (layer-index:LayerIndex, shape:Shape -- name?:Maybe<String> = ?, class:Seqable<String>|String = ?) -> VirtualCopper
- Returns
VirtualCopper
as-VirtualCopper¶
public defn as-VirtualCopper (e:VirtualElement) -> VirtualCopper
- Returns
VirtualCopper
append¶
Add a virtual copper
statement to virtual landpattern
public defn append (vp:VirtualLP, cu:VirtualCopper) -> False
- Returns
False
append-all¶
Add multiple virtual copper
statements to virtual landpattern
public defn append-all (vp:VirtualLP, cus:Seqable<VirtualCopper>) -> False
- Returns
False
VirtualLP¶
Virtual LandPattern Node
public defstruct VirtualLP <: VirtualElement :
artwork: Vector<VirtualArtwork>
children: Vector<VirtualLP>
lands: Vector<VirtualPad>
metal: Vector<VirtualCopper>
parent: Maybe<VirtualLP>
pose: Pose
-
artwork: Vector<VirtualArtwork>
- Layer Artwork to be placed in this virtual landpattern frame of reference. -
children: Vector<VirtualLP>
- Child nodes of this landpattern -
lands: Vector<VirtualPad>
- Pads to be placed in this virtual landpattern frame of reference -
metal: Vector<VirtualCopper>
- Virtualcopper
statements as placed in the virtual landpattern frame of reference. -
parent: Maybe<VirtualLP>
- Optional Parent node. IfNone
then this node is the root of the tree. -
pose: Pose
- Kinematic transform of this node of the virtual landpattern tree. This pose will be applied to the reference frame of this node. This means that all geometry in this node will experience this transformation. Additionally, all children node's frames of reference will be transformed by this pose.
This type is used to create a virtual landpattern
model. We use this so that we can modify the landpattern
elements (pads, artwork, etc) before writing it to the
ESIR pcb-landpattern
definition. Once written to ESIR,
the landpattern cannot be modified.
Methods¶
make-landpattern¶
Recursively generate the pads and layer artwork for this virtual landpattern
defmethod make-landpattern (vp:VirtualLP, parent-pose:Pose = ?)
This function should be called from within a pcb-landpattern
definition. It will create pad
and layer
statements
which build up the landpattern
Functions¶
add-reference-designator¶
Create a reference designator in the current virtual landpattern
public defn add-reference-designator (vp:VirtualLP, ls:LayerSpecifier = ?, text-size:Double = ?, font:String = ?) -> False
vp: VirtualLP
- Land Pattern Node where content will be drawn.ls: LayerSpecifier
- Layer to draw the reference designator. By default this is the top silkscreen.text-size: Double
- Size of designator text height in mm. Default is 1.0 mm.font: String
- Optional Font to use. See theText
object in JITX runtime.- Returns
False
If a courtyard exists - This function will place a reference designator outside the courtyard outline of the component, just above the upper-left corner of the bounds of the outline.
If no courtyard exists - then this function places the silkscreen reference designator at the VirtualLP node origin.
In either case, this placement is really just an initial placement. The user will use the placer in the board view to move it to a more reasonable location.
get-coppers¶
public defn get-coppers (vp:VirtualLP) -> Tuple<VirtualCopper>
- Returns
Tuple<VirtualCopper>
add-copper¶
Add a copper geometry to the landpattern on a particular layer index.
public defn add-copper (vp:VirtualLP, li:LayerIndex, shape:Shape -- name:String = ?, class:Seqable<String>|String = ?) -> False
- Returns
False
add-copper¶
Add multiple copper geometry elements to the landpattern on a particular layer index.
public defn add-copper (vp:VirtualLP, li:LayerIndex, shapes:Seqable<Shape> -- class:Seqable<String>|String = ?) -> False
- Returns
False
add-artwork¶
public defn add-artwork (vp:VirtualLP, ls:LayerSpecifier, shape:Shape -- name:String = ?, class:Seqable<String>|String = ?) -> False
- Returns
False
add-artwork¶
public defn add-artwork (vp:VirtualLP, ls:LayerSpecifier, shapes:Seqable<Shape> -- class:Seqable<String>|String = ?) -> False
- Returns
False
create-child¶
Create a new Virtual Landpattern that is a child of this node
public defn create-child (vp:VirtualLP -- offset:Pose = ?, name:String = ?, class:Seqable<String>|String = ?) -> VirtualLP
vp: VirtualLP
- Selfoffset: Pose
- Default pose for the child node. This pose will be relative to the parent's pose.- Returns
VirtualLP
- VirtualLP with parent set tovp
.
get-silkscreen-outline¶
Retrieve the Silkscreen outline if present
public defn get-silkscreen-outline (vp:VirtualLP) -> Maybe<VirtualArtwork>
vp: VirtualLP
- Virtual Landpattern SceneGraph- Returns
Maybe<VirtualArtwork>
- If nooutline
present, then this function returnsNone()
If an artwork of classoutline
is present, we return one. - Throws
ValueError
- if multipleoutline
elements are found.
This function looks for a VirtualArtwork
object with class outline
.
as-VirtualLP¶
public defn as-VirtualLP (e:VirtualElement) -> VirtualLP
- Returns
VirtualLP
find-by-class¶
Find all virtual landpattern elements with the given class
public defn find-by-class (vp:VirtualLP, cls:String) -> Seqable<VirtualElement>
- Returns
Seqable<VirtualElement>
get-pads-by-column¶
Retrieve the pads in the specified column
public defn get-pads-by-column (vp:VirtualLP, column:Int) -> Seq<VirtualPad>
vp: VirtualLP
- VirtualLP SceneGraphcolumn: Int
- Identifies the column of pads to retrieve. Must be >= 0.- Returns
Seq<VirtualPad>
- Sequence ofVirtualPad
objects. If no column with indexcolumn
is present, then an empty sequence will be provided.
get-pads¶
Attempts to mimic the pads
function from jitx/commands
public defn get-pads (vp:VirtualLP) -> Tuple<VirtualPad>
- Returns
Tuple<VirtualPad>
- A Tuple of VirtualPad, 1 for each of the virtual pads invp
. For any children - theloc:Pose
of theVirtualPad
will be updated so that returned VirtualPad is correctly situated in the parent frame of reference. That means that the VirtualPad objects returned by this function are not necessarily the same as the parent definition.
This function is recursive over all of the nodes of the virtual land pattern scene graph.
get-layers¶
Attempts to mimic the layers
function from jitx/commands
public defn get-layers (vp:VirtualLP, offset:Pose = ?) -> Tuple<LayerShape>
vp: VirtualLP
- Virtual LP scene graphoffset: Pose
- Offset position to apply to the created LayerShape objects. This will cause all created objects to be in the same root frame of reference for the VirtualLPvp
.- Returns
Tuple<LayerShape>
- A Tuple of LayerShape object
This function is recursive over all of the nodes of the virtual landpattern scene graph.
append¶
Add a VirtualArtwork
instance to the landpattern
public defn append (vp:VirtualLP, va:VirtualArtwork) -> False
- Returns
False
append¶
Add a pad to the virtual landpattern
public defn append (vp:VirtualLP, p:VirtualPad) -> False
- Returns
False
append¶
Add a virtual copper
statement to virtual landpattern
public defn append (vp:VirtualLP, cu:VirtualCopper) -> False
- Returns
False
append¶
Add a new child virtual landpattern node
public defn append (vp:VirtualLP, child:VirtualLP) -> False
vp: VirtualLP
- Selfchild: VirtualLP
- VirtualLP to include as a child ofvp
- Returns
False
- Throws
ValueError
- If the passedchild
is already associated with a parent.
get-layer¶
Attempts to mimic the layer
function from jitx/commands
public defn get-layer (vp:VirtualLP, ls:LayerSpecifier) -> Tuple<Shape>
- Returns
Tuple<Shape>
This returns the shapes present on a specific layer that are defined directly in the landpattern or its children. It does not include the geometry defined in the pads.
get-pads-by-row¶
Retrieve the pads in the specified row
public defn get-pads-by-row (vp:VirtualLP, row:Int) -> Seq<VirtualPad>
vp: VirtualLP
- VirtualLP SceneGraphrow: Int
- Identifies the row of pads to retrieve. Must be >= 0.- Returns
Seq<VirtualPad>
- Sequence ofVirtualPad
objects. If no row with indexrow
is present, then an empty sequence will be provided.
get-child!¶
public defn get-child! (vp:VirtualLP, name:String) -> VirtualLP
- Returns
VirtualLP
add-silkscreen-outline¶
Construct artwork for the package outline in the silkscreen layer.
public defn add-silkscreen-outline (vp:VirtualLP, outline-geom:Shape -- side:Side = ?)
vp: VirtualLP
- Virtual Landpattern Scene Graphoutline-geom: Shape
- Shape of the silkscreen content to create.side: Side
- Optional Side - Default is Top Side.
identify-pad-columns¶
Identify the unique columns of pads in this land pattern
public defn identify-pad-columns (vp:VirtualLP) -> Tuple<Int>
vp: VirtualLP
- VirtualLP SceneGraph- Returns
Tuple<Int>
- Tuple of row indices. For example, a square quad with 8 x 8 will have 8 rows and 4 columns. This function will return 4.
get-child¶
Retrieve a child node by name from the parent virtual land pattern
public defn get-child (vp:VirtualLP, name:String) -> Maybe<VirtualLP>
vp: VirtualLP
- The parent scope to searchname: String
- Child name that we will match on. Unnamed children will be ignored.- Returns
Maybe<VirtualLP>
- One<VirtualLP> if we find a child withname? = name
elseNone()
This function is recursive. It will attempt to match to a child
node in the vp
scene graph by name.
find-by-name¶
Find all virtual landpattern elements with the given name
public defn find-by-name (vp:VirtualLP, name:String) -> Seqable<VirtualElement>
- Returns
Seqable<VirtualElement>
append-all¶
Add multiple VirtualArtwork
instances to the landpattern.
public defn append-all (vp:VirtualLP, vas:Seqable<VirtualArtwork>) -> False
- Returns
False
append-all¶
Add a multiple pads to the virtual landpattern
public defn append-all (vp:VirtualLP, ps:Seqable<VirtualPad>) -> False
- Returns
False
append-all¶
Add multiple virtual copper
statements to virtual landpattern
public defn append-all (vp:VirtualLP, cus:Seqable<VirtualCopper>) -> False
- Returns
False
get-layer-all¶
Get all shapes on the specified layer - including pad defined shapes
public defn get-layer-all (vp:VirtualLP, ls:LayerSpecifier) -> Tuple<Shape>
- Returns
Tuple<Shape>
This function is an expansion on get-layer
that includes
get-pad-by-ref¶
Find a virtual pad with the given reference
public defn get-pad-by-ref (vp:VirtualLP, r:Ref|Int) -> Maybe<VirtualPad>
- Returns
Maybe<VirtualPad>
VirtualLP¶
Construct a VirtualLP Root Node
public defn VirtualLP (pose:Pose = ? -- name?:Maybe<String> = ?, class:Seqable<String>|String = ?) -> VirtualLP
- Returns
VirtualLP
get-copper¶
public defn get-copper (vp:VirtualLP, li:LayerIndex) -> Tuple<VirtualCopper>
- Returns
Tuple<VirtualCopper>
add-thermal-pad¶
Add a Thermal Pad to the Virtual LandPattern Scene Graph
public defn add-thermal-pad (vp:VirtualLP, pad-id:Int|Ref, thermal-lead?:False|Shape|ThermalPad -- pose:Pose = ?)
vp: VirtualLP
- Scene Graphpad-id: Int|Ref
- Pad Id for this thermal pad - this is used in thepin-properties
mapping of thepcb-component
to map symbol pin to landpattern pad.thermal-lead?: False|Shape|ThermalPad
- Thermal Lead Object Definition. IfFalse
- this function does nothing. IfShape
- then we construct aThermalPad
with no special handling. Otherwise, we use theThermalPad
to construct a large thermal pad with optional paste subdivision etc. and add it to the passed scenegraph.
get-pad-by-ref!¶
Forcefully find a virtual pad with the given reference
public defn get-pad-by-ref! (vp:VirtualLP, r:Ref|Int) -> VirtualPad
- Returns
VirtualPad
identify-pad-rows¶
Identify the unique rows of pads in this land pattern
public defn identify-pad-rows (vp:VirtualLP) -> Tuple<Int>
vp: VirtualLP
- VirtualLP SceneGraph- Returns
Tuple<Int>
- Tuple of row indices. For example, a dual with 16 pins (2 x 8) will have 8 rows and 2 columns. This function will return 8.
get-silkscreen-outline!¶
Retrieve the silkscreen outline shape as a VirtualArtwork
object.
public defn get-silkscreen-outline! (vp:VirtualLP) -> VirtualArtwork
- Returns
VirtualArtwork
This function looks for a VirtualArtwork
object with class outline
.
If it finds a single object meeting this description - it will be
returned. Otherwise it throws a ValueError
This function will search recursively through the passed vp
node
and all child nodes for the outline
artwork.
elements¶
Local Elements for this Virtual Landpattern
public defn elements (vp:VirtualLP) -> Seqable<VirtualElement>
- Returns
Seqable<VirtualElement>
This does not search recursively into the children, it just reports the elements of this node.
pad-interior-bounds¶
Construct the interior bounds for the pads of a component
public defn pad-interior-bounds (vp:VirtualLP, side:Side -- layer-spec:LayerSpecifier|False = ?) -> Box
vp: VirtualLP
- VirtualLP Scene Graph - we will search for pads here.side: Side
- Board side to collect pads from.layer-spec: LayerSpecifier|False
- Specify which layer is used to collect the shapes. By default, this function uses theSolderMask(side)
layer. To select the copper on this side - usefalse
. See bounds- Returns
Box
- Throws
ValueError
- if it encounter a number of columns that it can't handle. Specifically, this function can handle [1, 2, 4] columns of pads. This corresponds to 2-pin, dual-row, and quad land patterns, respectively.
This function only makes sense for things like QFPs, SOICs, SSOPs, or 2-pin components.
This function assumes that you have used the function build-vpad-classes when constructing the rows and columns of pads for your footprint.
This function attempts to extract out the pads by row or column and then use the bounding box of the soldermask to determine the interior bounds between the pads.
Note - there is another way to do this that I decided against which was to try and find lines and intersections of those lines. This seemed like it might be a bit more robust but at the cost of being more complex code wise.
add-cutout¶
Add cutouts to the landpattern based on specified shapes.
public defn add-cutout (vp:VirtualLP, shape:Shape -- name:String = ?, class:Seqable<String>|String = ?) -> False
- Returns
False
add-cutout¶
public defn add-cutout (vp:VirtualLP, shapes:Seqable<Shape> -- name:String = ?, class:Seqable<String>|String = ?) -> False
- Returns
False
is-root?¶
Check if this is the root node in a Virtual Landpattern Tree
public defn is-root? (vp:VirtualLP) -> True|False
- Returns
True|False
get-artwork¶
public defn get-artwork (vp:VirtualLP, ls:LayerSpecifier) -> Seqable<VirtualArtwork>
- Returns
Seqable<VirtualArtwork>
add-keepout¶
Add keepout regions to the landpattern based on specified shapes.
public defn add-keepout (vp:VirtualLP, shape:Shape -- start:LayerIndex = ?, end:LayerIndex = ?, name:String = ?, class:Seqable<String>|String = ?) -> False
- Returns
False
add-keepout¶
public defn add-keepout (vp:VirtualLP, shapes:Seqable<Shape> -- start:LayerIndex = ?, end:LayerIndex = ?, name:String = ?, class:Seqable<String>|String = ?) -> False
- Returns
False
get-first-pad¶
Find the earliest virtual pad in the given landpattern by comparing pad references
public defn get-first-pad (vp:VirtualLP) -> VirtualPad
- Returns
VirtualPad
General Definitions¶
compare-pad-id¶
Compare two pad references
public defn compare-pad-id (r1:Ref|Int, r2:Ref|Int) -> Int
- Returns
Int
build-vpad-classes¶
Construct a set of class
strings for VirtualPad creation.
public defn build-vpad-classes (r:Int, c:Int) -> Tuple<String>
- Returns
Tuple<String>
This will construct the following class strings:
- "pad"
- "col-N" where
N
will be the column number - "row-M" where
M
will be the row number
Related Packages¶
Forwarded by packages: jsl/landpatterns/framework, jsl/landpatterns