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)
 
def SwapData (self, aImage)
 
- 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)
 
def SwapData (self, aImage)
 
- 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, args)
 
def Rotate (self, args)
 
def Flip (self, args)
 
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 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 23715 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 23727 of file pcbnew.py.

Member Function Documentation

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

Definition at line 23739 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 23938 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 23747 of file pcbnew.py.

Here is the caller graph for this function:

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

void BOARD_ITEM::Flip(const
VECTOR2I &aCentre) 

Definition at line 24011 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 23887 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 24057 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 24070 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 23783 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 23921 of file pcbnew.py.

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

const wxPoint&
VIA::GetPosition() const override 

Definition at line 23839 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 23901 of file pcbnew.py.

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

VIATYPE_T VIA::GetViaType()
const 

Definition at line 24021 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

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

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 23859 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 24098 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 23761 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 23818 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 24041 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 24085 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 23798 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 23849 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 24031 of file pcbnew.py.

def pcbnew.VIA.SwapData (   self,
  aImage 
)
SwapData(VIA self, BOARD_ITEM aImage)

void VIA::SwapData(BOARD_ITEM
*aImage) override

Swap data between aItem and aImage.

aItem and aImage should have the same type Used in undo redo command
to swap values between an item and its copy Only values like layer,
size .. which are modified by edition are swapped, not the pointers
like Pnext and Pback because aItem is not changed in the linked list

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

aImage:  = the item image which contains data to swap 

Definition at line 24112 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

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.

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

aLayers[]:  output layer index array

aCount:  number of layer indices in aLayers[] 

Definition at line 23961 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

Function ViewGetLOD() Returns the level of detail (LOD) 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.

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

aLayer:  current drawing layer

aView:  pointer to the VIEW device we are drawing on

the level of detail. 0 always show the item, because the actual zoom
level (or VIEW scale) is always > 0 

Definition at line 23986 of file pcbnew.py.

Member Data Documentation

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

Definition at line 23744 of file pcbnew.py.

pcbnew.VIA.this

Definition at line 23737 of file pcbnew.py.


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