163 bool pad_through =
false;
166 ZONE* zone =
nullptr;
171 static int breakhere = 0;
173 switch( item->
Type() )
209 if( fpText->
GetText() == wxT(
"10uH" ) )
235 switch( item->
Type() )
244 pad = static_cast<PAD*>( item );
255 footprint = static_cast<FOOTPRINT*>( item->
GetParent() );
261 via = static_cast<VIA*>( item );
271 footprint = static_cast<FOOTPRINT*>( item->
GetParent() );
277 zone = static_cast<ZONE*>( item );
284 shape = static_cast<PCB_SHAPE*>( item );
291 dimension = static_cast<DIMENSION_BASE*>( item );
299 FP_TEXT *text = static_cast<FP_TEXT*>( item );
335 footprint = static_cast<FOOTPRINT*>( item->
GetParent() );
340 shape = static_cast<FP_SHAPE*>( item );
344 footprint = static_cast<FOOTPRINT*>( item );
348 group = static_cast<PCB_GROUP*>( item );
352 marker = static_cast<PCB_MARKER*>( item );
588 for(
unsigned i = 0; i<
m_List2nd.size(); ++i )
void Empty()
Clear the list.
virtual bool IsLayerLocked(PCB_LAYER_ID layer) const =0
virtual SEARCH_RESULT Visit(INSPECTOR inspector, void *testData, const KICAD_T scanTypes[])
May be re-implemented for each derived class in order to handle all the types given by its member dat...
static const KICAD_T FootprintItems[]
A scan list for primary footprint items.
static const KICAD_T BoardLevelItems[]
A scan list for all primary board items, omitting items which are subordinate to a FOOTPRINT,...
virtual bool IgnoreBlindBuriedVias() const =0
class ALIGNED_DIMENSION, a linear dimension (graphic item)
class LEADER, a leader dimension (graphic item)
class FP_TEXT, text in a footprint
static const KICAD_T AllBoardItems[]
A scan list for all editable board items.
static const KICAD_T Tracks[]
A scan list for only TRACKs.
static const KICAD_T Footprints[]
A scan list for only FOOTPRINTs.
SEARCH_RESULT Inspect(EDA_ITEM *testItem, void *testData) override
The examining function within the INSPECTOR which is passed to the iterate function.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
class PCB_GROUP, a set of BOARD_ITEMs
void SetScanTypes(const KICAD_T *scanTypes)
Record the list of KICAD_T types to consider for collection by the Inspect() function.
A set of BOARD_ITEMs (i.e., without duplicates).
void Collect(BOARD_ITEM *aItem, const KICAD_T aScanList[], const wxPoint &aRefPos, const COLLECTORS_GUIDE &aGuide)
Scan a BOARD_ITEM using this class's Inspector method, which does the collection.
virtual double OnePixelInIU() const =0
bool IsBackLayer(PCB_LAYER_ID aLayerId)
Layer classification: check if it's a back layer.
class CENTER_DIMENSION, a center point marking (graphic item)
virtual bool IgnoreFootprintsOnBack() const =0
virtual bool IgnoreZoneFills() const =0
virtual bool IgnoreNonVisibleLayers() const =0
Smd pad, appears on the solder paste layer (default)
void Append2nd(BOARD_ITEM *item)
class PCB_TEXT, text on a layer
class ARC, an arc track segment on a copper layer
bool IsOnLayer(PCB_LAYER_ID aLayer) const override
Test to see if this object is on the given layer.
virtual PCB_LAYER_ID GetPreferredLayer() const =0
virtual bool IgnoreFPTextOnFront() const =0
std::vector< EDA_ITEM * > m_list
void Collect(BOARD_ITEM *aBoard, const KICAD_T aScanList[])
Tests a BOARD_ITEM using this class's Inspector method, which does the collection.
virtual bool IgnoreTracks() const =0
std::vector< BOARD_ITEM * > m_List2nd
A place to hold collected objects which don't match precisely the search criteria,...
virtual bool IgnoreFootprintsOnFront() const =0
class FP_SHAPE, a footprint edge
class PAD, a pad in a footprint
#define KI_FALLTHROUGH
The KI_FALLTHROUGH macro is to be used when switch statement cases should purposely fallthrough from ...
virtual bool IgnoreMicroVias() const =0
static const KICAD_T PadsOrTracks[]
A scan list for PADs, TRACKs, or VIAs.
int m_PrimaryLength
The number of items that were originally in the primary list before the m_List2nd was concatenated on...
virtual bool IgnoreHiddenFPText() const =0
virtual bool IgnorePreferredLayer() const =0
Provide wildcard behavior regarding the preferred layer.
bool HitTestFilledArea(PCB_LAYER_ID aLayer, const wxPoint &aRefPos, int aAccuracy=0) const
Function HitTestFilledArea tests if the given wxPoint is within the bounds of a filled area of this z...
search types array terminator (End Of Types)
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
bool HitTestForCorner(const wxPoint &refPos, int aAccuracy, SHAPE_POLY_SET::VERTEX_INDEX &aCornerHit) const
Function HitTestForCorner tests if the given wxPoint is near a corner.
class TRACK, a track segment (segment on a copper layer)
This file contains miscellaneous commonly used macros and functions.
virtual bool IgnorePadsOnFront() const =0
PAD_ATTR_T GetAttribute() const
void Append(EDA_ITEM *item)
Add an item to the end of the list.
void SetGuide(const COLLECTORS_GUIDE *aGuide)
Record which COLLECTORS_GUIDE to use.
virtual bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const
Test if aPosition is contained within or on the bounding box of an item.
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Test if aPosition is contained within or on the bounding box of an item.
SEARCH_RESULT Inspect(EDA_ITEM *testItem, void *testData) override
The examining function within the INSPECTOR which is passed to the Iterate function.
INSPECTOR_FUNC m_inspector
PCB_LAYER_ID
A quick note on layer IDs:
virtual bool IsOnLayer(PCB_LAYER_ID aLayer) const
Test to see if this object is on the given layer.
void SetRefPos(const wxPoint &aRefPos)
TEXT_TYPE GetType() const
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Test if aPosition is contained within or on the bounding box of an item.
static const KICAD_T Zones[]
A scan list for zones outlines only.
ZONE handles a list of polygons defining a copper zone.
class ZONE, a copper pour area
const COLLECTORS_GUIDE * m_Guide
Determines which items are to be collected by Inspect()
Like smd, does not appear on the solder paste layer (default) note also has a special attribute in Ge...
const KICAD_T * m_scanTypes
void Collect(BOARD_ITEM *aBoard, const KICAD_T aScanList[])
Collect BOARD_ITEM objects using this class's Inspector method, which does the collection.
virtual bool IgnoreThroughVias() const =0
class PCB_TARGET, a target (graphic item)
class FOOTPRINT, a footprint
bool IsFrontLayer(PCB_LAYER_ID aLayerId)
Layer classification: check if it's a front layer.
static const KICAD_T LockableItems[]
A scan list for TRACKs, VIAs, FOOTPRINTs.
static const KICAD_T DraggableItems[]
A scan list for items that can be dragged.
virtual bool IgnoreFPTextOnBack() const =0
virtual bool IsLocked() const
class MARKER_PCB, a marker used to show something
bool HitTestForEdge(const wxPoint &refPos, int aAccuracy, SHAPE_POLY_SET::VERTEX_INDEX &aCornerHit) const
Function HitTestForEdge tests if the given wxPoint is near a segment defined by 2 corners.
static const KICAD_T Dimensions[]
A scan list for dimensions.
virtual bool IgnorePads() const
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Test if aPosition is contained within or on the bounding box of an item.
class ZONE, managed by a footprint
VIATYPE GetViaType() const
virtual bool IgnoreFPValues() const =0
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
A base class for most all the KiCad significant classes used in schematics and boards.
bool HitTest(const wxPoint &aPosition, int aAccuracy) const override
Test if aPosition is contained within or on the bounding box of an item.
virtual bool IsLayerVisible(PCB_LAYER_ID layer) const =0
virtual bool IgnoreFPReferences() const =0
class ORTHOGONAL_DIMENSION, a linear dimension constrained to x/y
class VIA, a via (like a track segment on a copper layer)
virtual bool IgnorePadsOnBack() const =0
An abstract base class whose derivatives may be passed to a GENERAL_COLLECTOR, telling GENERAL_COLLEC...
virtual bool IgnoreLockedItems() const =0
virtual bool IgnoreLockedLayers() const =0
virtual bool IncludeSecondary() const =0
Determine if the secondary criteria or 2nd choice items should be included.
BOARD_ITEM_CONTAINER * GetParent() const
class PCB_SHAPE, a segment not on copper layers
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
SEARCH_RESULT Inspect(EDA_ITEM *testItem, void *testData) override
The examining function within the INSPECTOR which is passed to the Iterate function.
virtual const wxString & GetText() const
Return the string associated with the text object.
KICAD_T Type() const
Returns the type of object.