KiCad Pcbnew Python Scripting
Loading...
Searching...
No Matches
plugins.PadArray.PadArray Class Reference

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

Inheritance diagram for plugins.PadArray.PadArray:

Public Member Functions

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

Public Attributes

int firstPadNum = 1
 
 pinNames = None
 
 pad = pad
 
 firstPad = None
 

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 127 of file PadArray.py.

Constructor & Destructor Documentation

◆ __init__()

plugins.PadArray.PadArray.__init__ ( self,
pad )
Parameters
padthe prototypical pad

Definition at line 139 of file PadArray.py.

Member Function Documentation

◆ AddPad()

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

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

Parameters
padpad to add

Definition at line 175 of file PadArray.py.

Here is the caller graph for this function:

◆ GetName()

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 200 of file PadArray.py.

Here is the caller graph for this function:

◆ GetPad()

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 183 of file PadArray.py.

Here is the caller graph for this function:

◆ NamingFunction()

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

Implement this as needed for each array type.

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

Definition at line 211 of file PadArray.py.

Here is the caller graph for this function:

◆ SetFirstPadInArray()

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 168 of file PadArray.py.

◆ SetFirstPadType()

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 160 of file PadArray.py.

◆ SetPinNames()

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 151 of file PadArray.py.

Member Data Documentation

◆ firstPad

plugins.PadArray.PadArray.firstPad = None

Definition at line 149 of file PadArray.py.

◆ firstPadNum

int plugins.PadArray.PadArray.firstPadNum = 1

Definition at line 143 of file PadArray.py.

◆ pad

plugins.PadArray.PadArray.pad = pad

Definition at line 148 of file PadArray.py.

◆ pinNames

plugins.PadArray.PadArray.pinNames = None

Definition at line 144 of file PadArray.py.


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