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

Private Attributes

int m_minClearance
 
int m_trackWidth
 
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
 

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.

References THROUGH.

◆ ~SIZES_SETTINGS()

PNS::SIZES_SETTINGS::~SIZES_SETTINGS ( )
inline

Definition at line 52 of file pns_sizes_settings.h.

52 {};

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

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

References F_Cu, and m_layerPairs.

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

◆ MinClearance()

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

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

85  {
86  if( m_layerPairs.find(aLayerId) == m_layerPairs.end() )
87  return OPT<int>();
88 
89  return m_layerPairs[aLayerId];
90  }
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 95 of file pns_sizes_settings.h.

95 { 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 58 of file pns_sizes_settings.h.

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

61 { m_trackWidth = aWidth; }

References m_trackWidth.

Referenced by PNS_KICAD_IFACE_BASE::ImportSizes().

◆ SetViaDiameter()

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

Definition at line 79 of file pns_sizes_settings.h.

79 { 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 82 of file pns_sizes_settings.h.

82 { 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 98 of file pns_sizes_settings.h.

98 { m_viaType = aViaType; }

References m_viaType.

Referenced by ROUTER_TOOL::handleLayerSwitch().

◆ TrackWidth()

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

◆ ViaDiameter()

◆ ViaDrill()

◆ ViaType()

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

Definition at line 99 of file pns_sizes_settings.h.

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

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

◆ m_diffPairViaGap

int PNS::SIZES_SETTINGS::m_diffPairViaGap
private

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

Referenced by DiffPairWidth(), and SetDiffPairWidth().

◆ m_holeToHole

int PNS::SIZES_SETTINGS::m_holeToHole
private

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

Referenced by MinClearance(), and SetMinClearance().

◆ m_trackWidth

int PNS::SIZES_SETTINGS::m_trackWidth
private

Definition at line 103 of file pns_sizes_settings.h.

Referenced by SetTrackWidth(), and TrackWidth().

◆ m_viaDiameter

int PNS::SIZES_SETTINGS::m_viaDiameter
private

Definition at line 106 of file pns_sizes_settings.h.

Referenced by SetViaDiameter(), and ViaDiameter().

◆ m_viaDrill

int PNS::SIZES_SETTINGS::m_viaDrill
private

Definition at line 107 of file pns_sizes_settings.h.

Referenced by SetViaDrill(), and ViaDrill().

◆ m_viaType

VIATYPE PNS::SIZES_SETTINGS::m_viaType
private

Definition at line 105 of file pns_sizes_settings.h.

Referenced by SetViaType(), and ViaType().


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