KiCad PCB EDA Suite
|
A PADSTACK defines the characteristics of a single or multi-layer pad, in the IPC sense of the word. More...
#include <padstack.h>
Classes | |
struct | COPPER_LAYER_PROPS |
The features of a padstack that can vary between copper layers All parameters are optional; leaving them un-set means "use parent/rule defaults" Pad clearances, margins, etc. More... | |
struct | DRILL_PROPS |
! The properties of a padstack drill. Drill position is always the pad position (origin). More... | |
struct | MASK_LAYER_PROPS |
! The features of a padstack that can vary on outer layers. More... | |
struct | SHAPE_PROPS |
! The set of properties that define a pad's shape on a given layer More... | |
Public Types | |
enum class | TYPE { NORMAL , VIA , MOUNTING } |
! Padstack type, mostly for IPC-7351 naming and attributes Note that TYPE::MOUNTING is probably not currently supported by KiCad More... | |
enum class | MODE { NORMAL , FRONT_INNER_BACK , CUSTOM } |
! Copper geometry mode: controls how many unique copper layer shapes this padstack has More... | |
enum class | UNCONNECTED_LAYER_MODE { KEEP_ALL , REMOVE_ALL , REMOVE_EXCEPT_START_AND_END } |
! Whether or not to remove the copper shape for unconnected layers More... | |
enum class | CUSTOM_SHAPE_ZONE_MODE { OUTLINE , CONVEXHULL } |
Public Member Functions | |
PADSTACK (BOARD_ITEM *aParent) | |
virtual | ~PADSTACK ()=default |
PADSTACK (const PADSTACK &aOther) | |
PADSTACK & | operator= (const PADSTACK &aOther) |
bool | operator== (const PADSTACK &aOther) const |
bool | operator!= (const PADSTACK &aOther) const |
void | Serialize (google::protobuf::Any &aContainer) const override |
Serializes this object to the given Any message. | |
bool | Deserialize (const google::protobuf::Any &aContainer) override |
Deserializes the given protobuf message into this object. | |
double | Similarity (const PADSTACK &aOther) const |
Return a measure of how likely the other object is to represent the same object. | |
const LSET & | LayerSet () const |
LSET & | LayerSet () |
void | SetLayerSet (const LSET &aSet) |
void | FlipLayers (int aCopperLayerCount) |
Flips the padstack layers in the case that the pad's parent footprint is flipped to the other side of the board. | |
PCB_LAYER_ID | StartLayer () const |
PCB_LAYER_ID | EndLayer () const |
MODE | Mode () const |
void | SetMode (MODE aMode) |
wxString | Name () const |
! Returns the name of this padstack in IPC-7351 format | |
EDA_ANGLE | GetOrientation () const |
void | SetOrientation (EDA_ANGLE aAngle) |
DRILL_PROPS & | Drill () |
const DRILL_PROPS & | Drill () const |
DRILL_PROPS & | SecondaryDrill () |
const DRILL_PROPS & | SecondaryDrill () const |
UNCONNECTED_LAYER_MODE | UnconnectedLayerMode () const |
void | SetUnconnectedLayerMode (UNCONNECTED_LAYER_MODE aMode) |
COPPER_LAYER_PROPS & | CopperLayer (PCB_LAYER_ID aLayer) |
const COPPER_LAYER_PROPS & | CopperLayer (PCB_LAYER_ID aLayer) const |
MASK_LAYER_PROPS & | FrontOuterLayers () |
const MASK_LAYER_PROPS & | FrontOuterLayers () const |
MASK_LAYER_PROPS & | BackOuterLayers () |
const MASK_LAYER_PROPS & | BackOuterLayers () const |
std::optional< bool > | IsTented (PCB_LAYER_ID aSide) const |
Checks if this padstack is tented (covered in soldermask) on the given side. | |
CUSTOM_SHAPE_ZONE_MODE | CustomShapeInZoneMode () const |
void | SetCustomShapeInZoneMode (CUSTOM_SHAPE_ZONE_MODE aM) |
void | ForEachUniqueLayer (const std::function< void(PCB_LAYER_ID)> &aMethod) const |
Runs the given callable for each active unique copper layer in this padstack, meaning F_Cu for MODE::NORMAL; F_Cu, PADSTACK::INNER_LAYERS, and B_Cu for top/inner/bottom, and an arbitrary set of layers for full-custom padstacks. | |
std::vector< PCB_LAYER_ID > | UniqueLayers () const |
PCB_LAYER_ID | EffectiveLayerFor (PCB_LAYER_ID aLayer) const |
Determines which geometry layer should be used for the given input layer. | |
LSET | RelevantShapeLayers (const PADSTACK &aOther) const |
Returns the set of layers that must be considered if checking one padstack against another. | |
PAD_SHAPE | Shape (PCB_LAYER_ID aLayer) const |
void | SetShape (PAD_SHAPE aShape, PCB_LAYER_ID aLayer) |
void | SetSize (const VECTOR2I &aSize, PCB_LAYER_ID aLayer) |
const VECTOR2I & | Size (PCB_LAYER_ID aLayer) const |
PAD_DRILL_SHAPE | DrillShape () const |
void | SetDrillShape (PAD_DRILL_SHAPE aShape) |
VECTOR2I & | Offset (PCB_LAYER_ID aLayer) |
const VECTOR2I & | Offset (PCB_LAYER_ID aLayer) const |
PAD_SHAPE | AnchorShape (PCB_LAYER_ID aLayer) const |
void | SetAnchorShape (PAD_SHAPE aShape, PCB_LAYER_ID aLayer) |
VECTOR2I & | TrapezoidDeltaSize (PCB_LAYER_ID aLayer) |
const VECTOR2I & | TrapezoidDeltaSize (PCB_LAYER_ID aLayer) const |
double | RoundRectRadiusRatio (PCB_LAYER_ID aLayer) const |
void | SetRoundRectRadiusRatio (double aRatio, PCB_LAYER_ID aLayer) |
int | RoundRectRadius (PCB_LAYER_ID aLayer) const |
void | SetRoundRectRadius (double aRadius, PCB_LAYER_ID aLayer) |
double | ChamferRatio (PCB_LAYER_ID aLayer) const |
void | SetChamferRatio (double aRatio, PCB_LAYER_ID aLayer) |
int & | ChamferPositions (PCB_LAYER_ID aLayer) |
const int & | ChamferPositions (PCB_LAYER_ID aLayer) const |
void | SetChamferPositions (int aPositions, PCB_LAYER_ID aLayer) |
std::optional< int > & | Clearance (PCB_LAYER_ID aLayer=F_Cu) |
const std::optional< int > & | Clearance (PCB_LAYER_ID aLayer=F_Cu) const |
std::optional< int > & | SolderMaskMargin (PCB_LAYER_ID aLayer=F_Cu) |
const std::optional< int > & | SolderMaskMargin (PCB_LAYER_ID aLayer=F_Cu) const |
std::optional< int > & | SolderPasteMargin (PCB_LAYER_ID aLayer=F_Cu) |
const std::optional< int > & | SolderPasteMargin (PCB_LAYER_ID aLayer=F_Cu) const |
std::optional< double > & | SolderPasteMarginRatio (PCB_LAYER_ID aLayer=F_Cu) |
const std::optional< double > & | SolderPasteMarginRatio (PCB_LAYER_ID aLayer=F_Cu) const |
std::optional< ZONE_CONNECTION > & | ZoneConnection (PCB_LAYER_ID aLayer=F_Cu) |
const std::optional< ZONE_CONNECTION > & | ZoneConnection (PCB_LAYER_ID aLayer=F_Cu) const |
std::optional< int > & | ThermalSpokeWidth (PCB_LAYER_ID aLayer=F_Cu) |
const std::optional< int > & | ThermalSpokeWidth (PCB_LAYER_ID aLayer=F_Cu) const |
std::optional< int > & | ThermalGap (PCB_LAYER_ID aLayer=F_Cu) |
const std::optional< int > & | ThermalGap (PCB_LAYER_ID aLayer=F_Cu) const |
EDA_ANGLE | DefaultThermalSpokeAngleForShape (PCB_LAYER_ID aLayer=F_Cu) const |
EDA_ANGLE | ThermalSpokeAngle (PCB_LAYER_ID aLayer=F_Cu) const |
void | SetThermalSpokeAngle (EDA_ANGLE aAngle, PCB_LAYER_ID aLayer=F_Cu) |
std::vector< std::shared_ptr< PCB_SHAPE > > & | Primitives (PCB_LAYER_ID aLayer) |
const std::vector< std::shared_ptr< PCB_SHAPE > > & | Primitives (PCB_LAYER_ID aLayer) const |
void | AddPrimitive (PCB_SHAPE *aShape, PCB_LAYER_ID aLayer) |
Adds a custom shape primitive to the padstack. | |
void | AppendPrimitives (const std::vector< std::shared_ptr< PCB_SHAPE > > &aPrimitivesList, PCB_LAYER_ID aLayer) |
Appends a copy of each shape in the given list to this padstack's custom shape list. | |
void | ReplacePrimitives (const std::vector< std::shared_ptr< PCB_SHAPE > > &aPrimitivesList, PCB_LAYER_ID aLayer) |
Clears the existing primitive list (freeing the owned shapes) and adds copies of the given shapes to the padstack for the given layer. | |
void | ClearPrimitives (PCB_LAYER_ID aLayer) |
Static Public Member Functions | |
static int | Compare (const PADSTACK *aPadstackRef, const PADSTACK *aPadstackCmp) |
Compare two padstacks and return 0 if they are equal. | |
Static Public Attributes | |
static constexpr PCB_LAYER_ID | ALL_LAYERS = F_Cu |
! Temporary layer identifier to identify code that is not padstack-aware | |
static constexpr PCB_LAYER_ID | INNER_LAYERS = In1_Cu |
! The layer identifier to use for "inner layers" on top/inner/bottom padstacks | |
Private Member Functions | |
void | packCopperLayer (PCB_LAYER_ID aLayer, kiapi::board::types::PadStack &aProto) const |
bool | unpackCopperLayer (const kiapi::board::types::PadStackLayer &aProto) |
Private Attributes | |
BOARD_ITEM * | m_parent |
! The BOARD_ITEM this PADSTACK belongs to; will be used as the parent for owned shapes | |
MODE | m_mode |
! The copper layer variation mode this padstack is in | |
LSET | m_layerSet |
! The board layers that this padstack is active on | |
wxString | m_customName |
! An override for the IPC-7351 padstack name | |
EDA_ANGLE | m_orientation |
! The rotation of the pad relative to an outer reference frame | |
std::unordered_map< PCB_LAYER_ID, COPPER_LAYER_PROPS > | m_copperProps |
! The properties applied to copper layers if they aren't overridden | |
MASK_LAYER_PROPS | m_frontMaskProps |
! The overrides applied to front outer technical layers | |
MASK_LAYER_PROPS | m_backMaskProps |
! The overrides applied to back outer technical layers | |
UNCONNECTED_LAYER_MODE | m_unconnectedLayerMode |
CUSTOM_SHAPE_ZONE_MODE | m_customShapeInZoneMode |
How to build the custom shape in zone, to create the clearance area: CUSTOM_SHAPE_ZONE_MODE::OUTLINE = use pad shape CUSTOM_SHAPE_ZONE_MODE::CONVEXHULL = use the convex hull of the pad shape. | |
DRILL_PROPS | m_drill |
! The primary drill parameters, which also define the start and end layers for through-hole vias and pads (F_Cu to B_Cu for normal holes; a subset of layers for blind/buried vias) | |
DRILL_PROPS | m_secondaryDrill |
! Secondary drill, used to define back-drilling | |
A PADSTACK defines the characteristics of a single or multi-layer pad, in the IPC sense of the word.
This means that a PCB_PAD has a padstack, but also a PCB_VIA. The padstack for a pad defines its geometry on copper, soldermask, and paste layers, as well as any drilling or milling associated with the pad (round or slot hole, back-drilling, etc). Padstacks also define thermal relief settings for all copper layers, clearance overrides for all copper layers, and potentially other properties in the future. In other words, the padstack defines most of the geometric features of a pad on all layers. It does not define electrical properties or other metadata.
For padstacks that do not vary between layers, F_Cu is used as the copper layer to store all padstack properties.
Definition at line 123 of file padstack.h.
|
strong |
Enumerator | |
---|---|
OUTLINE | |
CONVEXHULL |
Definition at line 157 of file padstack.h.
|
strong |
! Copper geometry mode: controls how many unique copper layer shapes this padstack has
Enumerator | |
---|---|
NORMAL | Shape is the same on all layers. |
FRONT_INNER_BACK | Up to three shapes can be defined (F_Cu, inner copper layers, B_Cu) |
CUSTOM | Shapes can be defined on arbitrary layers. |
Definition at line 136 of file padstack.h.
|
strong |
! Padstack type, mostly for IPC-7351 naming and attributes Note that TYPE::MOUNTING is probably not currently supported by KiCad
Enumerator | |
---|---|
NORMAL | Padstack for a footprint pad. |
VIA | Padstack for a via. |
MOUNTING | A mounting hole (plated or unplated, not associated with a footprint) |
Definition at line 128 of file padstack.h.
|
strong |
! Whether or not to remove the copper shape for unconnected layers
Enumerator | |
---|---|
KEEP_ALL | |
REMOVE_ALL | |
REMOVE_EXCEPT_START_AND_END |
Definition at line 150 of file padstack.h.
PADSTACK::PADSTACK | ( | BOARD_ITEM * | aParent | ) |
Definition at line 34 of file padstack.cpp.
References ALL_LAYERS, ANGLE_45, B_Cu, PADSTACK::DRILL_PROPS::end, F_Cu, m_copperProps, m_drill, m_secondaryDrill, PADSTACK::DRILL_PROPS::shape, PADSTACK::DRILL_PROPS::start, and UNDEFINED_LAYER.
|
virtualdefault |
PADSTACK::PADSTACK | ( | const PADSTACK & | aOther | ) |
Definition at line 57 of file padstack.cpp.
References CopperLayer(), ForEachUniqueLayer(), and m_parent.
void PADSTACK::AddPrimitive | ( | PCB_SHAPE * | aShape, |
PCB_LAYER_ID | aLayer | ||
) |
Adds a custom shape primitive to the padstack.
aShape | is a shape to add as a custom primitive. Ownership is passed to this PADSTACK. |
aLayer | is the padstack layer to add to. |
Definition at line 1288 of file padstack.cpp.
References CopperLayer(), PADSTACK::COPPER_LAYER_PROPS::custom_shapes, m_parent, and EDA_ITEM::SetParent().
Referenced by PAD::AddPrimitive(), PAD::AddPrimitivePoly(), AppendPrimitives(), PCB_IO_KICAD_SEXPR_PARSER::parsePadstack(), and unpackCopperLayer().
PAD_SHAPE PADSTACK::AnchorShape | ( | PCB_LAYER_ID | aLayer | ) | const |
Definition at line 1079 of file padstack.cpp.
References PADSTACK::SHAPE_PROPS::anchor_shape, CopperLayer(), and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by PAD::GetAnchorPadShape(), packCopperLayer(), and Similarity().
void PADSTACK::AppendPrimitives | ( | const std::vector< std::shared_ptr< PCB_SHAPE > > & | aPrimitivesList, |
PCB_LAYER_ID | aLayer | ||
) |
Appends a copy of each shape in the given list to this padstack's custom shape list.
aPrimitivesList | is a list of shapes to add copies of to this PADSTACK |
aLayer | is the padstack layer to add to. |
Definition at line 1295 of file padstack.cpp.
References AddPrimitive().
Referenced by ReplacePrimitives().
|
inline |
Definition at line 315 of file padstack.h.
References m_backMaskProps.
Referenced by Deserialize(), PCB_IO_KICAD_SEXPR::formatTenting(), PCB_VIA::GetBackTentingMode(), PCB_VIA::IsTented(), PCB_IO_KICAD_SEXPR_PARSER::parseTenting(), Serialize(), PCB_VIA::SetBackTentingMode(), and DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow().
|
inline |
Definition at line 316 of file padstack.h.
References m_backMaskProps.
int & PADSTACK::ChamferPositions | ( | PCB_LAYER_ID | aLayer | ) |
Definition at line 1144 of file padstack.cpp.
References PADSTACK::SHAPE_PROPS::chamfered_rect_positions, CopperLayer(), and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by Compare(), PAD::Flip(), PAD::GetChamferPositions(), and Similarity().
const int & PADSTACK::ChamferPositions | ( | PCB_LAYER_ID | aLayer | ) | const |
Definition at line 1150 of file padstack.cpp.
References PADSTACK::SHAPE_PROPS::chamfered_rect_positions, CopperLayer(), and PADSTACK::COPPER_LAYER_PROPS::shape.
double PADSTACK::ChamferRatio | ( | PCB_LAYER_ID | aLayer | ) | const |
Definition at line 1132 of file padstack.cpp.
References PADSTACK::SHAPE_PROPS::chamfered_rect_ratio, CopperLayer(), and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by Compare(), PAD::GetChamferRectRatio(), and Similarity().
std::optional< int > & PADSTACK::Clearance | ( | PCB_LAYER_ID | aLayer = F_Cu | ) |
Definition at line 1162 of file padstack.cpp.
References PADSTACK::COPPER_LAYER_PROPS::clearance, and CopperLayer().
Referenced by PCB_IO_KICAD_SEXPR::format(), PAD::GetClearanceOverrides(), PAD::GetLocalClearance(), PCB_IO_KICAD_SEXPR_PARSER::parsePadstack(), PAD::SetLocalClearance(), and Similarity().
const std::optional< int > & PADSTACK::Clearance | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 1168 of file padstack.cpp.
References PADSTACK::COPPER_LAYER_PROPS::clearance, and CopperLayer().
void PADSTACK::ClearPrimitives | ( | PCB_LAYER_ID | aLayer | ) |
Definition at line 1313 of file padstack.cpp.
References CopperLayer(), and PADSTACK::COPPER_LAYER_PROPS::custom_shapes.
Referenced by PAD::DeletePrimitivesList(), operator=(), ReplacePrimitives(), and unpackCopperLayer().
Compare two padstacks and return 0 if they are equal.
Definition at line 526 of file padstack.cpp.
References ChamferPositions(), ChamferRatio(), BASE_SET::compare(), Drill(), DrillShape(), ForEachUniqueLayer(), LayerSet(), Offset(), Primitives(), RoundRectRadiusRatio(), Shape(), PADSTACK::DRILL_PROPS::size, Size(), TrapezoidDeltaSize(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PAD::Compare().
PADSTACK::COPPER_LAYER_PROPS & PADSTACK::CopperLayer | ( | PCB_LAYER_ID | aLayer | ) |
Definition at line 1008 of file padstack.cpp.
References EffectiveLayerFor(), and m_copperProps.
Referenced by AddPrimitive(), AnchorShape(), ChamferPositions(), ChamferRatio(), Clearance(), ClearPrimitives(), DefaultThermalSpokeAngleForShape(), Deserialize(), Offset(), operator==(), packCopperLayer(), PADSTACK(), Primitives(), RoundRectRadiusRatio(), Serialize(), SetAnchorShape(), SetChamferPositions(), SetChamferRatio(), SetRoundRectRadiusRatio(), SetShape(), SetSize(), SetThermalSpokeAngle(), Shape(), Size(), ThermalGap(), ThermalSpokeAngle(), ThermalSpokeWidth(), TrapezoidDeltaSize(), unpackCopperLayer(), and ZoneConnection().
const PADSTACK::COPPER_LAYER_PROPS & PADSTACK::CopperLayer | ( | PCB_LAYER_ID | aLayer | ) | const |
Definition at line 1016 of file padstack.cpp.
References ALL_LAYERS, EffectiveLayerFor(), and m_copperProps.
|
inline |
Definition at line 326 of file padstack.h.
References m_customShapeInZoneMode.
Referenced by PAD::GetCustomShapeInZoneOpt(), and Similarity().
EDA_ANGLE PADSTACK::DefaultThermalSpokeAngleForShape | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 1251 of file padstack.cpp.
References PADSTACK::SHAPE_PROPS::anchor_shape, ANGLE_45, ANGLE_90, CopperLayer(), PADSTACK::SHAPE_PROPS::shape, and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by Deserialize(), and ThermalSpokeAngle().
|
overridevirtual |
Deserializes the given protobuf message into this object.
aContainer | is an Any which should have a concrete type matching this object |
Reimplemented from SERIALIZABLE.
Definition at line 211 of file padstack.cpp.
References ALL_LAYERS, BackOuterLayers(), CopperLayer(), DefaultThermalSpokeAngleForShape(), DEGREES_T, Drill(), PADSTACK::DRILL_PROPS::end, F_Cu, FrontOuterLayers(), m_mode, m_orientation, SetLayerSet(), SetThermalSpokeAngle(), SetUnconnectedLayerMode(), PADSTACK::DRILL_PROPS::size, PADSTACK::MASK_LAYER_PROPS::solder_mask_margin, PADSTACK::MASK_LAYER_PROPS::solder_paste_margin, PADSTACK::MASK_LAYER_PROPS::solder_paste_margin_ratio, PADSTACK::DRILL_PROPS::start, PADSTACK::COPPER_LAYER_PROPS::thermal_gap, PADSTACK::COPPER_LAYER_PROPS::thermal_spoke_angle, PADSTACK::COPPER_LAYER_PROPS::thermal_spoke_width, unpackCopperLayer(), kiapi::board::UnpackLayerSet(), kiapi::common::UnpackVector2(), and PADSTACK::COPPER_LAYER_PROPS::zone_connection.
Referenced by PAD::Deserialize(), and PCB_VIA::Deserialize().
|
inline |
Definition at line 300 of file padstack.h.
References m_drill.
Referenced by PCB_VIA::BottomLayer(), PAD::BuildEffectiveShapes(), Compare(), PAD::ConditionallyFlashed(), PCB_VIA::ConditionallyFlashed(), Deserialize(), PCB_VIA::GetDrill(), PAD::GetDrillShape(), PAD::GetDrillSize(), PAD::GetDrillSizeX(), PAD::GetDrillSizeY(), PCB_VIA::GetDrillValue(), PCB_VIA::GetLayer(), PAD::GetMsgPanelInfo(), PAD::IsOnCopperLayer(), PCB_VIA::IsOnLayer(), PCB_VIA::LayerPair(), PAD::PAD(), PCB_VIA::PCB_VIA(), PCB_VIA::SanitizeLayers(), Serialize(), PAD::SetAttribute(), PCB_VIA::SetBottomLayer(), PCB_VIA::SetDrill(), PCB_VIA::SetDrillDefault(), PAD::SetDrillShape(), PAD::SetDrillSize(), PAD::SetDrillSizeX(), PAD::SetDrillSizeY(), PCB_VIA::SetLayer(), PCB_VIA::SetLayerPair(), PCB_VIA::SetLayerSet(), PCB_VIA::SetTopLayer(), Similarity(), and PCB_VIA::TopLayer().
|
inline |
Definition at line 301 of file padstack.h.
References m_drill.
PAD_DRILL_SHAPE PADSTACK::DrillShape | ( | ) | const |
Definition at line 1055 of file padstack.cpp.
References m_drill, and PADSTACK::DRILL_PROPS::shape.
Referenced by Compare(), and Similarity().
PCB_LAYER_ID PADSTACK::EffectiveLayerFor | ( | PCB_LAYER_ID | aLayer | ) | const |
Determines which geometry layer should be used for the given input layer.
For example, for MODE::NORMAL, this will always be F_Cu, and for MODE::FRONT_INNER_BACK, this will be one of F_Cu, PADSTACK::INNER_LAYERS, and B_Cu depending on the input layer.
aLayer | is a valid board layer |
Definition at line 922 of file padstack.cpp.
References ALL_LAYERS, LSET::AllCuMask(), B_Cu, BOARD_ITEM::BoardLayerSet(), LSET::Contains(), CUSTOM, F_Cu, FRONT_INNER_BACK, INNER_LAYERS, IsBackLayer(), IsCopperLayer(), IsFrontLayer(), LAYER_PAD_BK_NETNAMES, LAYER_PAD_FR_NETNAMES, LAYER_PAD_HOLEWALLS, LAYER_PAD_NETNAMES, LAYER_PAD_PLATEDHOLES, LAYER_PADS, LAYER_VIA_HOLES, LAYER_VIA_HOLEWALLS, m_parent, Mode(), and NORMAL.
Referenced by CopperLayer(), PAD::GetEffectivePolygon(), and PAD::GetEffectiveShape().
PCB_LAYER_ID PADSTACK::EndLayer | ( | ) | const |
Definition at line 702 of file padstack.cpp.
References PADSTACK::DRILL_PROPS::end, and m_drill.
Referenced by Serialize().
void PADSTACK::FlipLayers | ( | int | aCopperLayerCount | ) |
Flips the padstack layers in the case that the pad's parent footprint is flipped to the other side of the board.
Definition at line 708 of file padstack.cpp.
References B_Cu, CUSTOM, F_Cu, FRONT_INNER_BACK, In1_Cu, KI_FALLTHROUGH, m_backMaskProps, m_copperProps, m_frontMaskProps, m_mode, MAX_CU_LAYERS, and NORMAL.
Referenced by PAD::Flip().
void PADSTACK::ForEachUniqueLayer | ( | const std::function< void(PCB_LAYER_ID)> & | aMethod | ) | const |
Runs the given callable for each active unique copper layer in this padstack, meaning F_Cu for MODE::NORMAL; F_Cu, PADSTACK::INNER_LAYERS, and B_Cu for top/inner/bottom, and an arbitrary set of layers for full-custom padstacks.
aMethod | will be called once for each independent copper layer in the padstack |
Definition at line 870 of file padstack.cpp.
References B_Cu, BOARD_ITEM::BoardCopperLayerCount(), CUSTOM, F_Cu, FRONT_INNER_BACK, INNER_LAYERS, m_parent, MAX_CU_LAYERS, Mode(), and NORMAL.
Referenced by PAD::BuildEffectivePolygon(), PAD::BuildEffectiveShapes(), PAD::CheckPad(), PAD::Clone(), Compare(), PAD::DeletePrimitivesList(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DRAWING_TOOL::DrawVia(), PAD::Flip(), PAD::FlipPrimitives(), PCB_VIA::GetBoundingBox(), PAD::HitTest(), PCB_VIA::HitTest(), PAD::ImportSettingsFrom(), PAD::IsOnCopperLayer(), FOOTPRINT::cmp_pads::operator()(), operator=(), operator==(), padNeedsUpdate(), PADSTACK(), RelevantShapeLayers(), Serialize(), Similarity(), PNS_KICAD_IFACE_BASE::syncPad(), PNS_KICAD_IFACE_BASE::syncVia(), and PAD::ViewBBox().
|
inline |
Definition at line 312 of file padstack.h.
References m_frontMaskProps.
Referenced by Deserialize(), PCB_IO_KICAD_SEXPR::formatTenting(), PCB_VIA::GetFrontTentingMode(), PCB_VIA::IsTented(), PCB_IO_KICAD_SEXPR_PARSER::parseTenting(), Serialize(), PCB_VIA::SetFrontTentingMode(), and DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow().
|
inline |
Definition at line 313 of file padstack.h.
References m_frontMaskProps.
|
inline |
Definition at line 293 of file padstack.h.
References m_orientation.
Referenced by PAD::GetOrientation(), PAD::GetOrientationDegrees(), PAD::Rotate(), and Similarity().
std::optional< bool > PADSTACK::IsTented | ( | PCB_LAYER_ID | aSide | ) | const |
Checks if this padstack is tented (covered in soldermask) on the given side.
aSide | is a front or back layer (any will do) |
Definition at line 1319 of file padstack.cpp.
References PADSTACK::MASK_LAYER_PROPS::has_solder_mask, IsBackLayer(), IsFrontLayer(), m_backMaskProps, and m_frontMaskProps.
|
inline |
Definition at line 275 of file padstack.h.
References m_layerSet.
|
inline |
Definition at line 274 of file padstack.h.
References m_layerSet.
Referenced by Compare(), PCB_VIA::Deserialize(), PAD::Flip(), PAD::GetLayerSet(), PAD::GetSolderMaskExpansion(), PAD::GetSolderPasteMargin(), PAD::IsAperturePad(), PAD::IsOnLayer(), PCB_VIA::PCB_VIA(), PAD::SetAttribute(), Similarity(), and PAD::ViewGetLayers().
|
inline |
Definition at line 287 of file padstack.h.
References m_mode.
Referenced by DIALOG_PAD_PROPERTIES::afterPadstackModeChanged(), EffectiveLayerFor(), ForEachUniqueLayer(), PCB_IO_KICAD_SEXPR::format(), DIALOG_PAD_PROPERTIES::OnEditLayerChanged(), FOOTPRINT::cmp_pads::operator()(), PCB_IO_KICAD_SEXPR_PARSER::parsePadstack(), PCB_IO_KICAD_SEXPR_PARSER::parseViastack(), PNS_KICAD_IFACE_BASE::syncPad(), PNS_KICAD_IFACE_BASE::syncVia(), and UniqueLayers().
wxString PADSTACK::Name | ( | ) | const |
! Returns the name of this padstack in IPC-7351 format
Definition at line 689 of file padstack.cpp.
VECTOR2I & PADSTACK::Offset | ( | PCB_LAYER_ID | aLayer | ) |
Definition at line 1067 of file padstack.cpp.
References CopperLayer(), PADSTACK::SHAPE_PROPS::offset, and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by Compare(), PAD::Flip(), PAD::GetOffset(), PAD::IsOnCopperLayer(), packCopperLayer(), PAD::SetOffset(), PAD::ShapePos(), Similarity(), and unpackCopperLayer().
const VECTOR2I & PADSTACK::Offset | ( | PCB_LAYER_ID | aLayer | ) | const |
Definition at line 1073 of file padstack.cpp.
References CopperLayer(), PADSTACK::SHAPE_PROPS::offset, and PADSTACK::COPPER_LAYER_PROPS::shape.
|
inline |
Definition at line 255 of file padstack.h.
References operator==().
Definition at line 71 of file padstack.cpp.
References ClearPrimitives(), ForEachUniqueLayer(), m_backMaskProps, m_copperProps, m_customName, m_customShapeInZoneMode, m_drill, m_frontMaskProps, m_layerSet, m_mode, m_orientation, m_secondaryDrill, m_unconnectedLayerMode, Primitives(), ReplacePrimitives(), RoundRectRadiusRatio(), SetShape(), and Shape().
bool PADSTACK::operator== | ( | const PADSTACK & | aOther | ) | const |
Definition at line 115 of file padstack.cpp.
References CopperLayer(), ForEachUniqueLayer(), m_backMaskProps, m_customName, m_customShapeInZoneMode, m_drill, m_frontMaskProps, m_layerSet, m_mode, m_orientation, m_secondaryDrill, and m_unconnectedLayerMode.
Referenced by operator!=().
|
private |
Definition at line 381 of file padstack.cpp.
References AnchorShape(), PADSTACK::SHAPE_PROPS::chamfered_rect_positions, CopperLayer(), Offset(), kiapi::common::PackVector2(), Primitives(), RECT_CHAMFER_BOTTOM_LEFT, RECT_CHAMFER_BOTTOM_RIGHT, RECT_CHAMFER_TOP_LEFT, RECT_CHAMFER_TOP_RIGHT, PADSTACK::COPPER_LAYER_PROPS::shape, Shape(), Size(), and TrapezoidDeltaSize().
Referenced by Serialize().
std::vector< std::shared_ptr< PCB_SHAPE > > & PADSTACK::Primitives | ( | PCB_LAYER_ID | aLayer | ) |
Definition at line 1276 of file padstack.cpp.
References CopperLayer(), and PADSTACK::COPPER_LAYER_PROPS::custom_shapes.
Referenced by PAD::addPadPrimitivesToPolygon(), PAD::buildEffectiveShape(), PAD::Clone(), Compare(), PAD::FlipPrimitives(), PAD::GetPrimitives(), operator=(), packCopperLayer(), and Similarity().
const std::vector< std::shared_ptr< PCB_SHAPE > > & PADSTACK::Primitives | ( | PCB_LAYER_ID | aLayer | ) | const |
Definition at line 1282 of file padstack.cpp.
References CopperLayer(), and PADSTACK::COPPER_LAYER_PROPS::custom_shapes.
Returns the set of layers that must be considered if checking one padstack against another.
For example, two normal padstacks will just return a set with ALL_LAYERS, but if one of them is FRONT_INNER_BACK, there are three layers to check.
Definition at line 988 of file padstack.cpp.
References BOARD_ITEM::BoardCopperLayerCount(), CUSTOM, ForEachUniqueLayer(), m_mode, m_parent, and BASE_SET::set().
void PADSTACK::ReplacePrimitives | ( | const std::vector< std::shared_ptr< PCB_SHAPE > > & | aPrimitivesList, |
PCB_LAYER_ID | aLayer | ||
) |
Clears the existing primitive list (freeing the owned shapes) and adds copies of the given shapes to the padstack for the given layer.
aPrimitivesList | is a list of shapes to add copies of to this PADSTACK |
aLayer | is the padstack layer to add to. |
Definition at line 1303 of file padstack.cpp.
References AppendPrimitives(), and ClearPrimitives().
Referenced by operator=().
int PADSTACK::RoundRectRadius | ( | PCB_LAYER_ID | aLayer | ) | const |
Definition at line 1115 of file padstack.cpp.
References KiROUND(), RoundRectRadiusRatio(), Size(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PAD::GetRoundRectCornerRadius().
double PADSTACK::RoundRectRadiusRatio | ( | PCB_LAYER_ID | aLayer | ) | const |
Definition at line 1103 of file padstack.cpp.
References CopperLayer(), PADSTACK::SHAPE_PROPS::round_rect_radius_ratio, and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by Compare(), PAD::GetFrontRoundRectRadiusRatio(), PAD::GetRoundRectRadiusRatio(), operator=(), RoundRectRadius(), and Similarity().
|
inline |
Definition at line 303 of file padstack.h.
References m_secondaryDrill.
|
inline |
Definition at line 304 of file padstack.h.
References m_secondaryDrill.
|
overridevirtual |
Serializes this object to the given Any message.
The Any message's concrete type will be specific to the object in question.
aContainer | will be filled with a message describing this object |
Reimplemented from SERIALIZABLE.
Definition at line 422 of file padstack.cpp.
References ALL_LAYERS, EDA_ANGLE::AsDegrees(), BackOuterLayers(), CopperLayer(), Drill(), EndLayer(), F_Cu, ForEachUniqueLayer(), FrontOuterLayers(), PADSTACK::MASK_LAYER_PROPS::has_solder_mask, PADSTACK::MASK_LAYER_PROPS::has_solder_paste, m_layerSet, m_mode, m_orientation, m_unconnectedLayerMode, packCopperLayer(), kiapi::board::PackLayerSet(), kiapi::common::PackVector2(), PADSTACK::MASK_LAYER_PROPS::solder_mask_margin, PADSTACK::MASK_LAYER_PROPS::solder_paste_margin, PADSTACK::MASK_LAYER_PROPS::solder_paste_margin_ratio, StartLayer(), PADSTACK::COPPER_LAYER_PROPS::thermal_gap, PADSTACK::COPPER_LAYER_PROPS::thermal_spoke_width, ThermalSpokeAngle(), and PADSTACK::COPPER_LAYER_PROPS::zone_connection.
Referenced by PAD::Serialize(), and PCB_VIA::Serialize().
void PADSTACK::SetAnchorShape | ( | PAD_SHAPE | aShape, |
PCB_LAYER_ID | aLayer | ||
) |
Definition at line 1085 of file padstack.cpp.
References PADSTACK::SHAPE_PROPS::anchor_shape, CopperLayer(), and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by PCB_IO_KICAD_SEXPR_PARSER::parsePadstack(), PAD::SetAnchorPadShape(), and unpackCopperLayer().
void PADSTACK::SetChamferPositions | ( | int | aPositions, |
PCB_LAYER_ID | aLayer | ||
) |
Definition at line 1156 of file padstack.cpp.
References PADSTACK::SHAPE_PROPS::chamfered_rect_positions, CopperLayer(), and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by ALTIUM_PCB::ConvertPads6ToFootprintItemOnCopper(), PAD::PAD(), and PAD::SetChamferPositions().
void PADSTACK::SetChamferRatio | ( | double | aRatio, |
PCB_LAYER_ID | aLayer | ||
) |
Definition at line 1138 of file padstack.cpp.
References PADSTACK::SHAPE_PROPS::chamfered_rect_ratio, CopperLayer(), and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by ALTIUM_PCB::ConvertPads6ToFootprintItemOnCopper(), PAD::PAD(), and PAD::SetChamferRectRatio().
|
inline |
Definition at line 327 of file padstack.h.
References m_customShapeInZoneMode.
Referenced by PAD::SetCustomShapeInZoneOpt().
void PADSTACK::SetDrillShape | ( | PAD_DRILL_SHAPE | aShape | ) |
Definition at line 1061 of file padstack.cpp.
References m_drill, and PADSTACK::DRILL_PROPS::shape.
|
inline |
Definition at line 276 of file padstack.h.
References m_layerSet.
Referenced by Deserialize(), PAD::PAD(), and PAD::SetLayerSet().
void PADSTACK::SetMode | ( | MODE | aMode | ) |
Definition at line 821 of file padstack.cpp.
References ALL_LAYERS, B_Cu, CUSTOM, FRONT_INNER_BACK, In1_Cu, In30_Cu, INNER_LAYERS, m_copperProps, m_mode, m_parent, MAX_CU_LAYERS, and NORMAL.
Referenced by ALTIUM_PCB::ConvertPads6ToFootprintItemOnCopper(), PCB_IO_KICAD_SEXPR_PARSER::parsePadstack(), PCB_IO_KICAD_SEXPR_PARSER::parseViastack(), and DIALOG_PAD_PROPERTIES::transferDataToPad().
|
inline |
Definition at line 294 of file padstack.h.
References m_orientation, and EDA_ANGLE::Normalize().
Referenced by PAD::Rotate(), and PAD::SetOrientation().
void PADSTACK::SetRoundRectRadius | ( | double | aRadius, |
PCB_LAYER_ID | aLayer | ||
) |
Definition at line 1122 of file padstack.cpp.
References SetRoundRectRadiusRatio(), Size(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PAD::SetRoundRectCornerRadius().
void PADSTACK::SetRoundRectRadiusRatio | ( | double | aRatio, |
PCB_LAYER_ID | aLayer | ||
) |
Definition at line 1109 of file padstack.cpp.
References CopperLayer(), PADSTACK::SHAPE_PROPS::round_rect_radius_ratio, and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by ALTIUM_PCB::ConvertPads6ToFootprintItemOnCopper(), PAD::PAD(), PAD::SetFrontRoundRectRadiusRatio(), SetRoundRectRadius(), and PAD::SetRoundRectRadiusRatio().
void PADSTACK::SetShape | ( | PAD_SHAPE | aShape, |
PCB_LAYER_ID | aLayer | ||
) |
Definition at line 1034 of file padstack.cpp.
References CopperLayer(), PADSTACK::SHAPE_PROPS::shape, and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by ALTIUM_PCB::ConvertPads6ToFootprintItemOnCopper(), operator=(), PCB_VIA::PCB_VIA(), PAD::SetFrontShape(), PAD::SetShape(), and unpackCopperLayer().
void PADSTACK::SetSize | ( | const VECTOR2I & | aSize, |
PCB_LAYER_ID | aLayer | ||
) |
Definition at line 1040 of file padstack.cpp.
References std::abs(), CopperLayer(), PADSTACK::COPPER_LAYER_PROPS::shape, PADSTACK::SHAPE_PROPS::size, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ALTIUM_PCB::ConvertPads6ToFootprintItemOnCopper(), PAD::PAD(), PCB_IO_KICAD_SEXPR_PARSER::parseViastack(), PAD::SetSize(), PAD::SetSizeX(), PAD::SetSizeY(), PCB_VIA::SetWidth(), and unpackCopperLayer().
void PADSTACK::SetThermalSpokeAngle | ( | EDA_ANGLE | aAngle, |
PCB_LAYER_ID | aLayer = F_Cu |
||
) |
Definition at line 1270 of file padstack.cpp.
References CopperLayer(), and PADSTACK::COPPER_LAYER_PROPS::thermal_spoke_angle.
Referenced by Deserialize(), PCB_IO_KICAD_SEXPR_PARSER::parsePadstack(), PAD::SetThermalSpokeAngle(), and PAD::SetThermalSpokeAngleDegrees().
|
inline |
Definition at line 307 of file padstack.h.
References m_unconnectedLayerMode.
Referenced by Deserialize(), PCB_VIA::PCB_VIA(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::processItem(), PCB_VIA::SetKeepStartEnd(), PAD::SetKeepTopBottom(), PAD::SetRemoveUnconnected(), PCB_VIA::SetRemoveUnconnected(), PAD::SetUnconnectedLayerMode(), DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow(), and DIALOG_PAD_PROPERTIES::transferDataToPad().
PAD_SHAPE PADSTACK::Shape | ( | PCB_LAYER_ID | aLayer | ) | const |
Definition at line 1028 of file padstack.cpp.
References CopperLayer(), PADSTACK::SHAPE_PROPS::shape, and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by Compare(), PAD::GetFrontShape(), PAD::GetShape(), PAD::GetSolderPasteMargin(), operator=(), packCopperLayer(), Similarity(), and unpackCopperLayer().
double PADSTACK::Similarity | ( | const PADSTACK & | aOther | ) | const |
Return a measure of how likely the other object is to represent the same object.
The scale runs from 0.0 (definitely different objects) to 1.0 (same)
Definition at line 605 of file padstack.cpp.
References AnchorShape(), ChamferPositions(), ChamferRatio(), Clearance(), CustomShapeInZoneMode(), Drill(), DrillShape(), ForEachUniqueLayer(), GetOrientation(), LayerSet(), Offset(), Primitives(), RoundRectRadiusRatio(), Shape(), Size(), SolderMaskMargin(), SolderPasteMargin(), SolderPasteMarginRatio(), ThermalGap(), ThermalSpokeAngle(), ThermalSpokeWidth(), and ZoneConnection().
Referenced by PAD::Similarity().
const VECTOR2I & PADSTACK::Size | ( | PCB_LAYER_ID | aLayer | ) | const |
Definition at line 1049 of file padstack.cpp.
References CopperLayer(), PADSTACK::COPPER_LAYER_PROPS::shape, and PADSTACK::SHAPE_PROPS::size.
Referenced by PAD::buildEffectiveShape(), Compare(), PCB_IO_KICAD_SEXPR::format(), PAD::GetMsgPanelInfo(), PAD::GetSize(), PAD::GetSizeX(), PAD::GetSizeY(), PAD::GetSolderMaskExpansion(), PAD::GetSolderPasteMargin(), PCB_VIA::GetWidth(), PAD::IsOnCopperLayer(), packCopperLayer(), RoundRectRadius(), SetRoundRectRadius(), PAD::SetSizeX(), PAD::SetSizeY(), Similarity(), and PAD::TransformShapeToPolygon().
std::optional< int > & PADSTACK::SolderMaskMargin | ( | PCB_LAYER_ID | aLayer = F_Cu | ) |
Definition at line 1174 of file padstack.cpp.
References IsFrontLayer(), m_backMaskProps, m_frontMaskProps, and PADSTACK::MASK_LAYER_PROPS::solder_mask_margin.
Referenced by PAD::GetLocalSolderMaskMargin(), PAD::GetSolderMaskExpansion(), PAD::SetLocalSolderMaskMargin(), and Similarity().
const std::optional< int > & PADSTACK::SolderMaskMargin | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 1181 of file padstack.cpp.
References IsFrontLayer(), m_backMaskProps, m_frontMaskProps, and PADSTACK::MASK_LAYER_PROPS::solder_mask_margin.
std::optional< int > & PADSTACK::SolderPasteMargin | ( | PCB_LAYER_ID | aLayer = F_Cu | ) |
Definition at line 1188 of file padstack.cpp.
References IsFrontLayer(), m_backMaskProps, m_frontMaskProps, and PADSTACK::MASK_LAYER_PROPS::solder_paste_margin.
Referenced by PAD::GetLocalSolderPasteMargin(), PAD::GetSolderPasteMargin(), PAD::SetLocalSolderPasteMargin(), and Similarity().
const std::optional< int > & PADSTACK::SolderPasteMargin | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 1195 of file padstack.cpp.
References IsFrontLayer(), m_backMaskProps, m_frontMaskProps, and PADSTACK::MASK_LAYER_PROPS::solder_paste_margin.
std::optional< double > & PADSTACK::SolderPasteMarginRatio | ( | PCB_LAYER_ID | aLayer = F_Cu | ) |
Definition at line 1201 of file padstack.cpp.
References IsFrontLayer(), m_backMaskProps, m_frontMaskProps, and PADSTACK::MASK_LAYER_PROPS::solder_paste_margin_ratio.
Referenced by PAD::GetLocalSolderPasteMarginRatio(), PAD::GetSolderPasteMargin(), PAD::SetLocalSolderPasteMarginRatio(), and Similarity().
const std::optional< double > & PADSTACK::SolderPasteMarginRatio | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 1208 of file padstack.cpp.
References IsFrontLayer(), m_backMaskProps, m_frontMaskProps, and PADSTACK::MASK_LAYER_PROPS::solder_paste_margin_ratio.
PCB_LAYER_ID PADSTACK::StartLayer | ( | ) | const |
Definition at line 696 of file padstack.cpp.
References m_drill, and PADSTACK::DRILL_PROPS::start.
Referenced by PAD::Deserialize(), and Serialize().
std::optional< int > & PADSTACK::ThermalGap | ( | PCB_LAYER_ID | aLayer = F_Cu | ) |
Definition at line 1239 of file padstack.cpp.
References CopperLayer(), and PADSTACK::COPPER_LAYER_PROPS::thermal_gap.
Referenced by PCB_IO_KICAD_SEXPR::format(), PAD::GetLocalThermalGapOverride(), PAD::GetThermalGap(), PCB_IO_KICAD_SEXPR_PARSER::parsePadstack(), PAD::SetThermalGap(), and Similarity().
const std::optional< int > & PADSTACK::ThermalGap | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 1245 of file padstack.cpp.
References CopperLayer(), and PADSTACK::COPPER_LAYER_PROPS::thermal_gap.
EDA_ANGLE PADSTACK::ThermalSpokeAngle | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 1262 of file padstack.cpp.
References CopperLayer(), DefaultThermalSpokeAngleForShape(), and PADSTACK::COPPER_LAYER_PROPS::thermal_spoke_angle.
Referenced by PCB_IO_KICAD_SEXPR::format(), PAD::GetThermalSpokeAngle(), PAD::GetThermalSpokeAngleDegrees(), Serialize(), and Similarity().
std::optional< int > & PADSTACK::ThermalSpokeWidth | ( | PCB_LAYER_ID | aLayer = F_Cu | ) |
Definition at line 1227 of file padstack.cpp.
References CopperLayer(), and PADSTACK::COPPER_LAYER_PROPS::thermal_spoke_width.
Referenced by PCB_IO_KICAD_SEXPR::format(), PAD::GetLocalSpokeWidthOverride(), PAD::GetThermalSpokeWidth(), PCB_IO_KICAD_SEXPR_PARSER::parsePadstack(), PAD::SetThermalSpokeWidth(), and Similarity().
const std::optional< int > & PADSTACK::ThermalSpokeWidth | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 1233 of file padstack.cpp.
References CopperLayer(), and PADSTACK::COPPER_LAYER_PROPS::thermal_spoke_width.
VECTOR2I & PADSTACK::TrapezoidDeltaSize | ( | PCB_LAYER_ID | aLayer | ) |
Definition at line 1091 of file padstack.cpp.
References CopperLayer(), PADSTACK::COPPER_LAYER_PROPS::shape, and PADSTACK::SHAPE_PROPS::trapezoid_delta_size.
Referenced by PAD::buildEffectiveShape(), Compare(), PAD::Flip(), PAD::GetDelta(), packCopperLayer(), PAD::SetDelta(), PAD::TransformShapeToPolygon(), and unpackCopperLayer().
const VECTOR2I & PADSTACK::TrapezoidDeltaSize | ( | PCB_LAYER_ID | aLayer | ) | const |
Definition at line 1097 of file padstack.cpp.
References CopperLayer(), PADSTACK::COPPER_LAYER_PROPS::shape, and PADSTACK::SHAPE_PROPS::trapezoid_delta_size.
|
inline |
Definition at line 306 of file padstack.h.
References m_unconnectedLayerMode.
Referenced by PAD::ConditionallyFlashed(), PCB_VIA::ConditionallyFlashed(), PAD::FlashLayer(), PCB_VIA::GetKeepStartEnd(), PAD::GetKeepTopBottom(), PAD::GetRemoveUnconnected(), PCB_VIA::GetRemoveUnconnected(), and PAD::GetUnconnectedLayerMode().
std::vector< PCB_LAYER_ID > PADSTACK::UniqueLayers | ( | ) | const |
Definition at line 897 of file padstack.cpp.
References B_Cu, BOARD_ITEM::BoardCopperLayerCount(), CUSTOM, F_Cu, FRONT_INNER_BACK, INNER_LAYERS, m_parent, MAX_CU_LAYERS, Mode(), and NORMAL.
Referenced by padNeedsUpdate().
|
private |
Definition at line 160 of file padstack.cpp.
References AddPrimitive(), ALL_LAYERS, B_Cu, PADSTACK::SHAPE_PROPS::chamfered_rect_positions, PADSTACK::SHAPE_PROPS::chamfered_rect_ratio, ClearPrimitives(), CopperLayer(), F_Cu, FRONT_INNER_BACK, INNER_LAYERS, m_mode, m_parent, NORMAL, Offset(), RECT_CHAMFER_BOTTOM_LEFT, RECT_CHAMFER_BOTTOM_RIGHT, RECT_CHAMFER_TOP_LEFT, RECT_CHAMFER_TOP_RIGHT, PADSTACK::SHAPE_PROPS::round_rect_radius_ratio, SetAnchorShape(), SetShape(), SetSize(), PADSTACK::COPPER_LAYER_PROPS::shape, Shape(), TrapezoidDeltaSize(), and kiapi::common::UnpackVector2().
Referenced by Deserialize().
std::optional< ZONE_CONNECTION > & PADSTACK::ZoneConnection | ( | PCB_LAYER_ID | aLayer = F_Cu | ) |
Definition at line 1215 of file padstack.cpp.
References CopperLayer(), and PADSTACK::COPPER_LAYER_PROPS::zone_connection.
Referenced by PCB_IO_KICAD_SEXPR::format(), PAD::GetLocalZoneConnection(), PAD::GetZoneConnectionOverrides(), PCB_IO_KICAD_SEXPR_PARSER::parsePadstack(), PAD::SetLocalZoneConnection(), and Similarity().
const std::optional< ZONE_CONNECTION > & PADSTACK::ZoneConnection | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 1221 of file padstack.cpp.
References CopperLayer(), and PADSTACK::COPPER_LAYER_PROPS::zone_connection.
|
staticconstexpr |
! Temporary layer identifier to identify code that is not padstack-aware
Definition at line 144 of file padstack.h.
Referenced by PCB_IO_IPC2581::addLocationNode(), PCB_IO_IPC2581::addPadStack(), EDA_DATA::PACKAGE::AddPin(), PCB_IO_IPC2581::addShape(), PCB_IO_IPC2581::addSlotCavity(), PCAD2KICAD::PCAD_PAD::AddToBoard(), PCAD2KICAD::PCAD_PAD::AddToFootprint(), FEATURES_MANAGER::AddViaDrillHole(), DIALOG_TRACK_VIA_PROPERTIES::afterPadstackModeChanged(), AR_MATRIX::AR_MATRIX(), BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS(), BOOST_FIXTURE_TEST_CASE(), build_via_testpoints(), EDIT_TOOL::ChangeTrackWidth(), KI_TEST::CheckFpPad(), DRC_TEST_PROVIDER_SOLDER_MASK::checkMaskAperture(), ALTIUM_PCB::ConvertFills6ToFootprintItemOnLayer(), ALTIUM_PCB::ConvertPads6ToFootprintItemOnCopper(), ALTIUM_PCB::ConvertShapeBasedRegions6ToFootprintItemOnLayer(), ALTIUM_PCB::ConvertVias6ToFootprintItem(), CopperLayer(), MICROWAVE_TOOL::createBaseFootprint(), PNS_KICAD_IFACE::createBoardItem(), MICROWAVE_TOOL::createFootprint(), MICROWAVE_TOOL::createMicrowaveInductor(), PCB_IO_EASYEDAPRO_PARSER::createPAD(), GENCAD_EXPORTER::CreatePadsShapesSection(), Deserialize(), doPushPadProperties(), DRAWING_TOOL::DrawVia(), EffectiveLayerFor(), PAD_TOOL::explodePad(), PCB_IO_KICAD_SEXPR::format(), PLACE_FILE_EXPORTER::GenReportData(), CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad(), PAD::GetMsgPanelInfo(), PCB_VIA::GetMsgPanelInfo(), PAD::GetSizeX(), PAD::GetSizeY(), PCB_VIA::GetWidth(), hash_fp_item(), HYPERLYNX_PAD_STACK::HYPERLYNX_PAD_STACK(), PAD::ImportSettingsFrom(), ODB_NET_LIST::InitPadNetPoints(), isCopper(), isNullAperture(), DSN::isRoundKeepout(), FABMASTER::loadFootprints(), CADSTAR_PCB_ARCHIVE_LOADER::loadLibraryCoppers(), CADSTAR_PCB_ARCHIVE_LOADER::loadNetVia(), PCB_IO_KICAD_LEGACY::loadPAD(), PCB_IO_KICAD_LEGACY::loadSETUP(), PCB_IO_EAGLE::loadSignals(), PCB_IO_KICAD_LEGACY::loadTrackList(), FABMASTER::loadVias(), DSN::SPECCTRA_DB::makePADSTACK(), PCB_POINT_EDITOR::makePoints(), DSN::SPECCTRA_DB::makeVIA(), mirrorPad(), PNS_KICAD_IFACE::modifyBoardItem(), DIALOG_TRACK_VIA_PROPERTIES::onEditLayerChanged(), PCB_IO_EAGLE::packageHole(), PCB_IO_EAGLE::packagePad(), PCB_IO_EAGLE::packageSMD(), PAD::PAD(), PAD_DESC::PAD_DESC(), PADSTACK(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), GPCB_FPL_CACHE::parseFOOTPRINT(), PCB_IO_KICAD_SEXPR_PARSER::parsePAD(), PCB_IO_KICAD_SEXPR_PARSER::parsePAD_option(), PCB_IO_KICAD_SEXPR_PARSER::parsePCB_VIA(), PCB_IO_KICAD_SEXPR_PARSER::parseSetup(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), ALTIUM_PCB::ParseVias6Data(), PCB_VIA::PCB_VIA(), PAD_TOOL::PlacePad(), AR_MATRIX::PlacePad(), BRDITEMS_PLOTTER::PlotDrillMarks(), BRDITEMS_PLOTTER::PlotPadNumber(), DIALOG_GLOBAL_EDIT_TEARDROPS::processItem(), OUTSET_ROUTINE::ProcessItem(), DRC_TEST_PROVIDER_ANNULAR_WIDTH::Run(), DRC_TEST_PROVIDER_SOLDER_MASK::Run(), DRC_TEST_PROVIDER_VIA_DIAMETER::Run(), Serialize(), BOARD_DESIGN_SETTINGS::SetDefaultMasterPad(), SetMode(), PAD::SetSizeX(), PAD::SetSizeY(), PCB_VIA::SetWidth(), PNS_KICAD_IFACE_BASE::syncVia(), DRC_TEST_PROVIDER_SOLDER_MASK::testItemAgainstItems(), DRC_TEST_PROVIDER_SOLDER_MASK::testMaskBridges(), DRC_TEST_PROVIDER_SOLDER_MASK::testMaskItemAgainstZones(), PCB_IO_EAGLE::transferPad(), unpackCopperLayer(), BOARD_EDITOR_CONTROL::ViaSizeDec(), BOARD_EDITOR_CONTROL::ViaSizeInc(), ViaSort(), and DIALOG_GLOBAL_EDIT_TEARDROPS::visitItem().
|
staticconstexpr |
! The layer identifier to use for "inner layers" on top/inner/bottom padstacks
Definition at line 147 of file padstack.h.
Referenced by DIALOG_PAD_PROPERTIES::afterPadstackModeChanged(), DIALOG_TRACK_VIA_PROPERTIES::afterPadstackModeChanged(), ALTIUM_PCB::ConvertPads6ToFootprintItemOnCopper(), ALTIUM_PCB::ConvertVias6ToFootprintItem(), EffectiveLayerFor(), ForEachUniqueLayer(), PCB_IO_KICAD_SEXPR::format(), DIALOG_TRACK_VIA_PROPERTIES::onEditLayerChanged(), DIALOG_PAD_PROPERTIES::OnEditLayerChanged(), PCB_IO_KICAD_SEXPR_PARSER::parsePadstack(), ALTIUM_PCB::ParseVias6Data(), PCB_IO_KICAD_SEXPR_PARSER::parseViastack(), SetMode(), PNS_KICAD_IFACE_BASE::syncVia(), UniqueLayers(), and unpackCopperLayer().
|
private |
! The overrides applied to back outer technical layers
Definition at line 473 of file padstack.h.
Referenced by BackOuterLayers(), FlipLayers(), IsTented(), operator=(), operator==(), SolderMaskMargin(), SolderPasteMargin(), and SolderPasteMarginRatio().
|
private |
! The properties applied to copper layers if they aren't overridden
Definition at line 467 of file padstack.h.
Referenced by CopperLayer(), FlipLayers(), operator=(), PADSTACK(), and SetMode().
|
private |
! An override for the IPC-7351 padstack name
Definition at line 460 of file padstack.h.
Referenced by operator=(), and operator==().
|
private |
How to build the custom shape in zone, to create the clearance area: CUSTOM_SHAPE_ZONE_MODE::OUTLINE = use pad shape CUSTOM_SHAPE_ZONE_MODE::CONVEXHULL = use the convex hull of the pad shape.
Definition at line 482 of file padstack.h.
Referenced by CustomShapeInZoneMode(), operator=(), operator==(), and SetCustomShapeInZoneMode().
|
private |
! The primary drill parameters, which also define the start and end layers for through-hole vias and pads (F_Cu to B_Cu for normal holes; a subset of layers for blind/buried vias)
Definition at line 486 of file padstack.h.
Referenced by Drill(), DrillShape(), EndLayer(), operator=(), operator==(), PADSTACK(), SetDrillShape(), and StartLayer().
|
private |
! The overrides applied to front outer technical layers
Definition at line 470 of file padstack.h.
Referenced by FlipLayers(), FrontOuterLayers(), IsTented(), operator=(), operator==(), SolderMaskMargin(), SolderPasteMargin(), and SolderPasteMarginRatio().
|
private |
! The board layers that this padstack is active on
Definition at line 457 of file padstack.h.
Referenced by LayerSet(), operator=(), operator==(), Serialize(), and SetLayerSet().
|
private |
! The copper layer variation mode this padstack is in
Definition at line 454 of file padstack.h.
Referenced by Deserialize(), FlipLayers(), Mode(), operator=(), operator==(), RelevantShapeLayers(), Serialize(), SetMode(), and unpackCopperLayer().
|
private |
! The rotation of the pad relative to an outer reference frame
Definition at line 463 of file padstack.h.
Referenced by Deserialize(), GetOrientation(), operator=(), operator==(), Serialize(), and SetOrientation().
|
private |
! The BOARD_ITEM this PADSTACK belongs to; will be used as the parent for owned shapes
Definition at line 451 of file padstack.h.
Referenced by AddPrimitive(), EffectiveLayerFor(), ForEachUniqueLayer(), PADSTACK(), RelevantShapeLayers(), SetMode(), UniqueLayers(), and unpackCopperLayer().
|
private |
! Secondary drill, used to define back-drilling
Definition at line 489 of file padstack.h.
Referenced by operator=(), operator==(), PADSTACK(), and SecondaryDrill().
|
private |
Definition at line 475 of file padstack.h.
Referenced by operator=(), operator==(), Serialize(), SetUnconnectedLayerMode(), and UnconnectedLayerMode().