KiCad PCB EDA Suite
PNS::SIZES_SETTINGS Class Reference

#include <pns_sizes_settings.h>

Public Member Functions

 SIZES_SETTINGS ()
 
 ~SIZES_SETTINGS ()
 
void ClearLayerPairs ()
 
void AddLayerPair (int aL1, int aL2)
 
int MinClearance () const
 
void SetMinClearance (int aClearance)
 
int TrackWidth () const
 
void SetTrackWidth (int aWidth)
 
bool TrackWidthIsExplicit () const
 
void SetTrackWidthIsExplicit (bool aIsExplicit)
 
int DiffPairWidth () const
 
int DiffPairGap () const
 
int DiffPairViaGap () const
 
bool DiffPairViaGapSameAsTraceGap () const
 
void SetDiffPairWidth (int aWidth)
 
void SetDiffPairGap (int aGap)
 
void SetDiffPairViaGapSameAsTraceGap (bool aEnable)
 
void SetDiffPairViaGap (int aGap)
 
int ViaDiameter () const
 
void SetViaDiameter (int aDiameter)
 
int ViaDrill () const
 
void SetViaDrill (int aDrill)
 
std::optional< int > PairedLayer (int aLayerId)
 
int GetLayerTop () const
 
int GetLayerBottom () const
 
void SetHoleToHole (int aHoleToHole)
 
int GetHoleToHole () const
 
void SetViaType (VIATYPE aViaType)
 
VIATYPE ViaType () const
 
wxString GetClearanceSource () const
 
void SetClearanceSource (const wxString &aSource)
 
wxString GetWidthSource () const
 
void SetWidthSource (const wxString &aSource)
 
wxString GetDiffPairWidthSource () const
 
void SetDiffPairWidthSource (const wxString &aSource)
 
wxString GetDiffPairGapSource () const
 
void SetDiffPairGapSource (const wxString &aSource)
 

Private Attributes

int m_minClearance
 
int m_trackWidth
 
bool m_trackWidthIsExplicit
 
VIATYPE m_viaType
 
int m_viaDiameter
 
int m_viaDrill
 
int m_diffPairWidth
 
int m_diffPairGap
 
int m_diffPairViaGap
 
bool m_diffPairViaGapSameAsTraceGap
 
int m_holeToHole
 
std::map< int, int > m_layerPairs
 
wxString m_clearanceSource
 
wxString m_widthSource
 
wxString m_diffPairWidthSource
 
wxString m_diffPairGapSource
 

Detailed Description

Definition at line 37 of file pns_sizes_settings.h.

Constructor & Destructor Documentation

◆ SIZES_SETTINGS()

PNS::SIZES_SETTINGS::SIZES_SETTINGS ( )
inline

◆ ~SIZES_SETTINGS()

PNS::SIZES_SETTINGS::~SIZES_SETTINGS ( )
inline

Definition at line 54 of file pns_sizes_settings.h.

54{};

Member Function Documentation

◆ AddLayerPair()

void PNS::SIZES_SETTINGS::AddLayerPair ( int  aL1,
int  aL2 
)

Definition at line 36 of file pns_sizes_settings.cpp.

37{
38 int top = std::min( aL1, aL2 );
39 int bottom = std::max( aL1, aL2 );
40
41 m_layerPairs[bottom] = top;
42 m_layerPairs[top] = bottom;
43}
std::map< int, int > m_layerPairs

References m_layerPairs.

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

◆ ClearLayerPairs()

void PNS::SIZES_SETTINGS::ClearLayerPairs ( )

Definition at line 30 of file pns_sizes_settings.cpp.

31{
32 m_layerPairs.clear();
33}

References m_layerPairs.

Referenced by ROUTER_TOOL::handleLayerSwitch().

◆ DiffPairGap()

◆ DiffPairViaGap()

◆ DiffPairViaGapSameAsTraceGap()

bool PNS::SIZES_SETTINGS::DiffPairViaGapSameAsTraceGap ( ) const
inline

◆ DiffPairWidth()

◆ GetClearanceSource()

wxString PNS::SIZES_SETTINGS::GetClearanceSource ( ) const
inline

Definition at line 106 of file pns_sizes_settings.h.

106{ return m_clearanceSource; }

References m_clearanceSource.

Referenced by ROUTER_TOOL::UpdateMessagePanel().

◆ GetDiffPairGapSource()

wxString PNS::SIZES_SETTINGS::GetDiffPairGapSource ( ) const
inline

Definition at line 115 of file pns_sizes_settings.h.

115{ return m_diffPairGapSource; }

References m_diffPairGapSource.

Referenced by ROUTER_TOOL::UpdateMessagePanel().

◆ GetDiffPairWidthSource()

wxString PNS::SIZES_SETTINGS::GetDiffPairWidthSource ( ) const
inline

Definition at line 112 of file pns_sizes_settings.h.

112{ return m_diffPairWidthSource; }

References m_diffPairWidthSource.

Referenced by ROUTER_TOOL::UpdateMessagePanel().

◆ GetHoleToHole()

int PNS::SIZES_SETTINGS::GetHoleToHole ( ) const
inline

Definition at line 101 of file pns_sizes_settings.h.

101{ return m_holeToHole; }

References m_holeToHole.

Referenced by PNS::DIFF_PAIR_PLACER::viaGap().

◆ GetLayerBottom()

int PNS::SIZES_SETTINGS::GetLayerBottom ( ) const

Definition at line 55 of file pns_sizes_settings.cpp.

56{
57 if( m_layerPairs.empty() )
58 return B_Cu;
59 else
60 return m_layerPairs.begin()->second;
61}
@ B_Cu
Definition: layer_ids.h:95

References B_Cu, and m_layerPairs.

Referenced by PNS::LINE_PLACER::makeVia(), and PNS::DIFF_PAIR_PLACER::makeVia().

◆ GetLayerTop()

int PNS::SIZES_SETTINGS::GetLayerTop ( ) const

Definition at line 46 of file pns_sizes_settings.cpp.

47{
48 if( m_layerPairs.empty() )
49 return F_Cu;
50 else
51 return m_layerPairs.begin()->first;
52}
@ F_Cu
Definition: layer_ids.h:64

References F_Cu, and m_layerPairs.

Referenced by PNS::LINE_PLACER::makeVia(), PNS::DIFF_PAIR_PLACER::makeVia(), and ROUTER_TOOL::switchLayerOnViaPlacement().

◆ GetWidthSource()

wxString PNS::SIZES_SETTINGS::GetWidthSource ( ) const
inline

Definition at line 109 of file pns_sizes_settings.h.

109{ return m_widthSource; }

References m_widthSource.

Referenced by ROUTER_TOOL::UpdateMessagePanel().

◆ MinClearance()

int PNS::SIZES_SETTINGS::MinClearance ( ) const
inline

Definition at line 59 of file pns_sizes_settings.h.

59{ return m_minClearance; }

References m_minClearance.

Referenced by PNS::ROUTER::isStartingPointRoutable(), and ROUTER_TOOL::UpdateMessagePanel().

◆ PairedLayer()

std::optional< int > PNS::SIZES_SETTINGS::PairedLayer ( int  aLayerId)
inline

Definition at line 89 of file pns_sizes_settings.h.

90 {
91 if( m_layerPairs.find(aLayerId) == m_layerPairs.end() )
92 return std::optional<int>();
93
94 return m_layerPairs[aLayerId];
95 }

References m_layerPairs.

Referenced by ROUTER_TOOL::switchLayerOnViaPlacement().

◆ SetClearanceSource()

void PNS::SIZES_SETTINGS::SetClearanceSource ( const wxString &  aSource)
inline

Definition at line 107 of file pns_sizes_settings.h.

107{ m_clearanceSource = aSource; }

References m_clearanceSource.

Referenced by PNS_KICAD_IFACE_BASE::ImportSizes().

◆ SetDiffPairGap()

void PNS::SIZES_SETTINGS::SetDiffPairGap ( int  aGap)
inline

◆ SetDiffPairGapSource()

void PNS::SIZES_SETTINGS::SetDiffPairGapSource ( const wxString &  aSource)
inline

◆ SetDiffPairViaGap()

void PNS::SIZES_SETTINGS::SetDiffPairViaGap ( int  aGap)
inline

◆ SetDiffPairViaGapSameAsTraceGap()

void PNS::SIZES_SETTINGS::SetDiffPairViaGapSameAsTraceGap ( bool  aEnable)
inline

◆ SetDiffPairWidth()

void PNS::SIZES_SETTINGS::SetDiffPairWidth ( int  aWidth)
inline

◆ SetDiffPairWidthSource()

void PNS::SIZES_SETTINGS::SetDiffPairWidthSource ( const wxString &  aSource)
inline

◆ SetHoleToHole()

void PNS::SIZES_SETTINGS::SetHoleToHole ( int  aHoleToHole)
inline

Definition at line 100 of file pns_sizes_settings.h.

100{ m_holeToHole = aHoleToHole; }

References m_holeToHole.

Referenced by PNS_KICAD_IFACE_BASE::ImportSizes().

◆ SetMinClearance()

void PNS::SIZES_SETTINGS::SetMinClearance ( int  aClearance)
inline

Definition at line 60 of file pns_sizes_settings.h.

60{ m_minClearance = aClearance; }

References m_minClearance.

Referenced by PNS_KICAD_IFACE_BASE::ImportSizes().

◆ SetTrackWidth()

void PNS::SIZES_SETTINGS::SetTrackWidth ( int  aWidth)
inline

Definition at line 63 of file pns_sizes_settings.h.

63{ m_trackWidth = aWidth; }

References m_trackWidth.

Referenced by PNS_KICAD_IFACE_BASE::ImportSizes(), and ROUTER_TOOL::updateSizesAfterLayerSwitch().

◆ SetTrackWidthIsExplicit()

void PNS::SIZES_SETTINGS::SetTrackWidthIsExplicit ( bool  aIsExplicit)
inline

Definition at line 66 of file pns_sizes_settings.h.

66{ m_trackWidthIsExplicit = aIsExplicit; }

References m_trackWidthIsExplicit.

Referenced by PNS_KICAD_IFACE_BASE::ImportSizes().

◆ SetViaDiameter()

void PNS::SIZES_SETTINGS::SetViaDiameter ( int  aDiameter)
inline

Definition at line 84 of file pns_sizes_settings.h.

84{ m_viaDiameter = aDiameter; }

References m_viaDiameter.

Referenced by ROUTER_TOOL::handleLayerSwitch(), and PNS_KICAD_IFACE_BASE::ImportSizes().

◆ SetViaDrill()

void PNS::SIZES_SETTINGS::SetViaDrill ( int  aDrill)
inline

Definition at line 87 of file pns_sizes_settings.h.

87{ m_viaDrill = aDrill; }

References m_viaDrill.

Referenced by ROUTER_TOOL::handleLayerSwitch(), and PNS_KICAD_IFACE_BASE::ImportSizes().

◆ SetViaType()

void PNS::SIZES_SETTINGS::SetViaType ( VIATYPE  aViaType)
inline

Definition at line 103 of file pns_sizes_settings.h.

103{ m_viaType = aViaType; }

References m_viaType.

Referenced by ROUTER_TOOL::handleLayerSwitch().

◆ SetWidthSource()

void PNS::SIZES_SETTINGS::SetWidthSource ( const wxString &  aSource)
inline

Definition at line 110 of file pns_sizes_settings.h.

110{ m_widthSource = aSource; }

References m_widthSource.

Referenced by PNS_KICAD_IFACE_BASE::ImportSizes(), and ROUTER_TOOL::updateSizesAfterLayerSwitch().

◆ TrackWidth()

◆ TrackWidthIsExplicit()

bool PNS::SIZES_SETTINGS::TrackWidthIsExplicit ( ) const
inline

◆ ViaDiameter()

◆ ViaDrill()

int PNS::SIZES_SETTINGS::ViaDrill ( ) const
inline

◆ ViaType()

VIATYPE PNS::SIZES_SETTINGS::ViaType ( ) const
inline

Definition at line 104 of file pns_sizes_settings.h.

104{ return m_viaType; }

References m_viaType.

Referenced by PNS::LINE_PLACER::makeVia(), and PNS::DIFF_PAIR_PLACER::makeVia().

Member Data Documentation

◆ m_clearanceSource

wxString PNS::SIZES_SETTINGS::m_clearanceSource
private

Definition at line 136 of file pns_sizes_settings.h.

Referenced by GetClearanceSource(), and SetClearanceSource().

◆ m_diffPairGap

int PNS::SIZES_SETTINGS::m_diffPairGap
private

Definition at line 128 of file pns_sizes_settings.h.

Referenced by DiffPairGap(), DiffPairViaGap(), and SetDiffPairGap().

◆ m_diffPairGapSource

wxString PNS::SIZES_SETTINGS::m_diffPairGapSource
private

Definition at line 139 of file pns_sizes_settings.h.

Referenced by GetDiffPairGapSource(), and SetDiffPairGapSource().

◆ m_diffPairViaGap

int PNS::SIZES_SETTINGS::m_diffPairViaGap
private

Definition at line 129 of file pns_sizes_settings.h.

Referenced by DiffPairViaGap(), and SetDiffPairViaGap().

◆ m_diffPairViaGapSameAsTraceGap

bool PNS::SIZES_SETTINGS::m_diffPairViaGapSameAsTraceGap
private

◆ m_diffPairWidth

int PNS::SIZES_SETTINGS::m_diffPairWidth
private

Definition at line 127 of file pns_sizes_settings.h.

Referenced by DiffPairWidth(), and SetDiffPairWidth().

◆ m_diffPairWidthSource

wxString PNS::SIZES_SETTINGS::m_diffPairWidthSource
private

Definition at line 138 of file pns_sizes_settings.h.

Referenced by GetDiffPairWidthSource(), and SetDiffPairWidthSource().

◆ m_holeToHole

int PNS::SIZES_SETTINGS::m_holeToHole
private

Definition at line 132 of file pns_sizes_settings.h.

Referenced by GetHoleToHole(), and SetHoleToHole().

◆ m_layerPairs

std::map<int, int> PNS::SIZES_SETTINGS::m_layerPairs
private

◆ m_minClearance

int PNS::SIZES_SETTINGS::m_minClearance
private

Definition at line 119 of file pns_sizes_settings.h.

Referenced by MinClearance(), and SetMinClearance().

◆ m_trackWidth

int PNS::SIZES_SETTINGS::m_trackWidth
private

Definition at line 120 of file pns_sizes_settings.h.

Referenced by SetTrackWidth(), and TrackWidth().

◆ m_trackWidthIsExplicit

bool PNS::SIZES_SETTINGS::m_trackWidthIsExplicit
private

Definition at line 121 of file pns_sizes_settings.h.

Referenced by SetTrackWidthIsExplicit(), and TrackWidthIsExplicit().

◆ m_viaDiameter

int PNS::SIZES_SETTINGS::m_viaDiameter
private

Definition at line 124 of file pns_sizes_settings.h.

Referenced by SetViaDiameter(), and ViaDiameter().

◆ m_viaDrill

int PNS::SIZES_SETTINGS::m_viaDrill
private

Definition at line 125 of file pns_sizes_settings.h.

Referenced by SetViaDrill(), and ViaDrill().

◆ m_viaType

VIATYPE PNS::SIZES_SETTINGS::m_viaType
private

Definition at line 123 of file pns_sizes_settings.h.

Referenced by SetViaType(), and ViaType().

◆ m_widthSource

wxString PNS::SIZES_SETTINGS::m_widthSource
private

Definition at line 137 of file pns_sizes_settings.h.

Referenced by GetWidthSource(), and SetWidthSource().


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