PCB Environment 2
Loading...
Searching...
No Matches
PCBoard Class Reference

Public Member Functions

 PCBoard (const Nanometers UnitLength=Nanometers(163840.0))
PCBoardclone (CloneEnv &) const
const std::string & name () const
const std::string & getSourceFilePath () const
uint getNumLayers () const
const LayergetLayer (uint i) const
LayoutAreagetLayoutArea ()
const LayoutAreagetLayoutArea () const
PCBoardoperator= (const PCBoard &)=delete
NetgetNet (const std::string &name) const
NetgetNet (uint) const
NetgetNet (PyObject *) const
ComponentgetComponent (const std::string &name) const
ComponentgetComponent (uint) const
ComponentgetComponent (PyObject *) const
ComponentgetComponentAt (const Point_2 &, int z=-1) const
PingetPin (const std::string &name) const
PingetPin (PyObject *) const
ConnectiongetConnection (PyObject *) const
uint getNumNets () const
const std::vector< Net * > & getNets () const
uint getNumComponents () const
const std::vector< Component * > & getComponents () const
void renumberComs ()
void renumberPins ()
void renumberNets ()
const ObjectsBVHgetBVH () const
const NavGridgetNavGrid () const
NavGridgetNavGrid ()
NavTriangulationgetTNG () const
bool rebuildTNG ()
void forceConnectionsToGrid ()
 Move all connection endpoints to the nearest gridcell center.
void initPathfindingForNet (const Connection &)
 These unblock/restore pins and tracks associated with this connection.
void finiPathfindingForNet (const Connection &)
void initPathfindingFor (const Connection &)
void finiPathfindingFor (const Connection &)
void add (Component &)
void add (Net &)
Componentremove (Component &)
Netremove (Net &)
void pruneLayers (std::set< uint > &keep)
void pruneConnections (std::set< Connection * > &keep, bool deleteNets=true)
void pruneNets (std::set< Net * > &keep)
void prunePins (std::set< Pin * > &keep)
void pruneComponents (std::set< Component * > &keep)
void removeEmptyNets ()
Real metersToUnits (Nanometers nm) const
Nanometers unitsToNanometers (Real r) const
Micrometers unitsToMicrometers (Real r) const
uint getLayerForSide (char t_or_b) const
const std::vector< Layer > & getLayers () const
LayergetLayer (uint i)
void setName (const std::string &name)
void setSourceFilePath (const std::string &path)
void setNumLayers (uint N)
 NOTE: Deletes objects on no-longer existing layers.
void adjustLayoutAreaMargins (Real min, Real max=std::numeric_limits< Real >::infinity())
void setMinViaDiameter (Micrometers)
Real getMinViaDiameter () const
void setMinClearancePins (Micrometers)
Real getMinClearancePins () const
void setMinClearanceNets (Micrometers)
Real getMinClearanceNets () const
void setMinTrackWidth (Micrometers)
Real getMinTrackWidth () const
Bbox_2 getComponentAreaBbox () const
void recomputeComponentAreaBbox ()
Bbox_2 getActiveAreaBbox () const
void setActiveAreaBbox (const Bbox_2 &box)
bool runPathFinding (Connection &, Connection *ref=0, const AStarCosts *=0)
bool runPathFindingTri (Connection &)
void rasterizeTracks (const Connection &, int8_t count=1)
void unrasterizeTracks (const Connection &, int8_t count=-1)
void eraseTracks (Connection &)
void wipe ()
Real sumViolationArea (Connection &, Connection *ref=0)
PyObject * getPy (PyObject *dict, uint depth=3, bool asNumpy=true) const
PyObject * getLayersPy () const
std::mutex & getLock () const
bool hasChanged () const
void setChanged (uint32_t mask)
uint32_t ackChanges () const

Member Function Documentation

◆ adjustLayoutAreaMargins()

void PCBoard::adjustLayoutAreaMargins ( Real min,
Real max = std::numeric_limits< Real >::infinity() )

Adjust the layout area around the component area bbox.

Negative values are interpreted as fractions of the component bbox's maximum dimension.

Parameters
minMinimum margin around component area bbox.
maxMaximum margin around component area bbox (may be infinite).

◆ getLock()

std::mutex & PCBoard::getLock ( ) const
inline

Hold this lock to synchronize with the GUI while modifying the board. Only runPathFinding() does this on its own. This does not prevent two pathfinding operations from running in parallel and producing conflicting tracks!

◆ runPathFinding()

bool PCBoard::runPathFinding ( Connection & ,
Connection * ref = 0,
const AStarCosts * = 0 )

Run A-star.

Parameters
refSet this if there is a different connection we're allowed to cross.

NOTE: Locks the PCB while modifying the Connection.


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