91 for(
const KICAD_T* p = aScanTypes; *p !=
EOT; ++p )
268 void AddPrimitivePoly(
const std::vector<wxPoint>& aPoly,
int aThickness,
bool aFilled );
270 void AddPrimitiveCircle(
const wxPoint& aCenter,
int aRadius,
int aThickness,
bool aFilled );
271 void AddPrimitiveRect(
const wxPoint& aStart,
const wxPoint& aEnd,
int aThickness,
273 void AddPrimitiveArc(
const wxPoint& aCenter,
const wxPoint& aStart,
int aArcAngle,
275 void AddPrimitiveCurve(
const wxPoint& aStart,
const wxPoint& aEnd,
const wxPoint& aCtrl1,
276 const wxPoint& aCtrl2,
int aThickness );
300 void Flip(
const wxPoint& aCentre,
bool aFlipLeftRight )
override;
312 void ReplacePrimitives(
const std::vector<std::shared_ptr<PCB_SHAPE>>& aPrimitivesList );
318 void AppendPrimitives(
const std::vector<std::shared_ptr<PCB_SHAPE>>& aPrimitivesList );
402 bool ignoreLineWidth =
false )
const override;
572 bool FlashLayer(
int aLayer,
bool aIncludeZones =
false )
const;
580 bool FlashLayer(
LSET aLayers,
bool aIncludeZones =
false )
const;
582 bool HitTest(
const wxPoint& aPosition,
int aAccuracy = 0 )
const override;
583 bool HitTest(
const EDA_RECT& aRect,
bool aContained,
int aAccuracy = 0 )
const override;
610 void Move(
const wxPoint& aMoveVector )
override 612 m_pos += aMoveVector;
617 void Rotate(
const wxPoint& aRotCentre,
double aAngle )
override;
653 virtual void ViewGetLayers(
int aLayers[],
int& aCount )
const override;
662 virtual void Show(
int nestLevel, std::ostream& os )
const override { ShowDummy( os ); }
bool TransformHoleWithClearanceToPolygon(SHAPE_POLY_SET &aCornerBuffer, int aInflateValue, int aError, ERROR_LOC aErrorLoc) const
Function TransformHoleWithClearanceToPolygon Build the Corner list of the polygonal drill shape in th...
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
wxPoint GetCenter() const override
This defaults to the center of the bounding box if not overridden.
ZONE_CONNECTION
How pads are covered by copper in zone.
int GetLocalSolderMaskMargin() const
void FlipPrimitives(bool aFlipLeftRight)
Flip (mirror) the primitives left to right or top to bottom, around the anchor position in custom pad...
void SetOffset(const wxPoint &aOffset)
const int GetSizeY() const
An abstract class from which implementation specific LINE_READERs may be derived to read single lines...
int GetLocalClearance() const
static LSET ConnSMDMask()
layer set for a SMD pad on Front layer used for edge board connectors
void SetLocalSolderPasteMarginRatio(double aRatio)
void SetKeepTopBottom(bool aSet)
Sets whether we keep the top and bottom connections even if they are not connected.
const int GetDrillSizeX() const
PNG memory record (file in memory).
std::mutex m_shapesBuildingLock
std::mutex m_polyBuildingLock
int GetLocalSolderPasteMargin() const
Class CAIRO_GAL is the cairo implementation of the graphics abstraction layer.
double GetRoundRectRadiusRatio() const
virtual void ViewGetLayers(int aLayers[], int &aCount) const override
Return the all the layers within the VIEW the object is painted on.
PAD_ATTR_T
The set of pad shapes, used with PAD::{Set,Get}Attribute().
void DeletePrimitivesList()
clear the basic shapes list
void SetLocalClearance(int aClearance)
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
int m_effectiveBoundingRadius
void SetThermalSpokeWidth(int aWidth)
Set the width of the thermal spokes connecting the pad to a zone.
void SetDrillSizeY(const int aY)
int GetLocalClearanceOverrides(wxString *aSource) const override
Function GetLocalClearanceOverrides returns any local clearance overrides set in the "classic" (ie: p...
static int Compare(const PAD *padref, const PAD *padcmp)
Function Compare compares two pads and return 0 if they are equal.
double m_roundedCornerScale
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Test if aPosition is contained within or on the bounding box of an item.
void SetOrientationDegrees(double aOrientation)
Set orientation in degrees.
void SetAnchorPadShape(PAD_SHAPE_T aShape)
Function SetAnchorPadShape Set the shape of the anchor pad for custm shped pads.
void SetName(const wxString &aName)
Set the pad name (sometimes called pad number, although it can be an array reference like AA12).
bool IsLocked() const override
void SetSubRatsnest(int aSubRatsnest)
bool IsOnLayer(PCB_LAYER_ID aLayer) const override
Test to see if this object is on the given layer.
void SetSizeX(const int aX)
Implement a canvas based on a wxGLCanvas.
void AddPrimitiveRect(const wxPoint &aStart, const wxPoint &aEnd, int aThickness, bool aFilled)
const SHAPE_SEGMENT * GetEffectiveHoleShape() const
Function GetEffectiveHoleShape Returns a SHAPE object representing the pad's hole.
PAD * ClonePad() const
same as Clone, but returns a PAD item.
class PAD, a pad in a footprint
PAD_SHAPE_T GetShape() const
void SetPinType(const wxString &aType)
Set the pad electrical type.
void ReplacePrimitives(const std::vector< std::shared_ptr< PCB_SHAPE >> &aPrimitivesList)
Clear the current custom shape primitives list and import a new list.
void AddPrimitiveSegment(const wxPoint &aStart, const wxPoint &aEnd, int aThickness)
void SetSize(const wxSize &aSize)
int GetEffectiveThermalGap(wxString *aSource=nullptr) const
Return the effective thermal gap having resolved any inheritance.
void SetDelta(const wxSize &aSize)
like PAD_PTH, but not plated mechanical use only, no connection allowed
The base class for create windows for drawing purpose.
bool IsAperturePad() const
wxString GetClass() const override
Return the class name.
std::shared_ptr< SHAPE_COMPOUND > m_effectiveShape
int GetThermalGap() const
BOARD_CONNECTED_ITEM is a base class derived from BOARD_ITEM for items that can be connected and have...
PAD_DRILL_SHAPE_T
The set of pad drill shapes, used with PAD::{Set,Get}DrillShape()
wxString ShowPadShape() const
Function ShowPadShape.
bool GetKeepTopBottom() const
double m_localSolderPasteMarginRatio
search types array terminator (End Of Types)
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
PAD_SHAPE_T
The set of pad shapes, used with PAD::{Set,Get}Shape()
int m_localSolderPasteMargin
EDA_RECT m_effectiveBoundingBox
ERROR_LOC
When approximating an arc or circle, should the error be placed on the outside or inside of the curve...
int m_localSolderMaskMargin
void SetPadToDieLength(int aLength)
PAD_ATTR_T GetAttribute() const
void ImportSettingsFrom(const PAD &aMasterPad)
Imports the pad settings from aMasterPad.
std::shared_ptr< SHAPE_SEGMENT > m_effectiveHoleShape
int GetEffectiveThermalSpokeWidth(wxString *aSource=nullptr) const
Return the effective thermal spoke width having resolved any inheritance.
bool m_keepTopBottomLayer
ZONE_CONNECTION GetZoneConnection() const
double ViewGetLOD(int aLayer, KIGFX::VIEW *aView) const override
Return the level of detail (LOD) of the item.
void SetLocalSolderMaskMargin(int aMargin)
const wxPoint & GetOffset() const
std::shared_ptr< SHAPE_POLY_SET > m_effectivePolygon
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.
void SetDrillSizeX(const int aX)
const wxSize & GetDrillSize() const
virtual void SwapData(BOARD_ITEM *aImage) override
Swap data between aItem and aImage.
PCB_LAYER_ID
A quick note on layer IDs:
LSET is a set of PCB_LAYER_IDs.
BITMAP_DEF GetMenuImage() const override
Return a pointer to an image to be used in menus.
double GetOrientationRadians() const
int GetThermalSpokeWidth() const
double GetOrientation() const
Function GetOrientation returns the rotation angle of the pad in a variety of units (the basic call r...
void SetPos0(const wxPoint &aPos)
void SetLocalCoord()
Set relative coordinates.
void Flip(const wxPoint &aCentre, bool aFlipLeftRight) override
Flip this object, i.e.
void SetThermalGap(int aGap)
void SetDrillSize(const wxSize &aSize)
const wxSize & GetSize() const
ZONE_CONNECTION GetEffectiveZoneConnection(wxString *aSource=nullptr) const
Return the zone connection in effect (either locally overridden or overridden in the parent footprint...
virtual const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
const wxString & GetName() const
void SetRemoveUnconnected(bool aSet)
Sets the unconnected removal property.
static LSET PTHMask()
layer set for a through hole pad
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox The bounding box is cached, so this will be efficient most of the time.
const wxString & GetPinType() const
PAD & operator=(const PAD &aOther)
virtual std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER) const override
Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
virtual bool IsType(const KICAD_T aScanTypes[]) const
Check whether the item is one of the listed types.
PAD_PROP_T
Ghe set of pad properties used in Gerber files (Draw files, and P&P files) to define some properties ...
LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
bool FlashLayer(int aLayer, bool aIncludeZones=false) const
Checks to see whether the pad should be flashed on the specific layer.
void SetZoneConnection(ZONE_CONNECTION aType)
void SetDrawCoord()
Set absolute coordinates.
ZONE_CONNECTION m_zoneConnection
PAD_SHAPE_T GetAnchorPadShape() const
Function GetAnchorPadShape.
void SetPinFunction(const wxString &aName)
Set the pad function (pin name in schematic)
void BuildEffectivePolygon() const
void SetCustomShapeInZoneOpt(CUST_PAD_SHAPE_IN_ZONE aOption)
Set the option for the custom pad shape to use as clearance area in copper zones.
bool IsOnCopperLayer() const override
void SetShape(PAD_SHAPE_T aShape)
Set the new shape of this pad.
void SetRoundRectRadiusRatio(double aRadiusScale)
has meaning only for rounded rect pads Set the ratio between the smaller X or Y size and the rounded ...
PAD_SHAPE_T m_anchorPadShape
void SetDrillShape(PAD_DRILL_SHAPE_T aShape)
PAD_PROP_T GetProperty() const
void AddPrimitiveCurve(const wxPoint &aStart, const wxPoint &aEnd, const wxPoint &aCtrl1, const wxPoint &aCtrl2, int aThickness)
void BuildEffectiveShapes(PCB_LAYER_ID aLayer) const
Rebuilds the effective shape cache (and bounding box and radius) for the pad and clears the dirty bit...
double GetLocalSolderPasteMarginRatio() const
void SetRoundRectCornerRadius(double aRadius)
Function SetRoundRectCornerRadius has meaning only for rounded rect pads.
int GetRoundRectCornerRadius() const
const wxSize & GetDelta() const
int GetSolderMaskMargin() const
Function GetSolderMaskMargin.
FOOTPRINT * GetParent() const
void SetChamferPositions(int aPositions)
has meaning only for chamfered rect pads set the position of the chamfers for orientation 0.
PAD_DRILL_SHAPE_T m_drillShape
const wxPoint & GetPos0() const
void TransformShapeWithClearanceToPolygon(SHAPE_POLY_SET &aCornerBuffer, PCB_LAYER_ID aLayer, int aClearanceValue, int aMaxError, ERROR_LOC aErrorLoc, bool ignoreLineWidth=false) const override
Function TransformShapeWithClearanceToPolygon Convert the pad shape to a closed polygon.
void SetSizeY(const int aY)
int GetBoundingRadius() const
Function GetBoundingRadius returns the radius of a minimum sized circle which fully encloses this pad...
bool IsType(const KICAD_T aScanTypes[]) const override
Check whether the item is one of the listed types.
static LSET ApertureMask()
layer set for an aperture pad
void SetLayerSet(LSET aLayers) override
bool m_removeUnconnectedLayer
CUST_PAD_SHAPE_IN_ZONE GetCustomShapeInZoneOpt() const
double GetChamferRectRatio() const
std::vector< std::shared_ptr< PCB_SHAPE > > m_editPrimitives
wxSize GetSolderPasteMargin() const
Function GetSolderPasteMargin.
int GetSubRatsnest() const
Function GetSubRatsnest.
wxPoint GetPosition() const override
void MergePrimitivesAsPolygon(SHAPE_POLY_SET *aMergedPolygon, PCB_LAYER_ID aLayer) const
Merge all basic shapes to a SHAPE_POLY_SET Note: The results are relative to the pad position,...
void SetLocalSolderPasteMargin(int aMargin)
PAD_DRILL_SHAPE_T GetDrillShape() const
A base class which establishes the interface functions ReadParam and SaveParam, which are implemented...
const int GetDrillSizeY() const
double GetOrientationDegrees() const
void AddPrimitivePoly(const SHAPE_POLY_SET &aPoly, int aThickness, bool aFilled)
Has meaning only for custom shape pads.
void SetPosition(const wxPoint &aPos) override
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
Handle the component boundary box.
const int GetSizeX() const
void AddPrimitive(PCB_SHAPE *aPrimitive)
Add item to the custom shape primitives list.
void AddPrimitiveArc(const wxPoint &aCenter, const wxPoint &aStart, int aArcAngle, int aThickness)
const std::shared_ptr< SHAPE_POLY_SET > & GetEffectivePolygon() const
A base class for most all the KiCad significant classes used in schematics and boards.
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Return the text to display to be used in the selection clarification context menu when multiple items...
bool SameLogicalPadAs(const PAD *other) const
Before we had custom pad shapes it was common to have multiple overlapping pads to represent a more c...
int GetChamferPositions() const
void AppendPrimitives(const std::vector< std::shared_ptr< PCB_SHAPE >> &aPrimitivesList)
Import a custom shape primites list (composed of basic shapes) and add items to the current list.
wxString ShowPadAttr() const
Function ShowPadAttr.
static LSET UnplatedHoleMask()
layer set for a mechanical unplated through hole pad
void SetProperty(PAD_PROP_T aProperty)
CUST_PAD_SHAPE_IN_ZONE m_customShapeClearanceArea
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
void SetChamferRectRatio(double aChamferScale)
has meaning only for chamfered rect pads Set the ratio between the smaller X or Y size and chamfered ...
void Move(const wxPoint &aMoveVector) override
Move this object.
static LSET SMDMask()
layer set for a SMD pad on Front layer
int GetPadToDieLength() const
static bool ClassOf(const EDA_ITEM *aItem)
const wxString & GetPinFunction() const
bool GetRemoveUnconnected() const
bool GetBestAnchorPosition(VECTOR2I &aPos)
const std::vector< std::shared_ptr< PCB_SHAPE > > & GetPrimitives() const
Accessor to the basic shape list for custom-shaped pads.
void SetOrientation(double aAngle)
Function SetOrientation sets the rotation angle of the pad.
void AddPrimitiveCircle(const wxPoint &aCenter, int aRadius, int aThickness, bool aFilled)
KICAD_T Type() const
Returns the type of object.
void Rotate(const wxPoint &aRotCentre, double aAngle) override
Rotate this object.
void addPadPrimitivesToPolygon(SHAPE_POLY_SET *aMergedPolygon, PCB_LAYER_ID aLayer, int aError, ERROR_LOC aErrorLoc) const
void SetAttribute(PAD_ATTR_T aAttribute)