KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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 void SetPadToDieDelay( int aDelay ) { m_delayPadToDie = aDelay; }
456 int GetPadToDieDelay() const { return m_delayPadToDie; }
457
458 std::optional<int> GetLocalClearance() const override { return m_padStack.Clearance(); }
459 void SetLocalClearance( std::optional<int> aClearance ) { m_padStack.Clearance() = aClearance; }
460
461 std::optional<int> GetLocalSolderMaskMargin() const { return m_padStack.SolderMaskMargin(); }
462 void SetLocalSolderMaskMargin( std::optional<int> aMargin )
463 {
466 }
467
468 std::optional<int> GetLocalSolderPasteMargin() const { return m_padStack.SolderPasteMargin(); }
469 void SetLocalSolderPasteMargin( std::optional<int> aMargin )
470 {
473 }
474
475 std::optional<double> GetLocalSolderPasteMarginRatio() const
476 {
478 }
479 void SetLocalSolderPasteMarginRatio( std::optional<double> aRatio )
480 {
483 }
484
487 {
488 return m_padStack.ZoneConnection().value_or( ZONE_CONNECTION::INHERITED );
489 }
490
498 int GetOwnClearance( PCB_LAYER_ID aLayer, wxString* aSource = nullptr ) const override;
499
509 void TransformShapeToPolygon( SHAPE_POLY_SET& aBuffer, PCB_LAYER_ID aLayer, int aClearance,
510 int aMaxError, ERROR_LOC aErrorLoc = ERROR_INSIDE,
511 bool ignoreLineWidth = false ) const override;
512
522 bool TransformHoleToPolygon( SHAPE_POLY_SET& aBuffer, int aClearance, int aError,
523 ERROR_LOC aErrorLoc = ERROR_INSIDE ) const;
524
539 virtual std::shared_ptr<SHAPE>
541 FLASHING flashPTHPads = FLASHING::DEFAULT ) const override;
542
543 const std::shared_ptr<SHAPE_POLY_SET>& GetEffectivePolygon( PCB_LAYER_ID aLayer,
544 ERROR_LOC aErrorLoc = ERROR_INSIDE ) const;
545
549 std::shared_ptr<SHAPE_SEGMENT> GetEffectiveHoleShape() const override;
550
556 int GetBoundingRadius() const;
557
564 std::optional<int> GetLocalClearance( wxString* aSource ) const override;
565
572 std::optional<int> GetClearanceOverrides( wxString* aSource ) const override;
573
584 int GetSolderMaskExpansion( PCB_LAYER_ID aLayer ) const;
585
598
599 ZONE_CONNECTION GetZoneConnectionOverrides( wxString* aSource = nullptr ) const;
600
605 void SetLocalThermalSpokeWidthOverride( std::optional<int> aWidth )
606 {
607 m_padStack.ThermalSpokeWidth() = aWidth;
608 }
609 std::optional<int> GetLocalThermalSpokeWidthOverride() const
610 {
612 }
613
614 int GetLocalSpokeWidthOverride( wxString* aSource = nullptr ) const;
615
621 void SetThermalSpokeAngle( const EDA_ANGLE& aAngle )
622 {
624 }
626 {
628 }
629
630 // For property system
631 void SetThermalSpokeAngleDegrees( double aAngle )
632 {
634 }
636 {
638 }
639
640 void SetThermalGap( int aGap ) { m_padStack.ThermalGap() = aGap; }
641 int GetThermalGap() const { return m_padStack.ThermalGap().value_or( 0 ); }
642
643 int GetLocalThermalGapOverride( wxString* aSource ) const;
644
645 std::optional<int> GetLocalThermalGapOverride() const
646 {
647 return m_padStack.ThermalGap();
648 }
649 void SetLocalThermalGapOverride( const std::optional<int>& aOverride )
650 {
651 m_padStack.ThermalGap() = aOverride;
652 }
653
659 void SetRoundRectCornerRadius( PCB_LAYER_ID aLayer, double aRadius );
660 int GetRoundRectCornerRadius( PCB_LAYER_ID aLayer ) const;
661
662 VECTOR2I ShapePos( PCB_LAYER_ID aLayer ) const;
663
670 void SetRoundRectRadiusRatio( PCB_LAYER_ID aLayer, double aRadiusScale );
672 {
673 return m_padStack.RoundRectRadiusRatio( aLayer );
674 }
675
676 // For properties panel, which only supports normal padstacks
677 void SetFrontRoundRectRadiusRatio( double aRadiusScale );
679 {
681 }
682
683 // For properties panel, which only supports normal padstacks
684 void SetFrontRoundRectRadiusSize( int aRadius );
685 int GetFrontRoundRectRadiusSize() const;
686
693 void SetChamferRectRatio( PCB_LAYER_ID aLayer, double aChamferScale );
694 double GetChamferRectRatio( PCB_LAYER_ID aLayer ) const
695 {
696 return m_padStack.ChamferRatio( aLayer );
697 }
698
706 void SetChamferPositions( PCB_LAYER_ID aLayer, int aPositions )
707 {
708 m_padStack.SetChamferPositions( aPositions, aLayer );
709 }
710
712 {
713 return m_padStack.ChamferPositions( aLayer );
714 }
715
719 int GetSubRatsnest() const { return m_subRatsnest; }
720 void SetSubRatsnest( int aSubRatsnest ) { m_subRatsnest = aSubRatsnest; }
721
727 void SetRemoveUnconnected( bool aSet )
728 {
732 }
733
735 {
737 }
738
743 void SetKeepTopBottom( bool aSet )
744 {
748 }
749
750 bool GetKeepTopBottom() const
751 {
754 }
755
757 {
759 }
760
762 {
764 }
765
767 {
769 {
771 return false;
772
774 return true;
775
777 {
778 if( aLayer == m_padStack.Drill().start || aLayer == m_padStack.Drill().end )
779 return false;
780 }
781 }
782
783 return true;
784 }
785
786 void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
787
788 bool IsOnLayer( PCB_LAYER_ID aLayer ) const override
789 {
790 return m_padStack.LayerSet().test( aLayer );
791 }
792
801 bool FlashLayer( int aLayer, bool aOnlyCheckIfPermitted = false ) const;
802
803 bool CanFlashLayer( int aLayer )
804 {
805 return FlashLayer( aLayer, true );
806 }
807
808 PCB_LAYER_ID GetLayer() const override;
809
814
822 bool FlashLayer( const LSET& aLayers ) const;
823
824 bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override;
825 bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override;
826
827
835 std::vector<PCB_SHAPE*> Recombine( bool aIsDryRun, int aMaxError );
836
837 wxString GetClass() const override
838 {
839 return wxT( "PAD" );
840 }
841
845 const BOX2I GetBoundingBox() const override;
846 const BOX2I GetBoundingBox( PCB_LAYER_ID aLayer ) const;
847
854 static int Compare( const PAD* aPadRef, const PAD* aPadCmp );
855
856 void Move( const VECTOR2I& aMoveVector ) override
857 {
858 m_pos += aMoveVector;
859 SetDirty();
860 }
861
862 void Rotate( const VECTOR2I& aRotCentre, const EDA_ANGLE& aAngle ) override;
863
864 wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider, bool aFull ) const override;
865
866 BITMAPS GetMenuImage() const override;
867
871 wxString ShowPadShape( PCB_LAYER_ID aLayer ) const;
872
876 wxString ShowPadAttr() const;
877
878 EDA_ITEM* Clone() const override;
879
885 PAD* ClonePad() const
886 {
887 return (PAD*) Clone();
888 }
889
894 void BuildEffectiveShapes() const;
895 void BuildEffectivePolygon( ERROR_LOC aErrorLoc = ERROR_INSIDE ) const;
896
897 virtual std::vector<int> ViewGetLayers() const override;
898
899 double ViewGetLOD( int aLayer, const KIGFX::VIEW* aView ) const override;
900
901 virtual const BOX2I ViewBBox() const override;
902
904
906
907 void SetZoneLayerOverride( PCB_LAYER_ID aLayer, ZONE_LAYER_OVERRIDE aOverride );
908
909 void CheckPad( UNITS_PROVIDER* aUnitsProvider, bool aForPadProperties,
910 const std::function<void( int aErrorCode,
911 const wxString& aMsg )>& aErrorHandler ) const;
912
913 double Similarity( const BOARD_ITEM& aOther ) const override;
914
915 bool operator==( const PAD& aOther ) const;
916 bool operator==( const BOARD_ITEM& aBoardItem ) const override;
917
918#if defined(DEBUG)
919 virtual void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
920#endif
921
922protected:
923 virtual void swapData( BOARD_ITEM* aImage ) override;
924
925private:
926 const SHAPE_COMPOUND& buildEffectiveShape( PCB_LAYER_ID aLayer ) const;
927
928 void doCheckPad( PCB_LAYER_ID aLayer, UNITS_PROVIDER* aUnitsProvider, bool aForPadProperties,
929 const std::function<void( int aErrorCode,
930 const wxString& aMsg )>& aErrorHandler ) const;
931
932private:
933 wxString m_number; // Pad name (pin number in schematic)
934 wxString m_pinFunction; // Pin name in schematic
935 wxString m_pinType; // Pin electrical type in schematic
936
937 VECTOR2I m_pos; // Pad Position on board
938
940
941 // Must be set to true to force rebuild shapes to draw (after geometry change for instance)
942 typedef std::map<PCB_LAYER_ID, std::shared_ptr<SHAPE_COMPOUND>> LAYER_SHAPE_MAP;
943 mutable bool m_shapesDirty;
944 mutable std::mutex m_shapesBuildingLock;
947 mutable std::shared_ptr<SHAPE_SEGMENT> m_effectiveHoleShape;
948
949 typedef std::map<PCB_LAYER_ID, std::array<std::shared_ptr<SHAPE_POLY_SET>, 2>> LAYER_POLYGON_MAP;
950 mutable bool m_polyDirty[2];
951 mutable std::mutex m_polyBuildingLock;
954 // Last zoom level used to draw the pad: the LAYER_PAD_HOLEWALLS layer shape
955 // depend on the zoom level. So keep trace on the last used zoom level
956 mutable double m_lastGalZoomLevel;
957
958 int m_subRatsnest; // Variable used to handle subnet (block) number in
959 // ratsnest computations
960
961 PAD_ATTRIB m_attribute = PAD_ATTRIB::PTH;
962
963 PAD_PROP m_property; // Property in fab files (BGA, FIDUCIAL, TESTPOINT, etc.)
964
965 int m_lengthPadToDie; // Length net from pad to die, inside the package
966 int m_delayPadToDie; // Propagation delay from pad to die
967
968 mutable std::mutex m_zoneLayerOverridesMutex;
969 std::map<PCB_LAYER_ID, ZONE_LAYER_OVERRIDE> m_zoneLayerOverrides;
970};
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:299
Implement a canvas based on a wxGLCanvas.
Definition: eda_3d_canvas.h:51
double AsDegrees() const
Definition: eda_angle.h:116
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:96
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:108
virtual bool IsType(const std::vector< KICAD_T > &aScanTypes) const
Check whether the item is one of the listed types.
Definition: eda_item.h:188
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:583
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:1187
std::optional< double > & SolderPasteMarginRatio(PCB_LAYER_ID aLayer=F_Cu)
Definition: padstack.cpp:1226
void SetThermalSpokeAngle(EDA_ANGLE aAngle, PCB_LAYER_ID aLayer=F_Cu)
Definition: padstack.cpp:1295
void SetUnconnectedLayerMode(UNCONNECTED_LAYER_MODE aMode)
Definition: padstack.h:313
std::optional< int > & ThermalSpokeWidth(PCB_LAYER_ID aLayer=F_Cu)
Definition: padstack.cpp:1252
std::optional< int > & SolderPasteMargin(PCB_LAYER_ID aLayer=F_Cu)
Definition: padstack.cpp:1213
std::optional< int > & SolderMaskMargin(PCB_LAYER_ID aLayer=F_Cu)
Definition: padstack.cpp:1199
const LSET & LayerSet() const
Definition: padstack.h:280
void SetShape(PAD_SHAPE aShape, PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1059
VECTOR2I & TrapezoidDeltaSize(PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1116
VECTOR2I & Offset(PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1092
EDA_ANGLE ThermalSpokeAngle(PCB_LAYER_ID aLayer=F_Cu) const
Definition: padstack.cpp:1287
void SetChamferPositions(int aPositions, PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1181
UNCONNECTED_LAYER_MODE UnconnectedLayerMode() const
Definition: padstack.h:312
std::optional< int > & ThermalGap(PCB_LAYER_ID aLayer=F_Cu)
Definition: padstack.cpp:1264
PAD_SHAPE Shape(PCB_LAYER_ID aLayer) const
Definition: padstack.cpp:1053
DRILL_PROPS & Drill()
Definition: padstack.h:306
void SetAnchorShape(PAD_SHAPE aShape, PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1110
CUSTOM_SHAPE_ZONE_MODE
Definition: padstack.h:158
int & ChamferPositions(PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1169
const VECTOR2I & Size(PCB_LAYER_ID aLayer) const
Definition: padstack.cpp:1074
double RoundRectRadiusRatio(PCB_LAYER_ID aLayer) const
Definition: padstack.cpp:1128
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:1104
void SetSize(const VECTOR2I &aSize, PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1065
double ChamferRatio(PCB_LAYER_ID aLayer) const
Definition: padstack.cpp:1157
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:1240
std::vector< std::shared_ptr< PCB_SHAPE > > & Primitives(PCB_LAYER_ID aLayer)
Definition: padstack.cpp:1301
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:867
int GetOwnClearance(PCB_LAYER_ID aLayer, wxString *aSource=nullptr) const override
Return the pad's "own" clearance in internal units.
Definition: pad.cpp:1135
void CheckPad(UNITS_PROVIDER *aUnitsProvider, bool aForPadProperties, const std::function< void(int aErrorCode, const wxString &aMsg)> &aErrorHandler) const
Definition: pad.cpp:2226
virtual void swapData(BOARD_ITEM *aImage) override
Definition: pad.cpp:1945
PAD_PROP GetProperty() const
Definition: pad.h:443
bool GetRemoveUnconnected() const
Definition: pad.h:734
void Serialize(google::protobuf::Any &aContainer) const override
Serializes this object to the given Any message.
Definition: pad.cpp:153
double GetFrontRoundRectRadiusRatio() const
Definition: pad.h:678
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:2336
std::optional< int > GetClearanceOverrides(wxString *aSource) const override
Return any clearance overrides set in the "classic" (ie: pre-rule) system.
Definition: pad.cpp:1123
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:216
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:2637
int GetRoundRectCornerRadius(PCB_LAYER_ID aLayer) const
Definition: pad.cpp:457
bool FlashLayer(int aLayer, bool aOnlyCheckIfPermitted=false) const
Check to see whether the pad should be flashed on the specific layer.
Definition: pad.cpp:357
void SetLocalThermalGapOverride(const std::optional< int > &aOverride)
Definition: pad.h:649
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:527
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:1308
const BOX2I GetBoundingBox() const override
The bounding box is cached, so this will be efficient most of the time.
Definition: pad.cpp:851
bool IsOnLayer(PCB_LAYER_ID aLayer) const override
Test to see if this object is on the given layer.
Definition: pad.h:788
int GetDrillSizeY() const
Definition: pad.h:309
std::map< PCB_LAYER_ID, std::shared_ptr< SHAPE_COMPOUND > > LAYER_SHAPE_MAP
Definition: pad.h:942
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:2545
std::optional< double > GetLocalSolderPasteMarginRatio() const
Definition: pad.h:475
void SetFrontShape(PAD_SHAPE aShape)
Definition: pad.cpp:915
const wxString & GetPinType() const
Definition: pad.h:153
void SetZoneLayerOverride(PCB_LAYER_ID aLayer, ZONE_LAYER_OVERRIDE aOverride)
Definition: pad.cpp:226
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:286
static int Compare(const PAD *aPadRef, const PAD *aPadCmp)
Compare two pads and return 0 if they are equal.
Definition: pad.cpp:1523
void SetUnconnectedLayerMode(PADSTACK::UNCONNECTED_LAYER_MODE aMode)
Definition: pad.h:756
void SetRemoveUnconnected(bool aSet)
Definition: pad.h:727
const wxString & GetPinFunction() const
Definition: pad.h:147
std::mutex m_shapesBuildingLock
Definition: pad.h:944
void SetThermalGap(int aGap)
Definition: pad.h:640
bool CanHaveNumber() const
Indicates whether or not the pad can have a number.
Definition: pad.cpp:233
void SetThermalSpokeAngle(const EDA_ANGLE &aAngle)
The orientation of the thermal spokes.
Definition: pad.h:621
wxString m_pinType
Definition: pad.h:935
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
Definition: pad.cpp:178
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:1765
const VECTOR2I & GetDelta(PCB_LAYER_ID aLayer) const
Definition: pad.h:299
void SetFrontRoundRectRadiusRatio(double aRadiusScale)
Definition: pad.cpp:477
void BuildEffectiveShapes() const
Rebuild the effective shape cache (and bounding box and radius) for the pad and clears the dirty bit.
Definition: pad.cpp:602
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:146
void SetLocalSolderPasteMarginRatio(std::optional< double > aRatio)
Definition: pad.h:479
PAD & operator=(const PAD &aOther)
Definition: pad.cpp:128
void SetLocalThermalSpokeWidthOverride(std::optional< int > aWidth)
Set the width of the thermal spokes connecting the pad to a zone.
Definition: pad.h:605
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:947
bool IsLocked() const override
Definition: pad.cpp:247
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:934
void SetThermalSpokeAngleDegrees(double aAngle)
Definition: pad.h:631
EDA_ANGLE GetThermalSpokeAngle() const
Definition: pad.h:625
std::map< PCB_LAYER_ID, ZONE_LAYER_OVERRIDE > m_zoneLayerOverrides
Definition: pad.h:969
bool ConditionallyFlashed(PCB_LAYER_ID aLayer) const
Definition: pad.h:766
PAD_ATTRIB m_attribute
Definition: pad.h:961
void Flip(const VECTOR2I &VECTOR2I, FLIP_DIRECTION aFlipDirection) override
Flip this object, i.e.
Definition: pad.cpp:967
void Move(const VECTOR2I &aMoveVector) override
Move this object.
Definition: pad.h:856
std::vector< PCB_SHAPE * > Recombine(bool aIsDryRun, int aMaxError)
Recombines the pad with other graphical shapes in the footprint.
Definition: pad.cpp:2077
PCB_LAYER_ID GetPrincipalLayer() const
Definition: pad.cpp:335
void SetDirty()
Definition: pad.h:429
static LSET UnplatedHoleMask()
layer set for a mechanical unplated through hole pad
Definition: pad.cpp:307
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:1671
std::map< PCB_LAYER_ID, std::array< std::shared_ptr< SHAPE_POLY_SET >, 2 > > LAYER_POLYGON_MAP
Definition: pad.h:949
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:1538
PADSTACK m_padStack
Definition: pad.h:939
void SetPadToDieDelay(int aDelay)
Definition: pad.h:455
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:1034
LAYER_SHAPE_MAP m_effectiveShapes
Definition: pad.h:946
bool IsNoConnectPad() const
Definition: pad.cpp:273
int GetDrillSizeX() const
Definition: pad.h:307
PAD_PROP m_property
Definition: pad.h:963
double GetRoundRectRadiusRatio(PCB_LAYER_ID aLayer) const
Definition: pad.h:671
void SetKeepTopBottom(bool aSet)
Definition: pad.h:743
void DeletePrimitivesList(PCB_LAYER_ID aLayer=UNDEFINED_LAYER)
Clear the basic shapes list.
Definition: pad.cpp:2618
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:1970
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:487
wxString ShowPadAttr() const
Definition: pad.cpp:1563
wxString m_pinFunction
Definition: pad.h:934
void AddPrimitive(PCB_LAYER_ID aLayer, PCB_SHAPE *aPrimitive)
Add item to the custom shape primitives list.
Definition: pad.cpp:2609
void SetDrillShape(PAD_DRILL_SHAPE aShape)
Definition: pad.cpp:446
int m_effectiveBoundingRadius
Definition: pad.h:953
void SetLocalSolderMaskMargin(std::optional< int > aMargin)
Definition: pad.h:462
void SetOffset(PCB_LAYER_ID aLayer, const VECTOR2I &aOffset)
Definition: pad.h:311
bool GetKeepTopBottom() const
Definition: pad.h:750
void SetLocalZoneConnection(ZONE_CONNECTION aType)
Definition: pad.h:485
void SetChamferRectRatio(PCB_LAYER_ID aLayer, double aChamferScale)
Has meaning only for chamfered rectangular pads.
Definition: pad.cpp:507
int GetSolderMaskExpansion(PCB_LAYER_ID aLayer) const
Definition: pad.cpp:1161
int GetPadToDieDelay() const
Definition: pad.h:456
std::optional< int > GetLocalClearance() const override
Return any local clearances set in the "classic" (ie: pre-rule) system.
Definition: pad.h:458
void ImportSettingsFrom(const PAD &aMasterPad)
Import the pad settings from aMasterPad.
Definition: pad.cpp:1873
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:2521
bool IsOnCopperLayer() const override
Definition: pad.cpp:1067
void SetDrillSizeX(const int aX)
Definition: pad.cpp:435
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:648
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:937
double m_lastGalZoomLevel
Definition: pad.h:956
void BuildEffectivePolygon(ERROR_LOC aErrorLoc=ERROR_INSIDE) const
Definition: pad.cpp:804
static LSET ConnSMDMask()
layer set for a SMD pad on Front layer used for edge board connectors
Definition: pad.cpp:300
void SetDrillSize(const VECTOR2I &aSize)
Definition: pad.h:304
bool IsFreePad() const
Definition: pad.cpp:279
wxString GetClass() const override
Return the class name.
Definition: pad.h:837
bool CanFlashLayer(int aLayer)
Definition: pad.h:803
int m_subRatsnest
Definition: pad.h:958
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
int m_delayPadToDie
Definition: pad.h:966
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:2586
int GetChamferPositions(PCB_LAYER_ID aLayer) const
Definition: pad.h:711
void SetY(int y)
Definition: pad.h:256
static LSET ApertureMask()
layer set for an aperture pad
Definition: pad.cpp:314
virtual const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
Definition: pad.cpp:1838
bool m_shapesDirty
Definition: pad.h:943
std::mutex m_polyBuildingLock
Definition: pad.h:951
void SetRoundRectCornerRadius(PCB_LAYER_ID aLayer, double aRadius)
Has meaning only for rounded rectangle pads.
Definition: pad.cpp:463
static LSET SMDMask()
layer set for a SMD pad on Front layer
Definition: pad.cpp:293
std::optional< int > GetLocalSolderPasteMargin() const
Definition: pad.h:468
int GetFrontRoundRectRadiusSize() const
Definition: pad.cpp:497
const std::shared_ptr< SHAPE_POLY_SET > & GetEffectivePolygon(PCB_LAYER_ID aLayer, ERROR_LOC aErrorLoc=ERROR_INSIDE) const
Definition: pad.cpp:515
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:706
std::optional< int > GetLocalSolderMaskMargin() const
Definition: pad.h:461
void SetLocalSolderPasteMargin(std::optional< int > aMargin)
Definition: pad.h:469
int GetSizeY() const
Definition: pad.h:291
std::optional< int > GetLocalThermalGapOverride() const
Definition: pad.h:645
PCB_LAYER_ID GetLayer() const override
Return the primary layer this item is on.
Definition: pad.cpp:329
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
Definition: pad.cpp:1576
void SetPinFunction(const wxString &aName)
Set the pad function (pin name in schematic)
Definition: pad.h:146
EDA_ANGLE GetFPRelativeOrientation() const
Definition: pad.cpp:958
double GetChamferRectRatio(PCB_LAYER_ID aLayer) const
Definition: pad.h:694
bool m_polyDirty[2]
Definition: pad.h:950
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:1441
void SetFPRelativeOrientation(const EDA_ANGLE &aAngle)
Definition: pad.cpp:949
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:593
void ClearZoneLayerOverrides()
Definition: pad.cpp:207
void SetOrientation(const EDA_ANGLE &aAngle)
Set the rotation angle of the pad.
Definition: pad.cpp:942
std::mutex m_zoneLayerOverridesMutex
Definition: pad.h:968
std::optional< int > GetLocalThermalSpokeWidthOverride() const
Definition: pad.h:609
PADSTACK::UNCONNECTED_LAYER_MODE GetUnconnectedLayerMode() const
Definition: pad.h:761
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:1207
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
Definition: pad.cpp:1665
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:2599
wxString m_number
Definition: pad.h:933
bool HasDrilledHole() const override
Definition: pad.h:111
LAYER_POLYGON_MAP m_effectivePolygons
Definition: pad.h:952
void SetLocalClearance(std::optional< int > aClearance)
Definition: pad.h:459
int GetSubRatsnest() const
Definition: pad.h:719
void SetSizeX(const int aX)
Definition: pad.h:271
ZONE_CONNECTION GetLocalZoneConnection() const
Definition: pad.h:486
int m_lengthPadToDie
Definition: pad.h:965
bool HasHole() const override
Definition: pad.h:106
void SetDrillSizeY(const int aY)
Definition: pad.h:308
double GetThermalSpokeAngleDegrees() const
Definition: pad.h:635
PAD * ClonePad() const
Same as Clone, but returns a PAD item.
Definition: pad.h:885
int GetThermalGap() const
Definition: pad.h:641
VECTOR2I ShapePos(PCB_LAYER_ID aLayer) const
Definition: pad.cpp:1052
std::shared_ptr< SHAPE_SEGMENT > GetEffectiveHoleShape() const override
Return a SHAPE_SEGMENT object representing the pad's hole.
Definition: pad.cpp:584
void SetOrientationDegrees(double aOrientation)
Definition: pad.h:412
ZONE_CONNECTION GetZoneConnectionOverrides(wxString *aSource=nullptr) const
Definition: pad.cpp:1270
void SetLayerSet(const LSET &aLayers) override
Definition: pad.h:436
bool SharesNetTieGroup(const PAD *aOther) const
Definition: pad.cpp:256
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:469
void SetSubRatsnest(int aSubRatsnest)
Definition: pad.h:720
int GetLocalSpokeWidthOverride(wxString *aSource=nullptr) const
Definition: pad.cpp:1290
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:1953
void SetPadToDieLength(int aLength)
Definition: pad.h:452
bool IsFlipped() const
Definition: pad.cpp:321
bool operator==(const PAD &aOther) const
Definition: pad.cpp:2506
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:1547
void SetSizeY(const int aY)
Definition: pad.h:282
int GetPadToDieLength() const
Definition: pad.h:453
BOX2I m_effectiveBoundingBox
Definition: pad.h:945
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:1689
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: eda_group.h:32
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