KiCAD pcbnew scripting
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
pcbnew.D_PAD Class Reference
Inheritance diagram for pcbnew.D_PAD:
Inheritance graph

Public Member Functions

def __init__ (self, parent)
def StandardMask ()
def SMDMask ()
def ConnSMDMask ()
def UnplatedHoleMask ()
def ClassOf (aItem)
def Next (self)
def GetParent (self)
def ImportSettingsFromMaster (self, aMasterPad)
def IsFlipped (self)
def SetPadName (self, name)
def GetPadName (self)
def GetPackedPadName (self)
def IncrementPadName (self, aSkipUnconnectable, aFillSequenceGaps)
def PadNameEqual (self, other)
def GetShape (self)
def SetShape (self, aShape)
def SetPosition (self, aPos)
def GetPosition (self)
def SetY (self, y)
def SetX (self, x)
def SetPos0 (self, aPos)
def GetPos0 (self)
def SetY0 (self, y)
def SetX0 (self, x)
def SetSize (self, aSize)
def GetSize (self)
def SetDelta (self, aSize)
def GetDelta (self)
def SetDrillSize (self, aSize)
def GetDrillSize (self)
def SetOffset (self, aOffset)
def GetOffset (self)
def Flip (self, aCentre)
def SetOrientation (self, aAngle)
def SetOrientationDegrees (self, aOrientation)
def GetOrientation (self)
def GetOrientationDegrees (self)
def GetOrientationRadians (self)
def SetDrillShape (self, aDrillShape)
def GetDrillShape (self)
def GetOblongDrillGeometry (self, aStartPoint, aEndPoint, aWidth)
def SetLayerSet (self, aLayerMask)
def GetLayerSet (self)
def SetAttribute (self, aAttribute)
def GetAttribute (self)
def SetPadToDieLength (self, aLength)
def GetPadToDieLength (self)
def GetLocalSolderMaskMargin (self)
def SetLocalSolderMaskMargin (self, aMargin)
def GetLocalClearance (self)
def SetLocalClearance (self, aClearance)
def GetLocalSolderPasteMargin (self)
def SetLocalSolderPasteMargin (self, aMargin)
def GetLocalSolderPasteMarginRatio (self)
def SetLocalSolderPasteMarginRatio (self, aRatio)
def TransformShapeWithClearanceToPolygon (self, aCornerBuffer, aClearanceValue, aCircleToSegmentsCount, aCorrectionFactor)
def GetClearance
def GetSolderMaskMargin (self)
def GetSolderPasteMargin (self)
def SetZoneConnection (self, aType)
def GetZoneConnection (self)
def SetThermalWidth (self, aWidth)
def GetThermalWidth (self)
def SetThermalGap (self, aGap)
def GetThermalGap (self)
def Draw (self, args)
def DrawShape (self, aClipBox, aDC, aDrawInfo)
def BuildPadPolygon (self, aCoord, aInflateValue, aRotation)
def GetRoundRectCornerRadius (self, args)
def BuildPadShapePolygon (self, aCornerBuffer, aInflateValue, aSegmentsPerCircle, aCorrectionFactor)
def BuildPadDrillShapePolygon (self, aCornerBuffer, aInflateValue, aSegmentsPerCircle)
def BuildSegmentFromOvalShape (self, aSegStart, aSegEnd, aRotation, aMargin)
def StringPadName (self, text)
def GetBoundingRadius (self)
def ShapePos (self)
def GetRoundRectRadiusRatio (self)
def SetRoundRectRadiusRatio (self, aRadiusScale)
def GetSubRatsnest (self)
def SetSubRatsnest (self, aSubRatsnest)
def GetMsgPanelInfo (self, aList)
def IsOnLayer (self, aLayer)
def HitTest (self, args)
def GetClass (self)
def GetBoundingBox (self)
def SetDrawCoord (self)
def SetLocalCoord (self)
def Compare (padref, padcmp)
def Move (self, aMoveVector)
def Rotate (self, aRotCentre, aAngle)
def GetSelectMenuText (self)
def GetMenuImage (self)
def ShowPadShape (self)
def ShowPadAttr (self)
def AppendConfigs (self, aResult)
def Clone (self)
def Duplicate (self)
def ViewGetLayers (self, aLayers, aCount)
def ViewGetLOD (self, aLayer, aView)
def ViewBBox (self)
def CopyNetlistSettings (self, aPad, aCopyLocalSettings)
- Public Member Functions inherited from pcbnew.BOARD_CONNECTED_ITEM
def __init__ (self, args, kwargs)
def ClassOf (aItem)
def IsConnected (self)
def GetNet (self)
def SetNet (self, aNetInfo)
def GetNetCode (self)
def SetNetCode
def GetNetname (self)
def GetShortNetname (self)
def GetClearance
def GetNetClass (self)
def GetNetClassName (self)
def SetLocalRatsnestVisible (self, aVisible)
def GetLocalRatsnestVisible (self)
- Public Member Functions inherited from pcbnew.BOARD_ITEM
def __init__ (self, args, kwargs)
def GetPosition (self)
def GetCenter (self)
def SetPosition (self, aPos)
def IsConnected (self)
def Next (self)
def Back (self)
def GetParent (self)
def GetLayer (self)
def GetLayerSet (self)
def SetLayer (self, aLayer)
def Draw (self, args)
def SwapData (self, aImage)
def IsOnLayer (self, aLayer)
def IsTrack (self)
def IsLocked (self)
def SetLocked (self, aLocked)
def UnLink (self)
def DeleteStructure (self)
def ShowShape (aShape)
def Move (self, aMoveVector)
def Rotate (self, aRotCentre, aAngle)
def Flip (self, aCentre)
def GetBoard (self)
def GetLayerName (self)
def HitTest (self, args)
def FormatAngle (aAngle)
def FormatInternalUnits (args)
def ViewGetLayers (self, aLayers, aCount)
def Cast (self)
def Duplicate (self)
def SetPos (self, p)
def SetStartEnd (self, start, end)
- Public Member Functions inherited from pcbnew.EDA_ITEM
def __init__ (self, args, kwargs)
def Type (self)
def SetTimeStamp (self, aNewTimeStamp)
def GetTimeStamp (self)
def Next (self)
def Back (self)
def GetParent (self)
def GetList (self)
def SetParent (self, aParent)
def SetList (self, aList)
def IsNew (self)
def IsModified (self)
def IsMoving (self)
def IsDragging (self)
def IsWireImage (self)
def IsSelected (self)
def IsResized (self)
def IsHighlighted (self)
def IsBrightened (self)
def SetWireImage (self)
def SetSelected (self)
def SetHighlighted (self)
def SetBrightened (self)
def ClearSelected (self)
def ClearHighlighted (self)
def ClearBrightened (self)
def SetModified (self)
def GetState (self, type)
def SetState (self, type, state)
def GetStatus (self)
def SetStatus (self, aStatus)
def SetFlags (self, aMask)
def ClearFlags
def GetFlags (self)
def SetForceVisible (self, aEnable)
def GetMsgPanelInfo (self, aList)
def HitTest (self, aPosition)
def GetBoundingBox (self)
def Clone (self)
def IterateForward (listStart, inspector, testData, scanTypes)
def Visit (self, inspector, testData, scanTypes)
def GetClass (self)
def GetSelectMenuText (self)
def GetMenuImage (self)
def Matches (self, aSearchData, aAuxData, aFindLocation)
def Replace (self, args)
def IsReplaceable (self)
def __lt__ (self, aItem)
def Sort (aLeft, aRight)
def ViewBBox (self)
def ViewGetLayers (self, aLayers, aCount)

Public Attributes


Static Public Attributes

tuple StandardMask = staticmethod(StandardMask)
tuple SMDMask = staticmethod(SMDMask)
tuple ConnSMDMask = staticmethod(ConnSMDMask)
tuple UnplatedHoleMask = staticmethod(UnplatedHoleMask)
tuple ClassOf = staticmethod(ClassOf)
tuple Compare = staticmethod(Compare)
- Static Public Attributes inherited from pcbnew.BOARD_CONNECTED_ITEM
tuple ClassOf = staticmethod(ClassOf)
- Static Public Attributes inherited from pcbnew.BOARD_ITEM
tuple ShowShape = staticmethod(ShowShape)
tuple FormatAngle = staticmethod(FormatAngle)
tuple FormatInternalUnits = staticmethod(FormatInternalUnits)
- Static Public Attributes inherited from pcbnew.EDA_ITEM
tuple IterateForward = staticmethod(IterateForward)
tuple Sort = staticmethod(Sort)

Detailed Description

C++ includes: class_pad.h 

Definition at line 17938 of file

Constructor & Destructor Documentation

def pcbnew.D_PAD.__init__ (   self,
__init__(D_PAD self, MODULE parent) -> D_PAD

D_PAD::D_PAD(MODULE *parent) 

Definition at line 17950 of file

Member Function Documentation

def pcbnew.D_PAD.AppendConfigs (   self,
AppendConfigs(D_PAD self, PARAM_CFG_ARRAY * aResult)

D_PAD::AppendConfigs(PARAM_CFG_ARRAY *aResult)

Function AppendConfigs appends to aResult the configuration setting
accessors which will later allow reading or writing of configuration
file information directly into this object. 

Definition at line 19238 of file

def pcbnew.D_PAD.BuildPadDrillShapePolygon (   self,
BuildPadDrillShapePolygon(D_PAD self, SHAPE_POLY_SET aCornerBuffer, int aInflateValue, int aSegmentsPerCircle) -> bool

D_PAD::BuildPadDrillShapePolygon(SHAPE_POLY_SET &aCornerBuffer, int
aInflateValue, int aSegmentsPerCircle) const

Function BuildPadDrillShapePolygon Build the Corner list of the
polygonal drill shape, depending on shape pad hole and orientation.


aCornerBuffer:  = a buffer to fill.

aInflateValue:  = the clearance or margin value. value > 0: inflate, <
0 deflate, = 0 : no change

aSegmentsPerCircle:  = number of segments to approximate a circle
(used for round and oblong shapes only(16 to 32 is a good value)

false if the pad has no hole, true otherwise 

Definition at line 18846 of file

def pcbnew.D_PAD.BuildPadPolygon (   self,
BuildPadPolygon(D_PAD self, wxPoint aCoord, wxSize aInflateValue, double aRotation)

D_PAD::BuildPadPolygon(wxPoint aCoord[4], wxSize aInflateValue, double
aRotation) const

Function BuildPadPolygon Has meaning only for polygonal pads
(trapezoid and rectangular) Build the Corner list of the polygonal
shape, depending on shape, extra size (clearance ...) and orientation.


aCoord:  = a buffer to fill (4 corners).

aInflateValue:  = wxSize: the clearance or margin value. value > 0:
inflate, < 0 deflate

aRotation:  = full rotation of the polygon 

Definition at line 18761 of file

def pcbnew.D_PAD.BuildPadShapePolygon (   self,
BuildPadShapePolygon(D_PAD self, SHAPE_POLY_SET aCornerBuffer, wxSize aInflateValue, int aSegmentsPerCircle, double aCorrectionFactor)

D_PAD::BuildPadShapePolygon(SHAPE_POLY_SET &aCornerBuffer, wxSize
aInflateValue, int aSegmentsPerCircle, double aCorrectionFactor) const

Function BuildPadShapePolygon Build the Corner list of the polygonal
shape, depending on shape, extra size (clearance ...) pad and
orientation This function is similar to
TransformShapeWithClearanceToPolygon, but the difference is
BuildPadShapePolygon creates a polygon shape exactly similar to pad
shape, which a size inflated by aInflateValue and
TransformShapeWithClearanceToPolygon creates a more complex shape (for
instance a rectangular pad is converted in a rectangulr shape with
ronded corners)


aCornerBuffer:  = a buffer to fill.

aInflateValue:  = the clearance or margin value. value > 0: inflate, <
0 deflate, = 0 : no change the clearance can have different values for
x and y directions (relative to the pad)

aSegmentsPerCircle:  = number of segments to approximate a circle
(used for round and oblong shapes only (16 to 32 is a good value)

aCorrectionFactor:  = the correction to apply to circles radius to
keep the pad size/clearance when the arcs are approximated by segments

Definition at line 18809 of file

def pcbnew.D_PAD.BuildSegmentFromOvalShape (   self,
BuildSegmentFromOvalShape(D_PAD self, wxPoint aSegStart, wxPoint aSegEnd, double aRotation, wxSize aMargin) -> int

D_PAD::BuildSegmentFromOvalShape(wxPoint &aSegStart, wxPoint &aSegEnd,
double aRotation, const wxSize &aMargin) const

Function BuildSegmentFromOvalShape Has meaning only for OVAL (and
ROUND) pads Build an equivalent segment having the same shape as the
OVAL shape, Useful in draw function and in DRC and HitTest functions,
because segments are already well handled by track tests.

Function BuildSegmentFromOvalShape Has meaning only for OVAL (and
ROUND) pads.


aSegStart:  = the starting point of the equivalent segment relative to
the shape position.

aSegEnd:  = the ending point of the equivalent segment, relative to
the shape position

aRotation:  = full rotation of the segment

aRotation:  = full rotation of the segment

aMargin:  = a margin around the shape (for instance mask margin)

the width of the segment  Build an equivalent segment having the same
shape as the OVAL shape, aSegStart and aSegEnd are the ending points
of the equivalent segment of the shape aRotation is the asked rotation
of the segment (usually m_Orient) 

Definition at line 18873 of file

def pcbnew.D_PAD.ClassOf (   aItem)
ClassOf(EDA_ITEM aItem) -> bool

Definition at line 17994 of file

def pcbnew.D_PAD.Clone (   self)
Clone(D_PAD self) -> EDA_ITEM

EDA_ITEM * D_PAD::Clone() const

Function Clone creates a duplicate of this item with linked list
members set to NULL.

The default version will return NULL in release builds and likely
crash the program. In debug builds, a warning message indicating the
derived class has not implemented cloning. This really should be a
pure virtual function. Due to the fact that there are so many objects
derived from EDA_ITEM, the decision was made to return NULL until all
the objects derived from EDA_ITEM implement cloning. Once that
happens, this function should be made pure.

A clone of the item. 

Definition at line 19252 of file

def pcbnew.D_PAD.Compare (   padref,
Compare(D_PAD padref, D_PAD padcmp) -> int

Definition at line 19129 of file

def pcbnew.D_PAD.ConnSMDMask ( )
ConnSMDMask() -> LSET

Definition at line 17978 of file

def pcbnew.D_PAD.CopyNetlistSettings (   self,
CopyNetlistSettings(D_PAD self, D_PAD aPad, bool aCopyLocalSettings)

D_PAD::CopyNetlistSettings(D_PAD *aPad, bool aCopyLocalSettings)

Function CopyNetlistSettings copies the netlist settings to aPad, and
the net name.

Used to copy some pad parameters when replacing a footprint by an
other footprint when reading a netlist, or in exchange footprint

The netlist settings are all of the D_PAD settings not define by a
D_PAD in a netlist. The copied settings are the net name and
optionally include local clearance, etc. The pad physical geometry
settings are not copied.


aPad:  is the D_PAD to copy the settings to.

aCopyLocalSettings:  = false to copy only the net name true to also
copy local prms 

Definition at line 19345 of file

def pcbnew.D_PAD.Draw (   self,
Draw(D_PAD self, EDA_DRAW_PANEL * aPanel, wxDC * aDC, GR_DRAWMODE aDrawMode, wxPoint aOffset)
Draw(D_PAD self, EDA_DRAW_PANEL * aPanel, wxDC * aDC, GR_DRAWMODE aDrawMode)

*aPanel, wxDC *aDC, GR_DRAWMODE aDrawMode, const wxPoint
&aOffset=ZeroOffset) override

Function Draw BOARD_ITEMs have their own color information. 

Definition at line 18729 of file

Here is the caller graph for this function:

def pcbnew.D_PAD.DrawShape (   self,
DrawShape(D_PAD self, EDA_RECT aClipBox, wxDC * aDC, PAD_DRAWINFO aDrawInfo)

D_PAD::DrawShape(EDA_RECT *aClipBox, wxDC *aDC, PAD_DRAWINFO

Function DrawShape basic function to draw a pad.

This function is used by Draw after calculation of parameters (color,
) final orientation transforms are set. It can also be called to draw
a pad on any panel even if this panel is not a EDA_DRAW_PANEL for
instance on a wxPanel inside the pad editor. 

Definition at line 18743 of file

def pcbnew.D_PAD.Duplicate (   self)
Duplicate(D_PAD self) -> D_PAD

D_PAD* D_PAD::Duplicate()

same as Clone, but returns a D_PAD item.

Useful mainly for pythons scripts, because Clone (virtual function)
returns an EDA_ITEM. 

Definition at line 19275 of file

def pcbnew.D_PAD.Flip (   self,
Flip(D_PAD self, wxPoint aCentre)

void D_PAD::Flip(const wxPoint
&aCentre) override

Function Flip Flip this object, i.e.

change the board side for this object


aCentre:  - the rotation point. 

Definition at line 18309 of file

def pcbnew.D_PAD.GetAttribute (   self)
GetAttribute(D_PAD self) -> PAD_ATTR_T

D_PAD::GetAttribute() const 

Definition at line 18473 of file

def pcbnew.D_PAD.GetBoundingBox (   self)
GetBoundingBox(D_PAD self) -> EDA_RECT

const EDA_RECT
D_PAD::GetBoundingBox() const override

Function GetBoundingBox returns the orthogonal, bounding box of this
object for display purposes.

This box should be an enclosing perimeter for visible components of
this object, and the units should be in the pcb or schematic
coordinate system. It is OK to overestimate the size by a few counts.

Definition at line 19087 of file

def pcbnew.D_PAD.GetBoundingRadius (   self)
GetBoundingRadius(D_PAD self) -> int

D_PAD::GetBoundingRadius() const

Function GetBoundingRadius returns the radius of a minimum sized
circle which fully encloses this pad.

The center is the pad position 

Definition at line 18922 of file

def pcbnew.D_PAD.GetClass (   self)
GetClass(D_PAD self) -> wxString

wxString D_PAD::GetClass()
const override

Function GetClass returns the class name.


Definition at line 19073 of file

def pcbnew.D_PAD.GetClearance (   self,
  aItem = None 
GetClearance(D_PAD self, BOARD_CONNECTED_ITEM aItem=None) -> int
GetClearance(D_PAD self) -> int

D_PAD::GetClearance(BOARD_CONNECTED_ITEM *aItem=NULL) const override

Function GetClearance returns the clearance in internal units.

If aItem is not NULL then the returned clearance is the greater of
this object's clearance and aItem's clearance. If aItem is NULL, then
this objects clearance is returned.


aItem:  is another BOARD_CONNECTED_ITEM or NULL

int - the clearance in internal units. 

Definition at line 18612 of file

def pcbnew.D_PAD.GetDelta (   self)
GetDelta(D_PAD self) -> wxSize

const wxSize&
D_PAD::GetDelta() const 

Definition at line 18259 of file

def pcbnew.D_PAD.GetDrillShape (   self)
GetDrillShape(D_PAD self) -> PAD_DRILL_SHAPE_T

D_PAD::GetDrillShape() const 

Definition at line 18401 of file

def pcbnew.D_PAD.GetDrillSize (   self)
GetDrillSize(D_PAD self) -> wxSize

const wxSize&
D_PAD::GetDrillSize() const 

Definition at line 18279 of file

def pcbnew.D_PAD.GetLayerSet (   self)
GetLayerSet(D_PAD self) -> LSET

LSET D_PAD::GetLayerSet()
const override

Function GetLayerSet returns a "layer mask", which is a bitmap of
all layers on which the TRACK segment or VIA physically resides.

int - a layer mask, see layers_id_colors_visibility.h. 

Definition at line 18448 of file

def pcbnew.D_PAD.GetLocalClearance (   self)
GetLocalClearance(D_PAD self) -> int

D_PAD::GetLocalClearance() const 

Definition at line 18523 of file

def pcbnew.D_PAD.GetLocalSolderMaskMargin (   self)
GetLocalSolderMaskMargin(D_PAD self) -> int

D_PAD::GetLocalSolderMaskMargin() const 

Definition at line 18503 of file

def pcbnew.D_PAD.GetLocalSolderPasteMargin (   self)
GetLocalSolderPasteMargin(D_PAD self) -> int

D_PAD::GetLocalSolderPasteMargin() const 

Definition at line 18543 of file

def pcbnew.D_PAD.GetLocalSolderPasteMarginRatio (   self)
GetLocalSolderPasteMarginRatio(D_PAD self) -> double

D_PAD::GetLocalSolderPasteMarginRatio() const 

Definition at line 18563 of file

def pcbnew.D_PAD.GetMenuImage (   self)
GetMenuImage(D_PAD self) -> BITMAP_DEF

D_PAD::GetMenuImage() const override

Function GetMenuImage returns a pointer to an image to be used in

The default version returns the right arrow image. Override this
function to provide object specific menu images. The menu image
associated with the item. 

Definition at line 19193 of file

def pcbnew.D_PAD.GetMsgPanelInfo (   self,
GetMsgPanelInfo(D_PAD self, std::vector< MSG_PANEL_ITEM,std::allocator< MSG_PANEL_ITEM > > & aList)

D_PAD::GetMsgPanelInfo(std::vector< MSG_PANEL_ITEM > &aList) override

Function GetMsgPanelInfo populates aList of MSG_PANEL_ITEM objects
with it's internal state for display purposes.

This method replaces DisplayInfo() so that KiCad objects no longer
have any knowledge of wxWidgets UI objects.


aList:  is the list to populate. 

Definition at line 19003 of file

def pcbnew.D_PAD.GetOblongDrillGeometry (   self,
GetOblongDrillGeometry(D_PAD self, wxPoint aStartPoint, wxPoint aEndPoint, int & aWidth)

D_PAD::GetOblongDrillGeometry(wxPoint &aStartPoint, wxPoint
&aEndPoint, int &aWidth) const

Function GetOblongDrillGeometry calculates the start point, end point
and width of an equivalent segment which have the same position and
width as the hole Usefull to plot/draw oblong holes like segments with
rounded ends used in draw and plot functions.


aStartPoint:  = first point of the equivalent segment, relative to the
pad position.

aEndPoint:  = second point of the equivalent segment, relative to the
pad position.

aWidth:  = width equivalent segment. 

Definition at line 18411 of file

def pcbnew.D_PAD.GetOffset (   self)
GetOffset(D_PAD self) -> wxPoint

const wxPoint&
D_PAD::GetOffset() const 

Definition at line 18299 of file

def pcbnew.D_PAD.GetOrientation (   self)
GetOrientation(D_PAD self) -> double

D_PAD::GetOrientation() const

Function GetOrientation returns the rotation angle of the pad in
tenths of degrees, but soon degrees. 

Definition at line 18358 of file

def pcbnew.D_PAD.GetOrientationDegrees (   self)
GetOrientationDegrees(D_PAD self) -> double

D_PAD::GetOrientationDegrees() const 

Definition at line 18371 of file

def pcbnew.D_PAD.GetOrientationRadians (   self)
GetOrientationRadians(D_PAD self) -> double

D_PAD::GetOrientationRadians() const 

Definition at line 18381 of file

def pcbnew.D_PAD.GetPackedPadName (   self)
GetPackedPadName(D_PAD self) -> wxUint32

D_PAD::GetPackedPadName() const

the pad name in a wxUint32 which is possible because the pad name is
limited to 4 ASCII chars The packed pad name should be used only to
compare 2 pad names, not to try to print this name 

Definition at line 18079 of file

def pcbnew.D_PAD.GetPadName (   self)
GetPadName(D_PAD self) -> wxString

D_PAD::GetPadName() const

the pad name the pad name is limited to 4 ASCII chars 

Definition at line 18067 of file

def pcbnew.D_PAD.GetPadToDieLength (   self)
GetPadToDieLength(D_PAD self) -> int

D_PAD::GetPadToDieLength() const 

Definition at line 18493 of file

def pcbnew.D_PAD.GetParent (   self)
GetParent(D_PAD self) -> MODULE

MODULE* D_PAD::GetParent()

Definition at line 18011 of file

def pcbnew.D_PAD.GetPos0 (   self)
GetPos0(D_PAD self) -> wxPoint

const wxPoint&
D_PAD::GetPos0() const 

Definition at line 18201 of file

def pcbnew.D_PAD.GetPosition (   self)
GetPosition(D_PAD self) -> wxPoint

const wxPoint&
D_PAD::GetPosition() const override 

Definition at line 18163 of file

def pcbnew.D_PAD.GetRoundRectCornerRadius (   self,
GetRoundRectCornerRadius(D_PAD self) -> int
GetRoundRectCornerRadius(D_PAD self, wxSize aSize) -> int

D_PAD::GetRoundRectCornerRadius(const wxSize &aSize) const

Helper function GetRoundRectCornerRadius Has meaning only for rounded
rect pads Returns the radius of the rounded corners of a rectangle
size aSize, using others setting of the pad.


aSize:  = size of the of the round rect. Usually the pad size but can
be the size of the pad on solder mask or solder paste

The radius of the rounded corners for this pad size. 

Definition at line 18786 of file

def pcbnew.D_PAD.GetRoundRectRadiusRatio (   self)
GetRoundRectRadiusRatio(D_PAD self) -> double

D_PAD::GetRoundRectRadiusRatio() const

has meaning only for rounded rect pads

the scaling factor between the smaller Y or Y size and the radius of
the rounded corners. Cannot be > 0.5 the normalized IPC-7351C value is

Definition at line 18947 of file

def pcbnew.D_PAD.GetSelectMenuText (   self)
GetSelectMenuText(D_PAD self) -> wxString

D_PAD::GetSelectMenuText() const override

Function GetSelectMenuText returns the text to display to be used in
the selection clarification context menu when multiple items are found
at the current cursor position.

The default version of this function raises an assertion in the debug
mode and returns a string to indicate that it was not overridden to
provide the object specific text.

The menu text string. 

Definition at line 19173 of file

def pcbnew.D_PAD.GetShape (   self)
GetShape(D_PAD self) -> PAD_SHAPE_T


Function GetShape.

the shape of this pad. 

Definition at line 18129 of file

def pcbnew.D_PAD.GetSize (   self)
GetSize(D_PAD self) -> wxSize

const wxSize& D_PAD::GetSize()

Definition at line 18239 of file

def pcbnew.D_PAD.GetSolderMaskMargin (   self)
GetSolderMaskMargin(D_PAD self) -> int

D_PAD::GetSolderMaskMargin() const

Function GetSolderMaskMargin.

the margin for the solder mask layer usually > 0 (mask shape bigger
than pad value is 1 - the local value 2 - if null, the parent
footprint value 1 - if null, the global value 

Definition at line 18636 of file

def pcbnew.D_PAD.GetSolderPasteMargin (   self)
GetSolderPasteMargin(D_PAD self) -> wxSize

D_PAD::GetSolderPasteMargin() const

Function GetSolderPasteMargin.

the margin for the solder mask layer usually < 0 (mask shape smaller
than pad because the margin can be dependent on the pad size, the
margin has a x and a y value value is 1 - the local value 2 - if null,
the parent footprint value 1 - if null, the global value 

Definition at line 18652 of file

def pcbnew.D_PAD.GetSubRatsnest (   self)
GetSubRatsnest(D_PAD self) -> int

D_PAD::GetSubRatsnest() const

Function GetSubRatsnest.

int - the netcode 

Definition at line 18979 of file

def pcbnew.D_PAD.GetThermalGap (   self)
GetThermalGap(D_PAD self) -> int

D_PAD::GetThermalGap() const 

Definition at line 18719 of file

def pcbnew.D_PAD.GetThermalWidth (   self)
GetThermalWidth(D_PAD self) -> int

D_PAD::GetThermalWidth() const 

Definition at line 18699 of file

def pcbnew.D_PAD.GetZoneConnection (   self)
GetZoneConnection(D_PAD self) -> ZoneConnection

D_PAD::GetZoneConnection() const 

Definition at line 18679 of file

def pcbnew.D_PAD.HitTest (   self,
HitTest(D_PAD self, wxPoint aPosition) -> bool
HitTest(D_PAD self, EDA_RECT aRect, bool aContained, int aAccuracy=0) -> bool
HitTest(D_PAD self, EDA_RECT aRect, bool aContained) -> bool

bool D_PAD::HitTest(const
EDA_RECT &aRect, bool aContained, int aAccuracy=0) const override

Function HitTest tests if the aRect intersects or contains this object
(depending on aContained).


aRect:  A reference to an EDA_RECT object containg the area to test.

aContained:  Test if aRect contains this object completly.

aAccuracy:  Increase the item bounding box by this amount.

bool - True if aRect contains this object completly or if aRect
intersects the object and aContained is False, otherwise false. 

Definition at line 19046 of file

def pcbnew.D_PAD.ImportSettingsFromMaster (   self,
ImportSettingsFromMaster(D_PAD self, D_PAD aMasterPad)

D_PAD::ImportSettingsFromMaster(const D_PAD &aMasterPad)

Imports the pad settings from aMasterPad.

The result is "this" has the same settinds (sizes, shapes ... ) as


aMasterPad:  = the template pad 

Definition at line 18021 of file

def pcbnew.D_PAD.IncrementPadName (   self,
IncrementPadName(D_PAD self, bool aSkipUnconnectable, bool aFillSequenceGaps) -> bool

D_PAD::IncrementPadName(bool aSkipUnconnectable, bool

Function IncrementPadName.

Increments the pad name to the next available name in the module.


aSkipUnconnectable:  skips any pads that are not connectable (for
example NPTH)

aFillSequenceGaps:  if true, the next reference in a sequence like
A1,A3,A4 will be A2. If false, it will be A5.

pad name incremented 

Definition at line 18093 of file

def pcbnew.D_PAD.IsFlipped (   self)
IsFlipped(D_PAD self) -> bool

bool D_PAD::IsFlipped()

true if the pad has a footprint parent flipped (on the back/bottom

Definition at line 18041 of file

def pcbnew.D_PAD.IsOnLayer (   self,
IsOnLayer(D_PAD self, PCB_LAYER_ID aLayer) -> bool

D_PAD::IsOnLayer(PCB_LAYER_ID aLayer) const override

Function IsOnLayer tests to see if this object is on the given layer.

Is virtual so objects like D_PAD, which reside on multiple layers can
do their own form of testing.


aLayer:  The layer to test for.

bool - true if on given layer, else false. 

Definition at line 19024 of file

def pcbnew.D_PAD.Move (   self,
Move(D_PAD self, wxPoint aMoveVector)

void D_PAD::Move(const wxPoint
&aMoveVector) override

Function Move move this object.


aMoveVector:  - the move vector for this object. 

Definition at line 19137 of file

def pcbnew.D_PAD.Next (   self)
Next(D_PAD self) -> D_PAD

D_PAD* D_PAD::Next() const 

Definition at line 18002 of file

def pcbnew.D_PAD.PadNameEqual (   self,
PadNameEqual(D_PAD self, D_PAD other) -> bool

D_PAD::PadNameEqual(const D_PAD *other) const 

Definition at line 18119 of file

def pcbnew.D_PAD.Rotate (   self,
Rotate(D_PAD self, wxPoint aRotCentre, double aAngle)

void D_PAD::Rotate(const
wxPoint &aRotCentre, double aAngle) override

Function Rotate Rotate this object.


aRotCentre:  - the rotation point.

aAngle:  - the rotation angle in 0.1 degree. 

Definition at line 19154 of file

def pcbnew.D_PAD.SetAttribute (   self,
SetAttribute(D_PAD self, PAD_ATTR_T aAttribute)

D_PAD::SetAttribute(PAD_ATTR_T aAttribute) 

Definition at line 18463 of file

def pcbnew.D_PAD.SetDelta (   self,
SetDelta(D_PAD self, wxSize aSize)

void D_PAD::SetDelta(const
wxSize &aSize) 

Definition at line 18249 of file

def pcbnew.D_PAD.SetDrawCoord (   self)
SetDrawCoord(D_PAD self)


Set absolute coordinates. 

Definition at line 19105 of file

def pcbnew.D_PAD.SetDrillShape (   self,
SetDrillShape(D_PAD self, PAD_DRILL_SHAPE_T aDrillShape)

D_PAD::SetDrillShape(PAD_DRILL_SHAPE_T aDrillShape) 

Definition at line 18391 of file

def pcbnew.D_PAD.SetDrillSize (   self,
SetDrillSize(D_PAD self, wxSize aSize)

D_PAD::SetDrillSize(const wxSize &aSize) 

Definition at line 18269 of file

def pcbnew.D_PAD.SetLayerSet (   self,
SetLayerSet(D_PAD self, LSET aLayerMask)

D_PAD::SetLayerSet(LSET aLayerMask) 

Definition at line 18438 of file

def pcbnew.D_PAD.SetLocalClearance (   self,
SetLocalClearance(D_PAD self, int aClearance)

D_PAD::SetLocalClearance(int aClearance) 

Definition at line 18533 of file

def pcbnew.D_PAD.SetLocalCoord (   self)
SetLocalCoord(D_PAD self)


Set relative coordinates. 

Definition at line 19117 of file

def pcbnew.D_PAD.SetLocalSolderMaskMargin (   self,
SetLocalSolderMaskMargin(D_PAD self, int aMargin)

D_PAD::SetLocalSolderMaskMargin(int aMargin) 

Definition at line 18513 of file

def pcbnew.D_PAD.SetLocalSolderPasteMargin (   self,
SetLocalSolderPasteMargin(D_PAD self, int aMargin)

D_PAD::SetLocalSolderPasteMargin(int aMargin) 

Definition at line 18553 of file

def pcbnew.D_PAD.SetLocalSolderPasteMarginRatio (   self,
SetLocalSolderPasteMarginRatio(D_PAD self, double aRatio)

D_PAD::SetLocalSolderPasteMarginRatio(double aRatio) 

Definition at line 18573 of file

def pcbnew.D_PAD.SetOffset (   self,
SetOffset(D_PAD self, wxPoint aOffset)

void D_PAD::SetOffset(const
wxPoint &aOffset) 

Definition at line 18289 of file

def pcbnew.D_PAD.SetOrientation (   self,
SetOrientation(D_PAD self, double aAngle)

D_PAD::SetOrientation(double aAngle)

Function SetOrientation sets the rotation angle of the pad.


aAngle:  is tenths of degrees, but will soon be degrees. If it is
outside of 0 - 3600, then it will be normalized before being saved. 

Definition at line 18328 of file

def pcbnew.D_PAD.SetOrientationDegrees (   self,
SetOrientationDegrees(D_PAD self, double aOrientation)

D_PAD::SetOrientationDegrees(double aOrientation)

Set orientation in degrees. 

Definition at line 18346 of file

def pcbnew.D_PAD.SetPadName (   self,
SetPadName(D_PAD self, wxString name)

D_PAD::SetPadName(const wxString &name)

Set the pad name (sometimes called pad number, although it can be an
array ref like AA12 the pad name is limited to 4 ASCII chars. 

Definition at line 18054 of file

def pcbnew.D_PAD.SetPadToDieLength (   self,
SetPadToDieLength(D_PAD self, int aLength)

D_PAD::SetPadToDieLength(int aLength) 

Definition at line 18483 of file

def pcbnew.D_PAD.SetPos0 (   self,
SetPos0(D_PAD self, wxPoint aPos)

void D_PAD::SetPos0(const
wxPoint &aPos) 

Definition at line 18191 of file

def pcbnew.D_PAD.SetPosition (   self,
SetPosition(D_PAD self, wxPoint aPos)

D_PAD::SetPosition(const wxPoint &aPos) override 

Definition at line 18153 of file

def pcbnew.D_PAD.SetRoundRectRadiusRatio (   self,
SetRoundRectRadiusRatio(D_PAD self, double aRadiusScale)

D_PAD::SetRoundRectRadiusRatio(double aRadiusScale)

has meaning only for rounded rect pads Set the scaling factor between
the smaller Y or Y size and the radius of the rounded corners.

Cannot be < 0.5 and obviously must be > 0 the normalized IPC-7351C
value is 0.25 

Definition at line 18963 of file

def pcbnew.D_PAD.SetShape (   self,
SetShape(D_PAD self, PAD_SHAPE_T aShape)

D_PAD::SetShape(PAD_SHAPE_T aShape) 

Definition at line 18143 of file

def pcbnew.D_PAD.SetSize (   self,
SetSize(D_PAD self, wxSize aSize)

void D_PAD::SetSize(const
wxSize &aSize) 

Definition at line 18229 of file

def pcbnew.D_PAD.SetSubRatsnest (   self,
SetSubRatsnest(D_PAD self, int aSubRatsnest)

D_PAD::SetSubRatsnest(int aSubRatsnest) 

Definition at line 18993 of file

def pcbnew.D_PAD.SetThermalGap (   self,
SetThermalGap(D_PAD self, int aGap)

D_PAD::SetThermalGap(int aGap) 

Definition at line 18709 of file

def pcbnew.D_PAD.SetThermalWidth (   self,
SetThermalWidth(D_PAD self, int aWidth)

D_PAD::SetThermalWidth(int aWidth) 

Definition at line 18689 of file

def pcbnew.D_PAD.SetX (   self,
SetX(D_PAD self, int x)

void D_PAD::SetX(int x) 

Definition at line 18182 of file

def pcbnew.D_PAD.SetX0 (   self,
SetX0(D_PAD self, int x)

void D_PAD::SetX0(int x) 

Definition at line 18220 of file

def pcbnew.D_PAD.SetY (   self,
SetY(D_PAD self, int y)

void D_PAD::SetY(int y) 

Definition at line 18173 of file

def pcbnew.D_PAD.SetY0 (   self,
SetY0(D_PAD self, int y)

void D_PAD::SetY0(int y) 

Definition at line 18211 of file

def pcbnew.D_PAD.SetZoneConnection (   self,
SetZoneConnection(D_PAD self, ZoneConnection aType)

D_PAD::SetZoneConnection(ZoneConnection aType) 

Definition at line 18669 of file

def pcbnew.D_PAD.ShapePos (   self)
ShapePos(D_PAD self) -> wxPoint

wxPoint D_PAD::ShapePos()

Definition at line 18937 of file

def pcbnew.D_PAD.ShowPadAttr (   self)
ShowPadAttr(D_PAD self) -> wxString

D_PAD::ShowPadAttr() const

Function ShowPadAttr.

the name of the pad type (attribute) : STD, SMD ... 

Definition at line 19224 of file

def pcbnew.D_PAD.ShowPadShape (   self)
ShowPadShape(D_PAD self) -> wxString

D_PAD::ShowPadShape() const

Function ShowPadShape.

the name of the shape 

Definition at line 19210 of file

def pcbnew.D_PAD.SMDMask ( )
SMDMask() -> LSET

Definition at line 17970 of file

def pcbnew.D_PAD.StandardMask ( )
StandardMask() -> LSET

Definition at line 17962 of file

def pcbnew.D_PAD.StringPadName (   self,
StringPadName(D_PAD self, wxString text)

D_PAD::StringPadName(wxString &text) const 

Definition at line 18912 of file

def pcbnew.D_PAD.TransformShapeWithClearanceToPolygon (   self,
TransformShapeWithClearanceToPolygon(D_PAD self, SHAPE_POLY_SET aCornerBuffer, int aClearanceValue, int aCircleToSegmentsCount, double aCorrectionFactor)

void D_PAD::TransformShapeWithClearanceToPolygon(SHAPE_POLY_SET
&aCornerBuffer, int aClearanceValue, int aCircleToSegmentsCount,
double aCorrectionFactor) const

Function TransformShapeWithClearanceToPolygon Convert the pad shape to
a closed polygon Used in filling zones calculations Circles and arcs
are approximated by segments.


aCornerBuffer:  = a buffer to store the polygon

aClearanceValue:  = the clearance around the pad

aCircleToSegmentsCount:  = the number of segments to approximate a

aCorrectionFactor:  = the correction to apply to circles radius to
keep clearance when the circle is approximated by segment bigger or
equal to the real clearance value (usually near from 1.0) 

Definition at line 18583 of file

def pcbnew.D_PAD.UnplatedHoleMask ( )
UnplatedHoleMask() -> LSET

Definition at line 17986 of file

def pcbnew.D_PAD.ViewBBox (   self)
ViewBBox(D_PAD self) -> BOX2I const

const BOX2I D_PAD::ViewBBox()
const override

Function ViewBBox() returns the bounding box of the item covering all
its layers.

BOX2I - the current bounding box 

Definition at line 19330 of file

def pcbnew.D_PAD.ViewGetLayers (   self,
ViewGetLayers(D_PAD self, int [] aLayers, int & aCount)

D_PAD::ViewGetLayers(int aLayers[], int &aCount) const override

Function ViewGetLayers() Returns the all the layers within the VIEW
the object is painted on.

For instance, a D_PAD spans zero or more copper layers and a few
technical layers. ViewDraw() or PAINTER::Draw() is repeatedly called
for each of the layers returned by ViewGetLayers(), depending on the
rendering order.


aLayers[]:  output layer index array

aCount:  number of layer indices in aLayers[] 

Definition at line 19290 of file

def pcbnew.D_PAD.ViewGetLOD (   self,
ViewGetLOD(D_PAD self, int aLayer, KIGFX::VIEW * aView) -> unsigned int

unsigned int
D_PAD::ViewGetLOD(int aLayer, KIGFX::VIEW *aView) const override

Function ViewGetLOD() Returns the level of detail of the item.

A level of detail is the minimal VIEW scale that is sufficient for an
item to be shown on a given layer. 

Definition at line 19315 of file

Member Data Documentation

tuple pcbnew.D_PAD.ClassOf = staticmethod(ClassOf)

Definition at line 17999 of file

tuple pcbnew.D_PAD.Compare = staticmethod(Compare)

Definition at line 19134 of file

tuple pcbnew.D_PAD.ConnSMDMask = staticmethod(ConnSMDMask)

Definition at line 17983 of file

tuple pcbnew.D_PAD.SMDMask = staticmethod(SMDMask)

Definition at line 17975 of file

tuple pcbnew.D_PAD.StandardMask = staticmethod(StandardMask)

Definition at line 17967 of file


Definition at line 17960 of file

tuple pcbnew.D_PAD.UnplatedHoleMask = staticmethod(UnplatedHoleMask)

Definition at line 17991 of file

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