105 m_Shape( aShape ), m_Thickness( 0 ), m_Radius( 0 ), m_ArcAngle( 0 )
117 void Move(
wxPoint aMoveVector );
149 static LSET StandardMask();
150 static LSET SMDMask();
151 static LSET ConnSMDMask();
152 static LSET UnplatedHoleMask();
170 void ImportSettingsFromMaster(
const D_PAD& aMasterPad );
176 bool IsFlipped()
const;
205 bool IncrementPadName(
bool aSkipUnconnectable,
bool aFillSequenceGaps );
209 return m_name == other->
m_name;
234 return m_customShapeClearanceArea;
244 m_customShapeClearanceArea = aOption;
256 m_boundingRadius = -1;
259 void SetY(
int y ) { m_Pos.y = y; }
260 void SetX(
int x ) { m_Pos.x = x; }
265 void SetY0(
int y ) { m_Pos0.y = y; }
266 void SetX0(
int x ) { m_Pos0.x = x; }
268 void SetSize(
const wxSize& aSize ) { m_Size = aSize; m_boundingRadius = -1; }
269 const wxSize&
GetSize()
const {
return m_Size; }
271 void SetDelta(
const wxSize& aSize ) { m_DeltaSize = aSize; m_boundingRadius = -1; }
272 const wxSize&
GetDelta()
const {
return m_DeltaSize; }
290 void AddPrimitive(
const std::vector<wxPoint>& aPoly,
int aThickness );
291 void AddPrimitive(
wxPoint aStart,
wxPoint aEnd,
int aThickness );
292 void AddPrimitive(
wxPoint aCenter,
int aRadius,
int aThickness );
294 int aArcAngle,
int aThickness );
297 bool GetBestAnchorPosition(
VECTOR2I& aPos );
310 bool MergePrimitivesAsPolygon(
SHAPE_POLY_SET * aMergedPolygon = NULL,
311 int aCircleToSegmentsCount = 32 );
316 void DeletePrimitivesList();
330 void CustomShapeAsPolygonToBoardPosition(
SHAPE_POLY_SET * aMergedPolygon,
331 wxPoint aPosition,
double aRotation )
const;
336 const std::vector<PAD_CS_PRIMITIVE>&
GetPrimitives()
const {
return m_basicShapes; }
348 void FlipPrimitives();
355 bool SetPrimitives(
const std::vector<PAD_CS_PRIMITIVE>& aPrimitivesList );
362 bool AddPrimitives(
const std::vector<PAD_CS_PRIMITIVE>& aPrimitivesList );
371 void SetOrientation(
double aAngle );
387 { m_drillShape = aDrillShape; }
399 void GetOblongDrillGeometry(
wxPoint& aStartPoint,
wxPoint& aEndPoint,
int& aWidth )
const;
435 void TransformShapeWithClearanceToPolygon(
SHAPE_POLY_SET& aCornerBuffer,
437 int aCircleToSegmentsCount,
438 double aCorrectionFactor )
const override;
462 int GetSolderMaskMargin()
const;
474 wxSize GetSolderPasteMargin()
const;
480 int GetThermalWidth()
const;
483 int GetThermalGap()
const;
511 void BuildPadPolygon(
wxPoint aCoord[4], wxSize aInflateValue,
double aRotation )
const;
520 return GetRoundRectCornerRadius( m_Size );
532 int GetRoundRectCornerRadius(
const wxSize& aSize )
const;
554 wxSize aInflateValue,
int aSegmentsPerCircle,
555 double aCorrectionFactor )
const;
569 int aInflateValue,
int aSegmentsPerCircle )
const;
585 int BuildSegmentFromOvalShape(
wxPoint& aSegStart,
wxPoint& aSegEnd,
586 double aRotation,
const wxSize& aMargin )
const;
598 if( m_boundingRadius == -1 )
600 m_boundingRadius = boundingRadius();
603 return m_boundingRadius;
617 return m_padRoundRectRadiusScale;
629 if( aRadiusScale < 0.0 )
632 m_padRoundRectRadiusScale =
std::min( aRadiusScale, 0.5 );
642 void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
override;
646 return m_layerMask[aLayer];
649 bool HitTest(
const wxPoint& aPosition )
const override;
651 bool HitTest(
const EDA_RECT& aRect,
bool aContained,
int aAccuracy = 0 )
const override;
659 const EDA_RECT GetBoundingBox()
const override;
665 void SetLocalCoord();
672 static int Compare(
const D_PAD* padref,
const D_PAD* padcmp );
676 m_Pos += aMoveVector;
680 void Rotate(
const wxPoint& aRotCentre,
double aAngle )
override;
682 wxString GetSelectMenuText()
const override;
690 wxString ShowPadShape()
const;
696 wxString ShowPadAttr()
const;
723 bool PadShouldBeNPTH()
const;
725 virtual void ViewGetLayers(
int aLayers[],
int& aCount )
const override;
727 virtual unsigned int ViewGetLOD(
int aLayer,
KIGFX::VIEW* aView )
const override;
729 virtual const BOX2I ViewBBox()
const override;
746 void CopyNetlistSettings(
D_PAD* aPad,
bool aCopyLocalSettings );
748 virtual void SwapData(
BOARD_ITEM* aImage )
override;
751 virtual void Show(
int nestLevel, std::ostream& os )
const override { ShowDummy( os ); }
760 int boundingRadius()
const;
763 int aCircleToSegmentsCount );
int m_LocalClearance
Local clearance.
int m_LocalSolderMaskMargin
Local mask margins: when 0, the parent footprint design values are used.
KICAD_T Type() const
Function Type()
static int m_PadSketchModePenSize
Pen size used to draw pads in sketch mode (mode used to print pads on silkscreen layer) ...
double m_padRoundRectRadiusScale
scaling factor from smallest m_Size coord to corner radius, default 0.25
A list of parameters type.
int m_boundingRadius
radius of the circle containing the pad shape
Class LINE_READER is an abstract class from which implementation specific LINE_READERs may be derived...
PAD_SHAPE_T GetAnchorPadShape() const
Function GetAnchorPadShape.
static bool ClassOf(const EDA_ITEM *aItem)
bool PadNameEqual(const D_PAD *other) const
std::vector< PAD_CS_PRIMITIVE > m_basicShapes
for free shape pads: a list of basic shapes, in local coordinates, orient 0, coordinates relative to ...
const std::vector< PAD_CS_PRIMITIVE > & GetPrimitives() const
Accessor to the basic shape list.
PNG memory record (file in memory).
PAD_ATTR_T GetAttribute() const
Class CAIRO_GAL is the cairo implementation of the graphics abstraction layer.
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...
int m_LocalSolderPasteMargin
Local solder paste margin absolute value.
Class BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class...
const SHAPE_POLY_SET & GetCustomShapeAsPolygon() const
Accessor to the custom shape as one polygon.
Classes BOARD_ITEM and BOARD_CONNECTED_ITEM.
int GetPadToDieLength() const
int GetRoundRectCornerRadius() const
Function GetRoundRectCornerRadius Has meaning only for rounded rect pads.
wxPoint m_Start
angle of an arc, from its starting point, in 0.1 deg
ZoneConnection
How pads are covered by copper in zone.
int GetLocalSolderMaskMargin() const
wxSize m_Size
X and Y size ( relative to orient 0)
MODULE * GetParent() const
Class EDA_3D_CANVAS Implement a canvas based on a wxGLCanvas.
void SetPosition(const wxPoint &aPos) override
const wxPoint & GetPos0() const
PAD_DRILL_SHAPE_T GetDrillShape() const
class D_PAD, a pad in a footprint
int m_SubRatsnest
variable used in rats nest computations handle subnet (block) number in ratsnest connection ...
void SetSubRatsnest(int aSubRatsnest)
void SetDrillSize(const wxSize &aSize)
PAD_CS_PRIMITIVE(STROKE_T aShape)
wxString GetClass() const override
Function GetClass returns the class name.
const wxSize & GetDrillSize() const
void SetRoundRectRadiusRatio(double aRadiusScale)
has meaning only for rounded rect pads Set the scaling factor between the smaller Y or Y size and the...
PAD_SHAPE_T GetShape() const
Function GetShape.
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() ...
PAD_SHAPE_T
Enum PAD_SHAPE_T is the set of pad shapes, used with D_PAD::{Set,Get}Shape()
void SetAnchorPadShape(PAD_SHAPE_T aShape)
Function SetAnchorPadShape Set the shape of the anchor pad for custm shped pads.
PCB_LAYER_ID
A quick note on layer IDs:
int m_Radius
thickness of segment or outline For filled S_CIRCLE shape, thickness = 0.
Class LSET is a set of PCB_LAYER_IDs.
std::vector< wxPoint > m_Poly
is also the start point of the arc
void SetZoneConnection(ZoneConnection aType)
void SetName(const wxString &aName)
Set the pad name (sometimes called pad number, although it can be an array reference like AA12)...
int GetBoundingRadius() const
Function GetBoundingRadius returns the radius of a minimum sized circle which fully encloses this pad...
GR_DRAWMODE
Drawmode. Compositing mode plus a flag or two.
void SetPos0(const wxPoint &aPos)
int GetSubRatsnest() const
Function GetSubRatsnest.
EDA_DRAW_PANEL * m_DrawPanel
Helper class to handle a primitive (basic shape: polygon, segment, circle or arc) to build a custom p...
LSET GetLayerSet() const override
Function GetLayerSet returns a "layer mask", which is a bitmap of all layers on which the TRACK segme...
CUST_PAD_SHAPE_IN_ZONE m_customShapeClearanceArea
How to build the custom shape in zone, to create the clearance area: CUST_PAD_SHAPE_IN_ZONE_OUTLINE =...
double GetOrientationRadians() const
void SetThermalWidth(int aWidth)
void Move(const wxPoint &aMoveVector) override
Function Move move this object.
const wxSize & GetSize() const
void SetSize(const wxSize &aSize)
STROKE_T
Enum STROKE_T is the set of shapes for segments (graphic segments and tracks) which are often in the ...
void SetOrientationDegrees(double aOrientation)
Set orientation in degrees.
const wxString & GetName() const
int GetLocalSolderPasteMargin() const
SHAPE_POLY_SET m_customShapeAsPolygon
for free shape pads: the set of basic shapes, merged as one polygon, in local coordinates, orient 0, coordinates relative to m_Pos
PAD_SHAPE_T m_anchorPadShape
for custom shaped pads: shape of pad anchor, PAD_SHAPE_RECT, PAD_SHAPE_CIRCLE
void SetPadToDieLength(int aLength)
wxSize m_DeltaSize
delta on rectangular shapes
wxPoint m_End
is also the center of the circle and arc
PAD_DRILL_SHAPE_T m_drillShape
PAD_DRILL_SHAPE_CIRCLE, PAD_DRILL_SHAPE_OBLONG.
int GetLocalClearance() const
void SetLocalClearance(int aClearance)
double GetLocalSolderPasteMarginRatio() const
void SetLocalSolderPasteMarginRatio(double aRatio)
std::unique_ptr< typename std::remove_const< T >::type > Clone(const T &aItem)
int m_Thickness
S_SEGMENT, S_ARC, S_CIRCLE, S_POLYGON only (same as DRAWSEGMENT)
wxPoint GetArcStart()
returns the center of a circle or arc
LSET m_layerMask
Bitwise layer :1= copper layer, 15= cmp, 2..14 = internal layers 16 .
void SetLayerSet(LSET aLayerMask)
D_PAD * Duplicate() const
same as Clone, but returns a D_PAD item.
double GetRoundRectRadiusRatio() const
has meaning only for rounded rect pads
void SetDrillShape(PAD_DRILL_SHAPE_T aDrillShape)
wxPoint m_Pos0
Initial Pad position (i.e.
void SetLocalSolderMaskMargin(int aMargin)
CUST_PAD_SHAPE_IN_ZONE GetCustomShapeInZoneOpt() const
int m_LengthPadToDie
Length net from pad to die, inside the package.
double GetOrientation() const
Function GetOrientation returns the rotation angle of the pad in tenths of degrees, but soon degrees.
Class EDA_RECT handles the component boundary box.
const wxSize & GetDelta() const
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
void SetShape(PAD_SHAPE_T aShape)
PAD_ATTR_T m_Attribute
PAD_ATTRIB_NORMAL, PAD_ATTRIB_SMD, PAD_ATTRIB_CONN, PAD_ATTRIB_HOLE_NOT_PLATED.
void SetLocalSolderPasteMargin(int aMargin)
void SetCustomShapeInZoneOpt(CUST_PAD_SHAPE_IN_ZONE aOption)
Set the option for the custom pad shape to use as clearance area in copper zones. ...
wxSize m_Drill
Drill diam (drill shape = PAD_CIRCLE) or drill size (shape = OVAL) for drill shape = PAD_CIRCLE...
double m_LocalSolderPasteMarginRatio
Local solder mask margin ratio value of pad size The final margin is the sum of these 2 values...
wxPoint m_Offset
m_Offset is useful only for oblong and rect pads (it can be used for other shapes, but without any interest).
bool IsOnLayer(PCB_LAYER_ID aLayer) const override
Function IsOnLayer tests to see if this object is on the given layer.
Class BOARD_CONNECTED_ITEM.
const wxPoint GetPosition() const override
void SetOffset(const wxPoint &aOffset)
void SetThermalGap(int aGap)
double GetOrientationDegrees() const
const wxPoint & GetOffset() const
double m_ArcAngle
radius of a circle
void SetDelta(const wxSize &aSize)
PAD_SHAPE_T m_padShape
Shape: PAD_SHAPE_CIRCLE, PAD_SHAPE_RECT, PAD_SHAPE_OVAL, PAD_SHAPE_TRAPEZOID, PAD_SHAPE_ROUNDRECT, PAD_SHAPE_POLYGON.
wxPoint m_Pos
pad Position on board
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.