163 bool pad_through =
false;
166 ZONE* zone =
nullptr;
171 static int breakhere = 0;
173 switch( item->
Type() )
209 if( fpText->
GetText() == wxT(
"10uH" ) )
234 switch( item->
Type() )
243 pad = static_cast<PAD*>( item );
254 footprint = static_cast<FOOTPRINT*>( item->
GetParent() );
260 via = static_cast<PCB_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<PCB_DIMENSION_BASE*>( item );
316 switch(
text->GetType() )
339 footprint = static_cast<FOOTPRINT*>( item->
GetParent() );
344 shape = static_cast<FP_SHAPE*>( item );
348 footprint = static_cast<FOOTPRINT*>( item );
352 group = static_cast<PCB_GROUP*>( item );
356 marker = static_cast<PCB_MARKER*>( item );
412 auto type =
via->GetViaType();
592 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 PCB_DIM_ALIGNED, a linear dimension (graphic item)
class PCB_DIM_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
class PCB_DIM_CENTER, a center point marking (graphic item)
virtual bool IgnoreFootprintsOnBack() const =0
Like smd, does not appear on the solder paste layer (default)
virtual bool IgnoreZoneFills() const =0
Smd pad, appears on the solder paste layer (default)
virtual bool IgnoreNonVisibleLayers() const =0
void Append2nd(BOARD_ITEM *item)
class PCB_TEXT, text on a layer
class PCB_ARC, an arc track segment on a copper 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[])
Test 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.
virtual bool IsLocked() const
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
Test if the given wxPoint is within the bounds of a filled area of this zone.
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
Test if the given wxPoint is near a corner.
class PCB_TRACK, a track segment (segment on a copper layer)
This file contains miscellaneous commonly used macros and functions.
virtual bool IgnorePadsOnFront() const =0
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 inside or on the boundary of this item.
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this 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
virtual bool IsOnLayer(PCB_LAYER_ID aLayer) const
Test to see if this object is on the given layer.
bool IsBackLayer(PCB_LAYER_ID aLayerId)
Layer classification: check if it's a back layer.
void SetRefPos(const wxPoint &aRefPos)
static const KICAD_T Zones[]
A scan list for zones outlines only.
Handle a list of polygons defining a copper zone.
class ZONE, a copper pour area
const COLLECTORS_GUIDE * m_Guide
Determine which items are to be collected by Inspect().
bool IsFrontLayer(PCB_LAYER_ID aLayerId)
Layer classification: check if it's a front layer.
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
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
class PCB_MARKER, a marker used to show something
bool HitTestForEdge(const wxPoint &refPos, int aAccuracy, SHAPE_POLY_SET::VERTEX_INDEX &aCornerHit) const
Test 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 inside or on the boundary of this item.
PCB_LAYER_ID
A quick note on layer IDs:
class ZONE, managed by a footprint
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.
virtual bool IsLayerVisible(PCB_LAYER_ID layer) const =0
virtual bool IgnoreFPReferences() const =0
class PCB_DIM_ORTHOGONAL, a linear dimension constrained to x/y
class PCB_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.
bool HitTest(const wxPoint &aPosition, int aAccuracy) const override
Test if aPosition is inside or on the boundary of this item.
KICAD_T Type() const
Returns the type of object.