25#ifndef BOARD_ITEM_STRUCT_H
26#define BOARD_ITEM_STRUCT_H
172 FLASHING aFlash = FLASHING::DEFAULT )
const;
211 if( aLayers.count() == 1 )
217 wxFAIL_MSG( wxT(
"Attempted to SetLayerSet() on a single-layer object." ) );
284 wxFAIL_MSG( wxT(
"virtual BOARD_ITEM::Move called for " ) +
GetClass() );
300 virtual void Flip(
const VECTOR2I& aCentre,
bool aFlipLeftRight );
315 virtual void ViewGetLayers(
int aLayers[],
int& aCount )
const override;
328 int aClearance,
int aError,
ERROR_LOC aErrorLoc,
329 bool ignoreLineWidth =
false )
const;
372 return _(
"(Deleted Item)" );
377 return wxT(
"DELETED_BOARD_ITEM" );
395 void Show(
int , std::ostream& )
const override {}
ZONE_LAYER_OVERRIDE
Conditionally flashed vias and pads that interact with zones of different priority can be very squirr...
@ ZLO_FORCE_NO_ZONE_CONNECTION
Abstract interface for BOARD_ITEMs capable of storing other items inside.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
BOARD_ITEM(BOARD_ITEM *aParent, KICAD_T idtype, PCB_LAYER_ID aLayer=F_Cu)
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
void SetParentGroup(PCB_GROUP *aGroup)
void DeleteStructure()
Delete this object after removing from its parent if it has one.
void SwapItemData(BOARD_ITEM *aImage)
Swap data between aItem and aImage.
virtual void Flip(const VECTOR2I &aCentre, bool aFlipLeftRight)
Flip this object, i.e.
virtual STROKE_PARAMS GetStroke() const
virtual bool IsConnected() const
Returns information if the object is derived from BOARD_CONNECTED_ITEM.
virtual void SetLocked(bool aLocked)
PCB_GROUP * GetParentGroup() const
virtual void SetStroke(const STROKE_PARAMS &aStroke)
virtual bool IsKnockout() const
virtual void TransformShapeToPolygon(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aError, ERROR_LOC aErrorLoc, bool ignoreLineWidth=false) const
Convert the item shape to a closed polygon.
virtual void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle)
Rotate this object.
virtual BOARD_ITEM * Duplicate() const
Create a copy of this BOARD_ITEM.
virtual bool IsTented() const
virtual VECTOR2I GetCenter() const
This defaults to the center of the bounding box if not overridden.
virtual void Move(const VECTOR2I &aMoveVector)
Move this object.
virtual void SetIsKnockout(bool aKnockout)
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
virtual std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER, FLASHING aFlash=FLASHING::DEFAULT) const
Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
virtual const BOARD * GetBoard() const
Return the BOARD in which this BOARD_ITEM resides, or NULL if none.
FOOTPRINT * GetParentFootprint() const
VECTOR2I GetFPRelativePosition() const
virtual LSET GetLayerSet() const
Return a std::bitset of all layers on which the item physically resides.
virtual void swapData(BOARD_ITEM *aImage)
void SetFPRelativePosition(const VECTOR2I &aPos)
static VECTOR2I ZeroOffset
A value of wxPoint(0,0) which can be passed to the Draw() functions.
virtual bool IsLocked() const
virtual bool IsOnLayer(PCB_LAYER_ID aLayer, bool aIncludeCourtyards=false) const
Test to see if this object is on the given layer.
BOARD_ITEM_CONTAINER * GetParent() const
virtual void ViewGetLayers(int aLayers[], int &aCount) const override
Return the all the layers within the VIEW the object is painted on.
virtual bool IsOnCopperLayer() const
virtual bool HasLineStroke() const
Check if this item has line stoke properties.
virtual wxString layerMaskDescribe() const
Return a string (to be shown to the user) describing a layer mask.
wxString GetLayerName() const
Return the name of the PCB layer on which the item resides.
virtual std::shared_ptr< SHAPE_SEGMENT > GetEffectiveHoleShape() const
virtual void SetLayerSet(LSET aLayers)
virtual bool HasHole() const
Information pertinent to a Pcbnew printed circuit board.
const Vec GetCenter() const
A singleton item of this class is returned for a weak reference that no longer exists.
static DELETED_BOARD_ITEM * GetInstance()
wxString GetClass() const override
Return the class name.
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider) const override
Return a user-visible description string of this item.
VECTOR2I GetPosition() const override
void SetPosition(const VECTOR2I &) override
A base class for most all the KiCad significant classes used in schematics and boards.
virtual VECTOR2I GetPosition() const
virtual void SetPosition(const VECTOR2I &aPos)
virtual const BOX2I GetBoundingBox() const
Return the orthogonal bounding box of this object for display purposes.
virtual wxString GetClass() const =0
Return the class name.
EDA_ITEM * m_parent
Linked list: Link (parent struct)
LSET is a set of PCB_LAYER_IDs.
LSEQ Seq(const PCB_LAYER_ID *aWishListSequence, unsigned aCount) const
Return an LSEQ from the union of this LSET and a desired sequence.
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
A set of BOARD_ITEMs (i.e., without duplicates).
Represent a set of closed polygons.
An abstract shape on 2D plane.
Simple container to manage line stroke parameters.
a few functions useful in geometry calculations.
ERROR_LOC
When approximating an arc or circle, should the error be placed on the outside or inside of the curve...
FLASHING
Enum used during connectivity building to ensure we do not query connectivity while building the data...
bool IsCopperLayer(int aLayerId)
Tests whether a layer is a copper layer.
PCB_LAYER_ID
A quick note on layer IDs:
#define DECLARE_ENUM_TO_WXANY(type)
bool operator()(const BOARD_ITEM *a, const BOARD_ITEM *b) const
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
@ NOT_USED
the 3d code uses this value