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 34 of file board_stackup.cpp.

35 {
36  DIELECTRIC_PRMS item_prms;
37  m_DielectricPrmsList.emplace_back( item_prms );
39  m_Type = aType;
41  SetEnabled( true );
42 
43  // Initialize parameters to a usual value for allowed types:
44  switch( m_Type )
45  {
49  break;
50 
52  m_TypeName = KEY_CORE; // or prepreg
53  SetMaterial( "FR4" ); // or other dielectric name
54  SetLossTangent( 0.02 ); // for FR4
55  SetEpsilonR( 4.5 ); // for FR4
56  break;
57 
59  m_TypeName = "solderpaste";
60  break;
61 
63  m_TypeName = "soldermask";
64  m_Color = "Green";
65  SetMaterial( NotSpecifiedPrm() ); // or other solder mask material name
68  break;
69 
71  m_TypeName = "silkscreen";
73  SetMaterial( NotSpecifiedPrm() ); // or other silkscreen material name
75  break;
76 
78  break;
79  }
80 }
#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 83 of file board_stackup.cpp.

84 {
85  m_LayerId = aOther.m_LayerId;
87  m_Type = aOther.m_Type;
88  m_enabled = aOther.m_enabled;
90  m_TypeName = aOther.m_TypeName;
91  m_LayerName = aOther.m_LayerName;
92  m_Color = aOther.GetColor();
93 }
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 96 of file board_stackup.cpp.

97 {
98  // add a DIELECTRIC_PRMS item to m_DielectricPrmsList
99  DIELECTRIC_PRMS new_prms;
100 
101  m_DielectricPrmsList.emplace( m_DielectricPrmsList.begin() + aDielectricPrmsIdx,
102  new_prms );
103 }
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 303 of file board_stackup.cpp.

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

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 285 of file board_stackup.cpp.

286 {
287  // return a wxString to print/display Epsilon R
288  // note: we do not want scientific notation
289  wxString txt = Double2Str( GetEpsilonR( aDielectricSubLayer ) );
290  return txt;
291 }
double GetEpsilonR(int aDielectricSubLayer=0) const
std::string Double2Str(double aValue)
Print a float number without using scientific notation and no trailing 0 We want to avoid scientific ...

References Double2Str(), and 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 294 of file board_stackup.cpp.

295 {
296  // return a wxString to print/display Loss Tangent
297  // note: we do not want scientific notation
298  wxString txt = Double2Str( GetLossTangent( aDielectricSubLayer ) );
299  return txt;
300 }
double GetLossTangent(int aDielectricSubLayer=0) const
std::string Double2Str(double aValue)
Print a float number without using scientific notation and no trailing 0 We want to avoid scientific ...

References Double2Str(), and GetLossTangent().

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

◆ GetBrdLayerId()

PCB_LAYER_ID BOARD_STACKUP_ITEM::GetBrdLayerId ( ) const
inline

◆ 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 119 of file board_stackup.cpp.

120 {
121  // A reasonable thickness for copper layers:
122  return Millimeter2iu( 0.035 );
123 }
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 150 of file board_stackup.cpp.

151 {
152  wxASSERT( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() );
153 
154  return m_DielectricPrmsList[aDielectricSubLayer].m_EpsilonR;
155 }
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(), DRAWING_TOOL::DrawSpecificationStackup(), 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(), and DRAWING_TOOL::DrawSpecificationStackup().

◆ GetLossTangent()

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

Definition at line 142 of file board_stackup.cpp.

143 {
144  wxASSERT( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() );
145 
146  return m_DielectricPrmsList[aDielectricSubLayer].m_LossTangent;
147 }
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(), DRAWING_TOOL::DrawSpecificationStackup(), 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 126 of file board_stackup.cpp.

127 {
128  // A reasonable thickness for solder mask:
129  return Millimeter2iu( 0.01 );
130 }
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 166 of file board_stackup.cpp.

167 {
168  wxASSERT( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() );
169 
170  return m_DielectricPrmsList[aDielectricSubLayer].m_Material;
171 }
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(), DRAWING_TOOL::DrawSpecificationStackup(), 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(), DRAWING_TOOL::DrawSpecificationStackup(), 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 134 of file board_stackup.cpp.

135 {
136  wxASSERT( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() );
137 
138  return m_DielectricPrmsList[aDielectricSubLayer].m_Thickness;
139 }
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(), DRAWING_TOOL::DrawSpecificationStackup(), 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(), DRAWING_TOOL::DrawSpecificationStackup(), 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 220 of file board_stackup.cpp.

221 {
224  //|| m_Type == BS_ITEM_TYPE_SILKSCREEN
225  ;
226 };
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 229 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 236 of file board_stackup.cpp.

237 {
238  // return true if the material is specified
239  return IsMaterialEditable() && IsPrmSpecified( GetMaterial( aDielectricSubLayer ) );
240 }
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

◆ IsThicknessLocked()

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

Definition at line 158 of file board_stackup.cpp.

159 {
160  wxASSERT( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() );
161 
162  return m_DielectricPrmsList[aDielectricSubLayer].m_ThicknessLocked;
163 }
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 106 of file board_stackup.cpp.

107 {
108  // Remove a DIELECTRIC_PRMS item from m_DielectricPrmsList if possible
109 
110  if( GetSublayersCount() < 2 || aDielectricPrmsIdx < 0
111  || aDielectricPrmsIdx >= GetSublayersCount() )
112  return;
113 
114  m_DielectricPrmsList.erase( m_DielectricPrmsList.begin() + aDielectricPrmsIdx );
115 }
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 193 of file board_stackup.cpp.

194 {
195  wxASSERT( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() );
196 
197  if( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() )
198  m_DielectricPrmsList[aDielectricSubLayer].m_EpsilonR = aEpsilon;
199 }
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 184 of file board_stackup.cpp.

185 {
186  wxASSERT( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() );
187 
188  if( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() )
189  m_DielectricPrmsList[aDielectricSubLayer].m_LossTangent = aTg;
190 }
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 211 of file board_stackup.cpp.

212 {
213  wxASSERT( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() );
214 
215  if( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() )
216  m_DielectricPrmsList[aDielectricSubLayer].m_Material = aName;
217 }
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 175 of file board_stackup.cpp.

176 {
177  wxASSERT( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() );
178 
179  if( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() )
180  m_DielectricPrmsList[aDielectricSubLayer].m_Thickness = aThickness;
181 }
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 202 of file board_stackup.cpp.

203 {
204  wxASSERT( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() );
205 
206  if( aDielectricSubLayer >= 0 && aDielectricSubLayer < GetSublayersCount() )
207  m_DielectricPrmsList[aDielectricSubLayer].m_ThicknessLocked = aLocked;
208 }
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: