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

Public Member Functions

def __init__ (self, args)
def SetPosition (self, aPos)
def GetPosition (self)
def SetShape (self, aShape)
def GetShape (self)
def SetSize (self, aSize)
def GetSize (self)
def SetWidth (self, aWidth)
def GetWidth (self)
def Move (self, aMoveVector)
def Rotate (self, aRotCentre, aAngle)
def Flip (self, aCentre)
def Draw (self, args)
def GetClass (self)
def HitTest (self, args)
def GetBoundingBox (self)
def GetSelectMenuText (self)
def GetMenuImage (self)
def Clone (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


Additional Inherited Members

- 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_mire.h 

Definition at line 28333 of file

Constructor & Destructor Documentation

def pcbnew.PCB_TARGET.__init__ (   self,
__init__(PCB_TARGET self, BOARD_ITEM aParent) -> PCB_TARGET
__init__(PCB_TARGET self, BOARD_ITEM aParent, int aShape, PCB_LAYER_ID aLayer, wxPoint aPos, int aSize, int aWidth) -> PCB_TARGET

aLayer, const wxPoint &aPos, int aSize, int aWidth) 

Definition at line 28345 of file

Member Function Documentation

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

PCB_TARGET::Clone() const override

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 28605 of file

def pcbnew.PCB_TARGET.Draw (   self,
Draw(PCB_TARGET self, EDA_DRAW_PANEL * panel, wxDC * DC, GR_DRAWMODE aDrawMode, wxPoint offset)
Draw(PCB_TARGET self, EDA_DRAW_PANEL * panel, wxDC * DC, GR_DRAWMODE aDrawMode)

aDrawMode, const wxPoint &offset=ZeroOffset) override

Function Draw BOARD_ITEMs have their own color information. 

Definition at line 28496 of file

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

void PCB_TARGET::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 28477 of file

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

const EDA_RECT
PCB_TARGET::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 28550 of file

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

PCB_TARGET::GetClass() const override

Function GetClass returns the class name.


Definition at line 28510 of file

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

PCB_TARGET::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 28588 of file

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

const wxPoint&
PCB_TARGET::GetPosition() const override 

Definition at line 28371 of file

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

PCB_TARGET::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 28568 of file

def pcbnew.PCB_TARGET.GetShape (   self)
GetShape(PCB_TARGET self) -> int

PCB_TARGET::GetShape() const 

Definition at line 28391 of file

def pcbnew.PCB_TARGET.GetSize (   self)
GetSize(PCB_TARGET self) -> int

int PCB_TARGET::GetSize()

Definition at line 28411 of file

def pcbnew.PCB_TARGET.GetWidth (   self)
GetWidth(PCB_TARGET self) -> int

PCB_TARGET::GetWidth() const 

Definition at line 28431 of file

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

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


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 28524 of file

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

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

Function Move move this object.


aMoveVector:  - the move vector for this object. 

Definition at line 28441 of file

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

PCB_TARGET::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 28458 of file

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

PCB_TARGET::SetPosition(const wxPoint &aPos) override 

Definition at line 28361 of file

def pcbnew.PCB_TARGET.SetShape (   self,
SetShape(PCB_TARGET self, int aShape)

PCB_TARGET::SetShape(int aShape) 

Definition at line 28381 of file

def pcbnew.PCB_TARGET.SetSize (   self,
SetSize(PCB_TARGET self, int aSize)

PCB_TARGET::SetSize(int aSize) 

Definition at line 28401 of file

def pcbnew.PCB_TARGET.SetWidth (   self,
SetWidth(PCB_TARGET self, int aWidth)

PCB_TARGET::SetWidth(int aWidth) 

Definition at line 28421 of file

Member Data Documentation


Definition at line 28357 of file

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