48 m_drcEngine( nullptr )
75 const VECTOR2I& aMarkerPos,
int aMarkerLayer,
78 item->SetViolatingTest(
this );
85 if( ( aCount % aDelta ) == 0 || aCount == aSize - 1 )
103 const std::function<
bool(
BOARD_ITEM*)>& aFunc )
106 std::bitset<MAX_STRUCT_TYPE_ID> typeMask;
109 if( aTypes.size() == 0 )
112 typeMask[ i ] =
true;
117 typeMask[ aType ] =
true;
122 if( (item->GetLayerSet() & aLayers).any() )
144 if( (item->GetLayerSet() & aLayers).any() )
209 if( ( item->GetLayerSet() & aLayers ).any() )
223 for(
PCB_FIELD* field : footprint->GetFields() )
225 if( ( field->GetLayerSet() & aLayers ).any() )
227 if( !aFunc( field ) )
237 for(
PAD*
pad : footprint->Pads() )
240 if(
pad->HasHole() || (
pad->GetLayerSet() & aLayers ).any() )
250 for(
BOARD_ITEM* dwg : footprint->GraphicalItems() )
252 if( (dwg->GetLayerSet() & aLayers).any() )
287 for(
ZONE* zone : footprint->Zones() )
289 if( (zone->GetLayerSet() & aLayers).any() )
301 if( !aFunc( footprint ) )
316 if( !field->IsVisible() )
330 if( constraint_str == actual_str )
337 return wxString::Format( aFormatString, aSource, std::move( constraint_str ), std::move( actual_str ) );
346 if( constraint_str == actual_str )
353 return wxString::Format( aFormatString, aSource, std::move( constraint_str ), std::move( actual_str ) );
constexpr EDA_IU_SCALE pcbIUScale
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Information pertinent to a Pcbnew printed circuit board.
const ZONES & Zones() const
const FOOTPRINTS & Footprints() const
const TRACKS & Tracks() const
const DRAWINGS & Drawings() const
void ReportViolation(const std::shared_ptr< DRC_ITEM > &aItem, const VECTOR2I &aPos, int aMarkerLayer, DRC_CUSTOM_MARKER_HANDLER *aCustomHandler=nullptr)
bool ReportProgress(double aProgress)
bool ReportPhase(const wxString &aMessage)
std::vector< DRC_TEST_PROVIDER * > m_providers
~DRC_TEST_PROVIDER_REGISTRY()
Represent a DRC "provider" which runs some DRC functions over a BOARD and spits out DRC_ITEM and posi...
static std::vector< KICAD_T > s_allBasicItemsButZones
virtual bool reportPhase(const wxString &aStageName)
virtual void reportViolation(std::shared_ptr< DRC_ITEM > &item, const VECTOR2I &aMarkerPos, int aMarkerLayer, DRC_CUSTOM_MARKER_HANDLER *aCustomHandler=nullptr)
int forEachGeometryItem(const std::vector< KICAD_T > &aTypes, const LSET &aLayers, const std::function< bool(BOARD_ITEM *)> &aFunc)
static std::vector< KICAD_T > s_allBasicItems
bool isInvisibleText(const BOARD_ITEM *aItem) const
virtual const wxString GetName() const
wxString formatMsg(const wxString &aFormatString, const wxString &aSource, double aConstraint, double aActual, EDA_DATA_TYPE aDataType=EDA_DATA_TYPE::DISTANCE)
virtual bool reportProgress(size_t aCount, size_t aSize, size_t aDelta=1)
LSET is a set of PCB_LAYER_IDs.
wxString MessageTextFromValue(double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
A lower-precision version of StringFromValue().
wxString StringFromValue(double aValue, bool aAddUnitLabel=false, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
Converts aValue in internal units into a united string.
Handle a list of polygons defining a copper zone.
std::function< void(PCB_MARKER *aMarker)> DRC_CUSTOM_MARKER_HANDLER
EDA_DATA_TYPE
The type of unit.
constexpr KICAD_T BaseType(const KICAD_T aType)
Return the underlying type of the given type.
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
@ 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_GROUP_T
class PCB_GROUP, a set of BOARD_ITEMs
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
@ PCB_ZONE_T
class ZONE, a copper pour area
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
@ PCB_FIELD_T
class PCB_FIELD, text associated with a footprint property
@ PCB_TARGET_T
class PCB_TARGET, a target (graphic item)
@ PCB_TABLECELL_T
class PCB_TABLECELL, PCB_TEXTBOX for use in tables
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
@ PCB_PAD_T
class PAD, a pad in a footprint
@ PCB_ARC_T
class PCB_ARC, an arc track segment on a copper layer
@ PCB_DIMENSION_T
class PCB_DIMENSION_BASE: abstract dimension meta-type
@ PCB_TABLE_T
class PCB_TABLE, table of PCB_TABLECELLs
@ PCB_TRACE_T
class PCB_TRACK, a track segment (segment on a copper layer)