47 m_drcEngine( nullptr )
57 const wxPoint& aMarkerPos )
59 if( item->GetViolatingRule() )
62 item->SetViolatingTest(
this );
69 if( ( aCount % aDelta ) == 0 || aCount == aSize - 1 )
89 va_start( vargs, fmt );
91 str.PrintfV( fmt, vargs );
105 auto it =
m_stats.find( ruleToTest );
127 for(
const std::pair<const DRC_RULE* const, int>& stat :
m_stats )
140 const std::function<
bool(
BOARD_ITEM*)>& aFunc )
143 std::bitset<MAX_STRUCT_TYPE_ID> typeMask;
160 if( aTypes.size() == 0 )
163 typeMask[ i ] =
true;
168 typeMask[ aType ] =
true;
173 if( (item->GetLayerSet() & aLayers).any() )
195 if( (item->GetLayerSet() & aLayers).any() )
232 if( ( item->GetLayerSet() & aLayers ).any() )
246 if( ( footprint->Reference().GetLayerSet() & aLayers ).any() )
248 if( !aFunc( &footprint->Reference() ) )
254 if( ( footprint->Value().GetLayerSet() & aLayers ).any() )
256 if( !aFunc( &footprint->Value() ) )
265 for(
PAD*
pad : footprint->Pads() )
268 if( (
pad->GetDrillSizeX() > 0 &&
pad->GetDrillSizeY() > 0 )
269 || (
pad->GetLayerSet() & aLayers ).any() )
279 for(
BOARD_ITEM* dwg : footprint->GraphicalItems() )
281 if( (dwg->GetLayerSet() & aLayers).any() )
302 for(
ZONE* zone : footprint->Zones() )
304 if( (zone->GetLayerSet() & aLayers).any() )
316 if( !aFunc( footprint ) )
330 if(
const FP_TEXT*
text = dyn_cast<const FP_TEXT*>( aItem ) )
332 if( !
text->IsVisible() )
336 if(
const PCB_TEXT*
text = dyn_cast<const PCB_TEXT*>( aItem ) )
338 if( !
text->IsVisible() )
class FP_TEXT, text in a footprint
bool ReportPhase(const wxString &aMessage)
bool isInvisibleText(const BOARD_ITEM *aItem) const
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
virtual void reportViolation(std::shared_ptr< DRC_ITEM > &item, const wxPoint &aMarkerPos)
std::vector< DRC_TEST_PROVIDER * > m_providers
constexpr KICAD_T BaseType(const KICAD_T aType)
Return the underlying type of the given type.
class PCB_TEXT, text on a layer
class PCB_ARC, an arc track segment on a copper layer
virtual bool reportProgress(int aCount, int aSize, int aDelta)
class FP_SHAPE, a footprint edge
class PAD, a pad in a footprint
virtual const wxString GetName() const
virtual void reportRuleStatistics()
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
class PCB_TRACK, a track segment (segment on a copper layer)
DRC_RULE * GetParentRule() const
LSET is a set of PCB_LAYER_IDs.
virtual bool reportPhase(const wxString &aStageName)
std::unordered_map< const DRC_RULE *, int > m_stats
FOOTPRINTS & Footprints()
bool ReportProgress(double aProgress)
virtual void accountCheck(const DRC_RULE *ruleToTest)
Handle a list of polygons defining a copper zone.
class ZONE, a copper pour area
EDA_UNITS userUnits() const
virtual const wxString GetDescription() const
class PCB_DIMENSION_BASE: abstract dimension meta-type
class PCB_TARGET, a target (graphic item)
class FOOTPRINT, a footprint
~DRC_TEST_PROVIDER_REGISTRY()
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
int forEachGeometryItem(const std::vector< KICAD_T > &aTypes, LSET aLayers, const std::function< bool(BOARD_ITEM *)> &aFunc)
Represent a DRC "provider" which runs some DRC functions over a BOARD and spits out #DRC_ITEMs and po...
Information pertinent to a Pcbnew printed circuit board.
static std::vector< KICAD_T > s_allBasicItems
void ReportAux(const wxString &aStr)
static std::vector< KICAD_T > s_allBasicItemsButZones
class ZONE, managed by a footprint
class PCB_VIA, a via (like a track segment on a copper layer)
EDA_UNITS UserUnits() const
void ReportViolation(const std::shared_ptr< DRC_ITEM > &aItem, const wxPoint &aPos)
class PCB_SHAPE, a segment not on copper layers
virtual void reportAux(wxString fmt,...)