KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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)
 
bool operator== (const BOARD_STACKUP_ITEM &aOther) const
 
bool operator!= (const BOARD_STACKUP_ITEM &aOther) const
 
void AddDielectricPrms (int aDielectricPrmsIdx)
 Add (insert) a DIELECTRIC_PRMS item to m_DielectricPrmsList all values are set to default.
 
void RemoveDielectricPrms (int aDielectricPrmsIdx)
 Remove a DIELECTRIC_PRMS item from m_DielectricPrmsList.
 
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 GetLayerName () const
 
wxString GetTypeName () const
 
int GetDielectricLayerId () const
 
wxString GetColor (int aDielectricSubLayer=0) 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 SetLayerName (const wxString &aName)
 
void SetTypeName (const wxString &aName)
 
void SetDielectricLayerId (int aLayerId)
 
void SetColor (const wxString &aColorName, int aDielectricSubLayer=0)
 
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
 
PCB_LAYER_ID m_LayerId
 type name of layer (copper, silk screen, core, prepreg ...)
 
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
 
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)
 
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 95 of file board_stackup.h.

Constructor & Destructor Documentation

◆ BOARD_STACKUP_ITEM() [1/2]

◆ BOARD_STACKUP_ITEM() [2/2]

BOARD_STACKUP_ITEM::BOARD_STACKUP_ITEM ( const BOARD_STACKUP_ITEM aOther)

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

References m_DielectricPrmsList.

Referenced by PANEL_SETUP_BOARD_STACKUP::onAddDielectricLayer(), PCB_IO_KICAD_SEXPR_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 340 of file board_stackup.cpp.

References _, and GetDielectricLayerId().

Referenced by PANEL_SETUP_BOARD_STACKUP::lazyBuildRowUI(), 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 322 of file board_stackup.cpp.

References GetEpsilonR(), and UIDouble2Str().

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

References GetLossTangent(), and UIDouble2Str().

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

◆ GetBrdLayerId()

◆ GetColor()

◆ GetCopperDefaultThickness()

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

Definition at line 160 of file board_stackup.cpp.

References EDA_IU_SCALE::mmToIU(), and pcbIUScale.

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

◆ GetDielectricLayerId()

◆ GetEpsilonR()

◆ GetLayerName()

wxString BOARD_STACKUP_ITEM::GetLayerName ( ) const
inline

◆ GetLossTangent()

◆ GetMaskDefaultThickness()

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

Definition at line 167 of file board_stackup.cpp.

References EDA_IU_SCALE::mmToIU(), and pcbIUScale.

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

◆ GetMaterial()

◆ GetSublayersCount()

◆ GetThickness()

◆ GetType()

◆ GetTypeName()

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

References BS_ITEM_TYPE_DIELECTRIC, BS_ITEM_TYPE_SOLDERMASK, and m_Type.

Referenced by PANEL_SETUP_BOARD_STACKUP::lazyBuildRowUI(), 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 284 of file board_stackup.cpp.

References BS_ITEM_TYPE_DIELECTRIC, BS_ITEM_TYPE_SOLDERMASK, and m_Type.

Referenced by PANEL_SETUP_BOARD_STACKUP::lazyBuildRowUI(), 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 291 of file board_stackup.cpp.

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

Referenced by GERBER_JOBFILE_WRITER::addJSONMaterialStackup().

◆ IsColorEditable()

◆ IsEnabled()

bool BOARD_STACKUP_ITEM::IsEnabled ( ) const
inline

Definition at line 159 of file board_stackup.h.

References m_enabled.

Referenced by PANEL_SETUP_BOARD_STACKUP::onUnitsChanged().

◆ IsMaterialEditable()

bool BOARD_STACKUP_ITEM::IsMaterialEditable ( ) const

◆ IsThicknessEditable()

◆ IsThicknessLocked()

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

◆ operator!=()

bool BOARD_STACKUP_ITEM::operator!= ( const BOARD_STACKUP_ITEM aOther) const
inline

Definition at line 102 of file board_stackup.h.

References operator==().

◆ operator==()

bool BOARD_STACKUP_ITEM::operator== ( const BOARD_STACKUP_ITEM aOther) const

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

References GetSublayersCount(), and m_DielectricPrmsList.

Referenced by PANEL_SETUP_BOARD_STACKUP::onRemoveDielectricLayer().

◆ SetBrdLayerId()

void BOARD_STACKUP_ITEM::SetBrdLayerId ( PCB_LAYER_ID  aBrdLayerId)
inline

◆ SetColor()

void BOARD_STACKUP_ITEM::SetColor ( const wxString &  aColorName,
int  aDielectricSubLayer = 0 
)

◆ SetDielectricLayerId()

void BOARD_STACKUP_ITEM::SetDielectricLayerId ( int  aLayerId)
inline

◆ SetEnabled()

void BOARD_STACKUP_ITEM::SetEnabled ( bool  aEnable)
inline

Definition at line 175 of file board_stackup.h.

References m_enabled.

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

◆ SetEpsilonR()

◆ SetLayerName()

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

◆ SetLossTangent()

◆ SetMaterial()

◆ SetThickness()

◆ SetThicknessLocked()

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

◆ SetTypeName()

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

Member Data Documentation

◆ 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 195 of file board_stackup.h.

Referenced by BOARD_STACKUP_ITEM(), GetDielectricLayerId(), operator==(), 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 202 of file board_stackup.h.

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

◆ m_enabled

bool BOARD_STACKUP_ITEM::m_enabled
private

Definition at line 204 of file board_stackup.h.

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

◆ m_LayerId

PCB_LAYER_ID BOARD_STACKUP_ITEM::m_LayerId
private

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

Definition at line 192 of file board_stackup.h.

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

◆ m_LayerName

wxString BOARD_STACKUP_ITEM::m_LayerName
private

Definition at line 190 of file board_stackup.h.

Referenced by BOARD_STACKUP_ITEM(), GetLayerName(), operator==(), 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 191 of file board_stackup.h.

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


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