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

Public Member Functions

def __init__ (self, aParent)
 
def SetValue (self, aValue)
 
def GetValue (self)
 
def GetPosition (self)
 
def SetPosition (self, aPos)
 
def SetTextSize (self, aTextSize)
 
def SetLayer (self, aLayer)
 
def SetShape (self, aShape)
 
def GetShape (self)
 
def GetWidth (self)
 
def SetWidth (self, aWidth)
 
def SetOrigin (self, aOrigin)
 
def GetOrigin (self)
 
def SetEnd (self, aEnd)
 
def GetEnd (self)
 
def SetHeight (self, aHeight)
 
def GetHeight (self)
 
def UpdateHeight (self)
 
def GetAngle (self)
 
def AdjustDimensionDetails
 
def SetText (self, NewText)
 
def GetText (self)
 
def Text (self, args)
 
def Draw (self, args)
 
def Move (self, offset)
 
def Rotate (self, aRotCentre, aAngle)
 
def Flip (self, aCentre)
 
def Mirror (self, axis_pos)
 
def GetMsgPanelInfo (self, aList)
 
def HitTest (self, args)
 
def GetClass (self)
 
def GetBoundingBox (self)
 
def GetSelectMenuText (self)
 
def GetMenuImage (self)
 
def Clone (self)
 
def ViewBBox (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
 

Static Public Attributes

tuple m_crossBarO = _swig_property(_pcbnew.DIMENSION_m_crossBarO_get, _pcbnew.DIMENSION_m_crossBarO_set)
 
tuple m_crossBarF = _swig_property(_pcbnew.DIMENSION_m_crossBarF_get, _pcbnew.DIMENSION_m_crossBarF_set)
 
tuple m_featureLineGO = _swig_property(_pcbnew.DIMENSION_m_featureLineGO_get, _pcbnew.DIMENSION_m_featureLineGO_set)
 
tuple m_featureLineGF = _swig_property(_pcbnew.DIMENSION_m_featureLineGF_get, _pcbnew.DIMENSION_m_featureLineGF_set)
 
tuple m_featureLineDO = _swig_property(_pcbnew.DIMENSION_m_featureLineDO_get, _pcbnew.DIMENSION_m_featureLineDO_set)
 
tuple m_featureLineDF = _swig_property(_pcbnew.DIMENSION_m_featureLineDF_get, _pcbnew.DIMENSION_m_featureLineDF_set)
 
tuple m_arrowD1F = _swig_property(_pcbnew.DIMENSION_m_arrowD1F_get, _pcbnew.DIMENSION_m_arrowD1F_set)
 
tuple m_arrowD2F = _swig_property(_pcbnew.DIMENSION_m_arrowD2F_get, _pcbnew.DIMENSION_m_arrowD2F_set)
 
tuple m_arrowG1F = _swig_property(_pcbnew.DIMENSION_m_arrowG1F_get, _pcbnew.DIMENSION_m_arrowG1F_set)
 
tuple m_arrowG2F = _swig_property(_pcbnew.DIMENSION_m_arrowG2F_get, _pcbnew.DIMENSION_m_arrowG2F_set)
 
- 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

Class DIMENSION.

For better understanding of the points that make a dimension:
m_featureLineGO  m_featureLineDO        | |        |
|        | |        |  m_arrowG2F      m_arrowD2F  |        | / \\ |
m_crossBarO|/____________________________|m_crossBarF |\\ m_Text /|
| \\ / | | m_arrowG1F m_arrowD1F | | | m_featureLineGF
m_featureLineDF

C++ includes: class_dimension.h 

Definition at line 26602 of file pcbnew.py.

Constructor & Destructor Documentation

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

DIMENSION::DIMENSION(BOARD_ITEM *aParent) 

Definition at line 26667 of file pcbnew.py.

Member Function Documentation

def pcbnew.DIMENSION.AdjustDimensionDetails (   self,
  aDoNotChangeText = False 
)
AdjustDimensionDetails(DIMENSION self, bool aDoNotChangeText=False)
AdjustDimensionDetails(DIMENSION self)

void
DIMENSION::AdjustDimensionDetails(bool aDoNotChangeText=false)

Function AdjustDimensionDetails Calculate coordinates of segments used
to draw the dimension.

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

aDoNotChangeText:  (bool) if false, the dimension text is initialized

Definition at line 26913 of file pcbnew.py.

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

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

def pcbnew.DIMENSION.Draw (   self,
  args 
)
Draw(DIMENSION self, EDA_DRAW_PANEL * panel, wxDC * DC, GR_DRAWMODE aColorMode, wxPoint offset)
Draw(DIMENSION self, EDA_DRAW_PANEL * panel, wxDC * DC, GR_DRAWMODE aColorMode)

void
DIMENSION::Draw(EDA_DRAW_PANEL *panel, wxDC *DC, GR_DRAWMODE
aColorMode, const wxPoint &offset=ZeroOffset) override

Function Draw BOARD_ITEMs have their own color information. 

Definition at line 26964 of file pcbnew.py.

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

void DIMENSION::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 27014 of file pcbnew.py.

def pcbnew.DIMENSION.GetAngle (   self)
GetAngle(DIMENSION self) -> double

double
DIMENSION::GetAngle() const

Function GetAngle Returns angle of the crossbar.

Angle of the crossbar line expressed in radians. 

Definition at line 26899 of file pcbnew.py.

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

const EDA_RECT
DIMENSION::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 27115 of file pcbnew.py.

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

wxString
DIMENSION::GetClass() const override

Function GetClass returns the class name.

wxString 

Definition at line 27101 of file pcbnew.py.

def pcbnew.DIMENSION.GetEnd (   self)
GetEnd(DIMENSION self) -> wxPoint

const wxPoint&
DIMENSION::GetEnd()

Function GetEnd.

End of the crossbar line. 

Definition at line 26843 of file pcbnew.py.

def pcbnew.DIMENSION.GetHeight (   self)
GetHeight(DIMENSION self) -> int

int
DIMENSION::GetHeight() const

Function GetHeight Returns the length of feature lines. 

Definition at line 26874 of file pcbnew.py.

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

BITMAP_DEF
DIMENSION::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 27153 of file pcbnew.py.

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

void
DIMENSION::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.

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

aList:  is the list to populate. 

Definition at line 27053 of file pcbnew.py.

def pcbnew.DIMENSION.GetOrigin (   self)
GetOrigin(DIMENSION self) -> wxPoint

const wxPoint&
DIMENSION::GetOrigin() const

Function GetOrigin.

Origin of the crossbar line. 

Definition at line 26809 of file pcbnew.py.

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

const wxPoint &
DIMENSION::GetPosition() const override 

Definition at line 26701 of file pcbnew.py.

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

wxString
DIMENSION::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 27133 of file pcbnew.py.

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

int DIMENSION::GetShape()
const 

Definition at line 26759 of file pcbnew.py.

def pcbnew.DIMENSION.GetText (   self)
GetText(DIMENSION self) -> wxString

const wxString
DIMENSION::GetText() const 

Definition at line 26943 of file pcbnew.py.

def pcbnew.DIMENSION.GetValue (   self)
GetValue(DIMENSION self) -> int

int DIMENSION::GetValue()
const 

Definition at line 26691 of file pcbnew.py.

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

int DIMENSION::GetWidth()
const 

Definition at line 26769 of file pcbnew.py.

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

bool
DIMENSION::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 27075 of file pcbnew.py.

def pcbnew.DIMENSION.Mirror (   self,
  axis_pos 
)
Mirror(DIMENSION self, wxPoint axis_pos)

void
DIMENSION::Mirror(const wxPoint &axis_pos)

Function Mirror Mirror the Dimension , relative to a given horizontal
axis the text is not mirrored.

only its position (and angle) is mirrored the layer is not changed

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

axis_pos:  : vertical axis position 

Definition at line 27033 of file pcbnew.py.

def pcbnew.DIMENSION.Move (   self,
  offset 
)
Move(DIMENSION self, wxPoint offset)

void DIMENSION::Move(const
wxPoint &offset) override

Function Move.

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

offset:  : moving vector 

Definition at line 26978 of file pcbnew.py.

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

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

Function Rotate Rotate this object.

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

aRotCentre:  - the rotation point.

aAngle:  - the rotation angle in 0.1 degree. 

Definition at line 26995 of file pcbnew.py.

def pcbnew.DIMENSION.SetEnd (   self,
  aEnd 
)
SetEnd(DIMENSION self, wxPoint aEnd)

void
DIMENSION::SetEnd(const wxPoint &aEnd)

Function SetEnd Sets a new end of the crossbar line.

All remaining lines are adjusted after that.

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

aEnd:  is the new point to be used as the new end of the crossbar
line. 

Definition at line 26823 of file pcbnew.py.

def pcbnew.DIMENSION.SetHeight (   self,
  aHeight 
)
SetHeight(DIMENSION self, int aHeight)

void
DIMENSION::SetHeight(int aHeight)

Function SetHeight Sets the length of feature lines.

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

aHeight:  is the new height. 

Definition at line 26857 of file pcbnew.py.

def pcbnew.DIMENSION.SetLayer (   self,
  aLayer 
)
SetLayer(DIMENSION self, PCB_LAYER_ID aLayer)

void
DIMENSION::SetLayer(PCB_LAYER_ID aLayer) override

Function SetLayer sets the layer this item is on.

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

aLayer:  The layer number. is virtual because some items (in fact:
class DIMENSION) have a slightly different initialization 

Definition at line 26731 of file pcbnew.py.

def pcbnew.DIMENSION.SetOrigin (   self,
  aOrigin 
)
SetOrigin(DIMENSION self, wxPoint aOrigin)

void
DIMENSION::SetOrigin(const wxPoint &aOrigin)

Function SetOrigin Sets a new origin of the crossbar line.

All remaining lines are adjusted after that.

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

aOrigin:  is the new point to be used as the new origin of the
crossbar line. 

Definition at line 26789 of file pcbnew.py.

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

void
DIMENSION::SetPosition(const wxPoint &aPos) override 

Definition at line 26711 of file pcbnew.py.

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

void
DIMENSION::SetShape(int aShape) 

Definition at line 26749 of file pcbnew.py.

def pcbnew.DIMENSION.SetText (   self,
  NewText 
)
SetText(DIMENSION self, wxString NewText)

void
DIMENSION::SetText(const wxString &NewText) 

Definition at line 26933 of file pcbnew.py.

def pcbnew.DIMENSION.SetTextSize (   self,
  aTextSize 
)
SetTextSize(DIMENSION self, wxSize aTextSize)

void
DIMENSION::SetTextSize(const wxSize &aTextSize) 

Definition at line 26721 of file pcbnew.py.

def pcbnew.DIMENSION.SetValue (   self,
  aValue 
)
SetValue(DIMENSION self, int aValue)

void
DIMENSION::SetValue(int aValue) 

Definition at line 26681 of file pcbnew.py.

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

void
DIMENSION::SetWidth(int aWidth) 

Definition at line 26779 of file pcbnew.py.

def pcbnew.DIMENSION.Text (   self,
  args 
)
Text(DIMENSION self) -> TEXTE_PCB
Text(DIMENSION self) -> TEXTE_PCB

TEXTE_PCB& DIMENSION::Text()
const 

Definition at line 26953 of file pcbnew.py.

def pcbnew.DIMENSION.UpdateHeight (   self)
UpdateHeight(DIMENSION self)

void
DIMENSION::UpdateHeight()

Function UpdateHeight Updates stored height basing on points
coordinates. 

Definition at line 26886 of file pcbnew.py.

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

const BOX2I
DIMENSION::ViewBBox() const override 

Definition at line 27193 of file pcbnew.py.

Member Data Documentation

tuple pcbnew.DIMENSION.m_arrowD1F = _swig_property(_pcbnew.DIMENSION_m_arrowD1F_get, _pcbnew.DIMENSION_m_arrowD1F_set)
static

Definition at line 26653 of file pcbnew.py.

tuple pcbnew.DIMENSION.m_arrowD2F = _swig_property(_pcbnew.DIMENSION_m_arrowD2F_get, _pcbnew.DIMENSION_m_arrowD2F_set)
static

Definition at line 26657 of file pcbnew.py.

tuple pcbnew.DIMENSION.m_arrowG1F = _swig_property(_pcbnew.DIMENSION_m_arrowG1F_get, _pcbnew.DIMENSION_m_arrowG1F_set)
static

Definition at line 26661 of file pcbnew.py.

tuple pcbnew.DIMENSION.m_arrowG2F = _swig_property(_pcbnew.DIMENSION_m_arrowG2F_get, _pcbnew.DIMENSION_m_arrowG2F_set)
static

Definition at line 26665 of file pcbnew.py.

tuple pcbnew.DIMENSION.m_crossBarF = _swig_property(_pcbnew.DIMENSION_m_crossBarF_get, _pcbnew.DIMENSION_m_crossBarF_set)
static

Definition at line 26633 of file pcbnew.py.

tuple pcbnew.DIMENSION.m_crossBarO = _swig_property(_pcbnew.DIMENSION_m_crossBarO_get, _pcbnew.DIMENSION_m_crossBarO_set)
static

Definition at line 26629 of file pcbnew.py.

tuple pcbnew.DIMENSION.m_featureLineDF = _swig_property(_pcbnew.DIMENSION_m_featureLineDF_get, _pcbnew.DIMENSION_m_featureLineDF_set)
static

Definition at line 26649 of file pcbnew.py.

tuple pcbnew.DIMENSION.m_featureLineDO = _swig_property(_pcbnew.DIMENSION_m_featureLineDO_get, _pcbnew.DIMENSION_m_featureLineDO_set)
static

Definition at line 26645 of file pcbnew.py.

tuple pcbnew.DIMENSION.m_featureLineGF = _swig_property(_pcbnew.DIMENSION_m_featureLineGF_get, _pcbnew.DIMENSION_m_featureLineGF_set)
static

Definition at line 26641 of file pcbnew.py.

tuple pcbnew.DIMENSION.m_featureLineGO = _swig_property(_pcbnew.DIMENSION_m_featureLineGO_get, _pcbnew.DIMENSION_m_featureLineGO_set)
static

Definition at line 26637 of file pcbnew.py.

pcbnew.DIMENSION.this

Definition at line 26677 of file pcbnew.py.


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