Skip to content

jsl/landpatterns/silkscreen

Package name: jsl/landpatterns/silkscreen

Summary

Data Types

SilkscreenOutline

Base Type for Silkscreen Outline Generators

Multis

Function Description
build-shape
build-outline Build Component Outline Silkscreen Content in VirtualLP

Methods

Function Description
build-outline Default Implementation for Build Component Outline

OverallOutline

Constructors

Function Description
OverallOutline (+ 1) Constructor for defstruct OverallOutline

SingleLineOutline

Constructors

Function Description
SingleLineOutline (+ 1) Constructor for defstruct SingleLineOutline

InterstitialOutline

Create an interstitial silkscreen outline.

Constructors

Function Description
InterstitialOutline (+ 1) Constructor for defstruct InterstitialOutline

InteriorEdgesOutline

Constructors

Function Description
InteriorEdgesOutline (+ 1) Constructor for defstruct InteriorEdgesOutline

Functions

Function Description
has-enough-interior-space?

EdgesOutline

Constructors

Function Description
EdgesOutline (+ 1) Constructor for defstruct EdgesOutline

PackageOutline

Silkscreen Outline Generator that follows the Package Body

Constructors

Function Description
PackageOutline (+ 1) Constructor for defstruct PackageOutline

SilkscreenEdge

Selector for whether the edge lines are

Functions

Function Description
create-silkscreen-pkg-extrema-outline Construct and instantiate the package extrema lines in the scene graph
construct-pkg-extrema-lines Construct the shapes for the package extrema lines
get-extended-pkg-outline Determine the dimensions of the package body with Y extension

General Definitions

Function Description
build-outline-pin-1-triangle Create a triangle shaped marker in the outline on the silkscreen
create-silkscreen-outline Construct a silkscreen outline of a component based on the Package Body
create-silkscreen-overall-outline Construct a silkscreen outline based on the Package Body and Soldermask Pad Openings
default-mask-clearance
add-pin-1-dot Construct the Pin-1 Dot Marker at a particular location.
compute-triangle-marker Compute the Triangle Marker Shape for Pin-1 outline
construct-pkg-outline Construct the projected shape of the package body on the board.
compute-corner Compute the Corner Anchor Position.
construct-overall-outline Construct the projected shape of the Package Body and Soldermask Pad Openings
build-smd-pin-1-dot Create a Pin 1 indicator as a round dot next to the pad
create-corner-marker-shape Create a shape for the triangle corner marker
corner-to-rotation Compute the rotation of the shape pattern for a particular anchor
default-silk-width
compute-closest-corner Compute the closest corner of the passed Box to the Pin1 position.

Definitions

SilkscreenOutline

Base Type for Silkscreen Outline Generators

public deftype SilkscreenOutline

The user should derive from this type and implement its interface to construct the silkscreen outline for a component.

Multis

build-shape

public defmulti build-shape (s:SilkscreenOutline, vp:VirtualLP -- side:Side = ?) -> Shape

  • Returns Shape

build-outline

Build Component Outline Silkscreen Content in VirtualLP

public defmulti build-outline (s:SilkscreenOutline, vp:VirtualLP -- side:Side = ?)

  • s: SilkscreenOutline - Silkscreen Outline Object
  • vp: VirtualLP - Virtual LandPattern Scene Graph. User can introspect the scene graph through this object then construct the appropriate new geometry.

This is the interface for the silkscreen outline generator function that will construct the silkscreen geometry in the VirtualLP scene graph.

Methods

build-outline

Default Implementation for Build Component Outline

defmethod build-outline (s:SilkscreenOutline, vp:VirtualLP -- side:Side = ?)

This method uses the build-shape method to construct the silkscreen content and then applies it to the VirtualLP scene graph.

OverallOutline

public defstruct OverallOutline <: SilkscreenOutline :
    density-level: DensityLevel
    line-width: Double
    mask-clearance: Double
    pkg-body: PackageBody

  • density-level: DensityLevel - Density Level Specification This determines whether we use:

    • Maximum Material Condition
    • Nominal Material Condition
    • Least Material Condition

    of the package body to construct the outline.

  • line-width: Double - Line Width for the constructed silkscreen outline By default we use the MinSilkscreenWidth from the design rules.

  • mask-clearance: Double - Clearance from silkscreen to the soldermask By default we use the MinSilkSolderMaskSpace from the design rules.

  • pkg-body: PackageBody - Package Body Dimensions These dimensions will be projected on to the board to construct the outline.

Constructors

OverallOutline

Constructor for defstruct OverallOutline

public defn OverallOutline (pkg-body:PackageBody, line-width:Double, mask-clearance:Double = ?, density-level:DensityLevel = ?)

OverallOutline

Constructor for defstruct OverallOutline

public defn OverallOutline ( -- pkg-body:PackageBody, line-width:Double = ?, mask-clearance:Double = ?, density-level:DensityLevel = ?)

SingleLineOutline

public defstruct SingleLineOutline <: SilkscreenOutline :
    density-level: DensityLevel
    edge: SilkscreenEdge
    line-width: Double
    mask-clearance: Double
    pkg-body: PackageBody

  • density-level: DensityLevel - Density Level Specification This determines whether we use:

    • Maximum Material Condition
    • Nominal Material Condition
    • Least Material Condition

    of the package body to construct the outline.

  • edge: SilkscreenEdge

  • line-width: Double - Line Width for the constructed silkscreen outline By default we use the MinSilkscreenWidth from the design rules.

  • mask-clearance: Double - Clearance from silkscreen to the soldermask By default we use the MinSilkSolderMaskSpace from the design rules.

  • pkg-body: PackageBody - Package Body Dimensions These dimensions will be projected on to the board to construct the outline.

Constructors

SingleLineOutline

Constructor for defstruct SingleLineOutline

public defn SingleLineOutline (pkg-body:PackageBody, edge:SilkscreenEdge, line-width:Double = ?, mask-clearance:Double = ?, density-level:DensityLevel = ?)

SingleLineOutline

Constructor for defstruct SingleLineOutline

public defn SingleLineOutline ( -- pkg-body:PackageBody, edge:SilkscreenEdge = ?, line-width:Double = ?, mask-clearance:Double = ?, density-level:DensityLevel = ?)

InterstitialOutline

Create an interstitial silkscreen outline.

public defstruct InterstitialOutline <: SilkscreenOutline :
    density-level: DensityLevel
    line-width: Double
    mask-clearance: Double
    pkg-body: PackageBody

  • density-level: DensityLevel - Density Level Specification This determines whether we use:

    • Maximum Material Condition
    • Nominal Material Condition
    • Least Material Condition

    of the package body to construct the outline.

  • line-width: Double - Line Width for the constructed silkscreen outline By default we use the MinSilkscreenWidth from the design rules.

  • mask-clearance: Double - Clearance from silkscreen to the soldermask By default we use the MinSilkSolderMaskSpace from the design rules.

  • pkg-body: PackageBody - Package Body Dimensions These dimensions will be projected on to the board to construct the outline.

The interstitial outline is formed between the pads, typically underneath the component package body. It may or may not be seen after the component has been installed.

This is most useful for packages like QFP, SOIC, SSOP, and similar packages. It also works for 2-pin SMT and through-hole components.

Constructors

InterstitialOutline

Constructor for defstruct InterstitialOutline

public defn InterstitialOutline (pkg-body:PackageBody, line-width:Double, mask-clearance:Double = ?, density-level:DensityLevel = ?)

InterstitialOutline

Constructor for defstruct InterstitialOutline

public defn InterstitialOutline ( -- pkg-body:PackageBody, line-width:Double = ?, mask-clearance:Double = ?, density-level:DensityLevel = ?)

InteriorEdgesOutline

public defstruct InteriorEdgesOutline <: SilkscreenOutline :
    density-level: DensityLevel
    edge: SilkscreenEdge
    line-width: Double
    mask-clearance: Double
    pkg-body: PackageBody

  • density-level: DensityLevel - Density Level Specification This determines whether we use:

    • Maximum Material Condition
    • Nominal Material Condition
    • Least Material Condition

    of the package body to construct the outline.

  • edge: SilkscreenEdge

  • line-width: Double - Line Width for the constructed silkscreen outline By default we use the MinSilkscreenWidth from the design rules.

  • mask-clearance: Double - Clearance from silkscreen to the soldermask By default we use the MinSilkSolderMaskSpace from the design rules.

  • pkg-body: PackageBody - Package Body Dimensions These dimensions will be projected on to the board to construct the outline.

Constructors

InteriorEdgesOutline

Constructor for defstruct InteriorEdgesOutline

public defn InteriorEdgesOutline (pkg-body:PackageBody, edge:SilkscreenEdge, line-width:Double = ?, mask-clearance:Double = ?, density-level:DensityLevel = ?)

InteriorEdgesOutline

Constructor for defstruct InteriorEdgesOutline

public defn InteriorEdgesOutline ( -- pkg-body:PackageBody, edge:SilkscreenEdge = ?, line-width:Double = ?, mask-clearance:Double = ?, density-level:DensityLevel = ?)

Functions

has-enough-interior-space?

public defn has-enough-interior-space? (s:InteriorEdgesOutline, vp:VirtualLP -- side:Side = ?) -> True|False

  • Returns True|False

EdgesOutline

public defstruct EdgesOutline <: SilkscreenOutline :
    density-level: DensityLevel
    edge: SilkscreenEdge
    line-width: Double
    mask-clearance: Double
    pkg-body: PackageBody

  • density-level: DensityLevel - Density Level Specification This determines whether we use:

    • Maximum Material Condition
    • Nominal Material Condition
    • Least Material Condition

    of the package body to construct the outline.

  • edge: SilkscreenEdge

  • line-width: Double - Line Width for the constructed silkscreen outline By default we use the MinSilkscreenWidth from the design rules.

  • mask-clearance: Double - Clearance from silkscreen to the soldermask By default we use the MinSilkSolderMaskSpace from the design rules.

  • pkg-body: PackageBody - Package Body Dimensions These dimensions will be projected on to the board to construct the outline.

Constructors

EdgesOutline

Constructor for defstruct EdgesOutline

public defn EdgesOutline (pkg-body:PackageBody, edge:SilkscreenEdge, line-width:Double = ?, mask-clearance:Double = ?, density-level:DensityLevel = ?)

EdgesOutline

Constructor for defstruct EdgesOutline

public defn EdgesOutline ( -- pkg-body:PackageBody, edge:SilkscreenEdge = ?, line-width:Double = ?, mask-clearance:Double = ?, density-level:DensityLevel = ?)

PackageOutline

Silkscreen Outline Generator that follows the Package Body

public defstruct PackageOutline <: SilkscreenOutline :
    density-level: DensityLevel
    line-width: Double
    mask-clearance: Double
    pkg-body: PackageBody

  • density-level: DensityLevel - Density Level Specification This determines whether we use:

    • Maximum Material Condition
    • Nominal Material Condition
    • Least Material Condition

    of the package body to construct the outline.

  • line-width: Double - Line Width for the constructed silkscreen outline By default we use the MinSilkscreenWidth from the design rules.

  • mask-clearance: Double - Clearance from silkscreen to the soldermask By default we use the MinSilkSolderMaskSpace from the design rules.

  • pkg-body: PackageBody - Package Body Dimensions These dimensions will be projected on to the board to construct the outline.

Constructors

PackageOutline

Constructor for defstruct PackageOutline

public defn PackageOutline (pkg-body:PackageBody, line-width:Double, mask-clearance:Double = ?, density-level:DensityLevel = ?)

PackageOutline

Constructor for defstruct PackageOutline

public defn PackageOutline ( -- pkg-body:PackageBody, line-width:Double = ?, mask-clearance:Double = ?, density-level:DensityLevel = ?)

SilkscreenEdge

Selector for whether the edge lines are

public defenum SilkscreenEdge <: Equalable & Hashable

  • NS-Edge

  • EW-Edge

drawn on the Top / Bottom sides (N/S) or the Left/Right sides (E/W)

Functions

create-silkscreen-pkg-extrema-outline

Construct and instantiate the package extrema lines in the scene graph

public defn create-silkscreen-pkg-extrema-outline (vp:VirtualLP, pkg-body:PackageBody -- edge:SilkscreenEdge = ?, density-level:DensityLevel = ?, line-width:Double = ?, mask-clearance:Double = ?, side:Side = ?) -> Shape

  • vp: VirtualLP - Virtual Land Pattern Scene Graph node
  • pkg-body: PackageBody - Package dimensional body for sizing the lines.
  • edge: SilkscreenEdge - N/S or E/W side of the component to creates lines for.
  • density-level: DensityLevel - Package density level. Default is DENSITY-LEVEL from design settings.
  • line-width: Double - Line width in mm. Default is silkscreen width from the design's pcb-rules.
  • mask-clearance: Double - Clearance distance between soldermask and silkscreen Default is the clearance rule from the design's pcb-rules.
  • side: Side - Top or Bottom side of the board where silkscreen will be drawn. We use this to determine which pads to include in the outline calculation.
  • Returns Shape

Legacy - To be replaced by EdgesOutline

construct-pkg-extrema-lines

Construct the shapes for the package extrema lines

public defn construct-pkg-extrema-lines (vp:VirtualLP, pkg-body:PackageBody -- density-level:DensityLevel = ?, line-width:Double = ?, mask-clearance:Double = ?, side:Side = ?, edge:SilkscreenEdge = ?) -> Shape

  • vp: VirtualLP - Virtual Land Pattern Scene Graph node
  • pkg-body: PackageBody - Package dimensional body for sizing the lines.
  • density-level: DensityLevel - Package density level. Default is DENSITY-LEVEL from design settings.
  • line-width: Double - Line width in mm. Default is silkscreen width from the design's pcb-rules.
  • mask-clearance: Double - Clearance distance between soldermask and silkscreen Default is the clearance rule from the design's pcb-rules.
  • side: Side - Top or Bottom side of the board where silkscreen will be drawn. We use this to determine which pads to include in the outline calculation.
  • edge: SilkscreenEdge - N/S or E/W side of the component to creates lines for.
  • Returns Shape

get-extended-pkg-outline

Determine the dimensions of the package body with Y extension

public defn get-extended-pkg-outline (vp:VirtualLP, pkg-body:PackageBody, density-level:DensityLevel, line-width:Double, mask-clearance:Double, side:Side, edge:SilkscreenEdge = ?) -> Box

  • vp: VirtualLP - Virtual Land Pattern Scene Graph
  • pkg-body: PackageBody - Package Body for the IC
  • density-level: DensityLevel - Density Level for the Package
  • line-width: Double - Silkscreen min line width as defined by pcb-rules.
  • mask-clearance: Double - Minimum soldermask clearance to silkscreen as defined by the pcb-rules.
  • side: Side - Which side of the board this outline will be created on. It filters for which pads of the landpattern to inspect.
  • Returns Box

This function is used to create the minimal package body outline that we will use to create the horizontal lines at the extremes on the package body.

This function attempts to make a conservative size box by accounting for both the package body length and the location of the soldermask opening of the pads.

This function is typically only useful for dual-row packages like SOP, SON, SOT, etc.

General Definitions

build-outline-pin-1-triangle

Create a triangle shaped marker in the outline on the silkscreen

public defn build-outline-pin-1-triangle (vp:VirtualLP -- pin-1-id:Int|Ref = ?)

  • vp: VirtualLP - Land Pattern scene graph node we will search for the outline
  • pin-1-id: Int|Ref - This argument accepts either an Int or a Ref for identifying the "Pin 1" of the component. If this is an Int it will map to the conventional p[N] ref syntax used for land patterns. The default value is 1.
  • Throws ValueError - If we find more than one outline in the silkscreen, or if we fail to find the pin-1-id pad.

This function looks for the outline shape in the virtual artwork of this VirtualLP node and then attempts to find the corner of that outline closest to the pin-1-id pad of the land pattern.

It then construct a triangle shaped marker and places it in that corner for a heavy indication of the pin 1 location. This corner marker will be placed in the silkscreen layer on the same side of the board as the outline is found.

create-silkscreen-outline

Construct a silkscreen outline of a component based on the Package Body

public defn create-silkscreen-outline (vp:VirtualLP, pkg-body:PackageBody -- density-level:DensityLevel = ?, line-width:Double = ?, mask-clearance:Double = ?, side:Side = ?) -> False

  • vp: VirtualLP - Virtual LP scene graph node - outline will be created here.
  • pkg-body: PackageBody - 3D body model for the component
  • density-level: DensityLevel - Indicates whether we will use MMC, NMC, or LMC
  • line-width: Double - width of the line to draw.
  • mask-clearance: Double - clearance between soldermask openings and the outline.
  • side: Side - Side of the board. Default is Top.
  • Returns False

To be replaced by the PackageOutline type

create-silkscreen-overall-outline

Construct a silkscreen outline based on the Package Body and Soldermask Pad Openings

public defn create-silkscreen-overall-outline (vp:VirtualLP, pkg-body:PackageBody -- density-level:DensityLevel = ?, line-width:Double = ?, mask-clearance:Double = ?, side:Side = ?) -> False

  • vp: VirtualLP - Virtual LP scene graph node - outline will be created here.
  • pkg-body: PackageBody - 3D body model for the component
  • density-level: DensityLevel - Indicates whether we will use MMC, NMC, or LMC
  • line-width: Double - width of the line to draw.
  • mask-clearance: Double - clearance between soldermask openings and the outline.
  • Returns False

Legacy - To be replaced with OverallOutline

The user must create all of the pads associated with this landpattern before invoking this function.

default-mask-clearance

public defn default-mask-clearance () -> Double

  • Returns Double

add-pin-1-dot

Construct the Pin-1 Dot Marker at a particular location.

public defn add-pin-1-dot (vp:VirtualLP, pos:Point -- line-width:Double = ?, side:Side = ?)

  • vp: VirtualLP - Virtual Landpattern scene graph node.
  • pos: Point - Location in the current scene graph node where this dot will be drawn.
  • line-width: Double - silkscreen line width defines the radius of the circle.
  • side: Side - Top or Bottom side silkscreen.

This function draws a Circle shaped dot at the provided location. This function is used to provide a visual pin 1 indicator in the silkscreen.

compute-triangle-marker

Compute the Triangle Marker Shape for Pin-1 outline

public defn compute-triangle-marker (pin-1-pos:Point, outline-box:Box, line-width:Double, max-height:Double = ?) -> Shape

  • pin-1-pos: Point - Position of the pin 1 pad
  • outline-box: Box - Silkscreen outline as a 2D box.
  • line-width: Double - Silkscreen line width - primarily used for positioning and not for drawing lines.
  • max-height: Double - Max triangle marker height. This function attempts to compute a reasonable marker size based on the component's scale. This is a limiter to prevent unnecessarily large triangle marker features.
  • Returns Shape

construct-pkg-outline

Construct the projected shape of the package body on the board.

public defn construct-pkg-outline (vp:VirtualLP, pkg-body:PackageBody -- density-level:DensityLevel = ?, line-width:Double = ?, mask-clearance:Double = ?) -> Shape

  • vp: VirtualLP - Virtual LP scene graph node - outline will be created here.
  • pkg-body: PackageBody - 3D body model for the component
  • density-level: DensityLevel - Indicates whether we will use MMC, NMC, or LMC
  • line-width: Double - width of the line to draw.
  • mask-clearance: Double - clearance between soldermask openings and the outline.
  • Returns Shape

Legacy - Use PackageOutline

compute-corner

Compute the Corner Anchor Position.

public defn compute-corner (closest:Point) -> Anchor

  • closest: Point - Closest point on the outline
  • Returns Anchor

Given a point on the outline box that is closest to pin 1 - compute the anchor position. For example, if pin 1 is in the top left and the closest corner is in the top-left, this would be the NW anchor position.

construct-overall-outline

Construct the projected shape of the Package Body and Soldermask Pad Openings

public defn construct-overall-outline (vp:VirtualLP, pkg-body:PackageBody -- density-level:DensityLevel = ?, line-width:Double = ?, mask-clearance:Double = ?, side:Side = ?) -> Shape

  • vp: VirtualLP - Virtual LP scene graph node - outline will be created here.
  • pkg-body: PackageBody - 3D body model for the component
  • density-level: DensityLevel - Indicates whether we will use MMC, NMC, or LMC
  • line-width: Double - width of the line to draw.
  • mask-clearance: Double - clearance between soldermask openings and the outline.
  • Returns Shape - LineRectangle Shape for the union of the package body and the pad openings.

Legacy - Use OverallOutline

The user must create all of the pads associated with this landpattern before invoking this function.

This function takes the union of the pads and the package body outline and constructs and overall outline encompassing this shape.

build-smd-pin-1-dot

Create a Pin 1 indicator as a round dot next to the pad

public defn build-smd-pin-1-dot (vp:VirtualLP -- pin-1-id:Int|Ref = ?, dir:Dir = ?, margin:Double = ?, line-width:Double = ?, mask-clearance:Double = ?, side:Side = ?)

  • vp: VirtualLP - Virtual Landpattern that will store artwork and be inspected for pads that match pin-1-id. Note that the pads must already have been added to the land pattern for this function to work.
  • pin-1-id: Int|Ref - Indicates which pad by Int or Ref will be used as the "Pin 1" of the land pattern.
  • dir: Dir - Direction where to place the dot with respect to the pin 1 pad. Default value is Up (+Y)
  • line-width: Double - Used for the radius of the created Circle. By default this is the minimum silk width from the design rules.
  • mask-clearance: Double - Mask clearance rule used to place the dot sufficiently far away the Pin 1 Pad. Default is the minimum silk to soldermask clearance pulled from the design rules.
  • side: Side - Indicates whether the marker will be drawn on the top or bottom side of the board. Default is Top.

By default This creates a small circle in the silkscreen directly above (+Y) the "pin 1" pad of a land pattern. You can use the dir option to place the marker in a different cardinal direction.

This function assumes that the space directly above the pin 1 pad is available to place this circle.

create-corner-marker-shape

Create a shape for the triangle corner marker

public defn create-corner-marker-shape (line-width:Double, marker-height:Double) -> Shape

  • Returns Shape

This is often used in a rectangular outlines for marking the the pin-1 indication in one of the corners of the outline.

This function creates a shape that is a solid, isosceles right triangle (polygon) in the lower right quadrant of the XY plane. It is then offset from the X and Y axis (toward the lower right quadrant) by half the line-width

corner-to-rotation

Compute the rotation of the shape pattern for a particular anchor

public defn corner-to-rotation (corner:Anchor) -> Double

  • Returns Double

We typically position the triangle marker or pin 1 dot marker by transforming its base configuration. This means translating and rotating it to fit in one of the outline corners.

This method takes the corner anchor position and converts it to rotation angle for a shape pattern.

default-silk-width

public defn default-silk-width () -> Double

  • Returns Double

compute-closest-corner

Compute the closest corner of the passed Box to the Pin1 position.

public defn compute-closest-corner (pin-1-pos:Point, outline-box:Box)

  • pin-1-pos: Point - Position of the Pin 1 pad.
  • outline-box: Box - Box that represents the silkscreen outline of the component.

This tool is used to determine what to place pin 1 markers in a component's silkscreen.

Related Packages

Forwarded by packages: jsl/landpatterns/framework, jsl/landpatterns