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 , TOP_INNER_BOTTOM , CUSTOM } |
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. | |
const LSET & | LayerSet () const |
LSET & | LayerSet () |
void | SetLayerSet (const LSET &aSet) |
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 & | CopperLayerDefaults () |
const COPPER_LAYER_PROPS & | CopperLayerDefaults () 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) |
PAD_SHAPE | Shape (PCB_LAYER_ID aLayer=F_Cu) const |
void | SetShape (PAD_SHAPE aShape, PCB_LAYER_ID aLayer=F_Cu) |
VECTOR2I & | Size (PCB_LAYER_ID aLayer=F_Cu) |
const VECTOR2I & | Size (PCB_LAYER_ID aLayer=F_Cu) const |
PAD_DRILL_SHAPE | DrillShape (PCB_LAYER_ID aLayer=F_Cu) const |
void | SetDrillShape (PAD_DRILL_SHAPE aShape, PCB_LAYER_ID aLayer=F_Cu) |
VECTOR2I & | Offset (PCB_LAYER_ID aLayer=F_Cu) |
const VECTOR2I & | Offset (PCB_LAYER_ID aLayer=F_Cu) const |
PAD_SHAPE | AnchorShape (PCB_LAYER_ID aLayer=F_Cu) const |
void | SetAnchorShape (PAD_SHAPE aShape, PCB_LAYER_ID aLayer=F_Cu) |
VECTOR2I & | TrapezoidDeltaSize (PCB_LAYER_ID aLayer=F_Cu) |
const VECTOR2I & | TrapezoidDeltaSize (PCB_LAYER_ID aLayer=F_Cu) const |
double | RoundRectRadiusRatio (PCB_LAYER_ID aLayer=F_Cu) const |
void | SetRoundRectRadiusRatio (double aRatio, PCB_LAYER_ID aLayer=F_Cu) |
int | RoundRectRadius (PCB_LAYER_ID aLayer=F_Cu) const |
void | SetRoundRectRadius (double aRadius, PCB_LAYER_ID aLayer=F_Cu) |
double | ChamferRatio (PCB_LAYER_ID aLayer=F_Cu) const |
void | SetChamferRatio (double aRatio, PCB_LAYER_ID aLayer=F_Cu) |
int & | ChamferPositions (PCB_LAYER_ID aLayer=F_Cu) |
const int & | ChamferPositions (PCB_LAYER_ID aLayer=F_Cu) const |
void | SetChamferPositions (int aPositions, PCB_LAYER_ID aLayer=F_Cu) |
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=F_Cu) |
const std::vector< std::shared_ptr< PCB_SHAPE > > & | Primitives (PCB_LAYER_ID aLayer=F_Cu) const |
void | AddPrimitive (PCB_SHAPE *aShape, PCB_LAYER_ID aLayer=F_Cu) |
Adds a custom shape primitive to the padstack. | |
void | AppendPrimitives (const std::vector< std::shared_ptr< PCB_SHAPE > > &aPrimitivesList, PCB_LAYER_ID aLayer=F_Cu) |
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=F_Cu) |
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=F_Cu) |
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 | |
COPPER_LAYER_PROPS | m_defaultCopperProps |
! 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. | |
std::unordered_map< PCB_LAYER_ID, COPPER_LAYER_PROPS > | m_copperOverrides |
! Any entries here override the copper layer settings on the given copper layer. | |
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 116 of file padstack.h.
|
strong |
Enumerator | |
---|---|
OUTLINE | |
CONVEXHULL |
Definition at line 143 of file padstack.h.
|
strong |
Enumerator | |
---|---|
NORMAL | Shape is the same on all layers. |
TOP_INNER_BOTTOM | Up to three shapes can be defined (top, inner, bottom) |
CUSTOM | Shapes can be defined on arbitrary layers. |
Definition at line 128 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 121 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 136 of file padstack.h.
PADSTACK::PADSTACK | ( | BOARD_ITEM * | aParent | ) |
Definition at line 30 of file padstack.cpp.
References ANGLE_45, B_Cu, PADSTACK::DRILL_PROPS::end, F_Cu, m_defaultCopperProps, m_drill, m_secondaryDrill, PADSTACK::COPPER_LAYER_PROPS::shape, PADSTACK::DRILL_PROPS::shape, PADSTACK::DRILL_PROPS::start, PADSTACK::COPPER_LAYER_PROPS::thermal_gap, PADSTACK::COPPER_LAYER_PROPS::thermal_spoke_angle, PADSTACK::COPPER_LAYER_PROPS::thermal_spoke_width, UNDEFINED_LAYER, and PADSTACK::COPPER_LAYER_PROPS::zone_connection.
|
virtualdefault |
PADSTACK::PADSTACK | ( | const PADSTACK & | aOther | ) |
Definition at line 52 of file padstack.cpp.
void PADSTACK::AddPrimitive | ( | PCB_SHAPE * | aShape, |
PCB_LAYER_ID | aLayer = F_Cu |
||
) |
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 736 of file padstack.cpp.
References CopperLayerDefaults(), and PADSTACK::COPPER_LAYER_PROPS::custom_shapes.
Referenced by PAD::AddPrimitive(), PAD::AddPrimitivePoly(), AppendPrimitives(), and Deserialize().
PAD_SHAPE PADSTACK::AnchorShape | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 528 of file padstack.cpp.
References PADSTACK::SHAPE_PROPS::anchor_shape, CopperLayerDefaults(), and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by PAD::GetAnchorPadShape(), and Serialize().
void PADSTACK::AppendPrimitives | ( | const std::vector< std::shared_ptr< PCB_SHAPE > > & | aPrimitivesList, |
PCB_LAYER_ID | aLayer = F_Cu |
||
) |
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 742 of file padstack.cpp.
References AddPrimitive().
Referenced by ReplacePrimitives().
|
inline |
Definition at line 281 of file padstack.h.
References m_backMaskProps.
Referenced by Deserialize(), PCB_VIA::GetBackTentingMode(), PCB_VIA::IsTented(), Serialize(), PCB_VIA::SetBackTentingMode(), and DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow().
|
inline |
Definition at line 282 of file padstack.h.
References m_backMaskProps.
int & PADSTACK::ChamferPositions | ( | PCB_LAYER_ID | aLayer = F_Cu | ) |
Definition at line 593 of file padstack.cpp.
References PADSTACK::SHAPE_PROPS::chamfered_rect_positions, CopperLayerDefaults(), and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by PAD::Compare(), PAD::Flip(), and PAD::GetChamferPositions().
const int & PADSTACK::ChamferPositions | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 599 of file padstack.cpp.
References PADSTACK::SHAPE_PROPS::chamfered_rect_positions, CopperLayerDefaults(), and PADSTACK::COPPER_LAYER_PROPS::shape.
double PADSTACK::ChamferRatio | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 581 of file padstack.cpp.
References PADSTACK::SHAPE_PROPS::chamfered_rect_ratio, CopperLayerDefaults(), and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by PAD::Compare(), and PAD::GetChamferRectRatio().
std::optional< int > & PADSTACK::Clearance | ( | PCB_LAYER_ID | aLayer = F_Cu | ) |
Definition at line 611 of file padstack.cpp.
References PADSTACK::COPPER_LAYER_PROPS::clearance, and CopperLayerDefaults().
Referenced by PAD::GetClearanceOverrides(), PAD::GetLocalClearance(), and PAD::SetLocalClearance().
const std::optional< int > & PADSTACK::Clearance | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 617 of file padstack.cpp.
References PADSTACK::COPPER_LAYER_PROPS::clearance, and CopperLayerDefaults().
void PADSTACK::ClearPrimitives | ( | PCB_LAYER_ID | aLayer = F_Cu | ) |
Definition at line 760 of file padstack.cpp.
References CopperLayerDefaults(), and PADSTACK::COPPER_LAYER_PROPS::custom_shapes.
Referenced by PAD::DeletePrimitivesList(), Deserialize(), and ReplacePrimitives().
|
inline |
Definition at line 275 of file padstack.h.
References m_defaultCopperProps.
Referenced by AddPrimitive(), AnchorShape(), ChamferPositions(), ChamferRatio(), Clearance(), ClearPrimitives(), DefaultThermalSpokeAngleForShape(), Deserialize(), Offset(), Primitives(), RoundRectRadiusRatio(), Serialize(), SetAnchorShape(), SetChamferPositions(), SetChamferRatio(), SetRoundRectRadiusRatio(), SetShape(), SetThermalSpokeAngle(), Shape(), Size(), ThermalGap(), ThermalSpokeAngle(), ThermalSpokeWidth(), TrapezoidDeltaSize(), and ZoneConnection().
|
inline |
Definition at line 276 of file padstack.h.
References m_defaultCopperProps.
|
inline |
Definition at line 292 of file padstack.h.
References m_customShapeInZoneMode.
Referenced by PAD::GetCustomShapeInZoneOpt().
EDA_ANGLE PADSTACK::DefaultThermalSpokeAngleForShape | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 699 of file padstack.cpp.
References PADSTACK::SHAPE_PROPS::anchor_shape, ANGLE_45, ANGLE_90, CopperLayerDefaults(), 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 89 of file padstack.cpp.
References AddPrimitive(), BackOuterLayers(), PADSTACK::SHAPE_PROPS::chamfered_rect_positions, PADSTACK::SHAPE_PROPS::chamfered_rect_ratio, ClearPrimitives(), CopperLayerDefaults(), DefaultThermalSpokeAngleForShape(), DEGREES_T, Drill(), PADSTACK::DRILL_PROPS::end, FrontOuterLayers(), m_layerSet, m_mode, m_orientation, m_parent, RECT_CHAMFER_BOTTOM_LEFT, RECT_CHAMFER_BOTTOM_RIGHT, RECT_CHAMFER_TOP_LEFT, RECT_CHAMFER_TOP_RIGHT, BASE_SET::reset(), PADSTACK::SHAPE_PROPS::round_rect_radius_ratio, SetAnchorShape(), SetLayerSet(), SetShape(), SetThermalSpokeAngle(), SetUnconnectedLayerMode(), PADSTACK::COPPER_LAYER_PROPS::shape, PADSTACK::DRILL_PROPS::size, 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, 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 266 of file padstack.h.
References m_drill.
Referenced by PCB_VIA::BottomLayer(), PAD::BuildEffectiveShapes(), PAD::Compare(), PAD::ConditionallyFlashed(), PCB_VIA::ConditionallyFlashed(), Deserialize(), PCB_VIA::GetDrill(), PAD::GetDrillShape(), PAD::GetDrillSize(), PAD::GetDrillSizeX(), PAD::GetDrillSizeY(), PCB_VIA::GetDrillValue(), PCB_VIA::GetLayer(), PCB_VIA::GetLayerSet(), PAD::GetMsgPanelInfo(), PAD::IsOnCopperLayer(), 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(), and PCB_VIA::TopLayer().
|
inline |
Definition at line 267 of file padstack.h.
References m_drill.
PAD_DRILL_SHAPE PADSTACK::DrillShape | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 504 of file padstack.cpp.
References m_drill, and PADSTACK::DRILL_PROPS::shape.
PCB_LAYER_ID PADSTACK::EndLayer | ( | ) | const |
Definition at line 426 of file padstack.cpp.
References PADSTACK::DRILL_PROPS::end, and m_drill.
Referenced by Serialize().
|
inline |
Definition at line 278 of file padstack.h.
References m_frontMaskProps.
Referenced by Deserialize(), PCB_VIA::GetFrontTentingMode(), PCB_VIA::IsTented(), Serialize(), PCB_VIA::SetFrontTentingMode(), and DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow().
|
inline |
Definition at line 279 of file padstack.h.
References m_frontMaskProps.
|
inline |
Definition at line 259 of file padstack.h.
References m_orientation.
Referenced by PAD::GetOrientation(), PAD::GetOrientationDegrees(), and PAD::Rotate().
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 766 of file padstack.cpp.
References PADSTACK::MASK_LAYER_PROPS::has_solder_mask, IsBackLayer(), IsFrontLayer(), m_backMaskProps, and m_frontMaskProps.
|
inline |
Definition at line 247 of file padstack.h.
References m_layerSet.
|
inline |
Definition at line 246 of file padstack.h.
References m_layerSet.
Referenced by PAD::Flip(), PAD::GetLayerSet(), PAD::GetSolderMaskExpansion(), PAD::GetSolderPasteMargin(), PAD::IsAperturePad(), PAD::IsOnLayer(), PCB_VIA::PCB_VIA(), Serialize(), and PAD::SetAttribute().
|
inline |
Definition at line 253 of file padstack.h.
References m_mode.
wxString PADSTACK::Name | ( | ) | const |
! Returns the name of this padstack in IPC-7351 format
Definition at line 413 of file padstack.cpp.
VECTOR2I & PADSTACK::Offset | ( | PCB_LAYER_ID | aLayer = F_Cu | ) |
Definition at line 516 of file padstack.cpp.
References CopperLayerDefaults(), PADSTACK::SHAPE_PROPS::offset, and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by PAD::Compare(), PAD::Flip(), PAD::GetOffset(), PAD::IsOnCopperLayer(), PAD::SetOffset(), and PAD::ShapePos().
const VECTOR2I & PADSTACK::Offset | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 522 of file padstack.cpp.
References CopperLayerDefaults(), PADSTACK::SHAPE_PROPS::offset, and PADSTACK::COPPER_LAYER_PROPS::shape.
|
inline |
Definition at line 241 of file padstack.h.
References operator==().
Definition at line 58 of file padstack.cpp.
References m_backMaskProps, m_copperOverrides, m_customName, m_defaultCopperProps, m_drill, m_frontMaskProps, m_layerSet, m_mode, m_secondaryDrill, and m_unconnectedLayerMode.
bool PADSTACK::operator== | ( | const PADSTACK & | aOther | ) | const |
Definition at line 74 of file padstack.cpp.
References m_backMaskProps, m_copperOverrides, m_customName, m_defaultCopperProps, m_drill, m_frontMaskProps, m_layerSet, m_mode, m_secondaryDrill, and m_unconnectedLayerMode.
Referenced by operator!=().
std::vector< std::shared_ptr< PCB_SHAPE > > & PADSTACK::Primitives | ( | PCB_LAYER_ID | aLayer = F_Cu | ) |
Definition at line 724 of file padstack.cpp.
References CopperLayerDefaults(), and PADSTACK::COPPER_LAYER_PROPS::custom_shapes.
Referenced by PAD::addPadPrimitivesToPolygon(), PAD::BuildEffectiveShapes(), PAD::Compare(), PAD::FlipPrimitives(), PAD::GetPrimitives(), and Serialize().
const std::vector< std::shared_ptr< PCB_SHAPE > > & PADSTACK::Primitives | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 730 of file padstack.cpp.
References CopperLayerDefaults(), and PADSTACK::COPPER_LAYER_PROPS::custom_shapes.
void PADSTACK::ReplacePrimitives | ( | const std::vector< std::shared_ptr< PCB_SHAPE > > & | aPrimitivesList, |
PCB_LAYER_ID | aLayer = F_Cu |
||
) |
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 750 of file padstack.cpp.
References AppendPrimitives(), and ClearPrimitives().
int PADSTACK::RoundRectRadius | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 564 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 = F_Cu | ) | const |
Definition at line 552 of file padstack.cpp.
References CopperLayerDefaults(), PADSTACK::SHAPE_PROPS::round_rect_radius_ratio, and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by PAD::Compare(), PAD::GetRoundRectRadiusRatio(), and RoundRectRadius().
|
inline |
Definition at line 269 of file padstack.h.
References m_secondaryDrill.
|
inline |
Definition at line 270 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 294 of file padstack.cpp.
References AnchorShape(), EDA_ANGLE::AsDegrees(), BackOuterLayers(), PADSTACK::SHAPE_PROPS::chamfered_rect_positions, CopperLayerDefaults(), Drill(), EndLayer(), FrontOuterLayers(), LayerSet(), m_mode, m_orientation, m_unconnectedLayerMode, kiapi::board::PackLayerSet(), 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(), PADSTACK::MASK_LAYER_PROPS::solder_mask_margin, PADSTACK::MASK_LAYER_PROPS::solder_paste_margin, PADSTACK::MASK_LAYER_PROPS::solder_paste_margin_ratio, StartLayer(), and ThermalSpokeAngle().
Referenced by PAD::Serialize(), and PCB_VIA::Serialize().
void PADSTACK::SetAnchorShape | ( | PAD_SHAPE | aShape, |
PCB_LAYER_ID | aLayer = F_Cu |
||
) |
Definition at line 534 of file padstack.cpp.
References PADSTACK::SHAPE_PROPS::anchor_shape, CopperLayerDefaults(), and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by Deserialize(), and PAD::SetAnchorPadShape().
void PADSTACK::SetChamferPositions | ( | int | aPositions, |
PCB_LAYER_ID | aLayer = F_Cu |
||
) |
Definition at line 605 of file padstack.cpp.
References PADSTACK::SHAPE_PROPS::chamfered_rect_positions, CopperLayerDefaults(), and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by PAD::PAD(), and PAD::SetChamferPositions().
void PADSTACK::SetChamferRatio | ( | double | aRatio, |
PCB_LAYER_ID | aLayer = F_Cu |
||
) |
Definition at line 587 of file padstack.cpp.
References PADSTACK::SHAPE_PROPS::chamfered_rect_ratio, CopperLayerDefaults(), and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by PAD::PAD(), and PAD::SetChamferRectRatio().
|
inline |
Definition at line 293 of file padstack.h.
References m_customShapeInZoneMode.
Referenced by PAD::SetCustomShapeInZoneOpt().
void PADSTACK::SetDrillShape | ( | PAD_DRILL_SHAPE | aShape, |
PCB_LAYER_ID | aLayer = F_Cu |
||
) |
Definition at line 510 of file padstack.cpp.
References m_drill, and PADSTACK::DRILL_PROPS::shape.
|
inline |
Definition at line 248 of file padstack.h.
References m_layerSet.
Referenced by Deserialize(), PAD::PAD(), and PAD::SetLayerSet().
|
inline |
Definition at line 254 of file padstack.h.
References m_mode.
|
inline |
Definition at line 260 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 = F_Cu |
||
) |
Definition at line 571 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 = F_Cu |
||
) |
Definition at line 558 of file padstack.cpp.
References CopperLayerDefaults(), PADSTACK::SHAPE_PROPS::round_rect_radius_ratio, and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by PAD::PAD(), SetRoundRectRadius(), and PAD::SetRoundRectRadiusRatio().
void PADSTACK::SetShape | ( | PAD_SHAPE | aShape, |
PCB_LAYER_ID | aLayer = F_Cu |
||
) |
Definition at line 486 of file padstack.cpp.
References CopperLayerDefaults(), PADSTACK::SHAPE_PROPS::shape, and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by Deserialize(), PCB_VIA::PCB_VIA(), and PAD::SetShape().
void PADSTACK::SetThermalSpokeAngle | ( | EDA_ANGLE | aAngle, |
PCB_LAYER_ID | aLayer = F_Cu |
||
) |
Definition at line 718 of file padstack.cpp.
References CopperLayerDefaults(), and PADSTACK::COPPER_LAYER_PROPS::thermal_spoke_angle.
Referenced by Deserialize(), PAD::SetThermalSpokeAngle(), and PAD::SetThermalSpokeAngleDegrees().
|
inline |
Definition at line 273 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 = F_Cu | ) | const |
Definition at line 480 of file padstack.cpp.
References CopperLayerDefaults(), PADSTACK::SHAPE_PROPS::shape, and PADSTACK::COPPER_LAYER_PROPS::shape.
Referenced by PAD::GetShape(), PAD::GetSolderPasteMargin(), and Serialize().
VECTOR2I & PADSTACK::Size | ( | PCB_LAYER_ID | aLayer = F_Cu | ) |
Definition at line 492 of file padstack.cpp.
References CopperLayerDefaults(), PADSTACK::COPPER_LAYER_PROPS::shape, and PADSTACK::SHAPE_PROPS::size.
Referenced by PAD::BuildEffectiveShapes(), PAD::Compare(), Deserialize(), PCB_VIA::Deserialize(), PAD::GetMsgPanelInfo(), PAD::GetSize(), PAD::GetSizeX(), PAD::GetSizeY(), PAD::GetSolderMaskExpansion(), PAD::GetSolderPasteMargin(), PCB_VIA::GetWidth(), PAD::IsOnCopperLayer(), PAD::PAD(), RoundRectRadius(), Serialize(), SetRoundRectRadius(), PAD::SetSize(), PAD::SetSizeX(), PAD::SetSizeY(), PCB_VIA::SetWidth(), and PAD::TransformShapeToPolygon().
const VECTOR2I & PADSTACK::Size | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 498 of file padstack.cpp.
References CopperLayerDefaults(), PADSTACK::COPPER_LAYER_PROPS::shape, and PADSTACK::SHAPE_PROPS::size.
std::optional< int > & PADSTACK::SolderMaskMargin | ( | PCB_LAYER_ID | aLayer = F_Cu | ) |
Definition at line 623 of file padstack.cpp.
References IsFrontLayer(), m_backMaskProps, m_frontMaskProps, and PADSTACK::MASK_LAYER_PROPS::solder_mask_margin.
Referenced by PAD::GetLocalSolderMaskMargin(), PAD::GetSolderMaskExpansion(), and PAD::SetLocalSolderMaskMargin().
const std::optional< int > & PADSTACK::SolderMaskMargin | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 630 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 637 of file padstack.cpp.
References IsFrontLayer(), m_backMaskProps, m_frontMaskProps, and PADSTACK::MASK_LAYER_PROPS::solder_paste_margin.
Referenced by PAD::GetLocalSolderPasteMargin(), PAD::GetSolderPasteMargin(), and PAD::SetLocalSolderPasteMargin().
const std::optional< int > & PADSTACK::SolderPasteMargin | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 644 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 650 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(), and PAD::SetLocalSolderPasteMarginRatio().
const std::optional< double > & PADSTACK::SolderPasteMarginRatio | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 657 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 420 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 687 of file padstack.cpp.
References CopperLayerDefaults(), and PADSTACK::COPPER_LAYER_PROPS::thermal_gap.
Referenced by PAD::GetLocalThermalGapOverride(), PAD::GetThermalGap(), and PAD::SetThermalGap().
const std::optional< int > & PADSTACK::ThermalGap | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 693 of file padstack.cpp.
References CopperLayerDefaults(), and PADSTACK::COPPER_LAYER_PROPS::thermal_gap.
EDA_ANGLE PADSTACK::ThermalSpokeAngle | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 710 of file padstack.cpp.
References CopperLayerDefaults(), DefaultThermalSpokeAngleForShape(), and PADSTACK::COPPER_LAYER_PROPS::thermal_spoke_angle.
Referenced by PAD::GetThermalSpokeAngle(), PAD::GetThermalSpokeAngleDegrees(), and Serialize().
std::optional< int > & PADSTACK::ThermalSpokeWidth | ( | PCB_LAYER_ID | aLayer = F_Cu | ) |
Definition at line 675 of file padstack.cpp.
References CopperLayerDefaults(), and PADSTACK::COPPER_LAYER_PROPS::thermal_spoke_width.
Referenced by PAD::GetLocalSpokeWidthOverride(), PAD::GetThermalSpokeWidth(), and PAD::SetThermalSpokeWidth().
const std::optional< int > & PADSTACK::ThermalSpokeWidth | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 681 of file padstack.cpp.
References CopperLayerDefaults(), and PADSTACK::COPPER_LAYER_PROPS::thermal_spoke_width.
VECTOR2I & PADSTACK::TrapezoidDeltaSize | ( | PCB_LAYER_ID | aLayer = F_Cu | ) |
Definition at line 540 of file padstack.cpp.
References CopperLayerDefaults(), PADSTACK::COPPER_LAYER_PROPS::shape, and PADSTACK::SHAPE_PROPS::trapezoid_delta_size.
Referenced by PAD::BuildEffectiveShapes(), PAD::Compare(), PAD::Flip(), PAD::GetDelta(), PAD::SetDelta(), and PAD::TransformShapeToPolygon().
const VECTOR2I & PADSTACK::TrapezoidDeltaSize | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 546 of file padstack.cpp.
References CopperLayerDefaults(), PADSTACK::COPPER_LAYER_PROPS::shape, and PADSTACK::SHAPE_PROPS::trapezoid_delta_size.
|
inline |
Definition at line 272 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::optional< ZONE_CONNECTION > & PADSTACK::ZoneConnection | ( | PCB_LAYER_ID | aLayer = F_Cu | ) |
Definition at line 663 of file padstack.cpp.
References CopperLayerDefaults(), and PADSTACK::COPPER_LAYER_PROPS::zone_connection.
Referenced by PAD::GetLocalZoneConnection(), PAD::GetZoneConnectionOverrides(), and PAD::SetLocalZoneConnection().
const std::optional< ZONE_CONNECTION > & PADSTACK::ZoneConnection | ( | PCB_LAYER_ID | aLayer = F_Cu | ) | const |
Definition at line 669 of file padstack.cpp.
References CopperLayerDefaults(), and PADSTACK::COPPER_LAYER_PROPS::zone_connection.
|
private |
! The overrides applied to back outer technical layers
Definition at line 405 of file padstack.h.
Referenced by BackOuterLayers(), IsTented(), operator=(), operator==(), SolderMaskMargin(), SolderPasteMargin(), and SolderPasteMarginRatio().
|
private |
! Any entries here override the copper layer settings on the given copper layer.
If m_mode == MODE::TOP_INNER_BOTTOM, the inner layer setting is always In1_Cu and the only keys in this map that are used are F_Cu, In1_Cu, and B_Cu. If m_mode == MODE::NORMAL, this map is ignored.
Definition at line 420 of file padstack.h.
Referenced by operator=(), and operator==().
|
private |
! An override for the IPC-7351 padstack name
Definition at line 393 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 414 of file padstack.h.
Referenced by CustomShapeInZoneMode(), and SetCustomShapeInZoneMode().
|
private |
! The properties applied to copper layers if they aren't overridden
Definition at line 399 of file padstack.h.
Referenced by CopperLayerDefaults(), operator=(), operator==(), and PADSTACK().
|
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 424 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 402 of file padstack.h.
Referenced by FrontOuterLayers(), IsTented(), operator=(), operator==(), SolderMaskMargin(), SolderPasteMargin(), and SolderPasteMarginRatio().
|
private |
! The board layers that this padstack is active on
Definition at line 390 of file padstack.h.
Referenced by Deserialize(), LayerSet(), operator=(), operator==(), and SetLayerSet().
|
private |
! The copper layer variation mode this padstack is in
Definition at line 387 of file padstack.h.
Referenced by Deserialize(), Mode(), operator=(), operator==(), Serialize(), and SetMode().
|
private |
! The rotation of the pad relative to an outer reference frame
Definition at line 396 of file padstack.h.
Referenced by Deserialize(), GetOrientation(), Serialize(), and SetOrientation().
|
private |
! The BOARD_ITEM this PADSTACK belongs to; will be used as the parent for owned shapes
Definition at line 384 of file padstack.h.
Referenced by Deserialize().
|
private |
! Secondary drill, used to define back-drilling
Definition at line 427 of file padstack.h.
Referenced by operator=(), operator==(), PADSTACK(), and SecondaryDrill().
|
private |
Definition at line 407 of file padstack.h.
Referenced by operator=(), operator==(), Serialize(), SetUnconnectedLayerMode(), and UnconnectedLayerMode().