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 Clearance () const
 
void SetClearance (int aClearance)
 
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)
 
void SetDiffPairHoleToHole (int aHoleToHole)
 
int GetDiffPairHoleToHole () const
 

Private Attributes

int m_clearance
 
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
 
int m_diffPairHoleToHole
 
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

Definition at line 40 of file pns_sizes_settings.h.

40 :
41 m_clearance( 0 ),
42 m_minClearance( 0 ),
43 m_trackWidth( 155000 ),
46 m_viaDiameter( 600000 ),
47 m_viaDrill( 250000 ),
48 m_diffPairWidth( 125000 ),
49 m_diffPairGap( 180000 ),
50 m_diffPairViaGap( 180000 ),
52 m_holeToHole( 0 ),
54 {};

References THROUGH.

◆ ~SIZES_SETTINGS()

PNS::SIZES_SETTINGS::~SIZES_SETTINGS ( )
inline

Definition at line 56 of file pns_sizes_settings.h.

56{};

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().

◆ Clearance()

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

Definition at line 63 of file pns_sizes_settings.h.

63{ return m_clearance; }

References m_clearance.

Referenced by ROUTER_TOOL::UpdateMessagePanel().

◆ 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 118 of file pns_sizes_settings.h.

118{ return m_clearanceSource; }

References m_clearanceSource.

Referenced by ROUTER_TOOL::UpdateMessagePanel().

◆ GetDiffPairGapSource()

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

Definition at line 127 of file pns_sizes_settings.h.

127{ return m_diffPairGapSource; }

References m_diffPairGapSource.

Referenced by ROUTER_TOOL::UpdateMessagePanel().

◆ GetDiffPairHoleToHole()

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

Definition at line 131 of file pns_sizes_settings.h.

131{ return m_diffPairHoleToHole; }

References m_diffPairHoleToHole.

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

◆ GetDiffPairWidthSource()

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

Definition at line 124 of file pns_sizes_settings.h.

124{ return m_diffPairWidthSource; }

References m_diffPairWidthSource.

Referenced by ROUTER_TOOL::UpdateMessagePanel().

◆ GetHoleToHole()

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

Definition at line 113 of file pns_sizes_settings.h.

113{ return m_holeToHole; }

References m_holeToHole.

◆ 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 121 of file pns_sizes_settings.h.

121{ return m_widthSource; }

References m_widthSource.

Referenced by ROUTER_TOOL::UpdateMessagePanel().

◆ MinClearance()

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

Definition at line 67 of file pns_sizes_settings.h.

67{ return m_minClearance; }

References m_minClearance.

Referenced by PNS::ROUTER::isStartingPointRoutable().

◆ PairedLayer()

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

Definition at line 101 of file pns_sizes_settings.h.

102 {
103 if( m_layerPairs.find(aLayerId) == m_layerPairs.end() )
104 return std::optional<int>();
105
106 return m_layerPairs[aLayerId];
107 }

References m_layerPairs.

Referenced by ROUTER_TOOL::switchLayerOnViaPlacement().

◆ SetClearance()

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

Definition at line 64 of file pns_sizes_settings.h.

64{ m_clearance = aClearance; }

References m_clearance.

Referenced by PNS_KICAD_IFACE_BASE::ImportSizes().

◆ SetClearanceSource()

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

Definition at line 119 of file pns_sizes_settings.h.

119{ 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

◆ SetDiffPairHoleToHole()

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

Definition at line 130 of file pns_sizes_settings.h.

130{ m_diffPairHoleToHole = aHoleToHole; }

References m_diffPairHoleToHole.

Referenced by PNS_KICAD_IFACE_BASE::ImportSizes().

◆ 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 112 of file pns_sizes_settings.h.

112{ 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 68 of file pns_sizes_settings.h.

68{ 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 71 of file pns_sizes_settings.h.

71{ 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 74 of file pns_sizes_settings.h.

74{ 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 96 of file pns_sizes_settings.h.

96{ 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 99 of file pns_sizes_settings.h.

99{ 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 115 of file pns_sizes_settings.h.

115{ m_viaType = aViaType; }

References m_viaType.

Referenced by ROUTER_TOOL::handleLayerSwitch().

◆ SetWidthSource()

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

Definition at line 122 of file pns_sizes_settings.h.

122{ 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 116 of file pns_sizes_settings.h.

116{ return m_viaType; }

References m_viaType.

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

Member Data Documentation

◆ m_clearance

int PNS::SIZES_SETTINGS::m_clearance
private

Definition at line 134 of file pns_sizes_settings.h.

Referenced by Clearance(), and SetClearance().

◆ m_clearanceSource

wxString PNS::SIZES_SETTINGS::m_clearanceSource
private

Definition at line 153 of file pns_sizes_settings.h.

Referenced by GetClearanceSource(), and SetClearanceSource().

◆ m_diffPairGap

int PNS::SIZES_SETTINGS::m_diffPairGap
private

Definition at line 144 of file pns_sizes_settings.h.

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

◆ m_diffPairGapSource

wxString PNS::SIZES_SETTINGS::m_diffPairGapSource
private

Definition at line 156 of file pns_sizes_settings.h.

Referenced by GetDiffPairGapSource(), and SetDiffPairGapSource().

◆ m_diffPairHoleToHole

int PNS::SIZES_SETTINGS::m_diffPairHoleToHole
private

Definition at line 149 of file pns_sizes_settings.h.

Referenced by GetDiffPairHoleToHole(), and SetDiffPairHoleToHole().

◆ m_diffPairViaGap

int PNS::SIZES_SETTINGS::m_diffPairViaGap
private

Definition at line 145 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 143 of file pns_sizes_settings.h.

Referenced by DiffPairWidth(), and SetDiffPairWidth().

◆ m_diffPairWidthSource

wxString PNS::SIZES_SETTINGS::m_diffPairWidthSource
private

Definition at line 155 of file pns_sizes_settings.h.

Referenced by GetDiffPairWidthSource(), and SetDiffPairWidthSource().

◆ m_holeToHole

int PNS::SIZES_SETTINGS::m_holeToHole
private

Definition at line 148 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 135 of file pns_sizes_settings.h.

Referenced by MinClearance(), and SetMinClearance().

◆ m_trackWidth

int PNS::SIZES_SETTINGS::m_trackWidth
private

Definition at line 136 of file pns_sizes_settings.h.

Referenced by SetTrackWidth(), and TrackWidth().

◆ m_trackWidthIsExplicit

bool PNS::SIZES_SETTINGS::m_trackWidthIsExplicit
private

Definition at line 137 of file pns_sizes_settings.h.

Referenced by SetTrackWidthIsExplicit(), and TrackWidthIsExplicit().

◆ m_viaDiameter

int PNS::SIZES_SETTINGS::m_viaDiameter
private

Definition at line 140 of file pns_sizes_settings.h.

Referenced by SetViaDiameter(), and ViaDiameter().

◆ m_viaDrill

int PNS::SIZES_SETTINGS::m_viaDrill
private

Definition at line 141 of file pns_sizes_settings.h.

Referenced by SetViaDrill(), and ViaDrill().

◆ m_viaType

VIATYPE PNS::SIZES_SETTINGS::m_viaType
private

Definition at line 139 of file pns_sizes_settings.h.

Referenced by SetViaType(), and ViaType().

◆ m_widthSource

wxString PNS::SIZES_SETTINGS::m_widthSource
private

Definition at line 154 of file pns_sizes_settings.h.

Referenced by GetWidthSource(), and SetWidthSource().


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