KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PNS_KICAD_IFACE_BASE Class Reference

#include <pns_kicad_iface.h>

Inheritance diagram for PNS_KICAD_IFACE_BASE:
PNS::ROUTER_IFACE MOCK_PNS_KICAD_IFACE PNS_KICAD_IFACE PNS_LOG_PLAYER_KICAD_IFACE PNS_KICAD_IFACE_GENERATOR

Public Member Functions

 PNS_KICAD_IFACE_BASE ()
 
 ~PNS_KICAD_IFACE_BASE () override
 
void EraseView () override
 
void SetBoard (BOARD *aBoard)
 
void SyncWorld (PNS::NODE *aWorld) override
 
bool IsAnyLayerVisible (const PNS_LAYER_RANGE &aLayer) const override
 
bool IsFlashedOnLayer (const PNS::ITEM *aItem, int aLayer) const override
 
bool IsFlashedOnLayer (const PNS::ITEM *aItem, const PNS_LAYER_RANGE &aLayer) const override
 
bool IsItemVisible (const PNS::ITEM *aItem) const override
 
bool IsPNSCopperLayer (int aPNSLayer) const override
 
bool IsKicadCopperLayer (PCB_LAYER_ID aPcbnewLayer) const
 
void HideItem (PNS::ITEM *aItem) override
 
void DisplayItem (const PNS::ITEM *aItem, int aClearance, bool aEdit=false, int aFlags=0) override
 
void DisplayPathLine (const SHAPE_LINE_CHAIN &aLine, int aImportance) override
 
void DisplayRatline (const SHAPE_LINE_CHAIN &aRatline, PNS::NET_HANDLE aNet) override
 
void AddItem (PNS::ITEM *aItem) override
 
void UpdateItem (PNS::ITEM *aItem) override
 
void RemoveItem (PNS::ITEM *aItem) override
 
void Commit () override
 
bool ImportSizes (PNS::SIZES_SETTINGS &aSizes, PNS::ITEM *aStartItem, PNS::NET_HANDLE aNet, VECTOR2D aStartPosition) override
 
int StackupHeight (int aFirstLayer, int aSecondLayer) const override
 
int GetNetCode (PNS::NET_HANDLE aNet) const override
 
wxString GetNetName (PNS::NET_HANDLE aNet) const override
 
void UpdateNet (PNS::NET_HANDLE aNet) override
 
PNS::NET_HANDLE GetOrphanedNetHandle () override
 
void SetDebugDecorator (PNS::DEBUG_DECORATOR *aDec)
 
PCB_LAYER_ID GetBoardLayerFromPNSLayer (int aLayer) const override
 
int GetPNSLayerFromBoardLayer (PCB_LAYER_ID aLayer) const override
 
void SetStartLayerFromPCBNew (PCB_LAYER_ID aLayer)
 
void SetStartLayerFromPNS (int aLayer)
 
PNS_LAYER_RANGE SetLayersFromPCBNew (PCB_LAYER_ID aStartLayer, PCB_LAYER_ID aEndLayer)
 
virtual PNS::NODEGetWorld () const override
 
BOARDGetBoard () const
 
virtual EDA_UNITS GetUnits () const
 
PNS::RULE_RESOLVERGetRuleResolver () override
 
PNS::DEBUG_DECORATORGetDebugDecorator () override
 

Protected Member Functions

std::vector< std::unique_ptr< PNS::SOLID > > syncPad (PAD *aPad)
 
std::unique_ptr< PNS::SEGMENTsyncTrack (PCB_TRACK *aTrack)
 
std::unique_ptr< PNS::ARCsyncArc (PCB_ARC *aArc)
 
std::unique_ptr< PNS::VIAsyncVia (PCB_VIA *aVia)
 
bool syncTextItem (PNS::NODE *aWorld, PCB_TEXT *aText, PCB_LAYER_ID aLayer)
 
bool syncGraphicalItem (PNS::NODE *aWorld, PCB_SHAPE *aItem)
 
bool syncZone (PNS::NODE *aWorld, ZONE *aZone, SHAPE_POLY_SET *aBoardOutline)
 
bool inheritTrackWidth (PNS::ITEM *aItem, int *aInheritedWidth)
 

Protected Attributes

PNS_PCBNEW_RULE_RESOLVERm_ruleResolver
 
PNS::DEBUG_DECORATORm_debugDecorator
 
PNS::NODEm_world
 
BOARDm_board
 
int m_startLayer
 

Detailed Description

Definition at line 51 of file pns_kicad_iface.h.

Constructor & Destructor Documentation

◆ PNS_KICAD_IFACE_BASE()

PNS_KICAD_IFACE_BASE::PNS_KICAD_IFACE_BASE ( )

Definition at line 1093 of file pns_kicad_iface.cpp.

References m_board, m_debugDecorator, m_ruleResolver, m_startLayer, and m_world.

◆ ~PNS_KICAD_IFACE_BASE()

PNS_KICAD_IFACE_BASE::~PNS_KICAD_IFACE_BASE ( )
override

Definition at line 1112 of file pns_kicad_iface.cpp.

References m_debugDecorator, and m_ruleResolver.

Member Function Documentation

◆ AddItem()

void PNS_KICAD_IFACE_BASE::AddItem ( PNS::ITEM aItem)
overridevirtual

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE, and PNS_KICAD_IFACE_GENERATOR.

Definition at line 2043 of file pns_kicad_iface.cpp.

◆ Commit()

void PNS_KICAD_IFACE_BASE::Commit ( )
inlineoverridevirtual

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE, and PNS_KICAD_IFACE_GENERATOR.

Definition at line 74 of file pns_kicad_iface.h.

◆ DisplayItem()

void PNS_KICAD_IFACE_BASE::DisplayItem ( const PNS::ITEM aItem,
int  aClearance,
bool  aEdit = false,
int  aFlags = 0 
)
inlineoverridevirtual

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE, MOCK_PNS_KICAD_IFACE, and PNS_LOG_PLAYER_KICAD_IFACE.

Definition at line 67 of file pns_kicad_iface.h.

◆ DisplayPathLine()

void PNS_KICAD_IFACE_BASE::DisplayPathLine ( const SHAPE_LINE_CHAIN aLine,
int  aImportance 
)
inlineoverridevirtual

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE.

Definition at line 69 of file pns_kicad_iface.h.

◆ DisplayRatline()

void PNS_KICAD_IFACE_BASE::DisplayRatline ( const SHAPE_LINE_CHAIN aRatline,
PNS::NET_HANDLE  aNet 
)
inlineoverridevirtual

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE.

Definition at line 70 of file pns_kicad_iface.h.

◆ EraseView()

void PNS_KICAD_IFACE_BASE::EraseView ( )
inlineoverridevirtual

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE.

Definition at line 57 of file pns_kicad_iface.h.

◆ GetBoard()

BOARD * PNS_KICAD_IFACE_BASE::GetBoard ( ) const
inline

Definition at line 96 of file pns_kicad_iface.h.

References m_board.

Referenced by ROUTER_TOOL::saveRouterDebugLog().

◆ GetBoardLayerFromPNSLayer()

◆ GetDebugDecorator()

PNS::DEBUG_DECORATOR * PNS_KICAD_IFACE_BASE::GetDebugDecorator ( )
overridevirtual

Implements PNS::ROUTER_IFACE.

Definition at line 1087 of file pns_kicad_iface.cpp.

References m_debugDecorator.

◆ GetNetCode()

int PNS_KICAD_IFACE_BASE::GetNetCode ( PNS::NET_HANDLE  aNet) const
inlineoverridevirtual

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE, and PNS_LOG_PLAYER_KICAD_IFACE.

Definition at line 79 of file pns_kicad_iface.h.

◆ GetNetName()

wxString PNS_KICAD_IFACE_BASE::GetNetName ( PNS::NET_HANDLE  aNet) const
inlineoverridevirtual

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE, and PNS_LOG_PLAYER_KICAD_IFACE.

Definition at line 80 of file pns_kicad_iface.h.

◆ GetOrphanedNetHandle()

PNS::NET_HANDLE PNS_KICAD_IFACE_BASE::GetOrphanedNetHandle ( )
overridevirtual

Implements PNS::ROUTER_IFACE.

Definition at line 2225 of file pns_kicad_iface.cpp.

References NETINFO_LIST::OrphanedItem().

◆ GetPNSLayerFromBoardLayer()

◆ GetRuleResolver()

PNS::RULE_RESOLVER * PNS_KICAD_IFACE_BASE::GetRuleResolver ( )
overridevirtual

Implements PNS::ROUTER_IFACE.

Reimplemented in MOCK_PNS_KICAD_IFACE.

Definition at line 2231 of file pns_kicad_iface.cpp.

References m_ruleResolver.

Referenced by ROUTER_TOOL::UpdateMessagePanel().

◆ GetUnits()

virtual EDA_UNITS PNS_KICAD_IFACE_BASE::GetUnits ( ) const
inlinevirtual

Reimplemented in PNS_KICAD_IFACE.

Definition at line 98 of file pns_kicad_iface.h.

Referenced by syncZone().

◆ GetWorld()

virtual PNS::NODE * PNS_KICAD_IFACE_BASE::GetWorld ( ) const
inlineoverridevirtual

Implements PNS::ROUTER_IFACE.

Definition at line 94 of file pns_kicad_iface.h.

References m_world.

◆ HideItem()

void PNS_KICAD_IFACE_BASE::HideItem ( PNS::ITEM aItem)
inlineoverridevirtual

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE, MOCK_PNS_KICAD_IFACE, and PNS_LOG_PLAYER_KICAD_IFACE.

Definition at line 66 of file pns_kicad_iface.h.

◆ ImportSizes()

bool PNS_KICAD_IFACE_BASE::ImportSizes ( PNS::SIZES_SETTINGS aSizes,
PNS::ITEM aStartItem,
PNS::NET_HANDLE  aNet,
VECTOR2D  aStartPosition 
)
overridevirtual

Implements PNS::ROUTER_IFACE.

Definition at line 654 of file pns_kicad_iface.cpp.

References _, PNS::ITEM::Anchor(), PNS::CT_CLEARANCE, PNS::CT_DIFF_PAIR_GAP, PNS::CT_HOLE_TO_HOLE, PNS::CT_VIA_DIAMETER, PNS::CT_VIA_HOLE, PNS::CT_WIDTH, VECTOR2< T >::Distance(), PNS_PCBNEW_RULE_RESOLVER::DpCoupledNet(), BOARD_DESIGN_SETTINGS::GetCurrentDiffPairGap(), BOARD_DESIGN_SETTINGS::GetCurrentDiffPairViaGap(), BOARD_DESIGN_SETTINGS::GetCurrentDiffPairWidth(), BOARD_DESIGN_SETTINGS::GetCurrentTrackWidth(), BOARD_DESIGN_SETTINGS::GetCurrentViaDrill(), BOARD_DESIGN_SETTINGS::GetCurrentViaSize(), BOARD::GetDesignSettings(), inheritTrackWidth(), PNS::ITEM::Kind(), PNS::ITEM::Layer(), m_board, BOARD_DESIGN_SETTINGS::m_HoleToHoleMin, BOARD_DESIGN_SETTINGS::m_MinClearance, BOARD_DESIGN_SETTINGS::m_MinThroughDrill, PNS::CONSTRAINT::m_RuleName, m_ruleResolver, m_startLayer, BOARD_DESIGN_SETTINGS::m_TempOverrideTrackWidth, BOARD_DESIGN_SETTINGS::m_TrackMinWidth, BOARD_DESIGN_SETTINGS::m_UseConnectedTrackWidth, PNS::CONSTRAINT::m_Value, BOARD_DESIGN_SETTINGS::m_ViasMinSize, MINOPTMAX< T >::Min(), PNS::ITEM::Net(), MINOPTMAX< T >::Opt(), PNS_PCBNEW_RULE_RESOLVER::QueryConstraint(), PNS::ITEM::SEGMENT_T, PNS::SIZES_SETTINGS::SetBoardMinTrackWidth(), PNS::SIZES_SETTINGS::SetClearance(), PNS::SIZES_SETTINGS::SetClearanceSource(), PNS::SIZES_SETTINGS::SetDiffPairGap(), PNS::SIZES_SETTINGS::SetDiffPairGapSource(), PNS::SIZES_SETTINGS::SetDiffPairHoleToHole(), PNS::SIZES_SETTINGS::SetDiffPairViaGap(), PNS::SIZES_SETTINGS::SetDiffPairViaGapSameAsTraceGap(), PNS::SIZES_SETTINGS::SetDiffPairWidth(), PNS::SIZES_SETTINGS::SetDiffPairWidthSource(), PNS::SEGMENT::SetEnds(), PNS::SIZES_SETTINGS::SetHoleToHole(), PNS::ITEM::SetLayer(), PNS::SIZES_SETTINGS::SetMinClearance(), PNS::ITEM::SetNet(), PNS::SIZES_SETTINGS::SetTrackWidth(), PNS::SIZES_SETTINGS::SetTrackWidthIsExplicit(), PNS::SIZES_SETTINGS::SetViaDiameter(), PNS::SIZES_SETTINGS::SetViaDrill(), PNS::SIZES_SETTINGS::SetWidthSource(), UNDEFINED_LAYER, BOARD_DESIGN_SETTINGS::UseNetClassDiffPair(), BOARD_DESIGN_SETTINGS::UseNetClassTrack(), BOARD_DESIGN_SETTINGS::UseNetClassVia(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by ROUTER_TOOL::onTrackViaSizeChanged(), and ROUTER_TOOL::prepareInteractive().

◆ inheritTrackWidth()

bool PNS_KICAD_IFACE_BASE::inheritTrackWidth ( PNS::ITEM aItem,
int *  aInheritedWidth 
)
protected

◆ IsAnyLayerVisible()

bool PNS_KICAD_IFACE_BASE::IsAnyLayerVisible ( const PNS_LAYER_RANGE aLayer) const
inlineoverridevirtual

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE.

Definition at line 60 of file pns_kicad_iface.h.

◆ IsFlashedOnLayer() [1/2]

bool PNS_KICAD_IFACE_BASE::IsFlashedOnLayer ( const PNS::ITEM aItem,
const PNS_LAYER_RANGE aLayer 
) const
overridevirtual

◆ IsFlashedOnLayer() [2/2]

bool PNS_KICAD_IFACE_BASE::IsFlashedOnLayer ( const PNS::ITEM aItem,
int  aLayer 
) const
overridevirtual

◆ IsItemVisible()

bool PNS_KICAD_IFACE_BASE::IsItemVisible ( const PNS::ITEM aItem) const
inlineoverridevirtual

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE.

Definition at line 63 of file pns_kicad_iface.h.

◆ IsKicadCopperLayer()

bool PNS_KICAD_IFACE_BASE::IsKicadCopperLayer ( PCB_LAYER_ID  aPcbnewLayer) const

Definition at line 1529 of file pns_kicad_iface.cpp.

Referenced by syncGraphicalItem(), and syncTextItem().

◆ IsPNSCopperLayer()

bool PNS_KICAD_IFACE_BASE::IsPNSCopperLayer ( int  aPNSLayer) const
overridevirtual

Implements PNS::ROUTER_IFACE.

Definition at line 1522 of file pns_kicad_iface.cpp.

References GetBoardLayerFromPNSLayer().

Referenced by PNS::TOOL_BASE::pickSingleItem().

◆ RemoveItem()

void PNS_KICAD_IFACE_BASE::RemoveItem ( PNS::ITEM aItem)
overridevirtual

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE, and PNS_KICAD_IFACE_GENERATOR.

Definition at line 1932 of file pns_kicad_iface.cpp.

◆ SetBoard()

void PNS_KICAD_IFACE_BASE::SetBoard ( BOARD aBoard)

◆ SetDebugDecorator()

void PNS_KICAD_IFACE_BASE::SetDebugDecorator ( PNS::DEBUG_DECORATOR aDec)

Definition at line 1786 of file pns_kicad_iface.cpp.

References m_debugDecorator.

◆ SetLayersFromPCBNew()

PNS_LAYER_RANGE PNS_KICAD_IFACE_BASE::SetLayersFromPCBNew ( PCB_LAYER_ID  aStartLayer,
PCB_LAYER_ID  aEndLayer 
)

Definition at line 2280 of file pns_kicad_iface.cpp.

References GetPNSLayerFromBoardLayer().

Referenced by syncPad(), and syncVia().

◆ SetStartLayerFromPCBNew()

void PNS_KICAD_IFACE_BASE::SetStartLayerFromPCBNew ( PCB_LAYER_ID  aLayer)

◆ SetStartLayerFromPNS()

void PNS_KICAD_IFACE_BASE::SetStartLayerFromPNS ( int  aLayer)
inline

Definition at line 90 of file pns_kicad_iface.h.

References m_startLayer.

◆ StackupHeight()

int PNS_KICAD_IFACE_BASE::StackupHeight ( int  aFirstLayer,
int  aSecondLayer 
) const
overridevirtual

◆ syncArc()

◆ syncGraphicalItem()

◆ syncPad()

◆ syncTextItem()

◆ syncTrack()

◆ syncVia()

◆ SyncWorld()

◆ syncZone()

◆ UpdateItem()

void PNS_KICAD_IFACE_BASE::UpdateItem ( PNS::ITEM aItem)
overridevirtual

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE, and PNS_KICAD_IFACE_GENERATOR.

Definition at line 1957 of file pns_kicad_iface.cpp.

◆ UpdateNet()

void PNS_KICAD_IFACE_BASE::UpdateNet ( PNS::NET_HANDLE  aNet)
inlineoverridevirtual

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE.

Definition at line 81 of file pns_kicad_iface.h.

Member Data Documentation

◆ m_board

◆ m_debugDecorator

◆ m_ruleResolver

PNS_PCBNEW_RULE_RESOLVER* PNS_KICAD_IFACE_BASE::m_ruleResolver
protected

◆ m_startLayer

int PNS_KICAD_IFACE_BASE::m_startLayer
protected

◆ m_world

PNS::NODE* PNS_KICAD_IFACE_BASE::m_world
protected

Definition at line 117 of file pns_kicad_iface.h.

Referenced by GetWorld(), PNS_KICAD_IFACE_BASE(), and SyncWorld().


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