58 switch( aItem->
Type() )
84 ret = hash<int>{}(
via->GetDrillValue() );
88 via->GetLayerSet().RunOnLayers(
100 const PAD*
pad =
static_cast<const PAD*
>( aItem );
102 ret = hash<int>{}(
static_cast<int>(
pad->GetAttribute() ) );
130 for(
int ii = 0; ii < poly->VertexCount(); ++ii )
132 VECTOR2I point = poly->CVertex( ii ) -
pad->GetPosition();
143 pad->Padstack().ForEachUniqueLayer( hashPadLayer );
150 pad->GetLayerSet().RunOnLayers(
176 if( !( aFlags &
HASH_REF ) &&
static_cast<const PCB_FIELD*
>( aItem )->IsReference() )
200 :
text->GetPosition();
224 std::vector<VECTOR2I> points;
226 points.push_back( shape->
GetStart() );
227 points.push_back( shape->
GetEnd() );
242 points.push_back( *it );
322 wxASSERT_MSG(
false,
"Unhandled type in function hash_fp_item() (exporter_gencad.cpp)" );
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
FOOTPRINT * GetParentFootprint() const
virtual LSET GetLayerSet() const
Return a std::bitset of all layers on which the item physically resides.
A base class for most all the KiCad significant classes used in schematics and boards.
KICAD_T Type() const
Returns the type of object.
const VECTOR2I & GetBezierC2() const
SHAPE_POLY_SET & GetPolyShape()
const VECTOR2I & GetEnd() const
Return the ending point of the graphic.
LINE_STYLE GetLineStyle() const
const VECTOR2I & GetStart() const
Return the starting point of the graphic.
const VECTOR2I & GetBezierC1() const
VECTOR2I GetArcMid() const
int GetTextHeight() const
const EDA_ANGLE & GetTextAngle() const
virtual const wxString & GetText() const
Return the string associated with the text object.
GR_TEXT_H_ALIGN_T GetHorizJustify() const
GR_TEXT_V_ALIGN_T GetVertJustify() const
static constexpr PCB_LAYER_ID ALL_LAYERS
! Temporary layer identifier to identify code that is not padstack-aware
VECTOR2I GetCenter() const override
This defaults to the center of the bounding box if not overridden.
int GetWidth() const override
VECTOR2I GetPosition() const override
Represent a set of closed polygons.
CONST_ITERATOR CIterateWithHoles(int aOutline) const
@ ARC
use RECTANGLE instead of RECT to avoid collision in a Windows header
static constexpr void hash_combine(std::size_t &seed)
This is a dummy function to take the final case of hash_combine below.
size_t hash_fp_item(const EDA_ITEM *aItem, int aFlags)
Calculate hash of an EDA_ITEM.
static size_t hash_board_item(const BOARD_ITEM *aItem, int aFlags)
@ HASH_POS
use coordinates relative to the parent object
@ REL_COORD
use coordinates relative to the shape position
PCB_LAYER_ID
A quick note on layer IDs:
This file contains miscellaneous commonly used macros and functions.
#define KI_FALLTHROUGH
The KI_FALLTHROUGH macro is to be used when switch statement cases should purposely fallthrough from ...
@ NPTH
like PAD_PTH, but not plated mechanical use only, no connection allowed
@ PTH
Plated through hole pad.
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)
Calculate the new point of coord coord pX, pY, for a rotation center 0, 0.
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
@ PCB_FIELD_T
class PCB_FIELD, text associated with a footprint property
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
@ PCB_PAD_T
class PAD, a pad in a footprint
@ PCB_TABLE_T
class PCB_TABLE, table of PCB_TABLECELLs