25#ifndef BOARD_STACKUP_H
26#define BOARD_STACKUP_H
167 wxString
GetColor(
int aDielectricSubLayer = 0 )
const;
170 double GetEpsilonR(
int aDielectricSubLayer = 0 )
const;
172 wxString
GetMaterial(
int aDielectricSubLayer = 0 )
const;
181 void SetColor(
const wxString& aColorName,
int aDielectricSubLayer = 0 );
182 void SetThickness(
int aThickness,
int aDielectricSubLayer = 0 );
184 void SetEpsilonR(
double aEpsilon,
int aDielectricSubLayer = 0 );
186 void SetMaterial(
const wxString& aName,
int aDielectricSubLayer = 0 );
230 void Serialize( google::protobuf::Any &aContainer )
const override;
232 bool Deserialize(
const google::protobuf::Any &aContainer )
override;
280 int aActiveCopperLayersCount = 0 );
289 const BOARD* aBoard,
int aNestLevel )
const;
BS_EDGE_CONNECTOR_CONSTRAINTS
@ BS_EDGE_CONNECTOR_BEVELLED
@ BS_EDGE_CONNECTOR_IN_USE
@ BS_ITEM_TYPE_SILKSCREEN
@ BS_ITEM_TYPE_DIELECTRIC
@ BS_ITEM_TYPE_SOLDERPASTE
@ BS_ITEM_TYPE_SOLDERMASK
Container for design settings for a BOARD object.
Manage one layer needed to make a physical board.
void AddDielectricPrms(int aDielectricPrmsIdx)
Add (insert) a DIELECTRIC_PRMS item to m_DielectricPrmsList all values are set to default.
wxString GetTypeName() const
bool operator!=(const BOARD_STACKUP_ITEM &aOther) const
PCB_LAYER_ID m_LayerId
type name of layer (copper, silk screen, core, prepreg ...)
int GetSublayersCount() const
void SetDielectricLayerId(int aLayerId)
double GetEpsilonR(int aDielectricSubLayer=0) const
wxString GetColor(int aDielectricSubLayer=0) const
bool HasEpsilonRValue() const
void SetThickness(int aThickness, int aDielectricSubLayer=0)
bool IsMaterialEditable() const
BOARD_STACKUP_ITEM_TYPE m_Type
bool HasMaterialValue(int aDielectricSubLayer=0) const
void SetThicknessLocked(bool aLocked, int aDielectricSubLayer=0)
wxString FormatDielectricLayerName() const
wxString GetLayerName() const
void SetMaterial(const wxString &aName, int aDielectricSubLayer=0)
bool HasLossTangentValue() const
PCB_LAYER_ID GetBrdLayerId() const
bool IsThicknessEditable() const
void SetLossTangent(double aTg, int aDielectricSubLayer=0)
int GetThickness(int aDielectricSubLayer=0) const
void SetEnabled(bool aEnable)
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...
static int GetMaskDefaultThickness()
BOARD_STACKUP_ITEM_TYPE GetType() const
wxString GetMaterial(int aDielectricSubLayer=0) const
wxString m_TypeName
name of layer as shown in layer manager. Useful to create reports
void SetBrdLayerId(PCB_LAYER_ID aBrdLayerId)
void SetTypeName(const wxString &aName)
bool IsThicknessLocked(int aDielectricSubLayer=0) const
wxString FormatEpsilonR(int aDielectricSubLayer=0) const
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...
void SetColor(const wxString &aColorName, int aDielectricSubLayer=0)
void SetEpsilonR(double aEpsilon, int aDielectricSubLayer=0)
void SetLayerName(const wxString &aName)
void RemoveDielectricPrms(int aDielectricPrmsIdx)
Remove a DIELECTRIC_PRMS item from m_DielectricPrmsList.
int GetDielectricLayerId() const
bool operator==(const BOARD_STACKUP_ITEM &aOther) const
bool IsColorEditable() const
wxString FormatLossTangent(int aDielectricSubLayer=0) const
double GetLossTangent(int aDielectricSubLayer=0) const
static int GetCopperDefaultThickness()
Manage layers needed to make a physical board.
void RemoveAll()
Delete all items in list and clear the list.
void FormatBoardStackup(OUTPUTFORMATTER *aFormatter, const BOARD *aBoard, int aNestLevel) const
Write the stackup info on board file.
bool m_CastellatedPads
True if castellated pads exist.
const std::vector< BOARD_STACKUP_ITEM * > & GetList() const
static LSET StackupAllowedBrdLayers()
bool SynchronizeWithBoard(BOARD_DESIGN_SETTINGS *aSettings)
Synchronize the BOARD_STACKUP_ITEM* list with the board.
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
bool operator==(const BOARD_STACKUP &aOther) const
int BuildBoardThicknessFromStackup() const
bool m_HasDielectricConstrains
True if some layers have impedance controlled tracks or have specific constrains for micro-wave appli...
void Add(BOARD_STACKUP_ITEM *aItem)
Add a new item in stackup layer.
void BuildDefaultStackupList(const BOARD_DESIGN_SETTINGS *aSettings, int aActiveCopperLayersCount=0)
Create a default stackup, according to the current BOARD_DESIGN_SETTINGS settings.
void Serialize(google::protobuf::Any &aContainer) const override
Serializes this object to the given Any message.
BOARD_STACKUP & operator=(const BOARD_STACKUP &aOther)
BOARD_STACKUP_ITEM * GetStackupLayer(int aIndex)
int GetLayerDistance(PCB_LAYER_ID aFirstLayer, PCB_LAYER_ID aSecondLayer) const
Calculate the distance (height) between the two given copper layers.
std::vector< BOARD_STACKUP_ITEM * > m_list
bool m_EdgePlating
True if the edge board is plated.
BS_EDGE_CONNECTOR_CONSTRAINTS m_EdgeConnectorConstraints
If the board has edge connector cards, some constrains can be specified in job file: BS_EDGE_CONNECTO...
bool m_HasThicknessConstrains
True if some layers (copper and/or dielectric) have specific thickness.
bool operator!=(const BOARD_STACKUP &aOther) const
wxString m_FinishType
The name of external copper finish.
Information pertinent to a Pcbnew printed circuit board.
A helper class to manage a dielectric layer set of parameters.
double m_EpsilonR
true for dielectric layers with a fixed thickness (for impedance controlled purposes),...
int m_Thickness
type of material (for dielectric and solder mask)
bool operator==(const DIELECTRIC_PRMS &aOther) const
wxString m_Color
For dielectric (and solder mask) the dielectric loss.
bool operator!=(const DIELECTRIC_PRMS &aOther) const
bool m_ThicknessLocked
the physical layer thickness in internal units
double m_LossTangent
For dielectric (and solder mask) the dielectric constant.
LSET is a set of PCB_LAYER_IDs.
static LSET ExternalCuMask()
Return a mask holding the Front and Bottom layers.
static LSET InternalCuMask()
Return a complete set of internal copper layers which is all Cu layers except F_Cu and B_Cu.
Interface for objects that can be serialized to Protobuf messages.
PCB_LAYER_ID
A quick note on layer IDs: