36 case S_RECT:
return _(
"Rect" );
37 case S_ARC:
return _(
"Arc" );
39 case S_CURVE:
return _(
"Bezier Curve" );
41 default:
return wxT(
"??" );
79 return _(
"all copper layers" );
84 for(
LSET testLayers : { copperLayers, techLayers, layers } )
88 if( testLayers[ bit ] )
90 wxString layerInfo = board->
GetLayerName( static_cast<PCB_LAYER_ID>( bit ) );
92 if( testLayers.count() > 1 )
93 layerInfo << wxS(
" " ) +
_(
"and others" );
101 return _(
"no layers" );
132 bool ignoreLineWidth )
const 134 wxASSERT_MSG(
false,
"Called TransformShapeWithClearanceToPolygon() on unsupported BOARD_ITEM." );
155 std::shared_ptr<SHAPE> shape;
157 wxFAIL_MSG(
"GetEffectiveShape() not implemented for " +
GetClass() );
169 if( layerEnum.
Choices().GetCount() == 0 )
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
static PROPERTY_MANAGER & Instance()
#define IMPLEMENT_ENUM_TO_WXANY(type)
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
ENUM_MAP & Undefined(T aValue)
polygon (not yet used for tracks, but could be in microwave apps)
virtual void ViewGetLayers(int aLayers[], int &aCount) const override
Return the all the layers within the VIEW the object is painted on.
static ENUM_MAP< T > & Instance()
void DeleteStructure()
Delete this object after removing from its parent if it has one.
static wxString ShowShape(PCB_SHAPE_TYPE_T aShape)
Convert the enum PCB_SHAPE_TYPE_T integer value to a wxString.
usual segment : line with rounded ends
LSET GetEnabledLayers() const
A proxy function that calls the corresponding function in m_BoardSettings Returns a bit-mask of all t...
virtual void SetLocked(bool aLocked)
Modify the 'lock' status for of the item.
segment with non rounded ends
static LSET AllTechMask()
Return a mask holding all technical layers (no CU layer) on both side.
static struct BOARD_ITEM_DESC _BOARD_ITEM_DESC
ERROR_LOC
When approximating an arc or circle, should the error be placed on the outside or inside of the curve...
virtual void SwapData(BOARD_ITEM *aImage)
Swap data between aItem and aImage.
virtual wxString layerMaskDescribe() const
Return a string (to be shown to the user) describing a layer mask.
PCB_LAYER_ID
A quick note on layer IDs:
Display value expressed in distance units (mm/inch)
PCB_SHAPE_TYPE_T
The set of shapes for PCB graphics and tracks and footprint graphics in the .m_Shape member.
LSET is a set of PCB_LAYER_IDs.
static const wxChar * Name(PCB_LAYER_ID aLayerId)
Return the fixed name association with aLayerId.
Represent a set of closed polygons.
virtual BOARD * GetBoard() const
Return the BOARD in which this BOARD_ITEM resides, or NULL if none.
void InheritsAfter(TYPE_ID aDerived, TYPE_ID aBase)
Declare an inheritance relationship between types.
static LSET AllLayersMask()
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
Some functions to handle hotkeys in KiCad.
virtual bool IsLocked() const
virtual wxString GetClass() const =0
Return the class name.
Information pertinent to a Pcbnew printed circuit board.
bool operator()(const BOARD_ITEM *a, const BOARD_ITEM *b) const
void AddProperty(PROPERTY_BASE *aProperty)
Register a property.
A base class for most all the KiCad significant classes used in schematics and boards.
virtual std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER) const
Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
Provide class metadata.Helper macro to map type hashes to names.
virtual void TransformShapeWithClearanceToPolygon(SHAPE_POLY_SET &aCornerBuffer, PCB_LAYER_ID aLayer, int aClearanceValue, int aError, ERROR_LOC aErrorLoc, bool ignoreLineWidth=false) const
Convert the item shape to a closed polygon.
virtual void Remove(BOARD_ITEM *aItem, REMOVE_MODE aMode=REMOVE_MODE::NORMAL)=0
Removes an item from the container.
Abstract interface for BOARD_ITEMs capable of storing other items inside.
ENUM_MAP & Map(T aValue, const wxString &aName)
BOARD_ITEM_CONTAINER * GetParent() const
wxString GetLayerName() const
Return the name of the PCB layer on which the item resides.
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
virtual LSET GetLayerSet() const
Return a std::bitset of all layers on which the item physically resides.
KICAD_T Type() const
Returns the type of object.
static wxString GetStandardLayerName(PCB_LAYER_ID aLayerId)
Return an "English Standard" name of a PCB layer when given aLayerNumber.