KiCad PCB EDA Suite
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
pad.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) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25#pragma once
26
27#include <mutex>
28#include <array>
29
31#include <core/arraydim.h>
32#include <core/mirror.h>
33#include <geometry/eda_angle.h>
36#include <lset.h>
37#include <padstack.h>
38#include <zones.h>
39
40class PCB_SHAPE;
41class SHAPE;
42class SHAPE_SEGMENT;
43
44class LINE_READER;
45class EDA_3D_CANVAS;
46class FOOTPRINT;
47
48namespace KIGFX
49{
50 class VIEW;
51}
52
54{
55public:
56 PAD( FOOTPRINT* parent );
57
58 // Copy constructor & operator= are needed because the list of basic shapes
59 // must be duplicated in copy.
60 PAD( const PAD& aPad );
61 PAD& operator=( const PAD &aOther );
62
63 void CopyFrom( const BOARD_ITEM* aOther ) override;
64
65 void Serialize( google::protobuf::Any &aContainer ) const override;
66 bool Deserialize( const google::protobuf::Any &aContainer ) override;
67
68 /*
69 * Default layers used for pads, according to the pad type.
70 *
71 * This is default values only, they can be changed for a given pad.
72 */
73 static LSET PTHMask();
74 static LSET SMDMask();
75 static LSET ConnSMDMask();
77 static LSET UnplatedHoleMask();
78 static LSET ApertureMask();
79
80 static inline bool ClassOf( const EDA_ITEM* aItem )
81 {
82 return aItem && PCB_PAD_T == aItem->Type();
83 }
84
85 bool IsType( const std::vector<KICAD_T>& aScanTypes ) const override
86 {
87 if( BOARD_CONNECTED_ITEM::IsType( aScanTypes ) )
88 return true;
89
90 for( KICAD_T scanType : aScanTypes )
91 {
92 if( HasHole() )
93 {
94 if( scanType == PCB_LOCATE_HOLE_T )
95 return true;
96 else if( scanType == PCB_LOCATE_PTH_T && m_attribute != PAD_ATTRIB::NPTH )
97 return true;
98 else if( scanType == PCB_LOCATE_NPTH_T && m_attribute == PAD_ATTRIB::NPTH )
99 return true;
100 }
101 }
102
103 return false;
104 }
105
106 bool HasHole() const override
107 {
108 return GetDrillSizeX() > 0 && GetDrillSizeY() > 0;
109 }
110
111 bool HasDrilledHole() const override
112 {
113 return HasHole() && GetDrillSizeX() == GetDrillSizeY();
114 }
115
116 bool IsLocked() const override;
117
125 void ImportSettingsFrom( const PAD& aMasterPad );
126
130 bool IsFlipped() const;
131
135 void SetNumber( const wxString& aNumber ) { m_number = aNumber; }
136 const wxString& GetNumber() const { return m_number; }
137
141 bool CanHaveNumber() const;
142
146 void SetPinFunction( const wxString& aName ) { m_pinFunction = aName; }
147 const wxString& GetPinFunction() const { return m_pinFunction; }
148
152 void SetPinType( const wxString& aType ) { m_pinType = aType; }
153 const wxString& GetPinType() const { return m_pinType; }
154
159 bool SameLogicalPadAs( const PAD* aOther ) const
160 {
161 // hide tricks behind sensible API
162 return GetParentFootprint() == aOther->GetParentFootprint()
163 && !m_number.IsEmpty() && m_number == aOther->m_number;
164 }
165
169 bool SharesNetTieGroup( const PAD* aOther ) const;
170
175 bool IsNoConnectPad() const;
176
181 bool IsFreePad() const;
182
186 void SetShape( PCB_LAYER_ID aLayer, PAD_SHAPE aShape )
187 {
188 m_padStack.SetShape( aShape, aLayer );
189 SetDirty();
190 }
191
195 PAD_SHAPE GetShape( PCB_LAYER_ID aLayer ) const { return m_padStack.Shape( aLayer ); }
196
197 // Used for the properties panel, which does not support padstacks at the moment
198 void SetFrontShape( PAD_SHAPE aShape );
199
201
202 void SetPosition( const VECTOR2I& aPos ) override
203 {
204 m_pos = aPos;
205 SetDirty();
206 }
207
208 VECTOR2I GetPosition() const override { return m_pos; }
209
214 {
215 return m_padStack.AnchorShape( aLayer );
216 }
217
222 {
224 }
225
232 {
234 }
235
243 {
244 m_padStack.SetAnchorShape( aShape == PAD_SHAPE::RECTANGLE
245 ? PAD_SHAPE::RECTANGLE
246 : PAD_SHAPE::CIRCLE,
247 aLayer );
248 SetDirty();
249 }
250
254 bool IsOnCopperLayer() const override;
255
256 void SetY( int y ) { m_pos.y = y; SetDirty(); }
257 void SetX( int x ) { m_pos.x = x; SetDirty(); }
258
259 void SetSize( PCB_LAYER_ID aLayer, const VECTOR2I& aSize )
260 {
261 m_padStack.SetSize( aSize, aLayer );
262 SetDirty();
263 }
264 const VECTOR2I& GetSize( PCB_LAYER_ID aLayer ) const { return m_padStack.Size( aLayer ); }
265
266 // These accessors are for the properties panel, which does not have the ability to deal with
267 // custom padstacks where the properties can vary by layer. The properties should be disabled
268 // in the GUI when the padstack mode is set to anything other than NORMAL, but so that the code
269 // compiles, these are set up to work with the front layer (in other words, assume the mode is
270 // NORMAL, where F_Cu stores the whole padstack data)
271 void SetSizeX( const int aX )
272 {
273 if( aX > 0 )
274 {
276 SetDirty();
277 }
278 }
279
280 int GetSizeX() const { return m_padStack.Size( PADSTACK::ALL_LAYERS ).x; }
281
282 void SetSizeY( const int aY )
283 {
284 if( aY > 0 )
285 {
287 SetDirty();
288 }
289 }
290
291 int GetSizeY() const { return m_padStack.Size( PADSTACK::ALL_LAYERS ).y; }
292
293 void SetDelta( PCB_LAYER_ID aLayer, const VECTOR2I& aSize )
294 {
295 m_padStack.TrapezoidDeltaSize( aLayer ) = aSize;
296 SetDirty();
297 }
298
299 const VECTOR2I& GetDelta( PCB_LAYER_ID aLayer ) const
300 {
301 return m_padStack.TrapezoidDeltaSize( aLayer );
302 }
303
304 void SetDrillSize( const VECTOR2I& aSize ) { m_padStack.Drill().size = aSize; SetDirty(); }
305 const VECTOR2I& GetDrillSize() const { return m_padStack.Drill().size; }
306 void SetDrillSizeX( const int aX );
307 int GetDrillSizeX() const { return m_padStack.Drill().size.x; }
308 void SetDrillSizeY( const int aY ) { m_padStack.Drill().size.y = aY; SetDirty(); }
309 int GetDrillSizeY() const { return m_padStack.Drill().size.y; }
310
311 void SetOffset( PCB_LAYER_ID aLayer, const VECTOR2I& aOffset )
312 {
313 m_padStack.Offset( aLayer ) = aOffset;
314 SetDirty();
315 }
316
317 const VECTOR2I& GetOffset( PCB_LAYER_ID aLayer ) const { return m_padStack.Offset( aLayer ); }
318
319 VECTOR2I GetCenter() const override { return GetPosition(); }
320
321 const PADSTACK& Padstack() const { return m_padStack; }
323 void SetPadstack( const PADSTACK& aPadstack ) { m_padStack = aPadstack; }
324
336 void AddPrimitivePoly( PCB_LAYER_ID aLayer, const SHAPE_POLY_SET& aPoly, int aThickness,
337 bool aFilled );
338 void AddPrimitivePoly( PCB_LAYER_ID aLayer, const std::vector<VECTOR2I>& aPoly, int aThickness,
339 bool aFilled );
340
353 void MergePrimitivesAsPolygon( PCB_LAYER_ID aLayer, SHAPE_POLY_SET* aMergedPolygon,
354 ERROR_LOC aErrorLoc = ERROR_INSIDE ) const;
355
361
365 const std::vector<std::shared_ptr<PCB_SHAPE>>& GetPrimitives( PCB_LAYER_ID aLayer ) const
366 {
367 return m_padStack.Primitives( aLayer );
368 }
369
370 void Flip( const VECTOR2I& VECTOR2I, FLIP_DIRECTION aFlipDirection ) override;
371
376 void FlipPrimitives( FLIP_DIRECTION aFlipDirection );
377
382 void ReplacePrimitives( PCB_LAYER_ID aLayer,
383 const std::vector<std::shared_ptr<PCB_SHAPE>>& aPrimitivesList );
384
389 void AppendPrimitives( PCB_LAYER_ID aLayer,
390 const std::vector<std::shared_ptr<PCB_SHAPE>>& aPrimitivesList );
391
395 void AddPrimitive( PCB_LAYER_ID aLayer, PCB_SHAPE* aPrimitive );
396
402 void SetOrientation( const EDA_ANGLE& aAngle );
403 void SetFPRelativeOrientation( const EDA_ANGLE& aAngle );
404
410
411 // For property system
412 void SetOrientationDegrees( double aOrientation )
413 {
414 SetOrientation( EDA_ANGLE( aOrientation, DEGREES_T ) );
415 }
417 {
419 }
420
421 void SetDrillShape( PAD_DRILL_SHAPE aShape );
423
424 bool IsDirty() const
425 {
427 }
428
429 void SetDirty()
430 {
431 m_shapesDirty = true;
434 }
435
436 void SetLayerSet( const LSET& aLayers ) override { m_padStack.SetLayerSet( aLayers ); SetDirty(); }
437 LSET GetLayerSet() const override { return m_padStack.LayerSet(); }
438
439 void SetAttribute( PAD_ATTRIB aAttribute );
441
442 void SetProperty( PAD_PROP aProperty );
443 PAD_PROP GetProperty() const { return m_property; }
444
445 // We don't currently have an attribute for APERTURE, and adding one will change the file
446 // format, so for now just infer a copper-less pad to be an APERTURE pad.
447 bool IsAperturePad() const
448 {
449 return ( m_padStack.LayerSet() & LSET::AllCuMask() ).none();
450 }
451
452 void SetPadToDieLength( int aLength ) { m_lengthPadToDie = aLength; }
453 int GetPadToDieLength() const { return m_lengthPadToDie; }
454
455 std::optional<int> GetLocalClearance() const override { return m_padStack.Clearance(); }
456 void SetLocalClearance( std::optional<int> aClearance ) { m_padStack.Clearance() = aClearance; }
457
458 std::optional<int> GetLocalSolderMaskMargin() const { return m_padStack.SolderMaskMargin(); }
459 void SetLocalSolderMaskMargin( std::optional<int> aMargin )
460 {
463 }
464
465 std::optional<int> GetLocalSolderPasteMargin() const { return m_padStack.SolderPasteMargin(); }
466 void SetLocalSolderPasteMargin( std::optional<int> aMargin )
467 {
470 }
471
472 std::optional<double> GetLocalSolderPasteMarginRatio() const
473 {
475 }
476 void SetLocalSolderPasteMarginRatio( std::optional<double> aRatio )
477 {
480 }
481
484 {
485 return m_padStack.ZoneConnection().value_or( ZONE_CONNECTION::INHERITED );
486 }
487
495 int GetOwnClearance( PCB_LAYER_ID aLayer, wxString* aSource = nullptr ) const override;
496
506 void TransformShapeToPolygon( SHAPE_POLY_SET& aBuffer, PCB_LAYER_ID aLayer, int aClearance,
507 int aMaxError, ERROR_LOC aErrorLoc = ERROR_INSIDE,
508 bool ignoreLineWidth = false ) const override;
509
519 bool TransformHoleToPolygon( SHAPE_POLY_SET& aBuffer, int aClearance, int aError,
520 ERROR_LOC aErrorLoc = ERROR_INSIDE ) const;
521
536 virtual std::shared_ptr<SHAPE>
538 FLASHING flashPTHPads = FLASHING::DEFAULT ) const override;
539
540 const std::shared_ptr<SHAPE_POLY_SET>& GetEffectivePolygon( PCB_LAYER_ID aLayer,
541 ERROR_LOC aErrorLoc = ERROR_INSIDE ) const;
542
546 std::shared_ptr<SHAPE_SEGMENT> GetEffectiveHoleShape() const override;
547
553 int GetBoundingRadius() const;
554
561 std::optional<int> GetLocalClearance( wxString* aSource ) const override;
562
569 std::optional<int> GetClearanceOverrides( wxString* aSource ) const override;
570
581 int GetSolderMaskExpansion( PCB_LAYER_ID aLayer ) const;
582
595
596 ZONE_CONNECTION GetZoneConnectionOverrides( wxString* aSource = nullptr ) const;
597
602 void SetLocalThermalSpokeWidthOverride( std::optional<int> aWidth )
603 {
604 m_padStack.ThermalSpokeWidth() = aWidth;
605 }
606 std::optional<int> GetLocalThermalSpokeWidthOverride() const
607 {
609 }
610
611 int GetLocalSpokeWidthOverride( wxString* aSource = nullptr ) const;
612
618 void SetThermalSpokeAngle( const EDA_ANGLE& aAngle )
619 {
621 }
623 {
625 }
626
627 // For property system
628 void SetThermalSpokeAngleDegrees( double aAngle )
629 {
631 }
633 {
635 }
636
637 void SetThermalGap( int aGap ) { m_padStack.ThermalGap() = aGap; }
638 int GetThermalGap() const { return m_padStack.ThermalGap().value_or( 0 ); }
639
640 int GetLocalThermalGapOverride( wxString* aSource ) const;
641
642 std::optional<int> GetLocalThermalGapOverride() const
643 {
644 return m_padStack.ThermalGap();
645 }
646 void SetLocalThermalGapOverride( const std::optional<int>& aOverride )
647 {
648 m_padStack.ThermalGap() = aOverride;
649 }
650
656 void SetRoundRectCornerRadius( PCB_LAYER_ID aLayer, double aRadius );
657 int GetRoundRectCornerRadius( PCB_LAYER_ID aLayer ) const;
658
659 VECTOR2I ShapePos( PCB_LAYER_ID aLayer ) const;
660
667 void SetRoundRectRadiusRatio( PCB_LAYER_ID aLayer, double aRadiusScale );
669 {
670 return m_padStack.RoundRectRadiusRatio( aLayer );
671 }
672
673 // For properties panel, which only supports normal padstacks
674 void SetFrontRoundRectRadiusRatio( double aRadiusScale );
676 {
678 }
679
680 // For properties panel, which only supports normal padstacks
681 void SetFrontRoundRectRadiusSize( int aRadius );
682 int GetFrontRoundRectRadiusSize() const;
683
690 void SetChamferRectRatio( PCB_LAYER_ID aLayer, double aChamferScale );
691 double GetChamferRectRatio( PCB_LAYER_ID aLayer ) const
692 {
693 return m_padStack.ChamferRatio( aLayer );
694 }
695
703 void SetChamferPositions( PCB_LAYER_ID aLayer, int aPositions )
704 {
705 m_padStack.SetChamferPositions( aPositions, aLayer );
706 }
707
709 {
710 return m_padStack.ChamferPositions( aLayer );
711 }
712
716 int GetSubRatsnest() const { return m_subRatsnest; }
717 void SetSubRatsnest( int aSubRatsnest ) { m_subRatsnest = aSubRatsnest; }
718
724 void SetRemoveUnconnected( bool aSet )
725 {
729 }
730
732 {
734 }
735
740 void SetKeepTopBottom( bool aSet )
741 {
745 }
746
747 bool GetKeepTopBottom() const
748 {
751 }
752
754 {
756 }
757
759 {
761 }
762
764 {
766 {
768 return false;
769
771 return true;
772
774 {
775 if( aLayer == m_padStack.Drill().start || aLayer == m_padStack.Drill().end )
776 return false;
777 }
778 }
779
780 return true;
781 }
782
783 void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
784
785 bool IsOnLayer( PCB_LAYER_ID aLayer ) const override
786 {
787 return m_padStack.LayerSet().test( aLayer );
788 }
789
798 bool FlashLayer( int aLayer, bool aOnlyCheckIfPermitted = false ) const;
799
800 bool CanFlashLayer( int aLayer )
801 {
802 return FlashLayer( aLayer, true );
803 }
804
805 PCB_LAYER_ID GetLayer() const override;
806
811
819 bool FlashLayer( const LSET& aLayers ) const;
820
821 bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override;
822 bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override;
823
824
832 std::vector<PCB_SHAPE*> Recombine( bool aIsDryRun, int aMaxError );
833
834 wxString GetClass() const override
835 {
836 return wxT( "PAD" );
837 }
838
842 const BOX2I GetBoundingBox() const override;
843
850 static int Compare( const PAD* aPadRef, const PAD* aPadCmp );
851
852 void Move( const VECTOR2I& aMoveVector ) override
853 {
854 m_pos += aMoveVector;
855 SetDirty();
856 }
857
858 void Rotate( const VECTOR2I& aRotCentre, const EDA_ANGLE& aAngle ) override;
859
860 wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider, bool aFull ) const override;
861
862 BITMAPS GetMenuImage() const override;
863
867 wxString ShowPadShape( PCB_LAYER_ID aLayer ) const;
868
872 wxString ShowPadAttr() const;
873
874 EDA_ITEM* Clone() const override;
875
881 PAD* ClonePad() const
882 {
883 return (PAD*) Clone();
884 }
885
890 void BuildEffectiveShapes() const;
891 void BuildEffectivePolygon( ERROR_LOC aErrorLoc = ERROR_INSIDE ) const;
892
893 virtual std::vector<int> ViewGetLayers() const override;
894
895 double ViewGetLOD( int aLayer, const KIGFX::VIEW* aView ) const override;
896
897 virtual const BOX2I ViewBBox() const override;
898
900
902
903 void SetZoneLayerOverride( PCB_LAYER_ID aLayer, ZONE_LAYER_OVERRIDE aOverride );
904
905 void CheckPad( UNITS_PROVIDER* aUnitsProvider, bool aForPadProperties,
906 const std::function<void( int aErrorCode,
907 const wxString& aMsg )>& aErrorHandler ) const;
908
909 double Similarity( const BOARD_ITEM& aOther ) const override;
910
911 bool operator==( const PAD& aOther ) const;
912 bool operator==( const BOARD_ITEM& aBoardItem ) const override;
913
914#if defined(DEBUG)
915 virtual void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
916#endif
917
918protected:
919 virtual void swapData( BOARD_ITEM* aImage ) override;
920
921private:
922 const SHAPE_COMPOUND& buildEffectiveShape( PCB_LAYER_ID aLayer ) const;
923
924 void doCheckPad( PCB_LAYER_ID aLayer, UNITS_PROVIDER* aUnitsProvider, bool aForPadProperties,
925 const std::function<void( int aErrorCode,
926 const wxString& aMsg )>& aErrorHandler ) const;
927
928private:
929 wxString m_number; // Pad name (pin number in schematic)
930 wxString m_pinFunction; // Pin name in schematic
931 wxString m_pinType; // Pin electrical type in schematic
932
933 VECTOR2I m_pos; // Pad Position on board
934
936
937 // Must be set to true to force rebuild shapes to draw (after geometry change for instance)
938 typedef std::map<PCB_LAYER_ID, std::shared_ptr<SHAPE_COMPOUND>> LAYER_SHAPE_MAP;
939 mutable bool m_shapesDirty;
940 mutable std::mutex m_shapesBuildingLock;
943 mutable std::shared_ptr<SHAPE_SEGMENT> m_effectiveHoleShape;
944
945 typedef std::map<PCB_LAYER_ID, std::array<std::shared_ptr<SHAPE_POLY_SET>, 2>> LAYER_POLYGON_MAP;
946 mutable bool m_polyDirty[2];
947 mutable std::mutex m_polyBuildingLock;
950 // Last zoom level used to draw the pad: the LAYER_PAD_HOLEWALLS layer shape
951 // depend on the zoom level. So keep trace on the last used zoom level
952 mutable double m_lastGalZoomLevel;
953
954 int m_subRatsnest; // Variable used to handle subnet (block) number in
955 // ratsnest computations
956
957 PAD_ATTRIB m_attribute = PAD_ATTRIB::PTH;
958
959 PAD_PROP m_property; // Property in fab files (BGA, FIDUCIAL, TESTPOINT, etc.)
960
961 int m_lengthPadToDie; // Length net from pad to die, inside the package
962
963 mutable std::mutex m_zoneLayerOverridesMutex;
964 std::map<PCB_LAYER_ID, ZONE_LAYER_OVERRIDE> m_zoneLayerOverrides;
965};
ERROR_LOC
When approximating an arc or circle, should the error be placed on the outside or inside of the curve...
Definition: approximation.h:32
@ ERROR_OUTSIDE
Definition: approximation.h:33
@ ERROR_INSIDE
Definition: approximation.h:34
BITMAPS
A list of all bitmap identifiers.
Definition: bitmaps_list.h:33
ZONE_LAYER_OVERRIDE
Conditionally flashed vias and pads that interact with zones of different priority can be very squirr...
Definition: board_item.h:66
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:78
FOOTPRINT * GetParentFootprint() const
Definition: board_item.cpp:305
Implement a canvas based on a wxGLCanvas.
Definition: eda_3d_canvas.h:51
double AsDegrees() const
Definition: eda_angle.h:113
The base class for create windows for drawing purpose.
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:95
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:107
virtual bool IsType(const std::vector< KICAD_T > &aScanTypes) const
Check whether the item is one of the listed types.
Definition: eda_item.h:180
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
Definition: view.h:67
An abstract class from which implementation specific LINE_READERs may be derived to read single lines...
Definition: richio.h:93
LSET is a set of PCB_LAYER_IDs.
Definition: lset.h:37
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:572
A PADSTACK defines the characteristics of a single or multi-layer pad, in the IPC sense of the word.
Definition: padstack.h:124
CUSTOM_SHAPE_ZONE_MODE CustomShapeInZoneMode() const
Definition: padstack.h:340
void SetCustomShapeInZoneMode(CUSTOM_SHAPE_ZONE_MODE aM)
Definition: padstack.h:341
std::optional< int > & Clearance(PCB_LAYER_ID aLayer=F_Cu)
Definition: padstack.cpp:1181
std::optional< double > & SolderPasteMarginRatio(PCB_LAYER_ID aLayer=F_Cu)
Definition: padstack.cpp:1220
void SetThermalSpokeAngle(EDA_ANGLE aAngle, PCB_LAYER_ID aLayer=F_Cu)
Definition: padstack.cpp:1289
void SetUnconnectedLayerMode(UNCONNECTED_LAYER_MODE aMode)
Definition: padstack.h:313
std::optional< int > & ThermalSpokeWidth(PCB_LAYER_ID aLayer=F_Cu)
Definition: padstack.cpp:1246
std::optional< int > & SolderPasteMargin(PCB_LAYER_ID aLayer=F_Cu)
Definition: padstack.cpp:1207
std::optional< int > & SolderMaskMargin(PCB_LAYER_ID aLayer=F_Cu)
Definition: padstack.cpp:1193
const LSET & LayerSet() const
Definition: padstack.h:280
void SetShape(PAD_SHAPE aShape, PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1053
VECTOR2I & TrapezoidDeltaSize(PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1110
VECTOR2I & Offset(PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1086
EDA_ANGLE ThermalSpokeAngle(PCB_LAYER_ID aLayer=F_Cu) const
Definition: padstack.cpp:1281
void SetChamferPositions(int aPositions, PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1175
UNCONNECTED_LAYER_MODE UnconnectedLayerMode() const
Definition: padstack.h:312
std::optional< int > & ThermalGap(PCB_LAYER_ID aLayer=F_Cu)
Definition: padstack.cpp:1258
PAD_SHAPE Shape(PCB_LAYER_ID aLayer) const
Definition: padstack.cpp:1047
DRILL_PROPS & Drill()
Definition: padstack.h:306
void SetAnchorShape(PAD_SHAPE aShape, PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1104
CUSTOM_SHAPE_ZONE_MODE
Definition: padstack.h:158
int & ChamferPositions(PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1163
const VECTOR2I & Size(PCB_LAYER_ID aLayer) const
Definition: padstack.cpp:1068
double RoundRectRadiusRatio(PCB_LAYER_ID aLayer) const
Definition: padstack.cpp:1122
UNCONNECTED_LAYER_MODE
! Whether or not to remove the copper shape for unconnected layers
Definition: padstack.h:151
PAD_SHAPE AnchorShape(PCB_LAYER_ID aLayer) const
Definition: padstack.cpp:1098
void SetSize(const VECTOR2I &aSize, PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1059
double ChamferRatio(PCB_LAYER_ID aLayer) const
Definition: padstack.cpp:1151
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:299
void SetLayerSet(const LSET &aSet)
Definition: padstack.h:282
std::optional< ZONE_CONNECTION > & ZoneConnection(PCB_LAYER_ID aLayer=F_Cu)
Definition: padstack.cpp:1234
std::vector< std::shared_ptr< PCB_SHAPE > > & Primitives(PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1295
Definition: pad.h:54
void SetAnchorPadShape(PCB_LAYER_ID aLayer, PAD_SHAPE aShape)
Set the shape of the anchor pad for custom shaped pads.
Definition: pad.h:242
bool IsAperturePad() const
Definition: pad.h:447
void SetAttribute(PAD_ATTRIB aAttribute)
Definition: pad.cpp:858
int GetOwnClearance(PCB_LAYER_ID aLayer, wxString *aSource=nullptr) const override
Return the pad's "own" clearance in internal units.
Definition: pad.cpp:1126
void CheckPad(UNITS_PROVIDER *aUnitsProvider, bool aForPadProperties, const std::function< void(int aErrorCode, const wxString &aMsg)> &aErrorHandler) const
Definition: pad.cpp:2209
virtual void swapData(BOARD_ITEM *aImage) override
Definition: pad.cpp:1928
PAD_PROP GetProperty() const
Definition: pad.h:443
bool GetRemoveUnconnected() const
Definition: pad.h:731
void Serialize(google::protobuf::Any &aContainer) const override
Serializes this object to the given Any message.
Definition: pad.cpp:151
double GetFrontRoundRectRadiusRatio() const
Definition: pad.h:675
void doCheckPad(PCB_LAYER_ID aLayer, UNITS_PROVIDER *aUnitsProvider, bool aForPadProperties, const std::function< void(int aErrorCode, const wxString &aMsg)> &aErrorHandler) const
Definition: pad.cpp:2319
std::optional< int > GetClearanceOverrides(wxString *aSource) const override
Return any clearance overrides set in the "classic" (ie: pre-rule) system.
Definition: pad.cpp:1114
void SetPinType(const wxString &aType)
Set the pad electrical type.
Definition: pad.h:152
LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
Definition: pad.h:437
const std::vector< std::shared_ptr< PCB_SHAPE > > & GetPrimitives(PCB_LAYER_ID aLayer) const
Accessor to the basic shape list for custom-shaped pads.
Definition: pad.h:365
const ZONE_LAYER_OVERRIDE & GetZoneLayerOverride(PCB_LAYER_ID aLayer) const
Definition: pad.cpp:214
int GetSizeX() const
Definition: pad.h:280
void MergePrimitivesAsPolygon(PCB_LAYER_ID aLayer, SHAPE_POLY_SET *aMergedPolygon, ERROR_LOC aErrorLoc=ERROR_INSIDE) const
Merge all basic shapes to a SHAPE_POLY_SET.
Definition: pad.cpp:2620
int GetRoundRectCornerRadius(PCB_LAYER_ID aLayer) const
Definition: pad.cpp:455
bool FlashLayer(int aLayer, bool aOnlyCheckIfPermitted=false) const
Check to see whether the pad should be flashed on the specific layer.
Definition: pad.cpp:355
void SetLocalThermalGapOverride(const std::optional< int > &aOverride)
Definition: pad.h:646
bool IsDirty() const
Definition: pad.h:424
virtual std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer, FLASHING flashPTHPads=FLASHING::DEFAULT) const override
Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
Definition: pad.cpp:525
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
Definition: pad.cpp:1299
const BOX2I GetBoundingBox() const override
The bounding box is cached, so this will be efficient most of the time.
Definition: pad.cpp:849
bool IsOnLayer(PCB_LAYER_ID aLayer) const override
Test to see if this object is on the given layer.
Definition: pad.h:785
int GetDrillSizeY() const
Definition: pad.h:309
std::map< PCB_LAYER_ID, std::shared_ptr< SHAPE_COMPOUND > > LAYER_SHAPE_MAP
Definition: pad.h:938
void AddPrimitivePoly(PCB_LAYER_ID aLayer, const SHAPE_POLY_SET &aPoly, int aThickness, bool aFilled)
Has meaning only for custom shape pads.
Definition: pad.cpp:2528
std::optional< double > GetLocalSolderPasteMarginRatio() const
Definition: pad.h:472
void SetFrontShape(PAD_SHAPE aShape)
Definition: pad.cpp:906
const wxString & GetPinType() const
Definition: pad.h:153
void SetZoneLayerOverride(PCB_LAYER_ID aLayer, ZONE_LAYER_OVERRIDE aOverride)
Definition: pad.cpp:224
const VECTOR2I & GetDrillSize() const
Definition: pad.h:305
PAD_ATTRIB GetAttribute() const
Definition: pad.h:440
static LSET PTHMask()
layer set for a through hole pad
Definition: pad.cpp:284
static int Compare(const PAD *aPadRef, const PAD *aPadCmp)
Compare two pads and return 0 if they are equal.
Definition: pad.cpp:1514
void SetUnconnectedLayerMode(PADSTACK::UNCONNECTED_LAYER_MODE aMode)
Definition: pad.h:753
void SetRemoveUnconnected(bool aSet)
Definition: pad.h:724
const wxString & GetPinFunction() const
Definition: pad.h:147
std::mutex m_shapesBuildingLock
Definition: pad.h:940
void SetThermalGap(int aGap)
Definition: pad.h:637
bool CanHaveNumber() const
Indicates whether or not the pad can have a number.
Definition: pad.cpp:231
void SetThermalSpokeAngle(const EDA_ANGLE &aAngle)
The orientation of the thermal spokes.
Definition: pad.h:618
wxString m_pinType
Definition: pad.h:931
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
Definition: pad.cpp:176
const wxString & GetNumber() const
Definition: pad.h:136
double ViewGetLOD(int aLayer, const KIGFX::VIEW *aView) const override
Return the level of detail (LOD) of the item.
Definition: pad.cpp:1752
const VECTOR2I & GetDelta(PCB_LAYER_ID aLayer) const
Definition: pad.h:299
void SetFrontRoundRectRadiusRatio(double aRadiusScale)
Definition: pad.cpp:475
void BuildEffectiveShapes() const
Rebuild the effective shape cache (and bounding box and radius) for the pad and clears the dirty bit.
Definition: pad.cpp:600
PAD_SHAPE GetFrontShape() const
Definition: pad.h:200
static bool ClassOf(const EDA_ITEM *aItem)
Definition: pad.h:80
void CopyFrom(const BOARD_ITEM *aOther) override
Definition: pad.cpp:144
void SetLocalSolderPasteMarginRatio(std::optional< double > aRatio)
Definition: pad.h:476
PAD & operator=(const PAD &aOther)
Definition: pad.cpp:127
void SetLocalThermalSpokeWidthOverride(std::optional< int > aWidth)
Set the width of the thermal spokes connecting the pad to a zone.
Definition: pad.h:602
void SetShape(PCB_LAYER_ID aLayer, PAD_SHAPE aShape)
Set the new shape of this pad.
Definition: pad.h:186
std::shared_ptr< SHAPE_SEGMENT > m_effectiveHoleShape
Definition: pad.h:943
bool IsLocked() const override
Definition: pad.cpp:245
VECTOR2I GetCenter() const override
This defaults to the center of the bounding box if not overridden.
Definition: pad.h:319
VECTOR2I GetPosition() const override
Definition: pad.h:208
void SetProperty(PAD_PROP aProperty)
Definition: pad.cpp:925
void SetThermalSpokeAngleDegrees(double aAngle)
Definition: pad.h:628
EDA_ANGLE GetThermalSpokeAngle() const
Definition: pad.h:622
std::map< PCB_LAYER_ID, ZONE_LAYER_OVERRIDE > m_zoneLayerOverrides
Definition: pad.h:964
bool ConditionallyFlashed(PCB_LAYER_ID aLayer) const
Definition: pad.h:763
PAD_ATTRIB m_attribute
Definition: pad.h:957
void Flip(const VECTOR2I &VECTOR2I, FLIP_DIRECTION aFlipDirection) override
Flip this object, i.e.
Definition: pad.cpp:958
void Move(const VECTOR2I &aMoveVector) override
Move this object.
Definition: pad.h:852
std::vector< PCB_SHAPE * > Recombine(bool aIsDryRun, int aMaxError)
Recombines the pad with other graphical shapes in the footprint.
Definition: pad.cpp:2060
PCB_LAYER_ID GetPrincipalLayer() const
Definition: pad.cpp:333
void SetDirty()
Definition: pad.h:429
static LSET UnplatedHoleMask()
layer set for a mechanical unplated through hole pad
Definition: pad.cpp:305
void SetDelta(PCB_LAYER_ID aLayer, const VECTOR2I &aSize)
Definition: pad.h:293
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
Definition: pad.cpp:1662
std::map< PCB_LAYER_ID, std::array< std::shared_ptr< SHAPE_POLY_SET >, 2 > > LAYER_POLYGON_MAP
Definition: pad.h:945
double GetOrientationDegrees() const
Definition: pad.h:416
bool SameLogicalPadAs(const PAD *aOther) const
Before we had custom pad shapes it was common to have multiple overlapping pads to represent a more c...
Definition: pad.h:159
void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
Definition: pad.cpp:1529
PADSTACK m_padStack
Definition: pad.h:935
void FlipPrimitives(FLIP_DIRECTION aFlipDirection)
Flip (mirror) the primitives left to right or top to bottom, around the anchor position in custom pad...
Definition: pad.cpp:1025
LAYER_SHAPE_MAP m_effectiveShapes
Definition: pad.h:942
bool IsNoConnectPad() const
Definition: pad.cpp:271
int GetDrillSizeX() const
Definition: pad.h:307
PAD_PROP m_property
Definition: pad.h:959
double GetRoundRectRadiusRatio(PCB_LAYER_ID aLayer) const
Definition: pad.h:668
void SetKeepTopBottom(bool aSet)
Definition: pad.h:740
void DeletePrimitivesList(PCB_LAYER_ID aLayer=UNDEFINED_LAYER)
Clear the basic shapes list.
Definition: pad.cpp:2601
PAD_SHAPE GetShape(PCB_LAYER_ID aLayer) const
Definition: pad.h:195
void TransformShapeToPolygon(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aMaxError, ERROR_LOC aErrorLoc=ERROR_INSIDE, bool ignoreLineWidth=false) const override
Convert the pad shape to a closed polygon.
Definition: pad.cpp:1953
PADSTACK & Padstack()
Definition: pad.h:322
void SetNumber(const wxString &aNumber)
Set the pad number (note that it can be alphanumeric, such as the array reference "AA12").
Definition: pad.h:135
void SetFrontRoundRectRadiusSize(int aRadius)
Definition: pad.cpp:485
wxString ShowPadAttr() const
Definition: pad.cpp:1554
wxString m_pinFunction
Definition: pad.h:930
void AddPrimitive(PCB_LAYER_ID aLayer, PCB_SHAPE *aPrimitive)
Add item to the custom shape primitives list.
Definition: pad.cpp:2592
void SetDrillShape(PAD_DRILL_SHAPE aShape)
Definition: pad.cpp:444
int m_effectiveBoundingRadius
Definition: pad.h:949
void SetLocalSolderMaskMargin(std::optional< int > aMargin)
Definition: pad.h:459
void SetOffset(PCB_LAYER_ID aLayer, const VECTOR2I &aOffset)
Definition: pad.h:311
bool GetKeepTopBottom() const
Definition: pad.h:747
void SetLocalZoneConnection(ZONE_CONNECTION aType)
Definition: pad.h:482
void SetChamferRectRatio(PCB_LAYER_ID aLayer, double aChamferScale)
Has meaning only for chamfered rectangular pads.
Definition: pad.cpp:505
int GetSolderMaskExpansion(PCB_LAYER_ID aLayer) const
Definition: pad.cpp:1152
std::optional< int > GetLocalClearance() const override
Return any local clearances set in the "classic" (ie: pre-rule) system.
Definition: pad.h:455
void ImportSettingsFrom(const PAD &aMasterPad)
Import the pad settings from aMasterPad.
Definition: pad.cpp:1857
double Similarity(const BOARD_ITEM &aOther) const override
Return a measure of how likely the other object is to represent the same object.
Definition: pad.cpp:2504
bool IsOnCopperLayer() const override
Definition: pad.cpp:1058
void SetDrillSizeX(const int aX)
Definition: pad.cpp:433
void SetPadstack(const PADSTACK &aPadstack)
Definition: pad.h:323
void SetPosition(const VECTOR2I &aPos) override
Definition: pad.h:202
const SHAPE_COMPOUND & buildEffectiveShape(PCB_LAYER_ID aLayer) const
Definition: pad.cpp:646
const PADSTACK & Padstack() const
Definition: pad.h:321
const VECTOR2I & GetOffset(PCB_LAYER_ID aLayer) const
Definition: pad.h:317
VECTOR2I m_pos
Definition: pad.h:933
double m_lastGalZoomLevel
Definition: pad.h:952
void BuildEffectivePolygon(ERROR_LOC aErrorLoc=ERROR_INSIDE) const
Definition: pad.cpp:802
static LSET ConnSMDMask()
layer set for a SMD pad on Front layer used for edge board connectors
Definition: pad.cpp:298
void SetDrillSize(const VECTOR2I &aSize)
Definition: pad.h:304
bool IsFreePad() const
Definition: pad.cpp:277
wxString GetClass() const override
Return the class name.
Definition: pad.h:834
bool CanFlashLayer(int aLayer)
Definition: pad.h:800
int m_subRatsnest
Definition: pad.h:954
EDA_ANGLE GetOrientation() const
Return the rotation angle of the pad.
Definition: pad.h:408
void SetSize(PCB_LAYER_ID aLayer, const VECTOR2I &aSize)
Definition: pad.h:259
PADSTACK::CUSTOM_SHAPE_ZONE_MODE GetCustomShapeInZoneOpt() const
Definition: pad.h:221
PAD_DRILL_SHAPE GetDrillShape() const
Definition: pad.h:422
void ReplacePrimitives(PCB_LAYER_ID aLayer, const std::vector< std::shared_ptr< PCB_SHAPE > > &aPrimitivesList)
Clear the current custom shape primitives list and import a new list.
Definition: pad.cpp:2569
int GetChamferPositions(PCB_LAYER_ID aLayer) const
Definition: pad.h:708
void SetY(int y)
Definition: pad.h:256
static LSET ApertureMask()
layer set for an aperture pad
Definition: pad.cpp:312
virtual const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
Definition: pad.cpp:1822
bool m_shapesDirty
Definition: pad.h:939
std::mutex m_polyBuildingLock
Definition: pad.h:947
void SetRoundRectCornerRadius(PCB_LAYER_ID aLayer, double aRadius)
Has meaning only for rounded rectangle pads.
Definition: pad.cpp:461
static LSET SMDMask()
layer set for a SMD pad on Front layer
Definition: pad.cpp:291
std::optional< int > GetLocalSolderPasteMargin() const
Definition: pad.h:465
int GetFrontRoundRectRadiusSize() const
Definition: pad.cpp:495
const std::shared_ptr< SHAPE_POLY_SET > & GetEffectivePolygon(PCB_LAYER_ID aLayer, ERROR_LOC aErrorLoc=ERROR_INSIDE) const
Definition: pad.cpp:513
void SetX(int x)
Definition: pad.h:257
void SetChamferPositions(PCB_LAYER_ID aLayer, int aPositions)
Has meaning only for chamfered rectangular pads.
Definition: pad.h:703
std::optional< int > GetLocalSolderMaskMargin() const
Definition: pad.h:458
void SetLocalSolderPasteMargin(std::optional< int > aMargin)
Definition: pad.h:466
int GetSizeY() const
Definition: pad.h:291
std::optional< int > GetLocalThermalGapOverride() const
Definition: pad.h:642
PCB_LAYER_ID GetLayer() const override
Return the primary layer this item is on.
Definition: pad.cpp:327
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
Definition: pad.cpp:1567
void SetPinFunction(const wxString &aName)
Set the pad function (pin name in schematic)
Definition: pad.h:146
EDA_ANGLE GetFPRelativeOrientation() const
Definition: pad.cpp:949
double GetChamferRectRatio(PCB_LAYER_ID aLayer) const
Definition: pad.h:691
bool m_polyDirty[2]
Definition: pad.h:946
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
Definition: pad.cpp:1432
void SetFPRelativeOrientation(const EDA_ANGLE &aAngle)
Definition: pad.cpp:940
void SetCustomShapeInZoneOpt(PADSTACK::CUSTOM_SHAPE_ZONE_MODE aOption)
Set the option for the custom pad shape to use as clearance area in copper zones.
Definition: pad.h:231
int GetBoundingRadius() const
Return the radius of a minimum sized circle which fully encloses this pad.
Definition: pad.cpp:591
void ClearZoneLayerOverrides()
Definition: pad.cpp:205
void SetOrientation(const EDA_ANGLE &aAngle)
Set the rotation angle of the pad.
Definition: pad.cpp:933
std::mutex m_zoneLayerOverridesMutex
Definition: pad.h:963
std::optional< int > GetLocalThermalSpokeWidthOverride() const
Definition: pad.h:606
PADSTACK::UNCONNECTED_LAYER_MODE GetUnconnectedLayerMode() const
Definition: pad.h:758
VECTOR2I GetSolderPasteMargin(PCB_LAYER_ID aLayer) const
Usually < 0 (mask shape smaller than pad)because the margin can be dependent on the pad size,...
Definition: pad.cpp:1198
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
Definition: pad.cpp:1656
void AppendPrimitives(PCB_LAYER_ID aLayer, const std::vector< std::shared_ptr< PCB_SHAPE > > &aPrimitivesList)
Import a custom shape primitive list (composed of basic shapes) and add items to the current list.
Definition: pad.cpp:2582
wxString m_number
Definition: pad.h:929
bool HasDrilledHole() const override
Definition: pad.h:111
LAYER_POLYGON_MAP m_effectivePolygons
Definition: pad.h:948
void SetLocalClearance(std::optional< int > aClearance)
Definition: pad.h:456
int GetSubRatsnest() const
Definition: pad.h:716
void SetSizeX(const int aX)
Definition: pad.h:271
ZONE_CONNECTION GetLocalZoneConnection() const
Definition: pad.h:483
int m_lengthPadToDie
Definition: pad.h:961
bool HasHole() const override
Definition: pad.h:106
void SetDrillSizeY(const int aY)
Definition: pad.h:308
double GetThermalSpokeAngleDegrees() const
Definition: pad.h:632
PAD * ClonePad() const
Same as Clone, but returns a PAD item.
Definition: pad.h:881
int GetThermalGap() const
Definition: pad.h:638
VECTOR2I ShapePos(PCB_LAYER_ID aLayer) const
Definition: pad.cpp:1043
std::shared_ptr< SHAPE_SEGMENT > GetEffectiveHoleShape() const override
Return a SHAPE_SEGMENT object representing the pad's hole.
Definition: pad.cpp:582
void SetOrientationDegrees(double aOrientation)
Definition: pad.h:412
ZONE_CONNECTION GetZoneConnectionOverrides(wxString *aSource=nullptr) const
Definition: pad.cpp:1261
void SetLayerSet(const LSET &aLayers) override
Definition: pad.h:436
bool SharesNetTieGroup(const PAD *aOther) const
Definition: pad.cpp:254
PAD_SHAPE GetAnchorPadShape(PCB_LAYER_ID aLayer) const
Definition: pad.h:213
void SetRoundRectRadiusRatio(PCB_LAYER_ID aLayer, double aRadiusScale)
Has meaning only for rounded rectangle pads.
Definition: pad.cpp:467
void SetSubRatsnest(int aSubRatsnest)
Definition: pad.h:717
int GetLocalSpokeWidthOverride(wxString *aSource=nullptr) const
Definition: pad.cpp:1281
bool TransformHoleToPolygon(SHAPE_POLY_SET &aBuffer, int aClearance, int aError, ERROR_LOC aErrorLoc=ERROR_INSIDE) const
Build the corner list of the polygonal drill shape in the board coordinate system.
Definition: pad.cpp:1936
void SetPadToDieLength(int aLength)
Definition: pad.h:452
bool IsFlipped() const
Definition: pad.cpp:319
bool operator==(const PAD &aOther) const
Definition: pad.cpp:2489
bool IsType(const std::vector< KICAD_T > &aScanTypes) const override
Check whether the item is one of the listed types.
Definition: pad.h:85
wxString ShowPadShape(PCB_LAYER_ID aLayer) const
Definition: pad.cpp:1538
void SetSizeY(const int aY)
Definition: pad.h:282
int GetPadToDieLength() const
Definition: pad.h:453
BOX2I m_effectiveBoundingBox
Definition: pad.h:941
const VECTOR2I & GetSize(PCB_LAYER_ID aLayer) const
Definition: pad.h:264
virtual std::vector< int > ViewGetLayers() const override
Return the all the layers within the VIEW the object is painted on.
Definition: pad.cpp:1680
Represent a set of closed polygons.
An abstract shape on 2D plane.
Definition: shape.h:126
@ DEGREES_T
Definition: eda_angle.h:31
FLASHING
Enum used during connectivity building to ensure we do not query connectivity while building the data...
Definition: layer_ids.h:184
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:60
@ F_Paste
Definition: layer_ids.h:104
@ B_Mask
Definition: layer_ids.h:98
@ F_Mask
Definition: layer_ids.h:97
@ B_Paste
Definition: layer_ids.h:105
@ UNDEFINED_LAYER
Definition: layer_ids.h:61
@ F_Cu
Definition: layer_ids.h:64
FLIP_DIRECTION
Definition: mirror.h:27
The Cairo implementation of the graphics abstraction layer.
Definition: color4d.cpp:247
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
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
PCB_LAYER_ID start
Definition: padstack.h:245
PCB_LAYER_ID end
Definition: padstack.h:246
VECTOR2I size
Drill diameter (x == y) or slot dimensions (x != y)
Definition: padstack.h:243
PAD_DRILL_SHAPE shape
Definition: padstack.h:244
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition: typeinfo.h:78
@ PCB_LOCATE_NPTH_T
Definition: typeinfo.h:129
@ PCB_LOCATE_PTH_T
Definition: typeinfo.h:128
@ PCB_PAD_T
class PAD, a pad in a footprint
Definition: typeinfo.h:87
@ PCB_LOCATE_HOLE_T
Definition: typeinfo.h:127
ZONE_CONNECTION
How pads are covered by copper in zone.
Definition: zones.h:47