KiCad Pcbnew Python Scripting
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
plugins.PadArray.PadGridArray Class Reference

A basic grid of pads. More...

Inheritance diagram for plugins.PadArray.PadGridArray:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, pad, nx, ny, px, py, centre=pcbnew.VECTOR2I(0, 0))
 
def AlphaNameFromNumber (self, n, aIndex=1, alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ")
 Utility function to generate an alphabetical name:
 
def NamingFunction (self, x, y)
 Implementation of the naming function: right to left, top-to-bottom.
 
def AddPadsToModule (self, dc)
 Create the pads and add them to the module in the correct positions.
 
- Public Member Functions inherited from plugins.PadArray.PadArray
def __init__ (self, pad)
 
def SetPinNames (self, pinNames)
 Set a name for all the pins.
 
def SetFirstPadType (self, firstPad)
 If the array has a different first pad, this is the pad that is used.
 
def SetFirstPadInArray (self, fpNum)
 Set the numbering for the first pad in the array.
 
def AddPad (self, pad)
 Add a pad to the array, under the same footprint as the main prototype pad.
 
def GetPad (self, is_first_pad, pos)
 Get a pad in the array with the given position.
 
def GetName (self, *args, **kwargs)
 Get the pad name from the naming function, or the pre-set pinNames parameter (set with SetPinNames)
 
def NamingFunction (self, *args, **kwargs)
 Implement this as needed for each array type.
 

Public Attributes

 nx
 
 ny
 
 px
 
 py
 
 centre
 
- Public Attributes inherited from plugins.PadArray.PadArray
 firstPadNum
 
 pinNames
 
 pad
 
 firstPad
 

Detailed Description

A basic grid of pads.

Definition at line 218 of file PadArray.py.

Constructor & Destructor Documentation

◆ __init__()

def plugins.PadArray.PadGridArray.__init__ (   self,
  pad,
  nx,
  ny,
  px,
  py,
  centre = pcbnew.VECTOR2I(0, 0) 
)
Parameters
padthe prototypical pad of the array
nxnumber of pads in x-direction
nynumber of pads in y-direction
pxpitch in x-direction
pypitch in y-direction
centrearray centre point

Reimplemented from plugins.PadArray.PadArray.

Reimplemented in plugins.PadArray.PadLineArray.

Definition at line 223 of file PadArray.py.

Here is the caller graph for this function:

Member Function Documentation

◆ AddPadsToModule()

def plugins.PadArray.PadGridArray.AddPadsToModule (   self,
  dc 
)

Create the pads and add them to the module in the correct positions.

Parameters
dcthe drawing context

Definition at line 275 of file PadArray.py.

◆ AlphaNameFromNumber()

def plugins.PadArray.PadGridArray.AlphaNameFromNumber (   self,
  n,
  aIndex = 1,
  alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 
)

Utility function to generate an alphabetical name:

eg. 1 - A, 2 - B, 26 - AA, etc

Parameters
aIndexindex of 'A': 0 for 0 - A
nthe pad index
alphabetset of allowable chars if not A-Z, e.g. ABCDEFGHJKLMNPRTUVWY for BGA

Definition at line 244 of file PadArray.py.

Here is the caller graph for this function:

◆ NamingFunction()

def plugins.PadArray.PadGridArray.NamingFunction (   self,
  x,
  y 
)

Implementation of the naming function: right to left, top-to-bottom.

Parameters
xthe pad x index
ythe pad y index

Reimplemented from plugins.PadArray.PadArray.

Reimplemented in plugins.PadArray.EPADGridArray.

Definition at line 265 of file PadArray.py.

Here is the caller graph for this function:

Member Data Documentation

◆ centre

plugins.PadArray.PadGridArray.centre

Definition at line 242 of file PadArray.py.

◆ nx

plugins.PadArray.PadGridArray.nx

Definition at line 238 of file PadArray.py.

◆ ny

plugins.PadArray.PadGridArray.ny

Definition at line 239 of file PadArray.py.

◆ px

plugins.PadArray.PadGridArray.px

Definition at line 240 of file PadArray.py.

◆ py

plugins.PadArray.PadGridArray.py

Definition at line 241 of file PadArray.py.


The documentation for this class was generated from the following file: