PCB Environment 2

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions
Component Class Reference
Inheritance diagram for Component:

## Public Member Functions
| Component (const std::string &name)
Object * | clone (CloneEnv &) const override
void | setLocation (const Point_2 &refPoint, int layer=0)
bool | isPlaced () const
const Point_2 & | getRefPoint () const
const std::vector< Object * > & | getPins () const
uint | numPins () const
Pin * | getPin (const std::string &name) const
Pin & | getPin (uint i) const
Pin * | addPin (const std::string &name)
Pin * | removeAndDisconnectPin (Pin &)
void | gatherConnections (std::set< Connection * > &) const
void | addOccludedObject (Object &) override
std::string | str () const override
PyObject * | getPy (uint depth) const override
void | setColors (const Color &line, const Color &fill)
const Color & | getLineColor () const
const Color & | getFillColor () const
Public Member Functions inherited from Object
const std::string & | name () const
std::string | getFullName () const
uint | id () const
void | setId (uint id)
bool | hasParent () const
Object * | getParent () const
Object * | getChildAt (const Point_2 &) const
const std::vector< Object * > & | getChildren () const
void | addChild (Object &)
uint | numChildren () const
bool | hasChildren () const
void | removeChild (Object &)
const Point_2 & | getCenter () const
Point_25 | getCenter25 () const
| Layer is set to max(LayerMin, parent.LayerMin) to account for bottom layer thru-hole pins.
const Bbox_2 | getBbox () const
void | translate (const Vector_2 &)
void | transform (const Aff_transformation_2 &)
void | rotateAround (const Point_2 &refPoint, Real angleRadians)
bool | isOnLayer (int z) const
int | minLayer () const
int | maxLayer () const
void | setLayer (int)
void | setLayerRange (int, int)
int | getSingleLayer () const
bool | sharesLayer (const Object &) const
Real | getClearance () const
void | setClearance (Real c)
AShape * | getShape () const
void | setShape (const Circle_2 &)
void | setShape (const Triangle_2 &)
void | setShape (const Iso_rectangle_2 &)
void | setShape (const Polygon_2 &)
void | setShape (const WideSegment_25 &, Real angleTolerance=0.0)
void | setShape (Polygon_2 &&)
bool | canRouteInside () const
void | setCanRouteInside (bool b)
bool | canPlaceViasInside () const
void | setCanPlaceViasInside (bool b)
bool | isSelected () const
void | setSelected (bool b)
void | setSelected (bool b, uint recursion)
bool | violatesClearance (const Via &, Real clearance, Point_25 *=0) const
bool | violatesClearance (const WideSegment_25 &, Real clearance, Point_25 *=0) const
Real | distanceTo (const Point_2 &v) const
bool | contains2D (const Point_2 &v) const
bool | contains3D (const Point_25 &v) const
bool | isInsideBbox (const Point_2 &v) const
bool | isInsideBbox (const Point_2 &v, int zmin, int zmax) const
bool | intersects (const Bbox_2 &B) const
bool | intersects (const WideSegment_25 &s) const
bool | intersects (const Object &A) const
bool | bboxTest (const Bbox_2 &B)
bool | bboxTest (const Bbox_2 &B, int z0, int z1=-1)
bool | isContainerOf (const Object &) const
void | copyFrom (CloneEnv &, const Object &)
template<typename T>
bool | is_a () const
template<typename T>
const T * | as () const
template<typename T>
T * | as ()

## Static Public Member Functions
static uint | connectivity (std::vector< std::pair< Pin *, Pin * > > &, const Component &, const Component &)

## Additional Inherited Members
Protected Member Functions inherited from Object
| Object (Object *parent, const std::string &name)
Protected Attributes inherited from Object
std::unique_ptr< AShape > | mShape
Point_2 | mCenter
Object *const | mParent
std::vector< Object * > | mChildren
std::string | mName
uint | mId
uint | mChildIndex {std::numeric_limits<uint>::max()}
int | mLayerRange [2] {-1,-1}
Real | mClearance {0.0}
bool | mCanRouteInside {false}
bool | mCanPlaceViasInside {true}
bool | mSelectionFlag {false}

## Member Function Documentation

## ◆ addOccludedObject()

void Component::addOccludedObject | ( | Object & |  | ) |
| override virtual

Mark the given object as occluded by this component. At the moment this does only this->setCanRouteInside(true).

Reimplemented from Object.

## ◆ addPin()

Pin * Component::addPin | ( | const std::string & | name | ) |

Create a new pin with the given name. The pin's layer is initialized to the layer specified in setLocation().

Parameters

  name | must be unique or empty (empty names result in "§getNumPins()").

## ◆ clone()

Object * Component::clone | ( | CloneEnv & |  | ) | const
| override virtual

Reimplemented from Object.

## ◆ connectivity()

uint Component::connectivity | ( | std::vector< std::pair< Pin *, Pin * > > & | ,
|  | const Component & | ,
|  | const Component & | )
| static

Add all pin pairs that are connected between the given components to the vector.

## ◆ gatherConnections()

void Component::gatherConnections | ( | std::set< Connection * > & |  | ) | const

Add all connections this component's pins participate in to the set.

## ◆ getPy()

PyObject * Component::getPy | ( | uint | depth | ) | const
| override virtual

Reimplemented from Object.

## ◆ removeAndDisconnectPin()

Pin * Component::removeAndDisconnectPin | ( | Pin & |  | ) |

Remove a pin from this component and its net.

Returns
  pointer to the pin

## ◆ setLocation()

void Component::setLocation | ( | const Point_2 & | refPoint,
|  | int | layer = 0 )

The location is for reference only, pins are not moved.

## ◆ str()

std::string Component::str | ( |  | ) | const
| override virtual

Reimplemented from Object.

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

- /home/chr/devel/PhD/Environment/pub/PCBEnv/pcbenv/cxx/Component.hpp