28#include <unordered_map> 
   59#define drc_dbg(level, fmt, ...) \ 
   60    drcPrintDebugMessage( level, wxString::Format( fmt, __VA_ARGS__ ), __FUNCTION__, __LINE__ ); 
 
   68typedef std::function<void( 
const std::shared_ptr<DRC_ITEM>& aItem,
 
  148    void InitEngine( 
const wxFileName& aRulePath );
 
  153    void RunTests( 
EDA_UNITS aUnits, 
bool aReportAllTrackErrors, 
bool aTestFootprints,
 
  177                          int aMarkerLayer, 
const std::function<
void( 
PCB_MARKER* )>& aPathGenerator = {} );
 
  215    static int MatchDpSuffix( 
const wxString& aNetName, wxString& aComplementNet,
 
  216                              wxString& aBaseDpName );
 
  226    void addRule( std::shared_ptr<DRC_RULE>& rule )
 
 
  236    void loadRules( 
const wxFileName& aPath );
 
  257    std::vector<std::shared_ptr<DRC_RULE>>  
m_rules;
 
 
Container for design settings for a BOARD object.
 
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.
 
DS_PROXY_VIEW_ITEM * GetDrawingSheet() const
 
std::map< DRC_CONSTRAINT_T, std::vector< DRC_ENGINE_CONSTRAINT * > * > m_constraintMap
 
friend class DRC_TEST_PROVIDER_CREEPAGE
 
DRC_ENGINE & operator=(const DRC_ENGINE &)=delete
 
bool GetTestFootprints() const
 
void RunTests(EDA_UNITS aUnits, bool aReportAllTrackErrors, bool aTestFootprints, BOARD_COMMIT *aCommit=nullptr)
Run the DRC tests.
 
void addRule(std::shared_ptr< DRC_RULE > &rule)
 
PROGRESS_REPORTER * m_progressReporter
 
void loadRules(const wxFileName &aPath)
Load and parse a rule set from an sexpr text file.
 
std::vector< DRC_TEST_PROVIDER * > m_testProviders
 
std::shared_ptr< KIGFX::VIEW_OVERLAY > GetDebugOverlay() const
 
void SetDesignSettings(BOARD_DESIGN_SETTINGS *aSettings)
 
void SetProgressReporter(PROGRESS_REPORTER *aProgRep)
Set an optional reporter for user-level progress info.
 
void SetDebugOverlay(std::shared_ptr< KIGFX::VIEW_OVERLAY > aOverlay)
 
void SetDrawingSheet(DS_PROXY_VIEW_ITEM *aDrawingSheet)
 
bool GetReportAllTrackErrors() const
 
std::set< int > QueryDistinctConstraints(DRC_CONSTRAINT_T aConstraintId)
 
DS_PROXY_VIEW_ITEM * m_drawingSheet
 
NETLIST * m_schematicNetlist
 
bool KeepRefreshing(bool aWait=false)
 
void SetLogReporter(REPORTER *aReporter)
 
void SetViolationHandler(DRC_VIOLATION_HANDLER aHandler)
Set an optional DRC violation handler (receives DRC_ITEMs and positions).
 
bool m_reportAllTrackErrors
 
bool ReportProgress(double aProgress)
 
DRC_TEST_PROVIDER * GetTestProvider(const wxString &name) const
 
bool HasRulesForConstraintType(DRC_CONSTRAINT_T constraintID)
 
BOARD_DESIGN_SETTINGS * GetDesignSettings() const
 
void SetMaxProgress(int aSize)
 
DRC_ENGINE(BOARD *aBoard=nullptr, BOARD_DESIGN_SETTINGS *aSettings=nullptr)
 
DRC_ENGINE(const DRC_ENGINE &)=delete
 
std::vector< int > m_errorLimits
 
bool IsErrorLimitExceeded(int error_code)
 
void ProcessAssertions(const BOARD_ITEM *a, std::function< void(const DRC_CONSTRAINT *)> aFailureHandler, REPORTER *aReporter=nullptr)
 
DRC_VIOLATION_HANDLER m_violationHandler
 
DRC_CONSTRAINT EvalRules(DRC_CONSTRAINT_T aConstraintType, const BOARD_ITEM *a, const BOARD_ITEM *b, PCB_LAYER_ID aLayer, REPORTER *aReporter=nullptr)
 
std::vector< std::shared_ptr< DRC_RULE > > m_rules
 
std::shared_ptr< DRC_RULE > createImplicitRule(const wxString &name)
 
void ClearViolationHandler()
 
void SetSchematicNetlist(NETLIST *aNetlist)
 
PROGRESS_REPORTER * GetProgressReporter() const
 
std::vector< DRC_TEST_PROVIDER * > GetTestProviders() const
 
static bool IsNetADiffPair(BOARD *aBoard, NETINFO_ITEM *aNet, int &aNetP, int &aNetN)
 
bool IsNetTieExclusion(int aTrackNetCode, PCB_LAYER_ID aTrackLayer, const VECTOR2I &aCollisionPos, BOARD_ITEM *aCollidingItem)
Check if the given collision between a track and another item occurs during the track's entry into a ...
 
std::shared_ptr< KIGFX::VIEW_OVERLAY > m_debugOverlay
 
bool QueryWorstConstraint(DRC_CONSTRAINT_T aRuleId, DRC_CONSTRAINT &aConstraint)
 
NETLIST * GetSchematicNetlist() const
 
std::vector< BOARD_ITEM * > GetItemsMatchingCondition(const wxString &aExpression, DRC_CONSTRAINT_T aConstraint=ASSERTION_CONSTRAINT, REPORTER *aReporter=nullptr)
Evaluate a DRC condition against all board items and return matches.
 
void InitEngine(const wxFileName &aRulePath)
Initialize the DRC engine.
 
DRC_CONSTRAINT EvalZoneConnection(const BOARD_ITEM *a, const BOARD_ITEM *b, PCB_LAYER_ID aLayer, REPORTER *aReporter=nullptr)
 
static int MatchDpSuffix(const wxString &aNetName, wxString &aComplementNet, wxString &aBaseDpName)
Check if the given net is a diff pair, returning its polarity and complement if so.
 
bool ReportPhase(const wxString &aMessage)
 
REPORTER * GetLogReporter() const
 
void SetBoard(BOARD *aBoard)
 
BOARD_DESIGN_SETTINGS * m_designSettings
 
void ReportViolation(const std::shared_ptr< DRC_ITEM > &aItem, const VECTOR2I &aPos, int aMarkerLayer, const std::function< void(PCB_MARKER *)> &aPathGenerator={})
 
Represent a DRC "provider" which runs some DRC functions over a BOARD and spits out DRC_ITEM and posi...
 
LSET is a set of PCB_LAYER_IDs.
 
A collection of nets and the parameters used to route or test these nets.
 
Handle the data for a net.
 
Store information read from a netlist along with the flags used to update the NETLIST in the BOARD.
 
The main frame for Pcbnew.
 
A progress reporter interface for use in multi-threaded environments.
 
A pure virtual class used to derive REPORTER objects from.
 
UNITS_PROVIDER(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnits)
 
void drcPrintDebugMessage(int level, const wxString &msg, const char *function, int line)
 
std::function< void(const std::shared_ptr< DRC_ITEM > &aItem, const VECTOR2I &aPos, int aLayer, const std::function< void(PCB_MARKER *)> &aPathGenerator)> DRC_VIOLATION_HANDLER
 
PCB_LAYER_ID
A quick note on layer IDs:
 
The Cairo implementation of the graphics abstraction layer.
 
std::shared_ptr< DRC_RULE > parentRule
 
DRC_RULE_CONDITION * condition
 
DRC_CONSTRAINT constraint
 
VECTOR2< int32_t > VECTOR2I