KiCad PCB EDA Suite
BOARD_STACKUP_ITEM Class Reference

Manage one layer needed to make a physical board. More...

#include <board_stackup.h>

Public Member Functions

 BOARD_STACKUP_ITEM (BOARD_STACKUP_ITEM_TYPE aType)
 
 BOARD_STACKUP_ITEM (const BOARD_STACKUP_ITEM &aOther)
 
void AddDielectricPrms (int aDielectricPrmsIdx)
 Add (insert) a DIELECTRIC_PRMS item to m_DielectricPrmsList all values are set to default. More...
 
void RemoveDielectricPrms (int aDielectricPrmsIdx)
 Remove a DIELECTRIC_PRMS item from m_DielectricPrmsList. More...
 
bool HasEpsilonRValue () const
 
bool HasLossTangentValue () const
 
bool HasMaterialValue (int aDielectricSubLayer=0) const
 
bool IsMaterialEditable () const
 
bool IsColorEditable () const
 
bool IsThicknessEditable () const
 
int GetSublayersCount () const
 
wxString FormatEpsilonR (int aDielectricSubLayer=0) const
 
wxString FormatLossTangent (int aDielectricSubLayer=0) const
 
wxString FormatDielectricLayerName () const
 
bool IsEnabled () const
 
BOARD_STACKUP_ITEM_TYPE GetType () const
 
PCB_LAYER_ID GetBrdLayerId () const
 
wxString GetColor () const
 
wxString GetLayerName () const
 
wxString GetTypeName () const
 
int GetDielectricLayerId () const
 
int GetThickness (int aDielectricSubLayer=0) const
 
bool IsThicknessLocked (int aDielectricSubLayer=0) const
 
double GetEpsilonR (int aDielectricSubLayer=0) const
 
double GetLossTangent (int aDielectricSubLayer=0) const
 
wxString GetMaterial (int aDielectricSubLayer=0) const
 
void SetEnabled (bool aEnable)
 
void SetBrdLayerId (PCB_LAYER_ID aBrdLayerId)
 
void SetColor (const wxString &aColorName)
 
void SetLayerName (const wxString &aName)
 
void SetTypeName (const wxString &aName)
 
void SetDielectricLayerId (int aLayerId)
 
void SetThickness (int aThickness, int aDielectricSubLayer=0)
 
void SetThicknessLocked (bool aLocked, int aDielectricSubLayer=0)
 
void SetEpsilonR (double aEpsilon, int aDielectricSubLayer=0)
 
void SetLossTangent (double aTg, int aDielectricSubLayer=0)
 
void SetMaterial (const wxString &aName, int aDielectricSubLayer=0)
 

Static Public Member Functions

static int GetCopperDefaultThickness ()
 
static int GetMaskDefaultThickness ()
 

Private Attributes

BOARD_STACKUP_ITEM_TYPE m_Type
 
wxString m_LayerName
 
wxString m_TypeName
 name of layer as shown in layer manager. Useful to create reports More...
 
wxString m_Color
 type name of layer (copper, silk screen, core, prepreg ...) More...
 
PCB_LAYER_ID m_LayerId
 mainly for silkscreen and solder mask More...
 
int m_DielectricLayerId
 the layer id (F.Cu to B.Cu, F.Silk, B.silk, F.Mask, B.Mask) and UNDEFINED_LAYER (-1) for dielectric layers that are not really layers for the board editor More...
 
std::vector< DIELECTRIC_PRMSm_DielectricPrmsList
 the "layer" id for dielectric layers, from 1 (top) to 31 (bottom) (only 31 dielectric layers for 32 copper layers) More...
 
bool m_enabled
 

Detailed Description

Manage one layer needed to make a physical board.

It can be a solder mask, silk screen, copper or a dielectric.

Definition at line 89 of file board_stackup.h.

Constructor & Destructor Documentation

◆ BOARD_STACKUP_ITEM() [1/2]

BOARD_STACKUP_ITEM::BOARD_STACKUP_ITEM ( BOARD_STACKUP_ITEM_TYPE  aType)

Definition at line 33 of file board_stackup.cpp.

34 {
35  DIELECTRIC_PRMS item_prms;
36  m_DielectricPrmsList.emplace_back( item_prms );
38  m_Type = aType;
40  SetEnabled( true );
41 
42  // Initialize parameters to a usual value for allowed types:
43  switch( m_Type )
44  {
48  break;
49 
51  m_TypeName = KEY_CORE; // or prepreg
52  SetMaterial( "FR4" ); // or other dielectric name
53  SetLossTangent( 0.02 ); // for FR4
54  SetEpsilonR( 4.5 ); // for FR4
55  break;
56 
58  m_TypeName = "solderpaste";
59  break;
60 
62  m_TypeName = "soldermask";
63  m_Color = "Green";
64  SetMaterial( NotSpecifiedPrm() ); // or other solder mask material name
67  break;
68 
70  m_TypeName = "silkscreen";
72  SetMaterial( NotSpecifiedPrm() ); // or other silkscreen material name
74  break;
75 
77  break;
78  }
79 }
#define DEFAULT_EPSILON_R_SOLDERMASK
#define KEY_COPPER
wxString m_TypeName
name of layer as shown in layer manager. Useful to create reports
static int GetCopperDefaultThickness()
std::vector< DIELECTRIC_PRMS > m_DielectricPrmsList
the "layer" id for dielectric layers, from 1 (top) to 31 (bottom) (only 31 dielectric layers for 32 c...
wxString NotSpecifiedPrm()
void SetDielectricLayerId(int aLayerId)
A helper class to manage a dielectric layer set of parameters.
Definition: board_stackup.h:64
PCB_LAYER_ID m_LayerId
mainly for silkscreen and solder mask
void SetMaterial(const wxString &aName, int aDielectricSubLayer=0)
void SetEpsilonR(double aEpsilon, int aDielectricSubLayer=0)
void SetThickness(int aThickness, int aDielectricSubLayer=0)
static int GetMaskDefaultThickness()
#define DEFAULT_EPSILON_R_SILKSCREEN
wxString m_Color
type name of layer (copper, silk screen, core, prepreg ...)
#define KEY_CORE
BOARD_STACKUP_ITEM_TYPE m_Type
void SetLossTangent(double aTg, int aDielectricSubLayer=0)
void SetEnabled(bool aEnable)

References BS_ITEM_TYPE_COPPER, BS_ITEM_TYPE_DIELECTRIC, BS_ITEM_TYPE_SILKSCREEN, BS_ITEM_TYPE_SOLDERMASK, BS_ITEM_TYPE_SOLDERPASTE, BS_ITEM_TYPE_UNDEFINED, DEFAULT_EPSILON_R_SILKSCREEN, DEFAULT_EPSILON_R_SOLDERMASK, GetCopperDefaultThickness(), GetMaskDefaultThickness(), KEY_COPPER, KEY_CORE, m_Color, m_DielectricPrmsList, m_LayerId, m_Type, m_TypeName, NotSpecifiedPrm(), SetDielectricLayerId(), SetEnabled(), SetEpsilonR(), SetLossTangent(), SetMaterial(), SetThickness(), and UNDEFINED_LAYER.

◆ BOARD_STACKUP_ITEM() [2/2]

BOARD_STACKUP_ITEM::BOARD_STACKUP_ITEM ( const BOARD_STACKUP_ITEM aOther)

Definition at line 82 of file board_stackup.cpp.

83 {
84  m_LayerId = aOther.m_LayerId;
86  m_Type = aOther.m_Type;
87  m_enabled = aOther.m_enabled;
89  m_TypeName = aOther.m_TypeName;
90  m_LayerName = aOther.m_LayerName;
91  m_Color = aOther.GetColor();
92 }
wxString GetColor() const
wxString m_TypeName
name of layer as shown in layer manager. Useful to create reports
std::vector< DIELECTRIC_PRMS > m_DielectricPrmsList
the "layer" id for dielectric layers, from 1 (top) to 31 (bottom) (only 31 dielectric layers for 32 c...
PCB_LAYER_ID m_LayerId
mainly for silkscreen and solder mask
wxString m_Color
type name of layer (copper, silk screen, core, prepreg ...)
BOARD_STACKUP_ITEM_TYPE m_Type
int m_DielectricLayerId
the layer id (F.Cu to B.Cu, F.Silk, B.silk, F.Mask, B.Mask) and UNDEFINED_LAYER (-1) for dielectric l...

References GetColor(), m_Color, m_DielectricLayerId, m_DielectricPrmsList, m_enabled, m_LayerId, m_LayerName, m_Type, and m_TypeName.

Member Function Documentation

◆ AddDielectricPrms()

void BOARD_STACKUP_ITEM::AddDielectricPrms ( int  aDielectricPrmsIdx)

Add (insert) a DIELECTRIC_PRMS item to m_DielectricPrmsList all values are set to default.

Parameters
aDielectricPrmsIdxis a index in m_DielectricPrmsList the new item will be inserted at this position

Definition at line 95 of file board_stackup.cpp.

96 {
97  // add a DIELECTRIC_PRMS item to m_DielectricPrmsList
98  DIELECTRIC_PRMS new_prms;
99 
100  m_DielectricPrmsList.emplace( m_DielectricPrmsList.begin() + aDielectricPrmsIdx,
101  new_prms );
102 }
std::vector< DIELECTRIC_PRMS > m_DielectricPrmsList
the "layer" id for dielectric layers, from 1 (top) to 31 (bottom) (only 31 dielectric layers for 32 c...
A helper class to manage a dielectric layer set of parameters.
Definition: board_stackup.h:64

References m_DielectricPrmsList.

Referenced by PANEL_SETUP_BOARD_STACKUP::onAddDielectricLayer(), PCB_PARSER::parseBoardStackup(), and PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup().

◆ FormatDielectricLayerName()

wxString BOARD_STACKUP_ITEM::FormatDielectricLayerName ( ) const
Returns
a wxString to print/display a dielectric name

Definition at line 302 of file board_stackup.cpp.

303 {
304  // return a wxString to print/display a dielectric name
305  wxString lname;
306  lname.Printf( _( "Dielectric %d" ), GetDielectricLayerId() );
307 
308  return lname;
309 }
int GetDielectricLayerId() const
#define _(s)
Definition: 3d_actions.cpp:33

References _, and GetDielectricLayerId().

Referenced by PANEL_SETUP_BOARD_STACKUP::createRowData(), and PANEL_SETUP_BOARD_STACKUP::onAddDielectricLayer().

◆ FormatEpsilonR()

wxString BOARD_STACKUP_ITEM::FormatEpsilonR ( int  aDielectricSubLayer = 0) const
Returns
a wxString to print/display Epsilon R

Definition at line 284 of file board_stackup.cpp.

285 {
286  // return a wxString to print/display Epsilon R
287  wxString txt;
288  txt.Printf( "%.2f", GetEpsilonR( aDielectricSubLayer ) );
289  return txt;
290 }
double GetEpsilonR(int aDielectricSubLayer=0) const

References GetEpsilonR().

Referenced by GERBER_JOBFILE_WRITER::addJSONMaterialStackup(), and PANEL_SETUP_BOARD_STACKUP::onMaterialChange().

◆ FormatLossTangent()

wxString BOARD_STACKUP_ITEM::FormatLossTangent ( int  aDielectricSubLayer = 0) const
Returns
a wxString to print/display Loss Tangent

Definition at line 293 of file board_stackup.cpp.

294 {
295  // return a wxString to print/display Loss Tangent
296  wxString txt;
297  txt.Printf( "%g", GetLossTangent( aDielectricSubLayer ) );
298  return txt;
299 }
double GetLossTangent(int aDielectricSubLayer=0) const

References GetLossTangent().

Referenced by GERBER_JOBFILE_WRITER::addJSONMaterialStackup(), and PANEL_SETUP_BOARD_STACKUP::onMaterialChange().

◆ GetBrdLayerId()

PCB_LAYER_ID BOARD_STACKUP_ITEM::GetBrdLayerId ( ) const
inline

Definition at line 153 of file board_stackup.h.

153 { return m_LayerId; }
PCB_LAYER_ID m_LayerId
mainly for silkscreen and solder mask

References m_LayerId.

Referenced by GERBER_JOBFILE_WRITER::addJSONMaterialStackup(), PANEL_SETUP_BOARD_STACKUP::createRowData(), and PANEL_SETUP_BOARD_STACKUP::showOnlyActiveLayers().

◆ GetColor()

wxString BOARD_STACKUP_ITEM::GetColor ( ) const
inline

◆ GetCopperDefaultThickness()

int BOARD_STACKUP_ITEM::GetCopperDefaultThickness ( )
static
Returns
a reasonable default value for a copper layer thickness

Definition at line 118 of file board_stackup.cpp.

119 {
120  // A reasonable thickness for copper layers:
121  return Millimeter2iu( 0.035 );
122 }
static constexpr int Millimeter2iu(double mm)

References Millimeter2iu().

Referenced by BOARD_STACKUP_ITEM(), and BOARD_STACKUP::BuildDefaultStackupList().

◆ GetDielectricLayerId()

int BOARD_STACKUP_ITEM::GetDielectricLayerId ( ) const
inline

Definition at line 157 of file board_stackup.h.

157 { return m_DielectricLayerId; }
int m_DielectricLayerId
the layer id (F.Cu to B.Cu, F.Silk, B.silk, F.Mask, B.Mask) and UNDEFINED_LAYER (-1) for dielectric l...

References m_DielectricLayerId.

Referenced by GERBER_JOBFILE_WRITER::addJSONMaterialStackup(), FormatDielectricLayerName(), and PANEL_SETUP_BOARD_STACKUP::showOnlyActiveLayers().

◆ GetEpsilonR()

double BOARD_STACKUP_ITEM::GetEpsilonR ( int  aDielectricSubLayer = 0) const

Definition at line 149 of file board_stackup.cpp.

150 {
151  wxASSERT( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() );
152 
153  return m_DielectricPrmsList[aDielectricSubLayer].m_EpsilonR;
154 }
int GetSublayersCount() const
std::vector< DIELECTRIC_PRMS > m_DielectricPrmsList
the "layer" id for dielectric layers, from 1 (top) to 31 (bottom) (only 31 dielectric layers for 32 c...

References GetSublayersCount(), and m_DielectricPrmsList.

Referenced by GERBER_JOBFILE_WRITER::addJSONMaterialStackup(), PANEL_SETUP_BOARD_STACKUP::createRowData(), FormatEpsilonR(), and PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard().

◆ GetLayerName()

wxString BOARD_STACKUP_ITEM::GetLayerName ( ) const
inline

Definition at line 155 of file board_stackup.h.

155 { return m_LayerName; }

References m_LayerName.

Referenced by PANEL_SETUP_BOARD_STACKUP::createRowData().

◆ GetLossTangent()

double BOARD_STACKUP_ITEM::GetLossTangent ( int  aDielectricSubLayer = 0) const

Definition at line 141 of file board_stackup.cpp.

142 {
143  wxASSERT( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() );
144 
145  return m_DielectricPrmsList[aDielectricSubLayer].m_LossTangent;
146 }
int GetSublayersCount() const
std::vector< DIELECTRIC_PRMS > m_DielectricPrmsList
the "layer" id for dielectric layers, from 1 (top) to 31 (bottom) (only 31 dielectric layers for 32 c...

References GetSublayersCount(), and m_DielectricPrmsList.

Referenced by GERBER_JOBFILE_WRITER::addJSONMaterialStackup(), PANEL_SETUP_BOARD_STACKUP::createRowData(), FormatLossTangent(), and PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard().

◆ GetMaskDefaultThickness()

int BOARD_STACKUP_ITEM::GetMaskDefaultThickness ( )
static
Returns
a reasonable default value for a solder mask layer thickness

Definition at line 125 of file board_stackup.cpp.

126 {
127  // A reasonable thickness for solder mask:
128  return Millimeter2iu( 0.01 );
129 }
static constexpr int Millimeter2iu(double mm)

References Millimeter2iu().

Referenced by BOARD_STACKUP_ITEM(), and BOARD_STACKUP::BuildDefaultStackupList().

◆ GetMaterial()

wxString BOARD_STACKUP_ITEM::GetMaterial ( int  aDielectricSubLayer = 0) const

Definition at line 165 of file board_stackup.cpp.

166 {
167  wxASSERT( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() );
168 
169  return m_DielectricPrmsList[aDielectricSubLayer].m_Material;
170 }
int GetSublayersCount() const
std::vector< DIELECTRIC_PRMS > m_DielectricPrmsList
the "layer" id for dielectric layers, from 1 (top) to 31 (bottom) (only 31 dielectric layers for 32 c...

References GetSublayersCount(), and m_DielectricPrmsList.

Referenced by GERBER_JOBFILE_WRITER::addJSONMaterialStackup(), PANEL_SETUP_BOARD_STACKUP::createRowData(), HasMaterialValue(), PANEL_SETUP_BOARD_STACKUP::onMaterialChange(), PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard(), and PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup().

◆ GetSublayersCount()

int BOARD_STACKUP_ITEM::GetSublayersCount ( ) const
inline
Returns
a the number of sublayers in a dielectric layer. the count is >= 1 (there is at least one layer)

Definition at line 138 of file board_stackup.h.

138 { return m_DielectricPrmsList.size(); }
std::vector< DIELECTRIC_PRMS > m_DielectricPrmsList
the "layer" id for dielectric layers, from 1 (top) to 31 (bottom) (only 31 dielectric layers for 32 c...

References m_DielectricPrmsList.

Referenced by GERBER_JOBFILE_WRITER::addJSONMaterialStackup(), PANEL_SETUP_BOARD_STACKUP::createRowData(), GetEpsilonR(), GetLossTangent(), GetMaterial(), GetThickness(), IsThicknessLocked(), PANEL_SETUP_BOARD_STACKUP::onAddDielectricLayer(), RemoveDielectricPrms(), SetEpsilonR(), SetLossTangent(), SetMaterial(), SetThickness(), SetThicknessLocked(), and PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup().

◆ GetThickness()

int BOARD_STACKUP_ITEM::GetThickness ( int  aDielectricSubLayer = 0) const

Definition at line 133 of file board_stackup.cpp.

134 {
135  wxASSERT( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() );
136 
137  return m_DielectricPrmsList[aDielectricSubLayer].m_Thickness;
138 }
int GetSublayersCount() const
std::vector< DIELECTRIC_PRMS > m_DielectricPrmsList
the "layer" id for dielectric layers, from 1 (top) to 31 (bottom) (only 31 dielectric layers for 32 c...

References GetSublayersCount(), and m_DielectricPrmsList.

Referenced by GERBER_JOBFILE_WRITER::addJSONMaterialStackup(), PANEL_SETUP_BOARD_STACKUP::createRowData(), and PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard().

◆ GetType()

◆ GetTypeName()

wxString BOARD_STACKUP_ITEM::GetTypeName ( ) const
inline

Definition at line 156 of file board_stackup.h.

156 { return m_TypeName; }
wxString m_TypeName
name of layer as shown in layer manager. Useful to create reports

References m_TypeName.

Referenced by GERBER_JOBFILE_WRITER::addJSONMaterialStackup(), PANEL_SETUP_BOARD_STACKUP::createRowData(), and PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard().

◆ HasEpsilonRValue()

bool BOARD_STACKUP_ITEM::HasEpsilonRValue ( ) const
Returns
true if the layer has a meaningful Epsilon R parameter namely dielectric layers: dielectric and solder mask

Definition at line 219 of file board_stackup.cpp.

220 {
223  //|| m_Type == BS_ITEM_TYPE_SILKSCREEN
224  ;
225 };
BOARD_STACKUP_ITEM_TYPE m_Type

References BS_ITEM_TYPE_DIELECTRIC, BS_ITEM_TYPE_SOLDERMASK, and m_Type.

Referenced by PANEL_SETUP_BOARD_STACKUP::createRowData(), PANEL_SETUP_BOARD_STACKUP::onMaterialChange(), PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard(), and PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup().

◆ HasLossTangentValue()

bool BOARD_STACKUP_ITEM::HasLossTangentValue ( ) const
Returns
true if the layer has a meaningfully Dielectric Loss parameter namely dielectric layers: dielectric and solder mask

Definition at line 228 of file board_stackup.cpp.

References BS_ITEM_TYPE_DIELECTRIC, BS_ITEM_TYPE_SOLDERMASK, and m_Type.

Referenced by PANEL_SETUP_BOARD_STACKUP::createRowData(), PANEL_SETUP_BOARD_STACKUP::onMaterialChange(), PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard(), and PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup().

◆ HasMaterialValue()

bool BOARD_STACKUP_ITEM::HasMaterialValue ( int  aDielectricSubLayer = 0) const
Returns
true if the material is specified

Definition at line 235 of file board_stackup.cpp.

236 {
237  // return true if the material is specified
238  return IsMaterialEditable() && IsPrmSpecified( GetMaterial( aDielectricSubLayer ) );
239 }
bool IsMaterialEditable() const
bool IsPrmSpecified(const wxString &aPrmValue)
wxString GetMaterial(int aDielectricSubLayer=0) const

References GetMaterial(), IsMaterialEditable(), and IsPrmSpecified().

Referenced by GERBER_JOBFILE_WRITER::addJSONMaterialStackup().

◆ IsColorEditable()

◆ IsEnabled()

bool BOARD_STACKUP_ITEM::IsEnabled ( ) const
inline

Definition at line 150 of file board_stackup.h.

150 { return m_enabled; }

References m_enabled.

◆ IsMaterialEditable()

bool BOARD_STACKUP_ITEM::IsMaterialEditable ( ) const

◆ IsThicknessEditable()

bool BOARD_STACKUP_ITEM::IsThicknessEditable ( ) const
Returns
true if Thickness is editable

Definition at line 257 of file board_stackup.cpp.

258 {
259  switch( m_Type )
260  {
261  case BS_ITEM_TYPE_COPPER:
262  return true;
263 
265  return true;
266 
268  return true;
269 
271  return false;
272 
274  return false;
275 
276  default:
277  break;
278  }
279 
280  return false;
281 }
BOARD_STACKUP_ITEM_TYPE m_Type

References BS_ITEM_TYPE_COPPER, BS_ITEM_TYPE_DIELECTRIC, BS_ITEM_TYPE_SILKSCREEN, BS_ITEM_TYPE_SOLDERMASK, BS_ITEM_TYPE_SOLDERPASTE, and m_Type.

Referenced by GERBER_JOBFILE_WRITER::addJSONMaterialStackup(), PANEL_SETUP_BOARD_STACKUP::computeBoardThickness(), PANEL_SETUP_BOARD_STACKUP::createRowData(), PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard(), and PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup().

◆ IsThicknessLocked()

bool BOARD_STACKUP_ITEM::IsThicknessLocked ( int  aDielectricSubLayer = 0) const

Definition at line 157 of file board_stackup.cpp.

158 {
159  wxASSERT( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() );
160 
161  return m_DielectricPrmsList[aDielectricSubLayer].m_ThicknessLocked;
162 }
int GetSublayersCount() const
std::vector< DIELECTRIC_PRMS > m_DielectricPrmsList
the "layer" id for dielectric layers, from 1 (top) to 31 (bottom) (only 31 dielectric layers for 32 c...

References GetSublayersCount(), and m_DielectricPrmsList.

Referenced by PANEL_SETUP_BOARD_STACKUP::createRowData(), and PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard().

◆ RemoveDielectricPrms()

void BOARD_STACKUP_ITEM::RemoveDielectricPrms ( int  aDielectricPrmsIdx)

Remove a DIELECTRIC_PRMS item from m_DielectricPrmsList.

Parameters
aDielectricPrmsIdxis the index of the parameters set to remove in m_DielectricPrmsList

Definition at line 105 of file board_stackup.cpp.

106 {
107  // Remove a DIELECTRIC_PRMS item from m_DielectricPrmsList if possible
108 
109  if( GetSublayersCount() < 2 || aDielectricPrmsIdx < 0
110  || aDielectricPrmsIdx >= GetSublayersCount() )
111  return;
112 
113  m_DielectricPrmsList.erase( m_DielectricPrmsList.begin() + aDielectricPrmsIdx );
114 }
int GetSublayersCount() const
std::vector< DIELECTRIC_PRMS > m_DielectricPrmsList
the "layer" id for dielectric layers, from 1 (top) to 31 (bottom) (only 31 dielectric layers for 32 c...

References GetSublayersCount(), and m_DielectricPrmsList.

Referenced by PANEL_SETUP_BOARD_STACKUP::onRemoveDielectricLayer().

◆ SetBrdLayerId()

void BOARD_STACKUP_ITEM::SetBrdLayerId ( PCB_LAYER_ID  aBrdLayerId)
inline

Definition at line 167 of file board_stackup.h.

167 { m_LayerId = aBrdLayerId; }
PCB_LAYER_ID m_LayerId
mainly for silkscreen and solder mask

References m_LayerId.

Referenced by BOARD_STACKUP::BuildDefaultStackupList(), and PCB_PARSER::parseBoardStackup().

◆ SetColor()

void BOARD_STACKUP_ITEM::SetColor ( const wxString &  aColorName)
inline

Definition at line 168 of file board_stackup.h.

168 { m_Color = aColorName; }
wxString m_Color
type name of layer (copper, silk screen, core, prepreg ...)

References m_Color.

Referenced by PCB_PARSER::parseBoardStackup(), and PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup().

◆ SetDielectricLayerId()

void BOARD_STACKUP_ITEM::SetDielectricLayerId ( int  aLayerId)
inline

Definition at line 171 of file board_stackup.h.

171 { m_DielectricLayerId = aLayerId; }
int m_DielectricLayerId
the layer id (F.Cu to B.Cu, F.Silk, B.silk, F.Mask, B.Mask) and UNDEFINED_LAYER (-1) for dielectric l...

References m_DielectricLayerId.

Referenced by BOARD_STACKUP_ITEM(), BOARD_STACKUP::BuildDefaultStackupList(), and PCB_PARSER::parseBoardStackup().

◆ SetEnabled()

void BOARD_STACKUP_ITEM::SetEnabled ( bool  aEnable)
inline

Definition at line 166 of file board_stackup.h.

166 { m_enabled = aEnable; }

References m_enabled.

Referenced by BOARD_STACKUP_ITEM(), and PANEL_SETUP_BOARD_STACKUP::showOnlyActiveLayers().

◆ SetEpsilonR()

void BOARD_STACKUP_ITEM::SetEpsilonR ( double  aEpsilon,
int  aDielectricSubLayer = 0 
)

Definition at line 192 of file board_stackup.cpp.

193 {
194  wxASSERT( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() );
195 
196  if( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() )
197  m_DielectricPrmsList[aDielectricSubLayer].m_EpsilonR = aEpsilon;
198 }
int GetSublayersCount() const
std::vector< DIELECTRIC_PRMS > m_DielectricPrmsList
the "layer" id for dielectric layers, from 1 (top) to 31 (bottom) (only 31 dielectric layers for 32 c...

References GetSublayersCount(), and m_DielectricPrmsList.

Referenced by BOARD_STACKUP_ITEM(), CADSTAR_PCB_ARCHIVE_LOADER::initStackupItem(), PANEL_SETUP_BOARD_STACKUP::onMaterialChange(), PCB_PARSER::parseBoardStackup(), and PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup().

◆ SetLayerName()

void BOARD_STACKUP_ITEM::SetLayerName ( const wxString &  aName)
inline

◆ SetLossTangent()

void BOARD_STACKUP_ITEM::SetLossTangent ( double  aTg,
int  aDielectricSubLayer = 0 
)

Definition at line 183 of file board_stackup.cpp.

184 {
185  wxASSERT( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() );
186 
187  if( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() )
188  m_DielectricPrmsList[aDielectricSubLayer].m_LossTangent = aTg;
189 }
int GetSublayersCount() const
std::vector< DIELECTRIC_PRMS > m_DielectricPrmsList
the "layer" id for dielectric layers, from 1 (top) to 31 (bottom) (only 31 dielectric layers for 32 c...

References GetSublayersCount(), and m_DielectricPrmsList.

Referenced by BOARD_STACKUP_ITEM(), CADSTAR_PCB_ARCHIVE_LOADER::initStackupItem(), PANEL_SETUP_BOARD_STACKUP::onMaterialChange(), PCB_PARSER::parseBoardStackup(), and PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup().

◆ SetMaterial()

void BOARD_STACKUP_ITEM::SetMaterial ( const wxString &  aName,
int  aDielectricSubLayer = 0 
)

Definition at line 210 of file board_stackup.cpp.

211 {
212  wxASSERT( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() );
213 
214  if( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() )
215  m_DielectricPrmsList[aDielectricSubLayer].m_Material = aName;
216 }
int GetSublayersCount() const
std::vector< DIELECTRIC_PRMS > m_DielectricPrmsList
the "layer" id for dielectric layers, from 1 (top) to 31 (bottom) (only 31 dielectric layers for 32 c...

References GetSublayersCount(), and m_DielectricPrmsList.

Referenced by BOARD_STACKUP_ITEM(), BOARD_STACKUP::BuildDefaultStackupList(), CADSTAR_PCB_ARCHIVE_LOADER::initStackupItem(), PANEL_SETUP_BOARD_STACKUP::onMaterialChange(), PCB_PARSER::parseBoardStackup(), and PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup().

◆ SetThickness()

void BOARD_STACKUP_ITEM::SetThickness ( int  aThickness,
int  aDielectricSubLayer = 0 
)

Definition at line 174 of file board_stackup.cpp.

175 {
176  wxASSERT( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() );
177 
178  if( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() )
179  m_DielectricPrmsList[aDielectricSubLayer].m_Thickness = aThickness;
180 }
int GetSublayersCount() const
std::vector< DIELECTRIC_PRMS > m_DielectricPrmsList
the "layer" id for dielectric layers, from 1 (top) to 31 (bottom) (only 31 dielectric layers for 32 c...

References GetSublayersCount(), and m_DielectricPrmsList.

Referenced by BOARD_STACKUP_ITEM(), BOARD_STACKUP::BuildDefaultStackupList(), CADSTAR_PCB_ARCHIVE_LOADER::initStackupItem(), PANEL_SETUP_BOARD_STACKUP::onThicknessChange(), PCB_PARSER::parseBoardStackup(), and PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup().

◆ SetThicknessLocked()

void BOARD_STACKUP_ITEM::SetThicknessLocked ( bool  aLocked,
int  aDielectricSubLayer = 0 
)

Definition at line 201 of file board_stackup.cpp.

202 {
203  wxASSERT( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() );
204 
205  if( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() )
206  m_DielectricPrmsList[aDielectricSubLayer].m_ThicknessLocked = aLocked;
207 }
int GetSublayersCount() const
std::vector< DIELECTRIC_PRMS > m_DielectricPrmsList
the "layer" id for dielectric layers, from 1 (top) to 31 (bottom) (only 31 dielectric layers for 32 c...

References GetSublayersCount(), and m_DielectricPrmsList.

Referenced by PCB_PARSER::parseBoardStackup(), and PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup().

◆ SetTypeName()

void BOARD_STACKUP_ITEM::SetTypeName ( const wxString &  aName)
inline

Definition at line 170 of file board_stackup.h.

170 { m_TypeName = aName; }
wxString m_TypeName
name of layer as shown in layer manager. Useful to create reports

References m_TypeName.

Referenced by BOARD_STACKUP::BuildDefaultStackupList(), PCB_PARSER::parseBoardStackup(), and PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup().

Member Data Documentation

◆ m_Color

wxString BOARD_STACKUP_ITEM::m_Color
private

type name of layer (copper, silk screen, core, prepreg ...)

Definition at line 183 of file board_stackup.h.

Referenced by BOARD_STACKUP_ITEM(), GetColor(), and SetColor().

◆ m_DielectricLayerId

int BOARD_STACKUP_ITEM::m_DielectricLayerId
private

the layer id (F.Cu to B.Cu, F.Silk, B.silk, F.Mask, B.Mask) and UNDEFINED_LAYER (-1) for dielectric layers that are not really layers for the board editor

Definition at line 187 of file board_stackup.h.

Referenced by BOARD_STACKUP_ITEM(), GetDielectricLayerId(), and SetDielectricLayerId().

◆ m_DielectricPrmsList

std::vector<DIELECTRIC_PRMS> BOARD_STACKUP_ITEM::m_DielectricPrmsList
private

the "layer" id for dielectric layers, from 1 (top) to 31 (bottom) (only 31 dielectric layers for 32 copper layers)

List of dielectric parameters usually only one item, but in complex (microwave) boards, one can have more than one dielectric layer between 2 copper layers, and therefore more than one item in list

Definition at line 194 of file board_stackup.h.

Referenced by AddDielectricPrms(), BOARD_STACKUP_ITEM(), GetEpsilonR(), GetLossTangent(), GetMaterial(), GetSublayersCount(), GetThickness(), IsThicknessLocked(), RemoveDielectricPrms(), SetEpsilonR(), SetLossTangent(), SetMaterial(), SetThickness(), and SetThicknessLocked().

◆ m_enabled

bool BOARD_STACKUP_ITEM::m_enabled
private

Definition at line 196 of file board_stackup.h.

Referenced by BOARD_STACKUP_ITEM(), IsEnabled(), and SetEnabled().

◆ m_LayerId

PCB_LAYER_ID BOARD_STACKUP_ITEM::m_LayerId
private

mainly for silkscreen and solder mask

Definition at line 184 of file board_stackup.h.

Referenced by BOARD_STACKUP_ITEM(), GetBrdLayerId(), and SetBrdLayerId().

◆ m_LayerName

wxString BOARD_STACKUP_ITEM::m_LayerName
private

Definition at line 181 of file board_stackup.h.

Referenced by BOARD_STACKUP_ITEM(), GetLayerName(), and SetLayerName().

◆ m_Type

◆ m_TypeName

wxString BOARD_STACKUP_ITEM::m_TypeName
private

name of layer as shown in layer manager. Useful to create reports

Definition at line 182 of file board_stackup.h.

Referenced by BOARD_STACKUP_ITEM(), GetTypeName(), and SetTypeName().


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