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)
 
OPT< 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 GetWidthSource () const
 
void SetWidthSource (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_widthSource
 

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_minClearance( 0 ),
42  m_trackWidth( 155000 ),
43  m_trackWidthIsExplicit( true ),
45  m_viaDiameter( 600000 ),
46  m_viaDrill( 250000 ),
47  m_diffPairWidth( 125000 ),
48  m_diffPairGap( 180000 ),
49  m_diffPairViaGap( 180000 ),
51  m_holeToHole( 0 ),
53  {};

References THROUGH.

◆ ~SIZES_SETTINGS()

PNS::SIZES_SETTINGS::~SIZES_SETTINGS ( )
inline

Definition at line 55 of file pns_sizes_settings.h.

55 {};

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

◆ ClearLayerPairs()

void PNS::SIZES_SETTINGS::ClearLayerPairs ( )

Definition at line 30 of file pns_sizes_settings.cpp.

31 {
32  m_layerPairs.clear();
33 }
std::map< int, int > m_layerPairs

References m_layerPairs.

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

◆ DiffPairGap()

◆ DiffPairViaGap()

◆ DiffPairViaGapSameAsTraceGap()

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

◆ DiffPairWidth()

◆ GetHoleToHole()

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

Definition at line 102 of file pns_sizes_settings.h.

102 { 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 }
std::map< int, int > m_layerPairs

References B_Cu, and m_layerPairs.

Referenced by PNS::DIFF_PAIR_PLACER::makeVia(), and PNS::LINE_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 }
std::map< int, int > m_layerPairs
Definition: layer_ids.h:71

References F_Cu, and m_layerPairs.

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

◆ GetWidthSource()

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

Definition at line 107 of file pns_sizes_settings.h.

107 { return m_widthSource; }

References m_widthSource.

◆ MinClearance()

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

Definition at line 60 of file pns_sizes_settings.h.

References m_minClearance.

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

◆ PairedLayer()

OPT<int> PNS::SIZES_SETTINGS::PairedLayer ( int  aLayerId)
inline

Definition at line 90 of file pns_sizes_settings.h.

91  {
92  if( m_layerPairs.find(aLayerId) == m_layerPairs.end() )
93  return OPT<int>();
94 
95  return m_layerPairs[aLayerId];
96  }
std::map< int, int > m_layerPairs
boost::optional< T > OPT
Definition: optional.h:7

References m_layerPairs.

Referenced by ROUTER_TOOL::switchLayerOnViaPlacement().

◆ SetDiffPairGap()

void PNS::SIZES_SETTINGS::SetDiffPairGap ( int  aGap)
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

◆ SetHoleToHole()

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

Definition at line 101 of file pns_sizes_settings.h.

101 { 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 61 of file pns_sizes_settings.h.

61 { 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 64 of file pns_sizes_settings.h.

64 { m_trackWidth = aWidth; }

References m_trackWidth.

Referenced by PNS_KICAD_IFACE_BASE::ImportSizes().

◆ SetTrackWidthIsExplicit()

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

Definition at line 67 of file pns_sizes_settings.h.

67 { 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 85 of file pns_sizes_settings.h.

85 { 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 88 of file pns_sizes_settings.h.

88 { 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 104 of file pns_sizes_settings.h.

104 { m_viaType = aViaType; }

References m_viaType.

Referenced by ROUTER_TOOL::handleLayerSwitch().

◆ SetWidthSource()

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

Definition at line 108 of file pns_sizes_settings.h.

108 { m_widthSource = aSource; }

References m_widthSource.

Referenced by PNS_KICAD_IFACE_BASE::ImportSizes().

◆ TrackWidth()

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

◆ TrackWidthIsExplicit()

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

Definition at line 66 of file pns_sizes_settings.h.

References m_trackWidthIsExplicit.

Referenced by PNS::LINE_PLACER::UpdateSizes().

◆ ViaDiameter()

◆ ViaDrill()

◆ ViaType()

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

Definition at line 105 of file pns_sizes_settings.h.

105 { return m_viaType; }

References m_viaType.

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

Member Data Documentation

◆ m_diffPairGap

int PNS::SIZES_SETTINGS::m_diffPairGap
private

Definition at line 120 of file pns_sizes_settings.h.

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

◆ m_diffPairViaGap

int PNS::SIZES_SETTINGS::m_diffPairViaGap
private

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

Referenced by DiffPairWidth(), and SetDiffPairWidth().

◆ m_holeToHole

int PNS::SIZES_SETTINGS::m_holeToHole
private

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

Referenced by MinClearance(), and SetMinClearance().

◆ m_trackWidth

int PNS::SIZES_SETTINGS::m_trackWidth
private

Definition at line 112 of file pns_sizes_settings.h.

Referenced by SetTrackWidth(), and TrackWidth().

◆ m_trackWidthIsExplicit

bool PNS::SIZES_SETTINGS::m_trackWidthIsExplicit
private

Definition at line 113 of file pns_sizes_settings.h.

Referenced by SetTrackWidthIsExplicit(), and TrackWidthIsExplicit().

◆ m_viaDiameter

int PNS::SIZES_SETTINGS::m_viaDiameter
private

Definition at line 116 of file pns_sizes_settings.h.

Referenced by SetViaDiameter(), and ViaDiameter().

◆ m_viaDrill

int PNS::SIZES_SETTINGS::m_viaDrill
private

Definition at line 117 of file pns_sizes_settings.h.

Referenced by SetViaDrill(), and ViaDrill().

◆ m_viaType

VIATYPE PNS::SIZES_SETTINGS::m_viaType
private

Definition at line 115 of file pns_sizes_settings.h.

Referenced by SetViaType(), and ViaType().

◆ m_widthSource

wxString PNS::SIZES_SETTINGS::m_widthSource
private

Definition at line 128 of file pns_sizes_settings.h.

Referenced by GetWidthSource(), and SetWidthSource().


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