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

#include <pns_kicad_iface.h>

Inheritance diagram for PNS_KICAD_IFACE:
PNS_KICAD_IFACE_BASE PNS::ROUTER_IFACE PNS_KICAD_IFACE_GENERATOR

Classes

struct  OFFSET
 

Public Member Functions

 PNS_KICAD_IFACE ()
 
 ~PNS_KICAD_IFACE () override
 
virtual void SetHostTool (PCB_TOOL_BASE *aTool)
 
void SetView (KIGFX::VIEW *aView)
 
void EraseView () override
 
bool IsAnyLayerVisible (const PNS_LAYER_RANGE &aLayer) const override
 
bool IsItemVisible (const PNS::ITEM *aItem) const override
 
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 Commit () override
 
void AddItem (PNS::ITEM *aItem) override
 
void UpdateItem (PNS::ITEM *aItem) override
 
void RemoveItem (PNS::ITEM *aItem) override
 
int GetNetCode (PNS::NET_HANDLE aNet) const override
 
wxString GetNetName (PNS::NET_HANDLE aNet) const override
 
void UpdateNet (PNS::NET_HANDLE aNet) override
 
EDA_UNITS GetUnits () const override
 
void SetCommitFlags (int aCommitFlags)
 
void SetBoard (BOARD *aBoard)
 
void SyncWorld (PNS::NODE *aWorld) 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 IsPNSCopperLayer (int aPNSLayer) const override
 
bool IsKicadCopperLayer (PCB_LAYER_ID aPcbnewLayer) const
 
bool ImportSizes (PNS::SIZES_SETTINGS &aSizes, PNS::ITEM *aStartItem, PNS::NET_HANDLE aNet, VECTOR2D aStartPosition) override
 
int StackupHeight (int aFirstLayer, int aSecondLayer) const 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
 
PNS::RULE_RESOLVERGetRuleResolver () override
 
PNS::DEBUG_DECORATORGetDebugDecorator () override
 

Protected Member Functions

BOARD_CONNECTED_ITEMcreateBoardItem (PNS::ITEM *aItem)
 
void modifyBoardItem (PNS::ITEM *aItem)
 
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

std::map< PAD *, OFFSETm_fpOffsets
 
KIGFX::VIEWm_view
 
KIGFX::VIEW_GROUPm_previewItems
 
std::unordered_set< BOARD_ITEM * > m_hiddenItems
 
PCB_TOOL_BASEm_tool
 
std::unique_ptr< BOARD_COMMITm_commit
 
int m_commitFlags
 
PNS_PCBNEW_RULE_RESOLVERm_ruleResolver
 
PNS::DEBUG_DECORATORm_debugDecorator
 
PNS::NODEm_world
 
BOARDm_board
 
int m_startLayer
 

Detailed Description

Definition at line 122 of file pns_kicad_iface.h.

Constructor & Destructor Documentation

◆ PNS_KICAD_IFACE()

PNS_KICAD_IFACE::PNS_KICAD_IFACE ( )

Definition at line 1103 of file pns_kicad_iface.cpp.

References m_commitFlags, m_previewItems, m_tool, and m_view.

◆ ~PNS_KICAD_IFACE()

PNS_KICAD_IFACE::~PNS_KICAD_IFACE ( )
override

Definition at line 1119 of file pns_kicad_iface.cpp.

References KIGFX::VIEW_GROUP::FreeItems(), and m_previewItems.

Member Function Documentation

◆ AddItem()

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

Reimplemented from PNS_KICAD_IFACE_BASE.

Reimplemented in PNS_KICAD_IFACE_GENERATOR.

Definition at line 2121 of file pns_kicad_iface.cpp.

References EDA_ITEM::ClearFlags(), createBoardItem(), m_commit, and PNS::ITEM::SetParent().

◆ Commit()

void PNS_KICAD_IFACE::Commit ( )
overridevirtual

◆ createBoardItem()

◆ DisplayItem()

◆ DisplayPathLine()

void PNS_KICAD_IFACE::DisplayPathLine ( const SHAPE_LINE_CHAIN aLine,
int  aImportance 
)
overridevirtual

◆ DisplayRatline()

◆ EraseView()

◆ GetBoard()

BOARD * PNS_KICAD_IFACE_BASE::GetBoard ( ) const
inlineinherited

Definition at line 96 of file pns_kicad_iface.h.

References PNS_KICAD_IFACE_BASE::m_board.

Referenced by ROUTER_TOOL::saveRouterDebugLog().

◆ GetBoardLayerFromPNSLayer()

◆ GetDebugDecorator()

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

Implements PNS::ROUTER_IFACE.

Definition at line 1087 of file pns_kicad_iface.cpp.

References PNS_KICAD_IFACE_BASE::m_debugDecorator.

◆ GetNetCode()

int PNS_KICAD_IFACE::GetNetCode ( PNS::NET_HANDLE  aNet) const
overridevirtual

Reimplemented from PNS_KICAD_IFACE_BASE.

Definition at line 2198 of file pns_kicad_iface.cpp.

References GetNetCode().

Referenced by GetNetCode().

◆ GetNetName()

wxString PNS_KICAD_IFACE::GetNetName ( PNS::NET_HANDLE  aNet) const
overridevirtual

Reimplemented from PNS_KICAD_IFACE_BASE.

Definition at line 2207 of file pns_kicad_iface.cpp.

Referenced by PCB_TUNING_PATTERN::Update(), and UpdateNet().

◆ GetOrphanedNetHandle()

PNS::NET_HANDLE PNS_KICAD_IFACE_BASE::GetOrphanedNetHandle ( )
overridevirtualinherited

Implements PNS::ROUTER_IFACE.

Definition at line 2222 of file pns_kicad_iface.cpp.

References NETINFO_LIST::OrphanedItem().

◆ GetPNSLayerFromBoardLayer()

◆ GetRuleResolver()

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

Implements PNS::ROUTER_IFACE.

Reimplemented in MOCK_PNS_KICAD_IFACE.

Definition at line 2228 of file pns_kicad_iface.cpp.

References PNS_KICAD_IFACE_BASE::m_ruleResolver.

Referenced by ROUTER_TOOL::UpdateMessagePanel().

◆ GetUnits()

EDA_UNITS PNS_KICAD_IFACE::GetUnits ( ) const
overridevirtual

◆ GetWorld()

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

Implements PNS::ROUTER_IFACE.

Definition at line 94 of file pns_kicad_iface.h.

References PNS_KICAD_IFACE_BASE::m_world.

◆ HideItem()

◆ ImportSizes()

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

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(), PNS_KICAD_IFACE_BASE::inheritTrackWidth(), PNS::ITEM::Kind(), PNS::ITEM::Layer(), PNS_KICAD_IFACE_BASE::m_board, BOARD_DESIGN_SETTINGS::m_HoleToHoleMin, BOARD_DESIGN_SETTINGS::m_MinClearance, BOARD_DESIGN_SETTINGS::m_MinThroughDrill, PNS::CONSTRAINT::m_RuleName, PNS_KICAD_IFACE_BASE::m_ruleResolver, PNS_KICAD_IFACE_BASE::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 
)
protectedinherited

◆ IsAnyLayerVisible()

bool PNS_KICAD_IFACE::IsAnyLayerVisible ( const PNS_LAYER_RANGE aLayer) const
overridevirtual

◆ IsFlashedOnLayer() [1/2]

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

◆ IsFlashedOnLayer() [2/2]

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

◆ IsItemVisible()

◆ IsKicadCopperLayer()

bool PNS_KICAD_IFACE_BASE::IsKicadCopperLayer ( PCB_LAYER_ID  aPcbnewLayer) const
inherited

◆ IsPNSCopperLayer()

bool PNS_KICAD_IFACE_BASE::IsPNSCopperLayer ( int  aPNSLayer) const
overridevirtualinherited

◆ modifyBoardItem()

◆ RemoveItem()

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

Reimplemented from PNS_KICAD_IFACE_BASE.

Reimplemented in PNS_KICAD_IFACE_GENERATOR.

Definition at line 1937 of file pns_kicad_iface.cpp.

References m_commit, m_fpOffsets, PNS::ITEM::OfKind(), pad, PNS::ITEM::Parent(), and PNS::ITEM::SOLID_T.

◆ SetBoard()

void PNS_KICAD_IFACE_BASE::SetBoard ( BOARD aBoard)
inherited

◆ SetCommitFlags()

void PNS_KICAD_IFACE::SetCommitFlags ( int  aCommitFlags)
inline

Definition at line 150 of file pns_kicad_iface.h.

References m_commitFlags.

Referenced by ROUTER_TOOL::performRouting(), and ROUTER_TOOL::RouteSelected().

◆ SetDebugDecorator()

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

Definition at line 1786 of file pns_kicad_iface.cpp.

References PNS_KICAD_IFACE_BASE::m_debugDecorator.

◆ SetHostTool()

void PNS_KICAD_IFACE::SetHostTool ( PCB_TOOL_BASE aTool)
virtual

Reimplemented in PNS_KICAD_IFACE_GENERATOR.

Definition at line 2234 of file pns_kicad_iface.cpp.

References m_commit, and m_tool.

Referenced by PNS::TOOL_BASE::Reset(), and GENERATOR_TOOL_PNS_PROXY::Reset().

◆ SetLayersFromPCBNew()

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

◆ SetStartLayerFromPCBNew()

void PNS_KICAD_IFACE_BASE::SetStartLayerFromPCBNew ( PCB_LAYER_ID  aLayer)
inherited

◆ SetStartLayerFromPNS()

void PNS_KICAD_IFACE_BASE::SetStartLayerFromPNS ( int  aLayer)
inlineinherited

Definition at line 90 of file pns_kicad_iface.h.

References PNS_KICAD_IFACE_BASE::m_startLayer.

◆ SetView()

◆ StackupHeight()

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

◆ syncArc()

◆ syncGraphicalItem()

◆ syncPad()

◆ syncTextItem()

◆ syncTrack()

◆ syncVia()

◆ SyncWorld()

◆ syncZone()

◆ UpdateItem()

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

Reimplemented from PNS_KICAD_IFACE_BASE.

Reimplemented in PNS_KICAD_IFACE_GENERATOR.

Definition at line 2034 of file pns_kicad_iface.cpp.

References modifyBoardItem().

◆ UpdateNet()

void PNS_KICAD_IFACE::UpdateNet ( PNS::NET_HANDLE  aNet)
overridevirtual

Reimplemented from PNS_KICAD_IFACE_BASE.

Definition at line 2216 of file pns_kicad_iface.cpp.

References GetNetName().

Member Data Documentation

◆ m_board

◆ m_commit

std::unique_ptr<BOARD_COMMIT> PNS_KICAD_IFACE::m_commit
protected

◆ m_commitFlags

int PNS_KICAD_IFACE::m_commitFlags
protected

Definition at line 168 of file pns_kicad_iface.h.

Referenced by Commit(), PNS_KICAD_IFACE(), and SetCommitFlags().

◆ m_debugDecorator

◆ m_fpOffsets

std::map<PAD*, OFFSET> PNS_KICAD_IFACE::m_fpOffsets
protected

◆ m_hiddenItems

std::unordered_set<BOARD_ITEM*> PNS_KICAD_IFACE::m_hiddenItems
protected

Definition at line 164 of file pns_kicad_iface.h.

Referenced by EraseView(), HideItem(), and IsItemVisible().

◆ m_previewItems

KIGFX::VIEW_GROUP* PNS_KICAD_IFACE::m_previewItems
protected

◆ m_ruleResolver

◆ m_startLayer

◆ m_tool

PCB_TOOL_BASE* PNS_KICAD_IFACE::m_tool
protected

◆ m_view

◆ m_world

PNS::NODE* PNS_KICAD_IFACE_BASE::m_world
protectedinherited

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