Skip to content

Pad Generators

Package name: jsl/landpatterns/pads

Tools for creating pads of different types.

This package contains the implementation of various utilities for creating pcb-pad types. The functions in this package are organized with the following function names:

All of the functions in this package use millimeters for units.

Plated Holes:

Functions will have names in the following format:

defn <HOLE>-[pth|npth]-<LAND>-pad (...)

Where:

  • &#60;HOLE> (String) = The shape of the drilled hole
  • [pth|npth] = User can select either plated or non-plated through hole.
  • &#60;LAND> (String) = The shape of the pad (copper)

The HOLE string can be one of:

  • oval - Capsule
  • circle - Circle

The LAND string can be one of:

  • oval - Capsule
  • circle - Circle
  • rect - Rectangle
  • round-rect - Rectangle with radial rounded corners
  • cham-rect - Rectangle with chamfered corner edges
  • dshape - a D shaped pad with one set of corners rounded.
  • general-round-rect - Generalized Rounded Rectangle
  • general-cham-rect - Generalized Chamfered Rectangle

Each function also accepts a mask and paste overriding value. This value can be either a parameterization of the pad shape for that function or a completely different shape.

SMD Pads

The surface mount pad functions come in the form:

defn <SHAPE>-smd-pad (...)

Where the &#60;SHAPE> string can be one of:

  • oval - Capsule
  • circle - Circle
  • rect - Rectangle
  • round-rect - Rectangle with radial rounded corners
  • cham-rect - Rectangle with chamfered corner edges
  • dshape - a D shaped pad with one set of corners rounded.
  • general-round-rect - Generalized Rounded Rectangle
  • general-cham-rect - Generalized Chamfered Rectangle

Each function also accepts a mask and paste overriding value. This value can be either a parameterization of the pad shape for that function or a completely different shape.

TODO: I want a function that will create a silkscreen outline of a shape but not draw silkscreen over any pads and keep enough clearance around the soldermask as to not generate any warnings.

Summary

PasteMaskStyle

Paste Mask Opening Style

General Definitions

Function Description
dshape-smd-pad
circle-pth-cham-rect-pad
oval-pth-cham-rect-pad
testpoint-pad (+ 1)
round-rect-smd-pad
general-round-rect-smd-pad (+ 1)
smd-pad (+ 2) PCB Pad Definition for SMD device
circle-smd-pad
oval-smd-pad
oval-npth-pad
non-plated-hole-landpattern (+ 3)
circle-npth-pad Create a circular NPTH pad
circle-pth-general-cham-rect-pad (+ 1)
oval-pth-general-cham-rect-pad (+ 1) Create a oval-shaped plated through-hole with ShapeType pad.
make-pastemask (+ 1) Generate a paste mask opening by using this explicit shape.
cham-rect-smd-pad
oval-pth-dshape-pad
circle-pth-dshape-pad
pth-pad (+ 1) Create a Plated Through-Hole (PTH) Pad Definition
make-soldermask (+ 1) Generator to apply a soldermask shape to a pcb-pad
oval-pth-round-rect-pad
circle-pth-round-rect-pad
oval-pth-general-round-rect-pad (+ 1) Create a oval-shaped plated through-hole with ShapeType pad.
circle-pth-general-round-rect-pad (+ 1)
get-default-soldermask-amount
oval-pth-circle-pad
npth-pad Create a Non-Plated Through-Hole (NPTH) pad
circle-pth-circle-pad
oval-pth-oval-pad
make-thermal-pad Generate a Thermal Pad for a Package
general-cham-rect-smd-pad (+ 1)
circle-pth-oval-pad

Definitions

PasteMaskStyle

Paste Mask Opening Style

public defenum PasteMaskStyle <: Equalable & Hashable

This enum provides flags that can indicate the style of pastemask to generate. This can often be useful for generating a pastemask layer that conforms to certain norms.

General Definitions

dshape-smd-pad

public defn dshape-smd-pad (pad-rect:Dims, pad-r:Double -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

circle-pth-cham-rect-pad

public defn circle-pth-cham-rect-pad (hole-diam:Double, pad-rect:Dims, pad-r:Double -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

oval-pth-cham-rect-pad

public defn oval-pth-cham-rect-pad (hole-size:Dims, pad-rect:Dims, pad-r:Double -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

testpoint-pad

public pcb-pad testpoint-pad (testpoint-shape:Shape)

testpoint-pad

public defn testpoint-pad (diameter:Double -- anchor:Anchor = ?)

round-rect-smd-pad

public defn round-rect-smd-pad (pad-rect:Dims, pad-r:Double -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

general-round-rect-smd-pad

public defn general-round-rect-smd-pad (pad-rect:Dims, pad-rs:Tuple<Double> -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

general-round-rect-smd-pad

public defn general-round-rect-smd-pad (pad-rect:Dims, pad-r:Double, m:CornerModifier -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

smd-pad

PCB Pad Definition for SMD device

public pcb-pad smd-pad (copper:Shape, mask:Shape|False = ?, paste:Shape|False = ?)

  • copper: Shape - Defines the shape of the copper layer for this pad.
  • mask: Shape|False - Defines the shape fo the soldermask opening for this pad. If this value is false then no soldermask opening will be created. By default, the soldermask will be created using the copper shape applying the default expansion rules.
  • paste: Shape|False - Defines the shape of the pastemask opening for this pad. If this value is false then no pastemask opening is created. By default, the pastemask opening is 1:1 with the copper shape. TODO - add a rule for default pastemask contraction rules?

TODO - Create a diagram here for the pad definition

smd-pad

Create a Rectangular PCB Pad Definition

public defn smd-pad (width:Double, height:Double -- anchor:Anchor = ?)

  • width: Double - X dimension of the pad shape
  • height: Double - Y dimension of the pad shape
  • anchor: Anchor - Origin of the pad definition. By default this function uses the pad center as its anchor.

smd-pad

public defn smd-pad (d:Dims -- anchor:Anchor = ?)

circle-smd-pad

public defn circle-smd-pad (pad-diam:Double -- mask:Double|Shape|False = ?, paste:Double|Shape|False = ?, anchor:Anchor = ?)

oval-smd-pad

public defn oval-smd-pad (pad-size:Dims -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

oval-npth-pad

public defn oval-npth-pad (hole-size:Dims -- anchor:Anchor = ?)

non-plated-hole-landpattern

public pcb-landpattern non-plated-hole-landpattern (hole:Shape, mask:Shape)

non-plated-hole-landpattern

public defn non-plated-hole-landpattern (hole:Shape)

non-plated-hole-landpattern

public defn non-plated-hole-landpattern (drill-r:Double, mask-r:Double)

non-plated-hole-landpattern

public defn non-plated-hole-landpattern (drill-r:Double)

circle-npth-pad

Create a circular NPTH pad

public defn circle-npth-pad (hole-diam:Double -- anchor:Anchor = ?)

  • hole-diam: Double - Create a circular hole with this diameter.
  • anchor: Anchor - Origin of the pad definition. By default this function uses the pad center as its anchor.

circle-pth-general-cham-rect-pad

public defn circle-pth-general-cham-rect-pad (hole-diam:Double, pad-rect:Dims, pad-rs:Tuple<Double> -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

circle-pth-general-cham-rect-pad

public defn circle-pth-general-cham-rect-pad (hole-diam:Double, pad-rect:Dims, pad-r:Double, m:CornerModifier -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

oval-pth-general-cham-rect-pad

Create a oval-shaped plated through-hole with ShapeType pad.

public defn oval-pth-general-cham-rect-pad (hole-size:Dims, pad-rect:Dims, pad-rs:Tuple<Double> -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

oval-pth-general-cham-rect-pad

public defn oval-pth-general-cham-rect-pad (hole-size:Dims, pad-rect:Dims, pad-r:Double, m:CornerModifier -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

make-pastemask

Generate a paste mask opening by using this explicit shape.

public defn make-pastemask (mask-shape:Shape, side:Side = ?)

  • mask-shape: Shape - Shape for the pastemask opening.
  • side: Side - Which side of the board to apply the paste mask opening. By default this is the top-side (convention).

make-pastemask

Generate a paste mask opening by expanding/shrinking the copper shape.

public defn make-pastemask (amount:Double, side:Side = ?)

  • amount: Double - Amount in mm to expand/shrink the current copper pad shape to generate the paste mask opening. If this value is positive, then the paste mask opening is expanded. If this value is negative, then the paste mask opening is shrunk.
  • side: Side - Which side of the board to apply the paste mask opening. By default this is the top-side (convention when constructing pads).

cham-rect-smd-pad

public defn cham-rect-smd-pad (pad-rect:Dims, pad-r:Double -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

oval-pth-dshape-pad

public defn oval-pth-dshape-pad (hole-size:Dims, pad-rect:Dims, pad-r:Double -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

circle-pth-dshape-pad

public defn circle-pth-dshape-pad (hole-diam:Double, pad-rect:Dims, pad-r:Double -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

pth-pad

Create a Plated Through-Hole (PTH) Pad Definition

public pcb-pad pth-pad (hole:Shape, copper:Shape, mask:Shape|False = ?, paste:Shape|False = ?)

  • hole: Shape - Plated Through-Hole shape for this pad.
  • copper: Shape - Shape of the copper land surrounding the hole. This shape is applied to both the top and bottom layers but not to the internal layers if any.

TODO- make the same as smd-pad - mask: Shape|False - Defines the shape fo the soldermask opening for this pad. If this value is false then the soldermask will be created using default expansion rules as applied by make-soldermask. This soldermask shape will be applied to both the top and bottom layers. - paste: Shape|False - Defines the shape of the pastemask opening for this pad. If this value is false then no pastemask opening is created. The default value is false meaning no pastemask opening is applied.

TODO - Create a diagram here for the pad definition

pth-pad

Create a circular Plated Through-Hole (PTH) Pad

public defn pth-pad (hole-diam:Double, pad-diam:Double = ? -- anchor:Anchor = ?)

  • hole-diam: Double - Diameter of the hole for the PTH pad.
  • pad-diam: Double - Diameter of the plated copper around the hole.
  • anchor: Anchor - Origin of the pad definition. By default this function uses the pad center as its anchor.
  • Throws ValueError - When the pad-diam is smaller than the hole-diam. In this case, the user should use npth-pad.

This function uses the default soldermask and pastemask definitions as defined by the pth-pad generator.

make-soldermask

Generator to apply a soldermask shape to a pcb-pad

public defn make-soldermask (mask-shape:Shape)

  • mask-shape: Shape - Creates an opening of this shape in the soldermask layer of the pad. If the pad is though-hole, then the soldermask shape is applied to bot top and bottom soldermask layers.

This generator must be called from within a pcb-pad definition.

make-soldermask

Generator to apply a soldermask by expansion of the current pad shape.

public defn make-soldermask (amount:Double = ?)

  • amount: Double - The soldermask opening will be created with a shape that is an expansion of the current shape in all directions by amount. By default, the SolderMaskRegistration rule setting is used to set the default expansion amount.

This generator must be called from within a pcb-pad definition.

TODO - Need a diagram here showing the expansion characteristics for different shapes - specifically rectangle and non-convex pad shapes

oval-pth-round-rect-pad

public defn oval-pth-round-rect-pad (hole-size:Dims, pad-rect:Dims, pad-r:Double -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

circle-pth-round-rect-pad

public defn circle-pth-round-rect-pad (hole-diam:Double, pad-rect:Dims, pad-r:Double -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

oval-pth-general-round-rect-pad

Create a oval-shaped plated through-hole with ShapeType pad.

public defn oval-pth-general-round-rect-pad (hole-size:Dims, pad-rect:Dims, pad-rs:Tuple<Double> -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

oval-pth-general-round-rect-pad

public defn oval-pth-general-round-rect-pad (hole-size:Dims, pad-rect:Dims, pad-r:Double, m:CornerModifier -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

circle-pth-general-round-rect-pad

public defn circle-pth-general-round-rect-pad (hole-diam:Double, pad-rect:Dims, pad-rs:Tuple<Double> -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

circle-pth-general-round-rect-pad

public defn circle-pth-general-round-rect-pad (hole-diam:Double, pad-rect:Dims, pad-r:Double, m:CornerModifier -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

get-default-soldermask-amount

public defn get-default-soldermask-amount () -> Double

  • Returns Double

oval-pth-circle-pad

public defn oval-pth-circle-pad (hole-size:Dims, pad-diam:Double -- mask:Double|Shape|False = ?, paste:Double|Shape|False = ?, anchor:Anchor = ?)

npth-pad

Create a Non-Plated Through-Hole (NPTH) pad

public pcb-pad npth-pad (hole:Shape, mask:Shape|False = ?)

  • hole: Shape - Shape for the non-plated hole of this pad.
  • mask: Shape|False - Defines the shape fo the soldermask opening for this npth pad. If this value is false then the soldermask will be created using default expansion rules from the passed hole shape.

No copper pad is created surrounding this hole and

circle-pth-circle-pad

public defn circle-pth-circle-pad (hole-diam:Double, pad-diam:Double -- mask:Double|Shape|False = ?, paste:Double|Shape|False = ?, anchor:Anchor = ?)

oval-pth-oval-pad

public defn oval-pth-oval-pad (hole-size:Dims, pad-size:Dims -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

make-thermal-pad

Generate a Thermal Pad for a Package

public defn make-thermal-pad (shape?:False|Shape, pad-num:Int -- location:Pose = ?)

  • shape?: False|Shape - Shape for the thermal pad that will be created by this generator. If false, no thermal pad is generated. TODO - we should make this also accept a Ref type.
  • pad-num: Int - Pad Index that will be used to create the thermal pad for the package.
  • location: Pose - Optional pose for the landpattern. The default location will be at (0,0) in the landpatterns frame of reference.

general-cham-rect-smd-pad

public defn general-cham-rect-smd-pad (pad-rect:Dims, pad-rs:Tuple<Double> -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

general-cham-rect-smd-pad

public defn general-cham-rect-smd-pad (pad-rect:Dims, pad-r:Double, m:CornerModifier -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

circle-pth-oval-pad

public defn circle-pth-oval-pad (hole-diam:Double, pad-size:Dims -- mask:Dims|Shape|False = ?, paste:Dims|Shape|False = ?, anchor:Anchor = ?)

Related Packages

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