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 The 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
39namespace kiapi::board::types
40{
41 class PadStack;
42 class PadStackLayer;
43}
44
45
51enum class PAD_SHAPE : int
52{
54 RECTANGLE, // do not use just RECT: it collides in a header on MSYS2
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
74
82
90
96enum class PAD_ATTRIB
97{
105};
106
107
125
126
134
135
141
142
156class PADSTACK : public SERIALIZABLE
157{
158public:
161 enum class TYPE
162 {
166 };
167
175
177 static constexpr PCB_LAYER_ID ALL_LAYERS = F_Cu;
178
180 static constexpr PCB_LAYER_ID INNER_LAYERS = In1_Cu;
181
185 {
189
190 /*
191 * Most of the time the hole is the center of the shape (m_Offset = 0). But some designers
192 * use oblong/rect pads with a hole moved to one of the oblong/rect pad shape ends.
193 * In all cases the hole is at the pad position. This offset is from the hole to the center
194 * of the pad shape (ie: the copper area around the hole).
195 * ShapePos() returns the board shape position according to the offset and the pad rotation.
196 */
198
202
208
209 SHAPE_PROPS();
210 bool operator==( const SHAPE_PROPS& aOther ) const;
211 int Compare( const SHAPE_PROPS& aOther ) const;
212 };
213
227 {
229 std::optional<ZONE_CONNECTION> zone_connection;
230 std::optional<int> thermal_spoke_width;
231 std::optional<EDA_ANGLE> thermal_spoke_angle;
232 std::optional<int> thermal_gap;
233 std::optional<int> clearance;
234
235 /*
236 * Editing definitions of primitives for custom pad shapes. In local coordinates relative
237 * to m_Pos (NOT shapePos) at orient 0.
238 */
239 std::vector<std::shared_ptr<PCB_SHAPE>> custom_shapes;
240
241 bool operator==( const COPPER_LAYER_PROPS& aOther ) const;
242 int Compare( const COPPER_LAYER_PROPS& aOther ) const;
243
244 double Similarity( const COPPER_LAYER_PROPS& aOther ) const;
245 };
246
250 {
251 std::optional<int> solder_mask_margin;
252 std::optional<int> solder_paste_margin;
253 std::optional<double> solder_paste_margin_ratio;
254
255 std::optional<bool> has_solder_mask;
256 std::optional<bool> has_solder_paste;
257 std::optional<bool> has_covering;
258 std::optional<bool> has_plugging;
259
260 bool operator==( const MASK_LAYER_PROPS& aOther ) const;
261 int Compare( const MASK_LAYER_PROPS& aOther ) const;
262 };
263
266 {
271
272 std::optional<bool> is_filled;
273 std::optional<bool> is_capped;
274
275 bool operator==( const DRILL_PROPS& aOther ) const;
276 int Compare( const DRILL_PROPS& aOther ) const;
277 };
278
280 {
281 std::optional<PAD_DRILL_POST_MACHINING_MODE> mode;
282 int size = 0;
283 int depth = 0;
284 int angle = 0;
285
286 bool operator==( const POST_MACHINING_PROPS& aOther ) const;
287 int Compare( const POST_MACHINING_PROPS& aOther ) const;
288 };
289
290public:
291 PADSTACK( BOARD_ITEM* aParent );
292 virtual ~PADSTACK() = default;
293 PADSTACK( const PADSTACK& aOther );
294 PADSTACK& operator=( const PADSTACK &aOther );
295
296 bool operator==( const PADSTACK& aOther ) const;
297 bool operator!=( const PADSTACK& aOther ) const { return !operator==( aOther ); }
298
299 void Serialize( google::protobuf::Any &aContainer ) const override;
300 bool Deserialize( const google::protobuf::Any &aContainer ) override;
301
308 static int Compare( const PADSTACK* aPadstackRef, const PADSTACK* aPadstackCmp );
309
314 bool HasExplicitDefinitionForLayer( PCB_LAYER_ID aLayer ) const;
315
320 double Similarity( const PADSTACK& aOther ) const;
321
322 const LSET& LayerSet() const { return m_layerSet; }
323 LSET& LayerSet() { return m_layerSet; }
324 void SetLayerSet( const LSET& aSet ) { m_layerSet = aSet; }
325
330 void FlipLayers( BOARD* aBoard );
331
332 PCB_LAYER_ID StartLayer() const;
333 PCB_LAYER_ID EndLayer() const;
334
335 MODE Mode() const { return m_mode; }
336 void SetMode( MODE aMode );
337
339 wxString Name() const;
340
343 {
344 m_orientation = aAngle;
345 m_orientation.Normalize();
346 }
347
348 DRILL_PROPS& Drill() { return m_drill; }
349 const DRILL_PROPS& Drill() const { return m_drill; }
350
352 const DRILL_PROPS& SecondaryDrill() const { return m_secondaryDrill; }
353
355 const DRILL_PROPS& TertiaryDrill() const { return m_tertiaryDrill; }
356
359
362
365
366 COPPER_LAYER_PROPS& CopperLayer( PCB_LAYER_ID aLayer );
367 const COPPER_LAYER_PROPS& CopperLayer( PCB_LAYER_ID aLayer ) const;
368
371
374
381 std::optional<bool> IsTented( PCB_LAYER_ID aSide ) const;
382
383 std::optional<bool> IsCovered( PCB_LAYER_ID aSide ) const;
384
385 std::optional<bool> IsPlugged( PCB_LAYER_ID aSide ) const;
386
387 std::optional<bool> IsCapped() const;
388
389 std::optional<bool> IsFilled() const;
390
393
400 void ForEachUniqueLayer( const std::function<void( PCB_LAYER_ID )>& aMethod ) const;
401
402 std::vector<PCB_LAYER_ID> UniqueLayers() const;
403
414
420 LSET RelevantShapeLayers( const PADSTACK& aOther ) const;
421
422 // The following section has convenience getters for the padstack properties on a given layer.
423
424 PAD_SHAPE Shape( PCB_LAYER_ID aLayer ) const;
425 void SetShape( PAD_SHAPE aShape, PCB_LAYER_ID aLayer );
426
427 // Setter rather than direct access to enforce only positive sizes
428 void SetSize( const VECTOR2I& aSize, PCB_LAYER_ID aLayer );
429 const VECTOR2I& Size( PCB_LAYER_ID aLayer ) const;
430
432 void SetDrillShape( PAD_DRILL_SHAPE aShape );
433
434 VECTOR2I& Offset( PCB_LAYER_ID aLayer );
435 const VECTOR2I& Offset( PCB_LAYER_ID aLayer ) const;
436
437 PAD_SHAPE AnchorShape( PCB_LAYER_ID aLayer ) const;
438 void SetAnchorShape( PAD_SHAPE aShape, PCB_LAYER_ID aLayer );
439
441 const VECTOR2I& TrapezoidDeltaSize( PCB_LAYER_ID aLayer ) const;
442
443 double RoundRectRadiusRatio( PCB_LAYER_ID aLayer ) const;
444 void SetRoundRectRadiusRatio( double aRatio, PCB_LAYER_ID aLayer );
445
446 int RoundRectRadius( PCB_LAYER_ID aLayer ) const;
447 void SetRoundRectRadius( double aRadius, PCB_LAYER_ID aLayer );
448
449 double ChamferRatio( PCB_LAYER_ID aLayer ) const;
450 void SetChamferRatio( double aRatio, PCB_LAYER_ID aLayer );
451
452 int& ChamferPositions( PCB_LAYER_ID aLayer );
453 const int& ChamferPositions( PCB_LAYER_ID aLayer ) const;
454 void SetChamferPositions( int aPositions, PCB_LAYER_ID aLayer );
455
456 std::optional<int>& Clearance( PCB_LAYER_ID aLayer = F_Cu );
457 const std::optional<int>& Clearance( PCB_LAYER_ID aLayer = F_Cu ) const;
458
459 std::optional<int>& SolderMaskMargin( PCB_LAYER_ID aLayer = F_Cu );
460 const std::optional<int>& SolderMaskMargin( PCB_LAYER_ID aLayer = F_Cu ) const;
461
462 std::optional<int>& SolderPasteMargin( PCB_LAYER_ID aLayer = F_Cu );
463 const std::optional<int>& SolderPasteMargin( PCB_LAYER_ID aLayer = F_Cu ) const;
464
465 std::optional<double>& SolderPasteMarginRatio( PCB_LAYER_ID aLayer = F_Cu );
466 const std::optional<double>& SolderPasteMarginRatio( PCB_LAYER_ID aLayer = F_Cu ) const;
467
468 std::optional<ZONE_CONNECTION>& ZoneConnection( PCB_LAYER_ID aLayer = F_Cu );
469 const std::optional<ZONE_CONNECTION>& ZoneConnection( PCB_LAYER_ID aLayer = F_Cu ) const;
470
471 std::optional<int>& ThermalSpokeWidth( PCB_LAYER_ID aLayer = F_Cu );
472 const std::optional<int>& ThermalSpokeWidth( PCB_LAYER_ID aLayer = F_Cu ) const;
473
474 std::optional<int>& ThermalGap( PCB_LAYER_ID aLayer = F_Cu );
475 const std::optional<int>& ThermalGap( PCB_LAYER_ID aLayer = F_Cu ) const;
476
479 void SetThermalSpokeAngle( EDA_ANGLE aAngle, PCB_LAYER_ID aLayer = F_Cu );
480
481 std::vector<std::shared_ptr<PCB_SHAPE>>& Primitives( PCB_LAYER_ID aLayer );
482 const std::vector<std::shared_ptr<PCB_SHAPE>>& Primitives( PCB_LAYER_ID aLayer ) const;
483
489 void AddPrimitive( PCB_SHAPE* aShape, PCB_LAYER_ID aLayer );
490
496 void AppendPrimitives( const std::vector<std::shared_ptr<PCB_SHAPE>>& aPrimitivesList,
497 PCB_LAYER_ID aLayer );
498
505 void ReplacePrimitives( const std::vector<std::shared_ptr<PCB_SHAPE>>& aPrimitivesList,
506 PCB_LAYER_ID aLayer );
507
508 void ClearPrimitives( PCB_LAYER_ID aLayer );
509
511 void SetBackdrillMode( BACKDRILL_MODE aMode );
512
513 std::optional<int> GetBackdrillSize( bool aTop ) const;
514 void SetBackdrillSize( bool aTop, std::optional<int> aSize );
515
516 PCB_LAYER_ID GetBackdrillEndLayer( bool aTop ) const;
517 void SetBackdrillEndLayer( bool aTop, PCB_LAYER_ID aLayer );
518
519private:
520 void packCopperLayer( PCB_LAYER_ID aLayer, kiapi::board::types::PadStack& aProto ) const;
521
522 bool unpackCopperLayer( const kiapi::board::types::PadStackLayer& aProto );
523
526
529
532
534 wxString m_customName;
535
538
540 //COPPER_LAYER_PROPS m_defaultCopperProps;
541 std::unordered_map<PCB_LAYER_ID, COPPER_LAYER_PROPS> m_copperProps;
542
545
548
550
557
561
564
567
570};
571
572#ifndef SWIG
576#endif
577
578
579#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:83
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:322
Represent basic circle geometry with utility geometry functions.
Definition circle.h:33
LSET is a set of PCB_LAYER_IDs.
Definition lset.h:37
A PADSTACK defines the characteristics of a single or multi-layer pad, in the IPC sense of the word.
Definition padstack.h:157
std::optional< bool > IsFilled() const
const DRILL_PROPS & Drill() const
Definition padstack.h:349
bool operator==(const PADSTACK &aOther) const
Definition padstack.cpp:129
CUSTOM_SHAPE_ZONE_MODE CustomShapeInZoneMode() const
Definition padstack.h:391
void SetCustomShapeInZoneMode(CUSTOM_SHAPE_ZONE_MODE aM)
Definition padstack.h:392
std::optional< int > & Clearance(PCB_LAYER_ID aLayer=F_Cu)
Definition padstack.cpp:998
void AddPrimitive(PCB_SHAPE *aShape, PCB_LAYER_ID aLayer)
Adds a custom shape primitive to the padstack.
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 ...
void SetBackdrillMode(BACKDRILL_MODE aMode)
Definition padstack.cpp:494
void packCopperLayer(PCB_LAYER_ID aLayer, kiapi::board::types::PadStack &aProto) const
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
Definition padstack.cpp:234
MASK_LAYER_PROPS & FrontOuterLayers()
Definition padstack.h:369
double Similarity(const PADSTACK &aOther) const
Return a measure of how likely the other object is to represent the same object.
int RoundRectRadius(PCB_LAYER_ID aLayer) const
Definition padstack.cpp:951
void SetDrillShape(PAD_DRILL_SHAPE aShape)
Definition padstack.cpp:897
std::optional< double > & SolderPasteMarginRatio(PCB_LAYER_ID aLayer=F_Cu)
wxString m_customName
! An override for the IPC-7351 padstack name
Definition padstack.h:534
void SetBackdrillSize(bool aTop, std::optional< int > aSize)
Definition padstack.cpp:554
DRILL_PROPS m_drill
!
Definition padstack.h:560
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::...
void SetThermalSpokeAngle(EDA_ANGLE aAngle, PCB_LAYER_ID aLayer=F_Cu)
void SetRoundRectRadiusRatio(double aRatio, PCB_LAYER_ID aLayer)
Definition padstack.cpp:945
UNCONNECTED_LAYER_MODE m_unconnectedLayerMode
Definition padstack.h:549
void ClearPrimitives(PCB_LAYER_ID aLayer)
void SetUnconnectedLayerMode(UNCONNECTED_LAYER_MODE aMode)
Definition padstack.h:364
bool HasExplicitDefinitionForLayer(PCB_LAYER_ID aLayer) const
Check if the padstack has an explicit definition for the given layer.
std::optional< bool > IsTented(PCB_LAYER_ID aSide) const
Checks if this padstack is tented (covered in soldermask) on the given side.
void SetMode(MODE aMode)
std::optional< int > & ThermalSpokeWidth(PCB_LAYER_ID aLayer=F_Cu)
std::optional< int > & SolderPasteMargin(PCB_LAYER_ID aLayer=F_Cu)
void FlipLayers(BOARD *aBoard)
Flips the padstack layers in the case that the pad's parent footprint is flipped to the other side of...
POST_MACHINING_PROPS m_backPostMachining
Definition padstack.h:569
void SetOrientation(EDA_ANGLE aAngle)
Definition padstack.h:342
const MASK_LAYER_PROPS & BackOuterLayers() const
Definition padstack.h:373
std::optional< int > & SolderMaskMargin(PCB_LAYER_ID aLayer=F_Cu)
void SetChamferRatio(double aRatio, PCB_LAYER_ID aLayer)
Definition padstack.cpp:974
const LSET & LayerSet() const
Definition padstack.h:322
PCB_LAYER_ID EffectiveLayerFor(PCB_LAYER_ID aLayer) const
Determines which geometry layer should be used for the given input layer.
PADSTACK & operator=(const PADSTACK &aOther)
Definition padstack.cpp:81
void SetShape(PAD_SHAPE aShape, PCB_LAYER_ID aLayer)
Definition padstack.cpp:885
LSET & LayerSet()
Definition padstack.h:323
EDA_ANGLE DefaultThermalSpokeAngleForShape(PCB_LAYER_ID aLayer=F_Cu) const
VECTOR2I & TrapezoidDeltaSize(PCB_LAYER_ID aLayer)
Definition padstack.cpp:927
DRILL_PROPS m_secondaryDrill
! Secondary drill, used to define back-drilling starting from the bottom side
Definition padstack.h:563
VECTOR2I & Offset(PCB_LAYER_ID aLayer)
Definition padstack.cpp:903
MASK_LAYER_PROPS m_backMaskProps
! The overrides applied to back outer technical layers
Definition padstack.h:547
COPPER_LAYER_PROPS & CopperLayer(PCB_LAYER_ID aLayer)
const POST_MACHINING_PROPS & BackPostMachining() const
Definition padstack.h:361
EDA_ANGLE ThermalSpokeAngle(PCB_LAYER_ID aLayer=F_Cu) const
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:556
bool unpackCopperLayer(const kiapi::board::types::PadStackLayer &aProto)
Definition padstack.cpp:183
PAD_DRILL_SHAPE DrillShape() const
Definition padstack.cpp:891
void SetChamferPositions(int aPositions, PCB_LAYER_ID aLayer)
Definition padstack.cpp:992
POST_MACHINING_PROPS & FrontPostMachining()
Definition padstack.h:357
DRILL_PROPS m_tertiaryDrill
! Tertiary drill, used to define back-drilling starting from the top side
Definition padstack.h:566
void SetRoundRectRadius(double aRadius, PCB_LAYER_ID aLayer)
Definition padstack.cpp:958
std::optional< bool > IsPlugged(PCB_LAYER_ID aSide) const
const MASK_LAYER_PROPS & FrontOuterLayers() const
Definition padstack.h:370
UNCONNECTED_LAYER_MODE UnconnectedLayerMode() const
Definition padstack.h:363
LSET RelevantShapeLayers(const PADSTACK &aOther) const
Returns the set of layers that must be considered if checking one padstack against another.
std::optional< int > & ThermalGap(PCB_LAYER_ID aLayer=F_Cu)
DRILL_PROPS & TertiaryDrill()
Definition padstack.h:354
PAD_SHAPE Shape(PCB_LAYER_ID aLayer) const
Definition padstack.cpp:879
DRILL_PROPS & Drill()
Definition padstack.h:348
void SetAnchorShape(PAD_SHAPE aShape, PCB_LAYER_ID aLayer)
Definition padstack.cpp:921
BOARD_ITEM * m_parent
! The BOARD_ITEM this PADSTACK belongs to; will be used as the parent for owned shapes
Definition padstack.h:525
PADSTACK(BOARD_ITEM *aParent)
Definition padstack.cpp:40
const POST_MACHINING_PROPS & FrontPostMachining() const
Definition padstack.h:358
std::optional< bool > IsCapped() const
std::vector< PCB_LAYER_ID > UniqueLayers() const
void SetBackdrillEndLayer(bool aTop, PCB_LAYER_ID aLayer)
Definition padstack.cpp:611
LSET m_layerSet
! The board layers that this padstack is active on
Definition padstack.h:531
std::optional< int > GetBackdrillSize(bool aTop) const
Definition padstack.cpp:538
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:541
BACKDRILL_MODE GetBackdrillMode() const
Definition padstack.cpp:463
static int Compare(const PADSTACK *aPadstackRef, const PADSTACK *aPadstackCmp)
Compare two padstacks and return 0 if they are equal.
PCB_LAYER_ID EndLayer() const
const DRILL_PROPS & SecondaryDrill() const
Definition padstack.h:352
std::optional< bool > IsCovered(PCB_LAYER_ID aSide) const
int & ChamferPositions(PCB_LAYER_ID aLayer)
Definition padstack.cpp:980
MASK_LAYER_PROPS m_frontMaskProps
! The overrides applied to front outer technical layers
Definition padstack.h:544
const VECTOR2I & Size(PCB_LAYER_ID aLayer) const
Definition padstack.cpp:873
virtual ~PADSTACK()=default
MODE
! Copper geometry mode: controls how many unique copper layer shapes this padstack has
Definition padstack.h:170
@ CUSTOM
Shapes can be defined on arbitrary layers.
Definition padstack.h:173
@ FRONT_INNER_BACK
Up to three shapes can be defined (F_Cu, inner copper layers, B_Cu)
Definition padstack.h:172
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.
DRILL_PROPS & SecondaryDrill()
Definition padstack.h:351
double RoundRectRadiusRatio(PCB_LAYER_ID aLayer) const
Definition padstack.cpp:939
PCB_LAYER_ID GetBackdrillEndLayer(bool aTop) const
Definition padstack.cpp:595
PCB_LAYER_ID StartLayer() const
POST_MACHINING_PROPS & BackPostMachining()
Definition padstack.h:360
POST_MACHINING_PROPS m_frontPostMachining
Definition padstack.h:568
MODE Mode() const
Definition padstack.h:335
bool operator!=(const PADSTACK &aOther) const
Definition padstack.h:297
PAD_SHAPE AnchorShape(PCB_LAYER_ID aLayer) const
Definition padstack.cpp:915
MASK_LAYER_PROPS & BackOuterLayers()
Definition padstack.h:372
void Serialize(google::protobuf::Any &aContainer) const override
Serializes this object to the given Any message.
Definition padstack.cpp:632
wxString Name() const
! Returns the name of this padstack in IPC-7351 format
void SetSize(const VECTOR2I &aSize, PCB_LAYER_ID aLayer)
Definition padstack.cpp:859
const DRILL_PROPS & TertiaryDrill() const
Definition padstack.h:355
double ChamferRatio(PCB_LAYER_ID aLayer) const
Definition padstack.cpp:968
static constexpr PCB_LAYER_ID ALL_LAYERS
! Temporary layer identifier to identify code that is not padstack-aware
Definition padstack.h:177
EDA_ANGLE GetOrientation() const
Definition padstack.h:341
static constexpr PCB_LAYER_ID INNER_LAYERS
! The layer identifier to use for "inner layers" on top/inner/bottom padstacks
Definition padstack.h:180
void SetLayerSet(const LSET &aSet)
Definition padstack.h:324
std::optional< ZONE_CONNECTION > & ZoneConnection(PCB_LAYER_ID aLayer=F_Cu)
@ NORMAL
Padstack for a footprint pad.
Definition padstack.h:163
@ MOUNTING
A mounting hole (plated or unplated, not associated with a footprint)
Definition padstack.h:165
@ VIA
Padstack for a via.
Definition padstack.h:164
MODE m_mode
! The copper layer variation mode this padstack is in
Definition padstack.h:528
EDA_ANGLE m_orientation
! The rotation of the pad relative to an outer reference frame
Definition padstack.h:537
std::vector< std::shared_ptr< PCB_SHAPE > > & Primitives(PCB_LAYER_ID aLayer)
A round rectangle shape, based on a rectangle and a radius.
Definition roundrect.h:36
Interface for objects that can be serialized to Protobuf messages.
@ NONE
Definition eda_shape.h:69
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_POST_MACHINING_MODE
Definition padstack.h:76
PAD_DRILL_SHAPE
The set of pad drill shapes, used with PAD::{Set,Get}DrillShape()
Definition padstack.h:69
CUSTOM_SHAPE_ZONE_MODE
Definition padstack.h:137
PAD_ATTRIB
The set of pad shapes, used with PAD::{Set,Get}Attribute().
Definition padstack.h:97
@ NPTH
like PAD_PTH, but not plated mechanical use only, no connection allowed
Definition padstack.h:103
@ SMD
Smd pad, appears on the solder paste layer (default)
Definition padstack.h:99
@ PTH
Plated through hole pad.
Definition padstack.h:98
@ CONN
Like smd, does not appear on the solder paste layer (default) Note: also has a special attribute in G...
Definition padstack.h:100
BACKDRILL_MODE
Definition padstack.h:84
PAD_SHAPE
The set of pad shapes, used with PAD::{Set,Get}Shape()
Definition padstack.h:52
@ CHAMFERED_RECT
Definition padstack.h:60
@ TRAPEZOID
Definition padstack.h:56
PAD_PROP
The set of pad properties used in Gerber files (Draw files, and P&P files) to define some properties ...
Definition padstack.h:114
@ FIDUCIAL_LOCAL
a fiducial (usually a smd) local to the parent footprint
Definition padstack.h:118
@ FIDUCIAL_GLBL
a fiducial (usually a smd) for the full board
Definition padstack.h:117
@ MECHANICAL
a pad used for mechanical support
Definition padstack.h:122
@ PRESSFIT
a PTH with a hole diameter with tight tolerances for press fit pin
Definition padstack.h:123
@ HEATSINK
a pad used as heat sink, usually in SMD footprints
Definition padstack.h:120
@ TESTPOINT
a test point pad
Definition padstack.h:119
@ CASTELLATED
a pad with a castellated through hole
Definition padstack.h:121
@ BGA
Smd pad, used in BGA footprints.
Definition padstack.h:116
UNCONNECTED_LAYER_MODE
Definition padstack.h:128
#define DECLARE_ENUM_TO_WXANY(type)
Definition property.h:787
The features of a padstack that can vary between copper layers All parameters are optional; leaving t...
Definition padstack.h:227
double Similarity(const COPPER_LAYER_PROPS &aOther) const
std::optional< ZONE_CONNECTION > zone_connection
Definition padstack.h:229
int Compare(const COPPER_LAYER_PROPS &aOther) const
std::optional< int > thermal_spoke_width
Definition padstack.h:230
std::vector< std::shared_ptr< PCB_SHAPE > > custom_shapes
Definition padstack.h:239
bool operator==(const COPPER_LAYER_PROPS &aOther) const
std::optional< EDA_ANGLE > thermal_spoke_angle
Definition padstack.h:231
std::optional< int > clearance
Definition padstack.h:233
std::optional< int > thermal_gap
Definition padstack.h:232
! The properties of a padstack drill. Drill position is always the pad position (origin).
Definition padstack.h:266
PCB_LAYER_ID start
Definition padstack.h:269
PCB_LAYER_ID end
Definition padstack.h:270
bool operator==(const DRILL_PROPS &aOther) const
VECTOR2I size
Drill diameter (x == y) or slot dimensions (x != y)
Definition padstack.h:267
std::optional< bool > is_capped
True if the drill hole should be capped.
Definition padstack.h:273
std::optional< bool > is_filled
True if the drill hole should be filled completely.
Definition padstack.h:272
PAD_DRILL_SHAPE shape
Definition padstack.h:268
int Compare(const DRILL_PROPS &aOther) const
bool operator==(const MASK_LAYER_PROPS &aOther) const
std::optional< int > solder_mask_margin
Definition padstack.h:251
int Compare(const MASK_LAYER_PROPS &aOther) const
std::optional< bool > has_covering
True if the pad on this side should have covering.
Definition padstack.h:257
std::optional< int > solder_paste_margin
Definition padstack.h:252
std::optional< double > solder_paste_margin_ratio
Definition padstack.h:253
std::optional< bool > has_solder_mask
True if this outer layer has mask (is not tented)
Definition padstack.h:255
std::optional< bool > has_solder_paste
True if this outer layer has solder paste.
Definition padstack.h:256
std::optional< bool > has_plugging
True if the drill hole should be plugged on this side.
Definition padstack.h:258
std::optional< PAD_DRILL_POST_MACHINING_MODE > mode
Definition padstack.h:281
bool operator==(const POST_MACHINING_PROPS &aOther) const
int Compare(const POST_MACHINING_PROPS &aOther) const
VECTOR2I trapezoid_delta_size
Delta for PAD_SHAPE::TRAPEZOID; half the delta squeezes one end and half expands the other.
Definition padstack.h:207
int Compare(const SHAPE_PROPS &aOther) const
VECTOR2I offset
Offset of the shape center from the pad center.
Definition padstack.h:197
bool operator==(const SHAPE_PROPS &aOther) const
VECTOR2I size
Size of the shape, or of the anchor pad for custom shape pads.
Definition padstack.h:188
double chamfered_rect_ratio
Size of chamfer: ratio of smallest of X,Y size.
Definition padstack.h:200
double round_rect_radius_ratio
Definition padstack.h:199
PAD_SHAPE shape
Shape of the pad.
Definition padstack.h:186
PAD_SHAPE anchor_shape
Shape of the anchor when shape == PAD_SHAPE::CUSTOM.
Definition padstack.h:187
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:695