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

Public Member Functions

def __init__ (self, aParent)
 
def ClassOf (aItem)
 
def Draw (self, args)
 
def IsOnLayer (self, aLayer)
 
def GetLayerSet (self)
 
def SetLayerPair (self, aTopLayer, aBottomLayer)
 
def LayerPair (self, top_layer, bottom_layer)
 
def GetPosition (self)
 
def SetPosition (self, aPoint)
 
def HitTest (self, args)
 
def GetClass (self)
 
def GetSelectMenuText (self)
 
def GetMenuImage (self)
 
def Clone (self)
 
def ViewGetLayers (self, aLayers, aCount)
 
def ViewGetLOD (self, aLayer, aView)
 
def Flip (self, aCentre)
 
def GetViaType (self)
 
def SetViaType (self, aViaType)
 
def SetDrill (self, aDrill)
 
def GetDrill (self)
 
def GetDrillValue (self)
 
def SetDrillDefault (self)
 
def IsDrillDefault (self)
 
- Public Member Functions inherited from pcbnew.TRACK
def ClassOf (aItem)
 
def __init__
 
def Next (self)
 
def Back (self)
 
def Move (self, aMoveVector)
 
def Rotate (self, aRotCentre, aAngle)
 
def Flip (self, aCentre)
 
def SetPosition (self, aPos)
 
def GetPosition (self)
 
def SetWidth (self, aWidth)
 
def GetWidth (self)
 
def SetEnd (self, aEnd)
 
def GetEnd (self)
 
def SetStart (self, aStart)
 
def GetStart (self)
 
def GetEndPoint (self, aEndPoint)
 
def GetBoundingBox (self)
 
def IsLocked (self)
 
def SetLocked (self, aLocked)
 
def GetBestInsertPoint (self, aPcb)
 
def GetStartNetCode (self, NetCode)
 
def GetEndNetCode (self, NetCode)
 
def GetLength (self)
 
def Draw (self, args)
 
def TransformShapeWithClearanceToPolygon (self, aCornerBuffer, aClearanceValue, aCircleToSegmentsCount, aCorrectionFactor)
 
def IsPointOnEnds
 
def IsNull (self)
 
def GetMsgPanelInfo (self, aList)
 
def ShowWidth (self)
 
def Visit (self, inspector, testData, scanTypes)
 
def HitTest (self, args)
 
def GetVia (self, args)
 
def GetTrack (self, aStartTrace, aEndTrace, aEndPoint, aSameNetOnly, aSequential)
 
def GetEndSegments (self, NbSegm, StartTrack, EndTrack)
 
def GetClass (self)
 
def GetClearance
 
def GetSelectMenuText (self)
 
def GetMenuImage (self)
 
def Clone (self)
 
def ViewGetLayers (self, aLayers, aCount)
 
def ViewGetLOD (self, aLayer, aView)
 
- 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 GetSubNet (self)
 
def SetSubNet (self, aSubNetCode)
 
def GetZoneSubNet (self)
 
def SetZoneSubNet (self, aSubNetCode)
 
def GetNetname (self)
 
def GetShortNetname (self)
 
def GetClearance
 
def GetNetClass (self)
 
def GetNetClassName (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

 this
 
- Public Attributes inherited from pcbnew.TRACK
 this
 

Static Public Attributes

tuple ClassOf = staticmethod(ClassOf)
 
- Static Public Attributes inherited from pcbnew.TRACK
tuple ClassOf = staticmethod(ClassOf)
 
tuple start = _swig_property(_pcbnew.TRACK_start_get, _pcbnew.TRACK_start_set)
 
tuple end = _swig_property(_pcbnew.TRACK_end_get, _pcbnew.TRACK_end_set)
 
tuple m_Param = _swig_property(_pcbnew.TRACK_m_Param_get, _pcbnew.TRACK_m_Param_set)
 
- Static Public Attributes inherited from pcbnew.BOARD_CONNECTED_ITEM
tuple m_TracksConnected = _swig_property(_pcbnew.BOARD_CONNECTED_ITEM_m_TracksConnected_get, _pcbnew.BOARD_CONNECTED_ITEM_m_TracksConnected_set)
 
tuple m_PadsConnected = _swig_property(_pcbnew.BOARD_CONNECTED_ITEM_m_PadsConnected_get, _pcbnew.BOARD_CONNECTED_ITEM_m_PadsConnected_set)
 
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_track.h 

Definition at line 22456 of file pcbnew.py.

Constructor & Destructor Documentation

def pcbnew.VIA.__init__ (   self,
  aParent 
)
__init__(VIA self, BOARD_ITEM aParent) -> VIA

VIA::VIA(BOARD_ITEM *aParent) 

Definition at line 22468 of file pcbnew.py.

Member Function Documentation

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

Definition at line 22480 of file pcbnew.py.

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

EDA_ITEM * VIA::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 22676 of file pcbnew.py.

def pcbnew.VIA.Draw (   self,
  args 
)
Draw(VIA self, EDA_DRAW_PANEL * panel, wxDC * DC, GR_DRAWMODE aDrawMode, wxPoint aOffset)
Draw(VIA self, EDA_DRAW_PANEL * panel, wxDC * DC, GR_DRAWMODE aDrawMode)

void VIA::Draw(EDA_DRAW_PANEL
*panel, wxDC *DC, GR_DRAWMODE aDrawMode, const wxPoint
&aOffset=ZeroOffset) override

Function Draw BOARD_ITEMs have their own color information. 

Definition at line 22488 of file pcbnew.py.

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

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

Function Flip Flip this object, i.e.

change the board side for this object

Parameters:
-----------

aCentre:  - the rotation point. 

Definition at line 22719 of file pcbnew.py.

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

wxString VIA::GetClass() const
override

Function GetClass returns the class name.

wxString 

Definition at line 22625 of file pcbnew.py.

def pcbnew.VIA.GetDrill (   self)
GetDrill(VIA self) -> int

int VIA::GetDrill() const

Function GetDrill returns the local drill setting for this VIA.

If you want the calculated value, use GetDrillValue() instead. 

Definition at line 22774 of file pcbnew.py.

def pcbnew.VIA.GetDrillValue (   self)
GetDrillValue(VIA self) -> int

int VIA::GetDrillValue()
const

Function GetDrillValue "calculates" the drill value for vias
(m-Drill if > 0, or default drill value for the board.

real drill_value 

Definition at line 22787 of file pcbnew.py.

Here is the caller graph for this function:

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

LSET VIA::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 22524 of file pcbnew.py.

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

BITMAP_DEF
VIA::GetMenuImage() const override

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

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 22659 of file pcbnew.py.

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

const wxPoint&
VIA::GetPosition() const override 

Definition at line 22580 of file pcbnew.py.

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

wxString
VIA::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 22639 of file pcbnew.py.

def pcbnew.VIA.GetViaType (   self)
GetViaType(VIA self) -> VIATYPE_T

VIATYPE_T VIA::GetViaType()
const 

Definition at line 22738 of file pcbnew.py.

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

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

Parameters:
-----------

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 22600 of file pcbnew.py.

def pcbnew.VIA.IsDrillDefault (   self)
IsDrillDefault(VIA self) -> bool

bool
VIA::IsDrillDefault() const

Function IsDrillDefault.

true if the drill value is default value (-1) 

Definition at line 22815 of file pcbnew.py.

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

bool
VIA::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.

Parameters:
-----------

aLayer:  The layer to test for.

bool - true if on given layer, else false. 

Definition at line 22502 of file pcbnew.py.

def pcbnew.VIA.LayerPair (   self,
  top_layer,
  bottom_layer 
)
LayerPair(VIA self, PCB_LAYER_ID * top_layer, PCB_LAYER_ID * bottom_layer)

void
VIA::LayerPair(PCB_LAYER_ID *top_layer, PCB_LAYER_ID *bottom_layer)
const

Function LayerPair Return the 2 layers used by the via (the via
actually uses all layers between these 2 layers)

Parameters:
-----------

top_layer:  = pointer to the first layer (can be null)

bottom_layer:  = pointer to the last layer (can be null) 

Definition at line 22559 of file pcbnew.py.

def pcbnew.VIA.SetDrill (   self,
  aDrill 
)
SetDrill(VIA self, int aDrill)

void VIA::SetDrill(int aDrill)

Function SetDrill sets the drill value for vias.

Parameters:
-----------

aDrill:  is the new drill diameter 

Definition at line 22758 of file pcbnew.py.

def pcbnew.VIA.SetDrillDefault (   self)
SetDrillDefault(VIA self)

void
VIA::SetDrillDefault()

Function SetDrillDefault sets the drill value for vias to the default
value UNDEFINED_DRILL_DIAMETER. 

Definition at line 22802 of file pcbnew.py.

def pcbnew.VIA.SetLayerPair (   self,
  aTopLayer,
  aBottomLayer 
)
SetLayerPair(VIA self, PCB_LAYER_ID aTopLayer, PCB_LAYER_ID aBottomLayer)

void
VIA::SetLayerPair(PCB_LAYER_ID aTopLayer, PCB_LAYER_ID aBottomLayer)

Function SetLayerPair For a via m_Layer contains the top layer, the
other layer is in m_BottomLayer.

Parameters:
-----------

aTopLayer:  = first layer connected by the via

aBottomLayer:  = last layer connected by the via 

Definition at line 22539 of file pcbnew.py.

def pcbnew.VIA.SetPosition (   self,
  aPoint 
)
SetPosition(VIA self, wxPoint aPoint)

void VIA::SetPosition(const
wxPoint &aPoint) override 

Definition at line 22590 of file pcbnew.py.

def pcbnew.VIA.SetViaType (   self,
  aViaType 
)
SetViaType(VIA self, VIATYPE_T aViaType)

void
VIA::SetViaType(VIATYPE_T aViaType) 

Definition at line 22748 of file pcbnew.py.

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

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

Definition at line 22699 of file pcbnew.py.

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

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

Definition at line 22709 of file pcbnew.py.

Member Data Documentation

tuple pcbnew.VIA.ClassOf = staticmethod(ClassOf)
static

Definition at line 22485 of file pcbnew.py.

pcbnew.VIA.this

Definition at line 22478 of file pcbnew.py.


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