KiCad PCB EDA Suite
Loading...
Searching...
No Matches
padstack.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2024 Jon Evans <[email protected]>
5 * Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation, either version 3 of the License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef KICAD_PADSTACK_H
22#define KICAD_PADSTACK_H
23
24#include <memory>
25#include <optional>
26#include <wx/string.h>
27
28#include <api/serializable.h>
29#include <geometry/eda_angle.h>
30#include <layer_ids.h>
31#include <lset.h>
32#include <math/vector2d.h>
33#include <properties/property.h>
34#include <zones.h>
35
36class BOARD_ITEM;
37class PCB_SHAPE;
38
40{
41 class PadStack;
42 class PadStackLayer;
43}
44
45
51enum class PAD_SHAPE : int
52{
53 CIRCLE,
54 RECTANGLE, // do not use just RECT: it collides in a header on MSYS2
55 OVAL,
58
59 // Rectangle with a chamfered corner ( and with rounded other corners).
61 CUSTOM // A shape defined by user, using a set of basic shapes
62 // (thick segments, circles, arcs, polygons).
63};
64
69{
71 CIRCLE,
72 OBLONG,
73};
74
80enum class PAD_ATTRIB
81{
82 PTH,
83 SMD,
84 CONN,
87 NPTH,
89};
90
91
97enum class PAD_PROP
98{
99 NONE,
100 BGA,
103 TESTPOINT,
104 HEATSINK,
106 MECHANICAL,
107};
108
109
123class PADSTACK : public SERIALIZABLE
124{
125public:
128 enum class TYPE
129 {
130 NORMAL,
131 VIA,
132 MOUNTING
133 };
134
136 enum class MODE
137 {
138 NORMAL,
140 CUSTOM
141 };
142
144 static constexpr PCB_LAYER_ID ALL_LAYERS = F_Cu;
145
147 static constexpr PCB_LAYER_ID INNER_LAYERS = In1_Cu;
148
151 {
152 KEEP_ALL,
155 };
156
158 {
159 OUTLINE,
161 };
162
165 {
169
170 /*
171 * Most of the time the hole is the center of the shape (m_Offset = 0). But some designers
172 * use oblong/rect pads with a hole moved to one of the oblong/rect pad shape ends.
173 * In all cases the hole is at the pad position. This offset is from the hole to the center
174 * of the pad shape (ie: the copper area around the hole).
175 * ShapePos() returns the board shape position according to the offset and the pad rotation.
176 */
178
183
189
190 SHAPE_PROPS();
191 bool operator==( const SHAPE_PROPS& aOther ) const;
192 };
193
207 {
209 std::optional<ZONE_CONNECTION> zone_connection;
210 std::optional<int> thermal_spoke_width;
211 std::optional<EDA_ANGLE> thermal_spoke_angle;
212 std::optional<int> thermal_gap;
213 std::optional<int> clearance;
214
215 /*
216 * Editing definitions of primitives for custom pad shapes. In local coordinates relative
217 * to m_Pos (NOT shapePos) at orient 0.
218 */
219 std::vector<std::shared_ptr<PCB_SHAPE>> custom_shapes;
220
221 bool operator==( const COPPER_LAYER_PROPS& aOther ) const;
222 };
223
227 {
228 std::optional<int> solder_mask_margin;
229 std::optional<int> solder_paste_margin;
230 std::optional<double> solder_paste_margin_ratio;
231 std::optional<bool> has_solder_mask;
232 std::optional<bool> has_solder_paste;
233
234 bool operator==( const MASK_LAYER_PROPS& aOther ) const;
235 };
236
239 {
244
245 bool operator==( const DRILL_PROPS& aOther ) const;
246 };
247
248public:
249 PADSTACK( BOARD_ITEM* aParent );
250 virtual ~PADSTACK() = default;
251 PADSTACK( const PADSTACK& aOther );
252 PADSTACK& operator=( const PADSTACK &aOther );
253
254 bool operator==( const PADSTACK& aOther ) const;
255 bool operator!=( const PADSTACK& aOther ) const { return !operator==( aOther ); }
256
257 void Serialize( google::protobuf::Any &aContainer ) const override;
258 bool Deserialize( const google::protobuf::Any &aContainer ) override;
259
266 static int Compare( const PADSTACK* aPadstackRef, const PADSTACK* aPadstackCmp );
267
272 double Similarity( const PADSTACK& aOther ) const;
273
274 const LSET& LayerSet() const { return m_layerSet; }
275 LSET& LayerSet() { return m_layerSet; }
276 void SetLayerSet( const LSET& aSet ) { m_layerSet = aSet; }
277
282 void FlipLayers( int aCopperLayerCount );
283
284 PCB_LAYER_ID StartLayer() const;
285 PCB_LAYER_ID EndLayer() const;
286
287 MODE Mode() const { return m_mode; }
288 void SetMode( MODE aMode );
289
291 wxString Name() const;
292
295 {
296 m_orientation = aAngle;
298 }
299
300 DRILL_PROPS& Drill() { return m_drill; }
301 const DRILL_PROPS& Drill() const { return m_drill; }
302
304 const DRILL_PROPS& SecondaryDrill() const { return m_secondaryDrill; }
305
308
309 COPPER_LAYER_PROPS& CopperLayer( PCB_LAYER_ID aLayer );
310 const COPPER_LAYER_PROPS& CopperLayer( PCB_LAYER_ID aLayer ) const;
311
314
317
324 std::optional<bool> IsTented( PCB_LAYER_ID aSide ) const;
325
328
335 void ForEachUniqueLayer( const std::function<void( PCB_LAYER_ID )>& aMethod ) const;
336
337 std::vector<PCB_LAYER_ID> UniqueLayers() const;
338
349
355 LSET RelevantShapeLayers( const PADSTACK& aOther ) const;
356
357 // The following section has convenience getters for the padstack properties on a given layer.
358
359 PAD_SHAPE Shape( PCB_LAYER_ID aLayer ) const;
360 void SetShape( PAD_SHAPE aShape, PCB_LAYER_ID aLayer );
361
362 // Setter rather than direct access to enforce only positive sizes
363 void SetSize( const VECTOR2I& aSize, PCB_LAYER_ID aLayer );
364 const VECTOR2I& Size( PCB_LAYER_ID aLayer ) const;
365
367 void SetDrillShape( PAD_DRILL_SHAPE aShape );
368
369 VECTOR2I& Offset( PCB_LAYER_ID aLayer );
370 const VECTOR2I& Offset( PCB_LAYER_ID aLayer ) const;
371
372 PAD_SHAPE AnchorShape( PCB_LAYER_ID aLayer ) const;
373 void SetAnchorShape( PAD_SHAPE aShape, PCB_LAYER_ID aLayer );
374
376 const VECTOR2I& TrapezoidDeltaSize( PCB_LAYER_ID aLayer ) const;
377
378 double RoundRectRadiusRatio( PCB_LAYER_ID aLayer ) const;
379 void SetRoundRectRadiusRatio( double aRatio, PCB_LAYER_ID aLayer );
380
381 int RoundRectRadius( PCB_LAYER_ID aLayer ) const;
382 void SetRoundRectRadius( double aRadius, PCB_LAYER_ID aLayer );
383
384 double ChamferRatio( PCB_LAYER_ID aLayer ) const;
385 void SetChamferRatio( double aRatio, PCB_LAYER_ID aLayer );
386
387 int& ChamferPositions( PCB_LAYER_ID aLayer );
388 const int& ChamferPositions( PCB_LAYER_ID aLayer ) const;
389 void SetChamferPositions( int aPositions, PCB_LAYER_ID aLayer );
390
391 std::optional<int>& Clearance( PCB_LAYER_ID aLayer = F_Cu );
392 const std::optional<int>& Clearance( PCB_LAYER_ID aLayer = F_Cu ) const;
393
394 std::optional<int>& SolderMaskMargin( PCB_LAYER_ID aLayer = F_Cu );
395 const std::optional<int>& SolderMaskMargin( PCB_LAYER_ID aLayer = F_Cu ) const;
396
397 std::optional<int>& SolderPasteMargin( PCB_LAYER_ID aLayer = F_Cu );
398 const std::optional<int>& SolderPasteMargin( PCB_LAYER_ID aLayer = F_Cu ) const;
399
400 std::optional<double>& SolderPasteMarginRatio( PCB_LAYER_ID aLayer = F_Cu );
401 const std::optional<double>& SolderPasteMarginRatio( PCB_LAYER_ID aLayer = F_Cu ) const;
402
403 std::optional<ZONE_CONNECTION>& ZoneConnection( PCB_LAYER_ID aLayer = F_Cu );
404 const std::optional<ZONE_CONNECTION>& ZoneConnection( PCB_LAYER_ID aLayer = F_Cu ) const;
405
406 std::optional<int>& ThermalSpokeWidth( PCB_LAYER_ID aLayer = F_Cu );
407 const std::optional<int>& ThermalSpokeWidth( PCB_LAYER_ID aLayer = F_Cu ) const;
408
409 std::optional<int>& ThermalGap( PCB_LAYER_ID aLayer = F_Cu );
410 const std::optional<int>& ThermalGap( PCB_LAYER_ID aLayer = F_Cu ) const;
411
414 void SetThermalSpokeAngle( EDA_ANGLE aAngle, PCB_LAYER_ID aLayer = F_Cu );
415
416 std::vector<std::shared_ptr<PCB_SHAPE>>& Primitives( PCB_LAYER_ID aLayer );
417 const std::vector<std::shared_ptr<PCB_SHAPE>>& Primitives( PCB_LAYER_ID aLayer ) const;
418
424 void AddPrimitive( PCB_SHAPE* aShape, PCB_LAYER_ID aLayer );
425
431 void AppendPrimitives( const std::vector<std::shared_ptr<PCB_SHAPE>>& aPrimitivesList,
432 PCB_LAYER_ID aLayer );
433
440 void ReplacePrimitives( const std::vector<std::shared_ptr<PCB_SHAPE>>& aPrimitivesList,
441 PCB_LAYER_ID aLayer );
442
443 void ClearPrimitives( PCB_LAYER_ID aLayer );
444
445private:
446 void packCopperLayer( PCB_LAYER_ID aLayer, kiapi::board::types::PadStack& aProto ) const;
447
448 bool unpackCopperLayer( const kiapi::board::types::PadStackLayer& aProto );
449
452
455
458
460 wxString m_customName;
461
464
466 //COPPER_LAYER_PROPS m_defaultCopperProps;
467 std::unordered_map<PCB_LAYER_ID, COPPER_LAYER_PROPS> m_copperProps;
468
471
474
476
483
487
490};
491
492#ifndef SWIG
494#endif
495
496
497#endif //KICAD_PADSTACK_H
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:79
EDA_ANGLE Normalize()
Definition: eda_angle.h:221
LSET is a set of PCB_LAYER_IDs.
Definition: lset.h:36
A PADSTACK defines the characteristics of a single or multi-layer pad, in the IPC sense of the word.
Definition: padstack.h:124
const DRILL_PROPS & Drill() const
Definition: padstack.h:301
bool operator==(const PADSTACK &aOther) const
Definition: padstack.cpp:115
CUSTOM_SHAPE_ZONE_MODE CustomShapeInZoneMode() const
Definition: padstack.h:326
void SetCustomShapeInZoneMode(CUSTOM_SHAPE_ZONE_MODE aM)
Definition: padstack.h:327
std::optional< int > & Clearance(PCB_LAYER_ID aLayer=F_Cu)
Definition: padstack.cpp:1162
void AddPrimitive(PCB_SHAPE *aShape, PCB_LAYER_ID aLayer)
Adds a custom shape primitive to the padstack.
Definition: padstack.cpp:1288
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 ...
Definition: padstack.cpp:1303
void packCopperLayer(PCB_LAYER_ID aLayer, kiapi::board::types::PadStack &aProto) const
Definition: padstack.cpp:381
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
Definition: padstack.cpp:211
MASK_LAYER_PROPS & FrontOuterLayers()
Definition: padstack.h:312
double Similarity(const PADSTACK &aOther) const
Return a measure of how likely the other object is to represent the same object.
Definition: padstack.cpp:605
int RoundRectRadius(PCB_LAYER_ID aLayer) const
Definition: padstack.cpp:1115
void SetDrillShape(PAD_DRILL_SHAPE aShape)
Definition: padstack.cpp:1061
std::optional< double > & SolderPasteMarginRatio(PCB_LAYER_ID aLayer=F_Cu)
Definition: padstack.cpp:1201
wxString m_customName
! An override for the IPC-7351 padstack name
Definition: padstack.h:460
DRILL_PROPS m_drill
! The primary drill parameters, which also define the start and end layers for through-hole vias and ...
Definition: padstack.h:486
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::...
Definition: padstack.cpp:870
void SetThermalSpokeAngle(EDA_ANGLE aAngle, PCB_LAYER_ID aLayer=F_Cu)
Definition: padstack.cpp:1270
void SetRoundRectRadiusRatio(double aRatio, PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1109
UNCONNECTED_LAYER_MODE m_unconnectedLayerMode
Definition: padstack.h:475
void ClearPrimitives(PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1313
void SetUnconnectedLayerMode(UNCONNECTED_LAYER_MODE aMode)
Definition: padstack.h:307
std::optional< bool > IsTented(PCB_LAYER_ID aSide) const
Checks if this padstack is tented (covered in soldermask) on the given side.
Definition: padstack.cpp:1319
void SetMode(MODE aMode)
Definition: padstack.cpp:821
std::optional< int > & ThermalSpokeWidth(PCB_LAYER_ID aLayer=F_Cu)
Definition: padstack.cpp:1227
std::optional< int > & SolderPasteMargin(PCB_LAYER_ID aLayer=F_Cu)
Definition: padstack.cpp:1188
void SetOrientation(EDA_ANGLE aAngle)
Definition: padstack.h:294
const MASK_LAYER_PROPS & BackOuterLayers() const
Definition: padstack.h:316
std::optional< int > & SolderMaskMargin(PCB_LAYER_ID aLayer=F_Cu)
Definition: padstack.cpp:1174
void SetChamferRatio(double aRatio, PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1138
const LSET & LayerSet() const
Definition: padstack.h:274
PCB_LAYER_ID EffectiveLayerFor(PCB_LAYER_ID aLayer) const
Determines which geometry layer should be used for the given input layer.
Definition: padstack.cpp:922
PADSTACK & operator=(const PADSTACK &aOther)
Definition: padstack.cpp:71
void SetShape(PAD_SHAPE aShape, PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1034
LSET & LayerSet()
Definition: padstack.h:275
EDA_ANGLE DefaultThermalSpokeAngleForShape(PCB_LAYER_ID aLayer=F_Cu) const
Definition: padstack.cpp:1251
VECTOR2I & TrapezoidDeltaSize(PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1091
DRILL_PROPS m_secondaryDrill
! Secondary drill, used to define back-drilling
Definition: padstack.h:489
VECTOR2I & Offset(PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1067
MASK_LAYER_PROPS m_backMaskProps
! The overrides applied to back outer technical layers
Definition: padstack.h:473
COPPER_LAYER_PROPS & CopperLayer(PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1008
EDA_ANGLE ThermalSpokeAngle(PCB_LAYER_ID aLayer=F_Cu) const
Definition: padstack.cpp:1262
void FlipLayers(int aCopperLayerCount)
Flips the padstack layers in the case that the pad's parent footprint is flipped to the other side of...
Definition: padstack.cpp:708
CUSTOM_SHAPE_ZONE_MODE m_customShapeInZoneMode
How to build the custom shape in zone, to create the clearance area: CUSTOM_SHAPE_ZONE_MODE::OUTLINE ...
Definition: padstack.h:482
bool unpackCopperLayer(const kiapi::board::types::PadStackLayer &aProto)
Definition: padstack.cpp:160
PAD_DRILL_SHAPE DrillShape() const
Definition: padstack.cpp:1055
void SetChamferPositions(int aPositions, PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1156
void SetRoundRectRadius(double aRadius, PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1122
const MASK_LAYER_PROPS & FrontOuterLayers() const
Definition: padstack.h:313
UNCONNECTED_LAYER_MODE UnconnectedLayerMode() const
Definition: padstack.h:306
LSET RelevantShapeLayers(const PADSTACK &aOther) const
Returns the set of layers that must be considered if checking one padstack against another.
Definition: padstack.cpp:988
std::optional< int > & ThermalGap(PCB_LAYER_ID aLayer=F_Cu)
Definition: padstack.cpp:1239
PAD_SHAPE Shape(PCB_LAYER_ID aLayer) const
Definition: padstack.cpp:1028
DRILL_PROPS & Drill()
Definition: padstack.h:300
void SetAnchorShape(PAD_SHAPE aShape, PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1085
BOARD_ITEM * m_parent
! The BOARD_ITEM this PADSTACK belongs to; will be used as the parent for owned shapes
Definition: padstack.h:451
std::vector< PCB_LAYER_ID > UniqueLayers() const
Definition: padstack.cpp:897
LSET m_layerSet
! The board layers that this padstack is active on
Definition: padstack.h:457
std::unordered_map< PCB_LAYER_ID, COPPER_LAYER_PROPS > m_copperProps
! The properties applied to copper layers if they aren't overridden
Definition: padstack.h:467
CUSTOM_SHAPE_ZONE_MODE
Definition: padstack.h:158
static int Compare(const PADSTACK *aPadstackRef, const PADSTACK *aPadstackCmp)
Compare two padstacks and return 0 if they are equal.
Definition: padstack.cpp:526
PCB_LAYER_ID EndLayer() const
Definition: padstack.cpp:702
const DRILL_PROPS & SecondaryDrill() const
Definition: padstack.h:304
int & ChamferPositions(PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1144
MASK_LAYER_PROPS m_frontMaskProps
! The overrides applied to front outer technical layers
Definition: padstack.h:470
const VECTOR2I & Size(PCB_LAYER_ID aLayer) const
Definition: padstack.cpp:1049
virtual ~PADSTACK()=default
MODE
! Copper geometry mode: controls how many unique copper layer shapes this padstack has
Definition: padstack.h:137
@ CUSTOM
Shapes can be defined on arbitrary layers.
@ FRONT_INNER_BACK
Up to three shapes can be defined (F_Cu, inner copper layers, B_Cu)
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.
Definition: padstack.cpp:1295
DRILL_PROPS & SecondaryDrill()
Definition: padstack.h:303
double RoundRectRadiusRatio(PCB_LAYER_ID aLayer) const
Definition: padstack.cpp:1103
UNCONNECTED_LAYER_MODE
! Whether or not to remove the copper shape for unconnected layers
Definition: padstack.h:151
PCB_LAYER_ID StartLayer() const
Definition: padstack.cpp:696
MODE Mode() const
Definition: padstack.h:287
bool operator!=(const PADSTACK &aOther) const
Definition: padstack.h:255
PAD_SHAPE AnchorShape(PCB_LAYER_ID aLayer) const
Definition: padstack.cpp:1079
MASK_LAYER_PROPS & BackOuterLayers()
Definition: padstack.h:315
void Serialize(google::protobuf::Any &aContainer) const override
Serializes this object to the given Any message.
Definition: padstack.cpp:422
wxString Name() const
! Returns the name of this padstack in IPC-7351 format
Definition: padstack.cpp:689
void SetSize(const VECTOR2I &aSize, PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1040
double ChamferRatio(PCB_LAYER_ID aLayer) const
Definition: padstack.cpp:1132
static constexpr PCB_LAYER_ID ALL_LAYERS
! Temporary layer identifier to identify code that is not padstack-aware
Definition: padstack.h:144
EDA_ANGLE GetOrientation() const
Definition: padstack.h:293
static constexpr PCB_LAYER_ID INNER_LAYERS
! The layer identifier to use for "inner layers" on top/inner/bottom padstacks
Definition: padstack.h:147
void SetLayerSet(const LSET &aSet)
Definition: padstack.h:276
std::optional< ZONE_CONNECTION > & ZoneConnection(PCB_LAYER_ID aLayer=F_Cu)
Definition: padstack.cpp:1215
TYPE
! Padstack type, mostly for IPC-7351 naming and attributes Note that TYPE::MOUNTING is probably not c...
Definition: padstack.h:129
@ NORMAL
Padstack for a footprint pad.
@ MOUNTING
A mounting hole (plated or unplated, not associated with a footprint)
@ VIA
Padstack for a via.
MODE m_mode
! The copper layer variation mode this padstack is in
Definition: padstack.h:454
EDA_ANGLE m_orientation
! The rotation of the pad relative to an outer reference frame
Definition: padstack.h:463
std::vector< std::shared_ptr< PCB_SHAPE > > & Primitives(PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1276
Interface for objects that can be serialized to Protobuf messages.
Definition: serializable.h:37
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:60
@ In1_Cu
Definition: layer_ids.h:66
@ F_Cu
Definition: layer_ids.h:64
PAD_DRILL_SHAPE
The set of pad drill shapes, used with PAD::{Set,Get}DrillShape()
Definition: padstack.h:69
PAD_ATTRIB
The set of pad shapes, used with PAD::{Set,Get}Attribute().
Definition: padstack.h:81
@ NPTH
like PAD_PTH, but not plated mechanical use only, no connection allowed
@ SMD
Smd pad, appears on the solder paste layer (default)
@ PTH
Plated through hole pad.
@ CONN
Like smd, does not appear on the solder paste layer (default) Note: also has a special attribute in G...
PAD_SHAPE
The set of pad shapes, used with PAD::{Set,Get}Shape()
Definition: padstack.h:52
PAD_PROP
The set of pad properties used in Gerber files (Draw files, and P&P files) to define some properties ...
Definition: padstack.h:98
@ FIDUCIAL_LOCAL
a fiducial (usually a smd) local to the parent footprint
@ FIDUCIAL_GLBL
a fiducial (usually a smd) for the full board
@ MECHANICAL
a pad used for mechanical support
@ HEATSINK
a pad used as heat sink, usually in SMD footprints
@ NONE
no special fabrication property
@ TESTPOINT
a test point pad
@ CASTELLATED
a pad with a castellated through hole
@ BGA
Smd pad, used in BGA footprints.
#define DECLARE_ENUM_TO_WXANY(type)
Definition: property.h:729
The features of a padstack that can vary between copper layers All parameters are optional; leaving t...
Definition: padstack.h:207
std::optional< ZONE_CONNECTION > zone_connection
Definition: padstack.h:209
std::optional< int > thermal_spoke_width
Definition: padstack.h:210
std::vector< std::shared_ptr< PCB_SHAPE > > custom_shapes
Definition: padstack.h:219
bool operator==(const COPPER_LAYER_PROPS &aOther) const
Definition: padstack.cpp:769
std::optional< EDA_ANGLE > thermal_spoke_angle
Definition: padstack.h:211
std::optional< int > clearance
Definition: padstack.h:213
std::optional< int > thermal_gap
Definition: padstack.h:212
! The properties of a padstack drill. Drill position is always the pad position (origin).
Definition: padstack.h:239
PCB_LAYER_ID start
Definition: padstack.h:242
PCB_LAYER_ID end
Definition: padstack.h:243
bool operator==(const DRILL_PROPS &aOther) const
Definition: padstack.cpp:814
VECTOR2I size
Drill diameter (x == y) or slot dimensions (x != y)
Definition: padstack.h:240
PAD_DRILL_SHAPE shape
Definition: padstack.h:241
! The features of a padstack that can vary on outer layers.
Definition: padstack.h:227
bool operator==(const MASK_LAYER_PROPS &aOther) const
Definition: padstack.cpp:804
std::optional< int > solder_mask_margin
Definition: padstack.h:228
std::optional< int > solder_paste_margin
Definition: padstack.h:229
std::optional< double > solder_paste_margin_ratio
Definition: padstack.h:230
std::optional< bool > has_solder_mask
True if this outer layer has mask (is not tented)
Definition: padstack.h:231
std::optional< bool > has_solder_paste
True if this outer layer has solder paste.
Definition: padstack.h:232
! The set of properties that define a pad's shape on a given layer
Definition: padstack.h:165
VECTOR2I trapezoid_delta_size
Delta for PAD_SHAPE::TRAPEZOID; half the delta squeezes one end and half expands the other.
Definition: padstack.h:188
double round_rect_corner_radius
Definition: padstack.h:179
VECTOR2I offset
Offset of the shape center from the pad center.
Definition: padstack.h:177
bool operator==(const SHAPE_PROPS &aOther) const
Definition: padstack.cpp:759
VECTOR2I size
Size of the shape, or of the anchor pad for custom shape pads.
Definition: padstack.h:168
double chamfered_rect_ratio
Size of chamfer: ratio of smallest of X,Y size.
Definition: padstack.h:181
double round_rect_radius_ratio
Definition: padstack.h:180
PAD_SHAPE shape
Shape of the pad.
Definition: padstack.h:166
PAD_SHAPE anchor_shape
Shape of the anchor when shape == PAD_SHAPE::CUSTOM.
Definition: padstack.h:167