![]() |
KiCad PCB EDA Suite
|
Manage layers needed to make a physical board. More...
#include <board_stackup.h>
Public Member Functions | |
BOARD_STACKUP () | |
BOARD_STACKUP (const BOARD_STACKUP &aOther) | |
BOARD_STACKUP & | operator= (const BOARD_STACKUP &aOther) |
~BOARD_STACKUP () | |
const std::vector< BOARD_STACKUP_ITEM * > & | GetList () const |
BOARD_STACKUP_ITEM * | GetStackupLayer (int aIndex) |
void | RemoveAll () |
Delete all items in list and clear the list. More... | |
int | GetCount () const |
int | BuildBoardThicknessFromStackup () const |
void | Add (BOARD_STACKUP_ITEM *aItem) |
Add a new item in stackup layer. More... | |
bool | SynchronizeWithBoard (BOARD_DESIGN_SETTINGS *aSettings) |
Synchronize the BOARD_STACKUP_ITEM* list with the board. More... | |
void | BuildDefaultStackupList (const BOARD_DESIGN_SETTINGS *aSettings, int aActiveCopperLayersCount=0) |
Create a default stackup, according to the current BOARD_DESIGN_SETTINGS settings. More... | |
void | FormatBoardStackup (OUTPUTFORMATTER *aFormatter, const BOARD *aBoard, int aNestLevel) const |
Write the stackup info on board file. More... | |
int | GetLayerDistance (PCB_LAYER_ID aFirstLayer, PCB_LAYER_ID aSecondLayer) const |
Calculate the distance (height) between the two given copper layers. More... | |
Static Public Member Functions | |
static LSET | StackupAllowedBrdLayers () |
Public Attributes | |
wxString | m_FinishType |
The name of external copper finish. More... | |
bool | m_HasDielectricConstrains |
True if some layers have impedance controlled tracks or have specific constrains for micro-wave applications If the board has dielectric constrains, the .gbrjob will contain info about dielectric constrains: loss tangent and Epsilon rel. More... | |
bool | m_HasThicknessConstrains |
True if some layers (copper and/or dielectric) have specific thickness. More... | |
BS_EDGE_CONNECTOR_CONSTRAINTS | m_EdgeConnectorConstraints |
If the board has edge connector cards, some constrains can be specified in job file: BS_EDGE_CONNECTOR_NONE = no edge connector BS_EDGE_CONNECTOR_IN_USE = board has edge connectors BS_EDGE_CONNECTOR_BEVELLED = edge connectors are beveled. More... | |
bool | m_CastellatedPads |
True if castellated pads exist. More... | |
bool | m_EdgePlating |
True if the edge board is plated. More... | |
Private Attributes | |
std::vector< BOARD_STACKUP_ITEM * > | m_list |
Manage layers needed to make a physical board.
They are solder mask, silk screen, copper and dielectric. Some other layers, used in fabrication, are not managed here because they are not used to make a physical board itself.
Definition at line 210 of file board_stackup.h.
BOARD_STACKUP::BOARD_STACKUP | ( | ) |
Definition at line 312 of file board_stackup.cpp.
References BS_EDGE_CONNECTOR_NONE, m_CastellatedPads, m_EdgeConnectorConstraints, m_EdgePlating, m_FinishType, m_HasDielectricConstrains, and m_HasThicknessConstrains.
BOARD_STACKUP::BOARD_STACKUP | ( | const BOARD_STACKUP & | aOther | ) |
Definition at line 324 of file board_stackup.cpp.
References Add(), m_CastellatedPads, m_EdgeConnectorConstraints, m_EdgePlating, m_FinishType, m_HasDielectricConstrains, m_HasThicknessConstrains, and m_list.
|
inline |
Definition at line 217 of file board_stackup.h.
References RemoveAll().
|
inline |
Add a new item in stackup layer.
Definition at line 245 of file board_stackup.h.
References m_list.
Referenced by BOARD_STACKUP(), BuildDefaultStackupList(), operator=(), PCB_PARSER::parseBoardStackup(), and PANEL_SETUP_BOARD_STACKUP::TransferDataFromWindow().
int BOARD_STACKUP::BuildBoardThicknessFromStackup | ( | ) | const |
Definition at line 384 of file board_stackup.cpp.
References m_list.
Referenced by PANEL_SETUP_BOARD_STACKUP::TransferDataFromWindow().
void BOARD_STACKUP::BuildDefaultStackupList | ( | const BOARD_DESIGN_SETTINGS * | aSettings, |
int | aActiveCopperLayersCount = 0 |
||
) |
Create a default stackup, according to the current BOARD_DESIGN_SETTINGS settings.
aSettings | is the current board setting. if nullptr, build a full stackup (with 32 copper layers) |
aActiveCopperLayersCount | is used only if aSettings == nullptr is the number of copper layers to use to calculate a default dielectric thickness. ((<= 0 to use all copper layers) |
Definition at line 492 of file board_stackup.cpp.
References _HKI, Add(), B_Cu, B_Mask, B_Paste, B_SilkS, BS_ITEM_TYPE_COPPER, BS_ITEM_TYPE_DIELECTRIC, BS_ITEM_TYPE_SILKSCREEN, BS_ITEM_TYPE_SOLDERMASK, BS_ITEM_TYPE_SOLDERPASTE, F_Mask, F_Paste, F_SilkS, BOARD_DESIGN_SETTINGS::GetBoardThickness(), BOARD_STACKUP_ITEM::GetCopperDefaultThickness(), BOARD_DESIGN_SETTINGS::GetCopperLayerCount(), BOARD_DESIGN_SETTINGS::GetEnabledLayers(), BOARD_STACKUP_ITEM::GetMaskDefaultThickness(), BOARD_DESIGN_SETTINGS::GetStackupDescriptor(), KEY_COPPER, KEY_CORE, KEY_PREPREG, m_CastellatedPads, m_EdgeConnectorConstraints, m_EdgePlating, m_FinishType, Millimeter2iu(), BOARD_STACKUP_ITEM::SetBrdLayerId(), BOARD_STACKUP_ITEM::SetDielectricLayerId(), BOARD_STACKUP_ITEM::SetMaterial(), BOARD_STACKUP_ITEM::SetThickness(), BOARD_STACKUP_ITEM::SetTypeName(), and StackupAllowedBrdLayers().
Referenced by PANEL_SETUP_BOARD_STACKUP::buildLayerStackPanel(), ALTIUM_PCB::ParseBoard6Data(), and SynchronizeWithBoard().
void BOARD_STACKUP::FormatBoardStackup | ( | OUTPUTFORMATTER * | aFormatter, |
const BOARD * | aBoard, | ||
int | aNestLevel | ||
) | const |
Write the stackup info on board file.
aFormatter | is the OUTPUTFORMATTER used to create the file |
aBoard | is the board |
aNestLevel | is the index to nest level to indent the lines in file |
Definition at line 618 of file board_stackup.cpp.
References BS_ITEM_TYPE_DIELECTRIC, Double2Str(), FormatInternalUnits(), IsPrmSpecified(), m_CastellatedPads, m_EdgeConnectorConstraints, m_EdgePlating, m_FinishType, m_HasDielectricConstrains, m_list, LSET::Name(), OUTPUTFORMATTER::Print(), OUTPUTFORMATTER::Quotew(), and UNDEFINED_LAYER.
Referenced by PCB_IO::formatSetup(), and PANEL_SETUP_BOARD_STACKUP::TransferDataFromWindow().
|
inline |
Definition at line 239 of file board_stackup.h.
References m_list.
Referenced by GERBER_JOBFILE_WRITER::addJSONMaterialStackup(), DRAWING_TOOL::DrawSpecificationStackup(), and GetStackupLayer().
int BOARD_STACKUP::GetLayerDistance | ( | PCB_LAYER_ID | aFirstLayer, |
PCB_LAYER_ID | aSecondLayer | ||
) | const |
Calculate the distance (height) between the two given copper layers.
This factors in the thickness of any dielectric and copper layers between the two given layers, but not the height of the given copper layers.
aFirstLayer | is a copper layer |
aSecondLayer | is a different copper layer |
Definition at line 703 of file board_stackup.cpp.
References IsCopperLayer(), m_list, and UNDEFINED_LAYER.
Referenced by DIALOG_NET_INSPECTOR::calculateViaLength(), BOARD::GetTrackLength(), and PNS_KICAD_IFACE_BASE::StackupHeight().
|
inline |
Definition at line 219 of file board_stackup.h.
References m_list.
Referenced by PANEL_SETUP_BOARD_STACKUP::buildLayerStackPanel(), BuildStackupReport(), DRAWING_TOOL::DrawSpecificationStackup(), GetStackupLayer(), PANEL_SETUP_BOARD_STACKUP::onMaterialChange(), PANEL_SETUP_BOARD_STACKUP::onRemoveDielectricLayer(), PANEL_SETUP_BOARD_STACKUP::onRemoveDielUI(), ALTIUM_PCB::ParseBoard6Data(), EDA_3D_VIEWER::SynchroniseColoursWithBoard(), SynchronizeWithBoard(), PANEL_SETUP_BOARD_STACKUP::TransferDataFromWindow(), and HYPERLYNX_EXPORTER::writeStackupInfo().
BOARD_STACKUP_ITEM * BOARD_STACKUP::GetStackupLayer | ( | int | aIndex | ) |
Definition at line 375 of file board_stackup.cpp.
References GetCount(), and GetList().
Referenced by GERBER_JOBFILE_WRITER::addJSONMaterialStackup().
BOARD_STACKUP & BOARD_STACKUP::operator= | ( | const BOARD_STACKUP & | aOther | ) |
Definition at line 343 of file board_stackup.cpp.
References Add(), m_CastellatedPads, m_EdgeConnectorConstraints, m_EdgePlating, m_FinishType, m_HasDielectricConstrains, m_HasThicknessConstrains, m_list, and RemoveAll().
void BOARD_STACKUP::RemoveAll | ( | ) |
Delete all items in list and clear the list.
Definition at line 366 of file board_stackup.cpp.
References m_list.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::loadBoardStackup(), operator=(), ALTIUM_PCB::ParseBoard6Data(), PANEL_SETUP_BOARD_STACKUP::TransferDataFromWindow(), and ~BOARD_STACKUP().
|
inlinestatic |
Definition at line 228 of file board_stackup.h.
References B_Mask, B_Paste, B_SilkS, LSET::ExternalCuMask(), F_Mask, F_Paste, F_SilkS, and LSET::InternalCuMask().
Referenced by BuildDefaultStackupList(), PANEL_SETUP_BOARD_STACKUP::ImportSettingsFrom(), PANEL_SETUP_BOARD_STACKUP::OnLayersOptionsChanged(), PANEL_SETUP_BOARD_STACKUP::PANEL_SETUP_BOARD_STACKUP(), and PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup().
bool BOARD_STACKUP::SynchronizeWithBoard | ( | BOARD_DESIGN_SETTINGS * | aSettings | ) |
Synchronize the BOARD_STACKUP_ITEM* list with the board.
Not enabled layers are removed Missing layers are added
aSettings,is | the current board setting. |
Definition at line 399 of file board_stackup.cpp.
References BuildDefaultStackupList(), GetList(), BOARD_DESIGN_SETTINGS::GetStackupDescriptor(), m_CastellatedPads, m_EdgeConnectorConstraints, m_EdgePlating, m_FinishType, m_HasDielectricConstrains, m_list, and UNDEFINED_LAYER.
Referenced by GERBER_JOBFILE_WRITER::addJSONMaterialStackup().
bool BOARD_STACKUP::m_CastellatedPads |
True if castellated pads exist.
Definition at line 315 of file board_stackup.h.
Referenced by BOARD_STACKUP(), BuildDefaultStackupList(), BuildStackupReport(), DRAWING_TOOL::DrawBoardCharacteristics(), FormatBoardStackup(), operator=(), PCB_PARSER::parseBoardStackup(), PANEL_SETUP_BOARD_FINISH::synchronizeWithBoard(), SynchronizeWithBoard(), PANEL_SETUP_BOARD_FINISH::TransferDataFromWindow(), and PANEL_SETUP_BOARD_STACKUP::TransferDataFromWindow().
BS_EDGE_CONNECTOR_CONSTRAINTS BOARD_STACKUP::m_EdgeConnectorConstraints |
If the board has edge connector cards, some constrains can be specified in job file: BS_EDGE_CONNECTOR_NONE = no edge connector BS_EDGE_CONNECTOR_IN_USE = board has edge connectors BS_EDGE_CONNECTOR_BEVELLED = edge connectors are beveled.
Definition at line 313 of file board_stackup.h.
Referenced by BOARD_STACKUP(), BuildDefaultStackupList(), BuildStackupReport(), FormatBoardStackup(), operator=(), PCB_PARSER::parseBoardStackup(), PANEL_SETUP_BOARD_FINISH::synchronizeWithBoard(), SynchronizeWithBoard(), PANEL_SETUP_BOARD_FINISH::TransferDataFromWindow(), and PANEL_SETUP_BOARD_STACKUP::TransferDataFromWindow().
bool BOARD_STACKUP::m_EdgePlating |
True if the edge board is plated.
Definition at line 316 of file board_stackup.h.
Referenced by BOARD_STACKUP(), BuildDefaultStackupList(), BuildStackupReport(), FormatBoardStackup(), operator=(), PCB_PARSER::parseBoardStackup(), PANEL_SETUP_BOARD_FINISH::synchronizeWithBoard(), SynchronizeWithBoard(), PANEL_SETUP_BOARD_FINISH::TransferDataFromWindow(), and PANEL_SETUP_BOARD_STACKUP::TransferDataFromWindow().
wxString BOARD_STACKUP::m_FinishType |
The name of external copper finish.
Definition at line 290 of file board_stackup.h.
Referenced by BOARD_STACKUP(), BuildDefaultStackupList(), BuildStackupReport(), DRAWING_TOOL::DrawBoardCharacteristics(), FormatBoardStackup(), operator=(), PCB_PARSER::parseBoardStackup(), PANEL_SETUP_BOARD_FINISH::synchronizeWithBoard(), SynchronizeWithBoard(), PANEL_SETUP_BOARD_FINISH::TransferDataFromWindow(), and PANEL_SETUP_BOARD_STACKUP::TransferDataFromWindow().
bool BOARD_STACKUP::m_HasDielectricConstrains |
True if some layers have impedance controlled tracks or have specific constrains for micro-wave applications If the board has dielectric constrains, the .gbrjob will contain info about dielectric constrains: loss tangent and Epsilon rel.
If not, these values will be not specified in job file.
Definition at line 299 of file board_stackup.h.
Referenced by GERBER_JOBFILE_WRITER::addJSONMaterialStackup(), BOARD_STACKUP(), BuildStackupReport(), DRAWING_TOOL::DrawBoardCharacteristics(), FormatBoardStackup(), operator=(), PCB_PARSER::parseBoardStackup(), PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard(), SynchronizeWithBoard(), PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup(), and PANEL_SETUP_BOARD_STACKUP::TransferDataFromWindow().
bool BOARD_STACKUP::m_HasThicknessConstrains |
True if some layers (copper and/or dielectric) have specific thickness.
Definition at line 304 of file board_stackup.h.
Referenced by BOARD_STACKUP(), and operator=().
|
private |
Definition at line 321 of file board_stackup.h.
Referenced by Add(), BOARD_STACKUP(), BuildBoardThicknessFromStackup(), FormatBoardStackup(), GetCount(), GetLayerDistance(), GetList(), operator=(), RemoveAll(), and SynchronizeWithBoard().