KiCad Pcbnew Python Scripting
Public Member Functions | Public Attributes | List of all members
plugins.PadArray.PadArray Class Reference

A class to assist in creating repetitive grids of pads. More...

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

Public Member Functions

def __init__ (self, pad)
 
def SetPinNames (self, pinNames)
 Set a name for all the pins. More...
 
def SetFirstPadType (self, firstPad)
 If the array has a different first pad, this is the pad that is used. More...
 
def SetFirstPadInArray (self, fpNum)
 Set the numbering for the first pad in the array. More...
 
def AddPad (self, pad)
 Add a pad to the array, under the same moodule as the main prototype pad. More...
 
def GetPad (self, is_first_pad, pos)
 Get a pad in the array with the given position. More...
 
def GetName (self, *args, **kwargs)
 Get the pad name from the naming function, or the pre-set pinNames parameter (set with SetPinNames) More...
 
def NamingFunction (self, *args, **kwargs)
 Implement this as needed for each array type. More...
 

Public Attributes

 firstPadNum
 
 pinNames
 
 pad
 
 firstPad
 

Detailed Description

A class to assist in creating repetitive grids of pads.

Generally, PadArrays have an internal prototypical pad, and copy this for each pad in the array. They can also have a special pad for the first pad, and a custom function to name the pad.

Generally, PadArray is used as a base class for more specific array types.

Definition at line 109 of file PadArray.py.

Constructor & Destructor Documentation

◆ __init__()

def plugins.PadArray.PadArray.__init__ (   self,
  pad 
)

Member Function Documentation

◆ AddPad()

def plugins.PadArray.PadArray.AddPad (   self,
  pad 
)

Add a pad to the array, under the same moodule as the main prototype pad.

Parameters
padpad to add

Definition at line 157 of file PadArray.py.

Here is the caller graph for this function:

◆ GetName()

def plugins.PadArray.PadArray.GetName (   self,
args,
**  kwargs 
)

Get the pad name from the naming function, or the pre-set pinNames parameter (set with SetPinNames)

Definition at line 183 of file PadArray.py.

Here is the caller graph for this function:

◆ GetPad()

def plugins.PadArray.PadArray.GetPad (   self,
  is_first_pad,
  pos 
)

Get a pad in the array with the given position.

Parameters
is_first_paduse the special first pad if there is one
posthe pad position

Definition at line 165 of file PadArray.py.

Here is the caller graph for this function:

◆ NamingFunction()

def plugins.PadArray.PadArray.NamingFunction (   self,
args,
**  kwargs 
)

Implement this as needed for each array type.

Reimplemented in plugins.PadArray.PadCircleArray, plugins.PadArray.PadCustomArray, plugins.PadArray.EPADGridArray, plugins.PadArray.PadZGridArray, and plugins.PadArray.PadGridArray.

Definition at line 194 of file PadArray.py.

Here is the caller graph for this function:

◆ SetFirstPadInArray()

def plugins.PadArray.PadArray.SetFirstPadInArray (   self,
  fpNum 
)

Set the numbering for the first pad in the array.

Parameters
fpNumthe number for the first pad

Definition at line 150 of file PadArray.py.

◆ SetFirstPadType()

def plugins.PadArray.PadArray.SetFirstPadType (   self,
  firstPad 
)

If the array has a different first pad, this is the pad that is used.

Parameters
firstPadthe prototypical first pad

Definition at line 142 of file PadArray.py.

◆ SetPinNames()

def plugins.PadArray.PadArray.SetPinNames (   self,
  pinNames 
)

Set a name for all the pins.

If given, this overrides the naming function.

Parameters
pinNamesthe name to use for all pins

Definition at line 133 of file PadArray.py.

Member Data Documentation

◆ firstPad

plugins.PadArray.PadArray.firstPad

Definition at line 131 of file PadArray.py.

◆ firstPadNum

plugins.PadArray.PadArray.firstPadNum

Definition at line 125 of file PadArray.py.

◆ pad

plugins.PadArray.PadArray.pad

Definition at line 130 of file PadArray.py.

◆ pinNames

plugins.PadArray.PadArray.pinNames

Definition at line 126 of file PadArray.py.


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