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

Public Member Functions

def __init__ (self, args, kwargs)
def Type (self)
def Clone (self)
def Collide (self, args)
def BBox
def Centre (self)
def Move (self, aVector)
def IsSolid (self)
def Parse (self, aStream)
def Format (self)

Detailed Description

Class SHAPE.

Represents an abstract shape on 2D plane.

C++ includes: shape.h 

Definition at line 6461 of file

Constructor & Destructor Documentation

def pcbnew.SHAPE.__init__ (   self,

Definition at line 6476 of file

Member Function Documentation

def pcbnew.SHAPE.BBox (   self,
  aClearance = 0 
BBox(SHAPE self, int aClearance=0) -> BOX2I const
BBox(SHAPE self) -> BOX2I const

virtual const BOX2I
SHAPE::BBox(int aClearance=0) const =0

Function BBox()

Computes a bounding box of the shape, with a margin of aClearance a


aClearance:  how much the bounding box is expanded wrs to the minimum
enclosing rectangle for the shape.

the bounding box. 

Definition at line 6541 of file

def pcbnew.SHAPE.Centre (   self)
Centre(SHAPE self) -> VECTOR2I

virtual VECTOR2I
SHAPE::Centre() const

Function Centre()

Computes a center-of-mass of the shape the center-of-mass point 

Definition at line 6565 of file

def pcbnew.SHAPE.Clone (   self)
Clone(SHAPE self) -> SHAPE

virtual SHAPE* SHAPE::Clone()

Function Clone()

Returns a dynamically allocated copy of the shape


copy:  of the shape 

Definition at line 6500 of file

def pcbnew.SHAPE.Collide (   self,
Collide(SHAPE self, VECTOR2I const & aP, int aClearance=0) -> bool
Collide(SHAPE self, VECTOR2I const & aP) -> bool
Collide(SHAPE self, SHAPE aShape, int aClearance, VECTOR2I & aMTV) -> bool
Collide(SHAPE self, SHAPE aShape, int aClearance=0) -> bool
Collide(SHAPE self, SHAPE aShape) -> bool
Collide(SHAPE self, SEG const & aSeg, int aClearance=0) -> bool
Collide(SHAPE self, SEG const & aSeg) -> bool

virtual bool
SHAPE::Collide(const SEG &aSeg, int aClearance=0) const =0

Function Collide()

Checks if the boundary of shape (this) lies closer to the segment aSeg
than aClearance, indicating a collision. true, if there is a

Definition at line 6519 of file

def pcbnew.SHAPE.Format (   self)
Format(SHAPE self) -> string

const std::string
SHAPE::Format() const 

Definition at line 6609 of file

def pcbnew.SHAPE.IsSolid (   self)
IsSolid(SHAPE self) -> bool

virtual bool SHAPE::IsSolid()
const =0 

Definition at line 6589 of file

def pcbnew.SHAPE.Move (   self,
Move(SHAPE self, VECTOR2I const & aVector)

virtual void SHAPE::Move(const
VECTOR2I &aVector)=0 

Definition at line 6579 of file

def pcbnew.SHAPE.Parse (   self,
Parse(SHAPE self, std::stringstream & aStream) -> bool

SHAPE::Parse(std::stringstream &aStream) 

Definition at line 6599 of file

def pcbnew.SHAPE.Type (   self)
Type(SHAPE self) -> SHAPE_TYPE

SHAPE_TYPE SHAPE::Type() const

Function Type()

Returns the type of the shape.


the:  type 

Definition at line 6482 of file

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