KiCad PCB EDA Suite
class_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) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 1992-2017 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 
30 #ifndef PAD_H_
31 #define PAD_H_
32 
33 
34 #include <class_board_item.h>
36 #include <pad_shapes.h>
37 #include <PolyLine.h>
38 #include <config_params.h> // PARAM_CFG_ARRAY
39 #include "zones.h"
40 
41 
42 class LINE_READER;
43 class EDA_3D_CANVAS;
44 class EDA_DRAW_PANEL;
45 class MODULE;
46 class TRACK;
47 class MSG_PANEL_INFO;
48 
49 namespace KIGFX
50 {
51  class VIEW;
52 };
53 
54 // Helper class to store parameters used to draw a pad
56 {
57 public:
58  EDA_DRAW_PANEL* m_DrawPanel; // the EDA_DRAW_PANEL used to draw a PAD ; can be null
59  GR_DRAWMODE m_DrawMode; // the draw mode
60  COLOR4D m_Color; // color used to draw the pad shape , from pad layers and
61  // visible layers
62  COLOR4D m_HoleColor; // color used to draw the pad hole
63  COLOR4D m_NPHoleColor; // color used to draw a pad Not Plated hole
64  int m_PadClearance; // clearance value, used to draw the pad area outlines
65  wxSize m_Mask_margin; // margin, used to draw solder paste when only one layer is shown
66  bool m_Display_padnum; // true to show pad number
67  bool m_Display_netname; // true to show net name
68  bool m_ShowPadFilled; // true to show pad as solid area, false to show pas in
69  // sketch mode
70  bool m_ShowNCMark; // true to show pad not connected mark
71  bool m_ShowNotPlatedHole; // true when the pad hole in not plated, to draw a specific
72  // pad shape
73  bool m_IsPrinting; // true to print, false to display on screen.
74  wxPoint m_Offset; // general draw offset
75 
76  PAD_DRAWINFO();
77 };
78 
79 
81 {
82 public:
84 
86 public:
87  D_PAD( MODULE* parent );
88 
89  // Do not create a copy constructor & operator=.
90  // The ones generated by the compiler are adequate.
91 
92  /* Default layers used for pads, according to the pad type.
93  * this is default values only, they can be changed for a given pad
94  */
95  static LSET StandardMask();
96  static LSET SMDMask();
97  static LSET ConnSMDMask();
98  static LSET UnplatedHoleMask();
100 
101  static inline bool ClassOf( const EDA_ITEM* aItem )
102  {
103  return aItem && PCB_PAD_T == aItem->Type();
104  }
105 
106  D_PAD* Next() const { return static_cast<D_PAD*>( Pnext ); }
107 
108  MODULE* GetParent() const { return (MODULE*) m_Parent; }
109 
116  void ImportSettingsFromMaster( const D_PAD& aMasterPad );
117 
122  bool IsFlipped() const;
123 
129  void SetPadName( const wxString& name ); // Change pad name
130 
135  wxString GetPadName() const;
136 
143  wxUint32 GetPackedPadName() const { return m_NumPadName; }
144 
155  bool IncrementPadName( bool aSkipUnconnectable, bool aFillSequenceGaps );
156 
157  bool PadNameEqual( const D_PAD* other ) const
158  {
159  return m_NumPadName == other->m_NumPadName; // hide tricks behind sensible API
160  }
161 
166  PAD_SHAPE_T GetShape() const { return m_padShape; }
167  void SetShape( PAD_SHAPE_T aShape ) { m_padShape = aShape; m_boundingRadius = -1; }
168 
169  void SetPosition( const wxPoint& aPos ) override { m_Pos = aPos; }
170  const wxPoint& GetPosition() const override { return m_Pos; }
171 
172  void SetY( int y ) { m_Pos.y = y; }
173  void SetX( int x ) { m_Pos.x = x; }
174 
175  void SetPos0( const wxPoint& aPos ) { m_Pos0 = aPos; }
176  const wxPoint& GetPos0() const { return m_Pos0; }
177 
178  void SetY0( int y ) { m_Pos0.y = y; }
179  void SetX0( int x ) { m_Pos0.x = x; }
180 
181  void SetSize( const wxSize& aSize ) { m_Size = aSize; m_boundingRadius = -1; }
182  const wxSize& GetSize() const { return m_Size; }
183 
184  void SetDelta( const wxSize& aSize ) { m_DeltaSize = aSize; m_boundingRadius = -1; }
185  const wxSize& GetDelta() const { return m_DeltaSize; }
186 
187  void SetDrillSize( const wxSize& aSize ) { m_Drill = aSize; }
188  const wxSize& GetDrillSize() const { return m_Drill; }
189 
190  void SetOffset( const wxPoint& aOffset ) { m_Offset = aOffset; }
191  const wxPoint& GetOffset() const { return m_Offset; }
192 
193 
194  void Flip( const wxPoint& aCentre ) override;
195 
196 
203  void SetOrientation( double aAngle );
204 
208  void SetOrientationDegrees( double aOrientation ) { SetOrientation( aOrientation*10.0 ); }
209 
214  double GetOrientation() const { return m_Orient; }
215  double GetOrientationDegrees() const { return m_Orient/10.0; }
216  double GetOrientationRadians() const { return m_Orient*M_PI/1800; }
217 
218  void SetDrillShape( PAD_DRILL_SHAPE_T aDrillShape )
219  { m_drillShape = aDrillShape; }
220 
222 
232  void GetOblongDrillGeometry( wxPoint& aStartPoint, wxPoint& aEndPoint, int& aWidth ) const;
233 
234  void SetLayerSet( LSET aLayerMask ) { m_layerMask = aLayerMask; }
235  LSET GetLayerSet() const override { return m_layerMask; }
236 
237  void SetAttribute( PAD_ATTR_T aAttribute );
238  PAD_ATTR_T GetAttribute() const { return m_Attribute; }
239 
240  void SetPadToDieLength( int aLength ) { m_LengthPadToDie = aLength; }
241  int GetPadToDieLength() const { return m_LengthPadToDie; }
242 
244  void SetLocalSolderMaskMargin( int aMargin ) { m_LocalSolderMaskMargin = aMargin; }
245 
246  int GetLocalClearance() const { return m_LocalClearance; }
247  void SetLocalClearance( int aClearance ) { m_LocalClearance = aClearance; }
248 
250  void SetLocalSolderPasteMargin( int aMargin ) { m_LocalSolderPasteMargin = aMargin; }
251 
254 
255 
269  int aClearanceValue,
270  int aCircleToSegmentsCount,
271  double aCorrectionFactor ) const;
272 
282  int GetClearance( BOARD_CONNECTED_ITEM* aItem = NULL ) const override;
283 
284  // Mask margins handling:
285 
295  int GetSolderMaskMargin() const;
296 
307  wxSize GetSolderPasteMargin() const;
308 
311 
312  void SetThermalWidth( int aWidth ) { m_ThermalWidth = aWidth; }
313  int GetThermalWidth() const;
314 
315  void SetThermalGap( int aGap ) { m_ThermalGap = aGap; }
316  int GetThermalGap() const;
317 
318  /* drawing functions */
319  void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
320  GR_DRAWMODE aDrawMode, const wxPoint& aOffset = ZeroOffset ) override;
321 
332  void DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo );
333 
344  void BuildPadPolygon( wxPoint aCoord[4], wxSize aInflateValue, double aRotation ) const;
345 
352  {
354  }
355 
365  int GetRoundRectCornerRadius( const wxSize& aSize ) const;
366 
386  void BuildPadShapePolygon( SHAPE_POLY_SET& aCornerBuffer,
387  wxSize aInflateValue, int aSegmentsPerCircle,
388  double aCorrectionFactor ) const;
389 
401  bool BuildPadDrillShapePolygon( SHAPE_POLY_SET& aCornerBuffer,
402  int aInflateValue, int aSegmentsPerCircle ) const;
403 
418  int BuildSegmentFromOvalShape( wxPoint& aSegStart, wxPoint& aSegEnd,
419  double aRotation, const wxSize& aMargin ) const;
420 
421  void StringPadName( wxString& text ) const; // Return pad name as string in a buffer
422 
428  int GetBoundingRadius() const
429  {
430  // Any member function which would affect this calculation should set
431  // m_boundingRadius to -1 to re-trigger the calculation from here.
432  // Currently that is only m_Size, m_DeltaSize, and m_padShape accessors.
433  if( m_boundingRadius == -1 )
434  {
436  }
437 
438  return m_boundingRadius;
439  }
440 
441  wxPoint ShapePos() const;
442 
450  double GetRoundRectRadiusRatio() const
451  {
453  }
454 
462  void SetRoundRectRadiusRatio( double aRadiusScale )
463  {
464  if( aRadiusScale < 0.0 )
465  aRadiusScale = 0.0;
466 
467  m_padRoundRectRadiusScale = std::min( aRadiusScale, 0.5 );
468  }
469 
474  int GetSubRatsnest() const { return m_SubRatsnest; }
475  void SetSubRatsnest( int aSubRatsnest ) { m_SubRatsnest = aSubRatsnest; }
476 
477  void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) override;
478 
479  bool IsOnLayer( LAYER_ID aLayer ) const override
480  {
481  return m_layerMask[aLayer];
482  }
483 
484  bool HitTest( const wxPoint& aPosition ) const override;
485 
486  wxString GetClass() const override
487  {
488  return wxT( "PAD" );
489  }
490 
491  // Virtual function:
492  const EDA_RECT GetBoundingBox() const override;
493 
495  void SetDrawCoord();
496 
498  void SetLocalCoord();
499 
505  static int Compare( const D_PAD* padref, const D_PAD* padcmp );
506 
507  void Move( const wxPoint& aMoveVector ) override
508  {
509  m_Pos += aMoveVector;
510  SetLocalCoord();
511  }
512 
513  void Rotate( const wxPoint& aRotCentre, double aAngle ) override;
514 
515  wxString GetSelectMenuText() const override;
516 
517  BITMAP_DEF GetMenuImage() const override;
518 
523  wxString ShowPadShape() const;
524 
529  wxString ShowPadAttr() const;
530 
537  void AppendConfigs( PARAM_CFG_ARRAY* aResult );
538 
539  EDA_ITEM* Clone() const override;
540 
546  D_PAD* Duplicate() const
547  {
548  return (D_PAD*) Clone();
549  }
550 
552  virtual void ViewGetLayers( int aLayers[], int& aCount ) const override;
553 
555  virtual unsigned int ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const override;
556 
558  virtual const BOX2I ViewBBox() const override;
559 
575  void CopyNetlistSettings( D_PAD* aPad, bool aCopyLocalSettings );
576 
577 #if defined(DEBUG)
578  virtual void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
579 #endif
580 
581 
582 private:
587  int boundingRadius() const;
588 
589 private: // Private variable members:
590 
591  // Actually computed and cached on demand by the accessor
592  mutable int m_boundingRadius;
593 
594 #ifndef SWIG
595  union
598  {
599 #define PADNAMEZ 4
600  char m_Padname[PADNAMEZ]; // zero padded at end to full size
601  wxUint32 m_NumPadName; // same number of bytes as m_Padname[]
602  };
603 #endif
604 
606 
608 
612 
614  wxSize m_Drill;
615 
618  wxSize m_Size;
619 
621 
623 
640 
642 
645  wxSize m_DeltaSize;
646 
648 
651  double m_Orient;
653 
655 
660 
662 
665 
670 
673 };
674 
675 #endif // PAD_H_
int m_LocalClearance
Local clearance.
Definition: class_pad.h:659
int m_ThermalGap
Definition: class_pad.h:672
int m_LocalSolderMaskMargin
Local mask margins: when 0, the parent footprint design values are used.
Definition: class_pad.h:663
BITMAP_DEF GetMenuImage() const override
Function GetMenuImage returns a pointer to an image to be used in menus.
Definition: class_pad.cpp:916
bool IncrementPadName(bool aSkipUnconnectable, bool aFillSequenceGaps)
Function IncrementPadName.
Definition: class_pad.cpp:424
KICAD_T Type() const
Function Type()
Definition: base_struct.h:198
static int m_PadSketchModePenSize
Pen size used to draw pads in sketch mode (mode used to print pads on silkscreen layer) ...
Definition: class_pad.h:83
Class BOARD_CONNECTED_ITEM.
double m_padRoundRectRadiusScale
scaling factor from smallest m_Size coord to corner radius, default 0.25
Definition: class_pad.h:622
A list of parameters type.
int m_boundingRadius
radius of the circle containing the pad shape
Definition: class_pad.h:592
EDA_ITEM * Clone() const override
Function Clone creates a duplicate of this item with linked list members set to NULL.
Definition: class_pad.cpp:922
Class LINE_READER is an abstract class from which implementation specific LINE_READERs may be derived...
Definition: richio.h:81
static bool ClassOf(const EDA_ITEM *aItem)
Definition: class_pad.h:101
EDA_ITEM * m_Parent
Linked list: Link (parent struct)
Definition: base_struct.h:168
bool PadNameEqual(const D_PAD *other) const
Definition: class_pad.h:157
static LSET StandardMask()
layer set for a through hole pad
Definition: class_pad.cpp:97
#define PADNAMEZ
Definition: class_pad.h:599
wxString GetSelectMenuText() const override
Function GetSelectMenuText returns the text to display to be used in the selection clarification cont...
Definition: class_pad.cpp:893
bool m_Display_padnum
Definition: class_pad.h:66
PNG memory record (file in memory).
Definition: bitmap_types.h:38
PAD_ATTR_T GetAttribute() const
Definition: class_pad.h:238
bool HitTest(const wxPoint &aPosition) const override
Function HitTest tests if aPosition is contained within or on the bounding area of an item...
Definition: class_pad.cpp:700
Class CAIRO_GAL is the cairo implementation of the graphics abstraction layer.
Definition: class_module.h:56
void Rotate(const wxPoint &aRotCentre, double aAngle) override
Function Rotate Rotate this object.
Definition: class_pad.cpp:836
PAD_ATTR_T
Enum PAD_ATTR_T is the set of pad shapes, used with D_PAD::{Set,Get}Attribute() The double name is fo...
Definition: pad_shapes.h:56
int m_LocalSolderPasteMargin
Local solder paste margin absolute value.
Definition: class_pad.h:664
static LSET UnplatedHoleMask()
layer set for a mechanical unplated through hole pad
Definition: class_pad.cpp:118
void Draw(EDA_DRAW_PANEL *aPanel, wxDC *aDC, GR_DRAWMODE aDrawMode, const wxPoint &aOffset=ZeroOffset) override
Function Draw BOARD_ITEMs have their own color information.
void BuildPadPolygon(wxPoint aCoord[4], wxSize aInflateValue, double aRotation) const
Function BuildPadPolygon Has meaning only for polygonal pads (trapezoid and rectangular) Build the Co...
static LSET SMDMask()
layer set for a SMD pad on Front layer
Definition: class_pad.cpp:104
Classes BOARD_ITEM and BOARD_CONNECTED_ITEM.
int GetPadToDieLength() const
Definition: class_pad.h:241
D_PAD(MODULE *parent)
Definition: class_pad.cpp:60
int GetRoundRectCornerRadius() const
Function GetRoundRectCornerRadius Has meaning only for rounded rect pads.
Definition: class_pad.h:351
ZoneConnection
How pads are covered by copper in zone.
Definition: zones.h:55
int GetLocalSolderMaskMargin() const
Definition: class_pad.h:243
wxSize m_Size
X and Y size ( relative to orient 0)
Definition: class_pad.h:618
MODULE * GetParent() const
Definition: class_pad.h:108
Class EDA_3D_CANVAS Implement a canvas based on a wxGLCanvas.
Definition: eda_3d_canvas.h:53
int boundingRadius() const
Function boundingRadius returns a calculated radius of a bounding circle for this pad...
Definition: class_pad.cpp:131
void SetPosition(const wxPoint &aPos) override
Definition: class_pad.h:169
wxString ShowPadAttr() const
Function ShowPadAttr.
Definition: class_pad.cpp:871
The common library.
const wxPoint & GetPos0() const
Definition: class_pad.h:176
PAD_DRILL_SHAPE_T GetDrillShape() const
Definition: class_pad.h:221
class D_PAD, a pad in a footprint
Definition: typeinfo.h:102
int m_SubRatsnest
variable used in rats nest computations handle subnet (block) number in ratsnest connection ...
Definition: class_pad.h:611
void SetSubRatsnest(int aSubRatsnest)
Definition: class_pad.h:475
void SetDrillSize(const wxSize &aSize)
Definition: class_pad.h:187
bool m_ShowNCMark
Definition: class_pad.h:70
wxString GetClass() const override
Function GetClass returns the class name.
Definition: class_pad.h:486
const wxSize & GetDrillSize() const
Definition: class_pad.h:188
void SetRoundRectRadiusRatio(double aRadiusScale)
has meaning only for rounded rect pads Set the scaling factor between the smaller Y or Y size and the...
Definition: class_pad.h:462
void SetY0(int y)
Definition: class_pad.h:178
PAD_SHAPE_T GetShape() const
Function GetShape.
Definition: class_pad.h:166
Class BOARD_CONNECTED_ITEM is a base class derived from BOARD_ITEM for items that can be connected an...
PAD_DRILL_SHAPE_T
Enum PAD_DRILL_SHAPE_T is the set of pad drill shapes, used with D_PAD::{Set,Get}DrillShape() ...
Definition: pad_shapes.h:44
bool m_IsPrinting
Definition: class_pad.h:73
PAD_SHAPE_T
Enum PAD_SHAPE_T is the set of pad shapes, used with D_PAD::{Set,Get}Shape()
Definition: pad_shapes.h:31
static wxPoint ZeroOffset
A value of wxPoint(0,0) which can be passed to the Draw() functions.
void SetLocalCoord()
Set relative coordinates.
Definition: class_pad.cpp:282
bool IsOnLayer(LAYER_ID aLayer) const override
Function IsOnLayer tests to see if this object is on the given layer.
Definition: class_pad.h:479
wxUint32 m_NumPadName
Definition: class_pad.h:601
virtual const BOX2I ViewBBox() const override
Definition: class_pad.cpp:997
Class LSET is a set of LAYER_IDs.
void TransformShapeWithClearanceToPolygon(SHAPE_POLY_SET &aCornerBuffer, int aClearanceValue, int aCircleToSegmentsCount, double aCorrectionFactor) const
Function TransformShapeWithClearanceToPolygon Convert the pad shape to a closed polygon Used in filli...
void SetZoneConnection(ZoneConnection aType)
Definition: class_pad.h:309
int GetBoundingRadius() const
Function GetBoundingRadius returns the radius of a minimum sized circle which fully encloses this pad...
Definition: class_pad.h:428
GR_DRAWMODE
Drawmode. Compositing mode plus a flag or two.
Definition: gr_basic.h:41
Class SHAPE_POLY_SET.
void SetPos0(const wxPoint &aPos)
Definition: class_pad.h:175
int GetSubRatsnest() const
Function GetSubRatsnest.
Definition: class_pad.h:474
int GetSolderMaskMargin() const
Function GetSolderMaskMargin.
Definition: class_pad.cpp:486
GR_DRAWMODE m_DrawMode
Definition: class_pad.h:59
const wxPoint & GetPosition() const override
Definition: class_pad.h:170
EDA_DRAW_PANEL * m_DrawPanel
Definition: class_pad.h:58
static int Compare(const D_PAD *padref, const D_PAD *padcmp)
Function Compare compares two pads and return 0 if they are equal.
Definition: class_pad.cpp:780
ZoneConnection GetZoneConnection() const
Definition: class_pad.cpp:559
LSET GetLayerSet() const override
Function GetLayerSet returns a "layer mask", which is a bitmap of all layers on which the TRACK segme...
Definition: class_pad.h:235
int GetThermalWidth() const
Definition: class_pad.cpp:570
D_PAD * Next() const
Definition: class_pad.h:106
double GetOrientationRadians() const
Definition: class_pad.h:216
int GetThermalGap() const
Definition: class_pad.cpp:581
void SetThermalWidth(int aWidth)
Definition: class_pad.h:312
void Move(const wxPoint &aMoveVector) override
Function Move move this object.
Definition: class_pad.h:507
COLOR4D m_HoleColor
Definition: class_pad.h:62
const wxSize & GetSize() const
Definition: class_pad.h:182
void SetSize(const wxSize &aSize)
Definition: class_pad.h:181
void SetOrientationDegrees(double aOrientation)
Set orientation in degrees.
Definition: class_pad.h:208
int m_ThermalWidth
Definition: class_pad.h:671
virtual void ViewGetLayers(int aLayers[], int &aCount) const override
Definition: class_pad.cpp:928
bool m_ShowNotPlatedHole
Definition: class_pad.h:71
int GetLocalSolderPasteMargin() const
Definition: class_pad.h:249
void SetPadToDieLength(int aLength)
Definition: class_pad.h:240
void ImportSettingsFromMaster(const D_PAD &aMasterPad)
Imports the pad settings from aMasterPad.
Definition: class_pad.cpp:1050
virtual unsigned int ViewGetLOD(int aLayer, KIGFX::VIEW *aView) const override
Definition: class_pad.cpp:977
void DrawShape(EDA_RECT *aClipBox, wxDC *aDC, PAD_DRAWINFO &aDrawInfo)
Function DrawShape basic function to draw a pad.
void SetDrawCoord()
Set absolute coordinates.
Definition: class_pad.cpp:266
wxSize m_DeltaSize
delta on rectangular shapes
Definition: class_pad.h:645
PAD_DRILL_SHAPE_T m_drillShape
PAD_DRILL_SHAPE_CIRCLE, PAD_DRILL_SHAPE_OBLONG.
Definition: class_pad.h:620
int m_PadClearance
Definition: class_pad.h:64
void SetAttribute(PAD_ATTR_T aAttribute)
Definition: class_pad.cpp:297
bool IsFlipped() const
Definition: class_pad.cpp:124
int GetLocalClearance() const
Definition: class_pad.h:246
void SetLocalClearance(int aClearance)
Definition: class_pad.h:247
double GetLocalSolderPasteMarginRatio() const
Definition: class_pad.h:252
void SetLocalSolderPasteMarginRatio(double aRatio)
Definition: class_pad.h:253
LSET m_layerMask
Bitwise layer :1= copper layer, 15= cmp, 2..14 = internal layers 16 .
Definition: class_pad.h:641
void SetLayerSet(LSET aLayerMask)
Definition: class_pad.h:234
D_PAD * Duplicate() const
same as Clone, but returns a D_PAD item.
Definition: class_pad.h:546
int BuildSegmentFromOvalShape(wxPoint &aSegStart, wxPoint &aSegEnd, double aRotation, const wxSize &aMargin) const
Function BuildSegmentFromOvalShape Has meaning only for OVAL (and ROUND) pads Build an equivalent seg...
void SetY(int y)
Definition: class_pad.h:172
wxPoint m_Offset
Definition: class_pad.h:74
double GetRoundRectRadiusRatio() const
has meaning only for rounded rect pads
Definition: class_pad.h:450
void SetDrillShape(PAD_DRILL_SHAPE_T aDrillShape)
Definition: class_pad.h:218
wxPoint m_Pos0
Initial Pad position (i.e.
Definition: class_pad.h:647
void GetOblongDrillGeometry(wxPoint &aStartPoint, wxPoint &aEndPoint, int &aWidth) const
Function GetOblongDrillGeometry calculates the start point, end point and width of an equivalent segm...
Definition: class_pad.cpp:667
LAYER_ID
Enum LAYER_ID is the set of PCB layers.
void SetLocalSolderMaskMargin(int aMargin)
Definition: class_pad.h:244
void Flip(const wxPoint &aCentre) override
Function Flip Flip this object, i.e.
Definition: class_pad.cpp:313
int m_LengthPadToDie
Length net from pad to die, inside the package.
Definition: class_pad.h:654
wxString ShowPadShape() const
Function ShowPadShape.
Definition: class_pad.cpp:846
double GetOrientation() const
Function GetOrientation returns the rotation angle of the pad in tenths of degrees, but soon degrees.
Definition: class_pad.h:214
Class EDA_RECT handles the component boundary box.
const wxSize & GetDelta() const
Definition: class_pad.h:185
wxSize GetSolderPasteMargin() const
Function GetSolderPasteMargin.
Definition: class_pad.cpp:519
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:151
int GetClearance(BOARD_CONNECTED_ITEM *aItem=NULL) const override
Function GetClearance returns the clearance in internal units.
Definition: class_pad.cpp:455
void SetShape(PAD_SHAPE_T aShape)
Definition: class_pad.h:167
void BuildPadShapePolygon(SHAPE_POLY_SET &aCornerBuffer, wxSize aInflateValue, int aSegmentsPerCircle, double aCorrectionFactor) const
Function BuildPadShapePolygon Build the Corner list of the polygonal shape, depending on shape...
wxPoint ShapePos() const
Definition: class_pad.cpp:367
bool m_ShowPadFilled
Definition: class_pad.h:68
char m_Padname[PADNAMEZ]
Definition: class_pad.h:600
void SetPadName(const wxString &name)
Set the pad name (sometimes called pad number, although it can be an array ref like AA12 the pad name...
Definition: class_pad.cpp:404
void SetOrientation(double aAngle)
Function SetOrientation sets the rotation angle of the pad.
Definition: class_pad.cpp:306
COLOR4D m_NPHoleColor
Definition: class_pad.h:63
PAD_ATTR_T m_Attribute
PAD_ATTRIB_NORMAL, PAD_ATTRIB_SMD, PAD_ATTRIB_CONN, PAD_ATTRIB_HOLE_NOT_PLATED.
Definition: class_pad.h:650
COLOR4D m_Color
Definition: class_pad.h:60
wxUint32 GetPackedPadName() const
Definition: class_pad.h:143
void SetLocalSolderPasteMargin(int aMargin)
Definition: class_pad.h:250
static LSET ConnSMDMask()
layer set for a SMD pad on Front layer used for edge board connectors
Definition: class_pad.cpp:111
wxString GetPadName() const
Definition: class_pad.cpp:382
wxSize m_Drill
Drill diam (drill shape = PAD_CIRCLE) or drill size (shape = OVAL) for drill shape = PAD_CIRCLE...
Definition: class_pad.h:614
void SetX0(int x)
Definition: class_pad.h:179
double m_Orient
in 1/10 degrees
Definition: class_pad.h:652
double m_LocalSolderPasteMarginRatio
Local solder mask margin ratio value of pad size The final margin is the sum of these 2 values...
Definition: class_pad.h:666
wxPoint m_Offset
m_Offset is useful only for oblong and rect pads (it can be used for other shapes, but without any interest).
Definition: class_pad.h:639
Class VIEW.
Definition: view.h:58
void StringPadName(wxString &text) const
Definition: class_pad.cpp:391
bool m_Display_netname
Definition: class_pad.h:67
void SetOffset(const wxPoint &aOffset)
Definition: class_pad.h:190
wxSize m_Mask_margin
Definition: class_pad.h:65
bool BuildPadDrillShapePolygon(SHAPE_POLY_SET &aCornerBuffer, int aInflateValue, int aSegmentsPerCircle) const
Function BuildPadDrillShapePolygon Build the Corner list of the polygonal drill shape, depending on shape pad hole and orientation.
void SetX(int x)
Definition: class_pad.h:173
void SetThermalGap(int aGap)
Definition: class_pad.h:315
double GetOrientationDegrees() const
Definition: class_pad.h:215
EDA_ITEM * Pnext
next in linked list
Definition: base_struct.h:164
void CopyNetlistSettings(D_PAD *aPad, bool aCopyLocalSettings)
Function CopyNetlistSettings copies the netlist settings to aPad, and the net name.
Definition: class_pad.cpp:435
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes...
Definition: class_pad.cpp:181
const wxPoint & GetOffset() const
Definition: class_pad.h:191
ZoneConnection m_ZoneConnection
how the connection to zone is made: no connection, thermal relief ...
Definition: class_pad.h:669
void SetDelta(const wxSize &aSize)
Definition: class_pad.h:184
PAD_SHAPE_T m_padShape
Shape: PAD_SHAPE_CIRCLE, PAD_SHAPE_RECT, PAD_SHAPE_OVAL, PAD_SHAPE_TRAPEZOID, PAD_SHAPE_ROUNDRECT, PAD_SHAPE_POLYGON.
Definition: class_pad.h:607
#define min(a, b)
Definition: auxiliary.h:85
wxPoint m_Pos
pad Position on board
Definition: class_pad.h:605
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39
void AppendConfigs(PARAM_CFG_ARRAY *aResult)
Function AppendConfigs appends to aResult the configuration setting accessors which will later allow ...
Definition: class_pad.cpp:335
void GetMsgPanelInfo(std::vector< MSG_PANEL_ITEM > &aList) override
Function GetMsgPanelInfo populates aList of MSG_PANEL_ITEM objects with it's internal state for displ...
Definition: class_pad.cpp:592