KiCad PCB EDA Suite
|
Design Rule Checker object that performs all the DRC tests. More...
#include <drc_engine.h>
Classes | |
struct | DRC_ENGINE_CONSTRAINT |
Public Member Functions | |
DRC_ENGINE (BOARD *aBoard=nullptr, BOARD_DESIGN_SETTINGS *aSettings=nullptr) | |
virtual | ~DRC_ENGINE () |
void | SetBoard (BOARD *aBoard) |
BOARD * | GetBoard () const |
void | SetDesignSettings (BOARD_DESIGN_SETTINGS *aSettings) |
BOARD_DESIGN_SETTINGS * | GetDesignSettings () const |
void | SetSchematicNetlist (NETLIST *aNetlist) |
NETLIST * | GetSchematicNetlist () const |
void | SetDrawingSheet (DS_PROXY_VIEW_ITEM *aDrawingSheet) |
DS_PROXY_VIEW_ITEM * | GetDrawingSheet () const |
void | SetDebugOverlay (std::shared_ptr< KIGFX::VIEW_OVERLAY > aOverlay) |
std::shared_ptr< KIGFX::VIEW_OVERLAY > | GetDebugOverlay () const |
void | SetViolationHandler (DRC_VIOLATION_HANDLER aHandler) |
Set an optional DRC violation handler (receives DRC_ITEMs and positions). | |
void | ClearViolationHandler () |
void | SetProgressReporter (PROGRESS_REPORTER *aProgRep) |
Set an optional reporter for user-level progress info. | |
PROGRESS_REPORTER * | GetProgressReporter () const |
void | SetLogReporter (REPORTER *aReporter) |
void | InitEngine (const wxFileName &aRulePath) |
Initialize the DRC engine. | |
void | RunTests (EDA_UNITS aUnits, bool aReportAllTrackErrors, bool aTestFootprints, BOARD_COMMIT *aCommit=nullptr) |
Run the DRC tests. | |
bool | IsErrorLimitExceeded (int error_code) |
DRC_CONSTRAINT | EvalRules (DRC_CONSTRAINT_T aConstraintType, const BOARD_ITEM *a, const BOARD_ITEM *b, PCB_LAYER_ID aLayer, REPORTER *aReporter=nullptr) |
DRC_CONSTRAINT | EvalZoneConnection (const BOARD_ITEM *a, const BOARD_ITEM *b, PCB_LAYER_ID aLayer, REPORTER *aReporter=nullptr) |
void | ProcessAssertions (const BOARD_ITEM *a, std::function< void(const DRC_CONSTRAINT *)> aFailureHandler, REPORTER *aReporter=nullptr) |
bool | HasRulesForConstraintType (DRC_CONSTRAINT_T constraintID) |
bool | GetReportAllTrackErrors () const |
bool | GetTestFootprints () const |
bool | RulesValid () |
void | ReportViolation (const std::shared_ptr< DRC_ITEM > &aItem, const VECTOR2I &aPos, int aMarkerLayer, DRC_CUSTOM_MARKER_HANDLER *aCustomHandler=nullptr) |
bool | KeepRefreshing (bool aWait=false) |
void | AdvanceProgress () |
void | SetMaxProgress (int aSize) |
bool | ReportProgress (double aProgress) |
bool | ReportPhase (const wxString &aMessage) |
void | ReportAux (const wxString &aStr) |
bool | IsCancelled () const |
bool | QueryWorstConstraint (DRC_CONSTRAINT_T aRuleId, DRC_CONSTRAINT &aConstraint) |
std::set< int > | QueryDistinctConstraints (DRC_CONSTRAINT_T aConstraintId) |
std::vector< DRC_TEST_PROVIDER * > | GetTestProviders () const |
DRC_TEST_PROVIDER * | GetTestProvider (const wxString &name) const |
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 net-tie pad. | |
EDA_UNITS | GetUserUnits () const |
void | SetUserUnits (EDA_UNITS aUnits) |
virtual void | GetUnitPair (EDA_UNITS &aPrimaryUnit, EDA_UNITS &aSecondaryUnits) |
const EDA_IU_SCALE & | GetIuScale () const |
virtual ORIGIN_TRANSFORMS & | GetOriginTransforms () |
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. | |
wxString | StringFromValue (const EDA_ANGLE &aValue, bool aAddUnitLabel=false) const |
wxString | StringFromOptionalValue (std::optional< int > aValue, bool aAddUnitLabel=false, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const |
Converts an optional aValue in internal units into a united string. | |
wxString | MessageTextFromValue (double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const |
A lower-precision version of StringFromValue(). | |
wxString | MessageTextFromValue (const EDA_ANGLE &aValue, bool aAddUnitLabel=true) const |
wxString | MessageTextFromMinOptMax (const MINOPTMAX< int > &aValue) const |
int | ValueFromString (const wxString &aTextValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const |
Converts aTextValue in aUnits to internal units used by the frame. | |
std::optional< int > | OptionalValueFromString (const wxString &aTextValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const |
Converts aTextValue in aUnits to internal units used by the frame. | |
EDA_ANGLE | AngleValueFromString (const wxString &aTextValue) const |
Static Public Member Functions | |
static bool | IsNetADiffPair (BOARD *aBoard, NETINFO_ITEM *aNet, int &aNetP, int &aNetN) |
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. | |
Static Public Attributes | |
static const wxString | NullUiString = "" |
The string that is used in the UI to represent a null value. | |
Protected Attributes | |
BOARD_DESIGN_SETTINGS * | m_designSettings |
BOARD * | m_board |
DS_PROXY_VIEW_ITEM * | m_drawingSheet |
NETLIST * | m_schematicNetlist |
std::vector< std::shared_ptr< DRC_RULE > > | m_rules |
bool | m_rulesValid |
std::vector< DRC_TEST_PROVIDER * > | m_testProviders |
std::vector< int > | m_errorLimits |
bool | m_reportAllTrackErrors |
bool | m_testFootprints |
std::map< DRC_CONSTRAINT_T, std::vector< DRC_ENGINE_CONSTRAINT * > * > | m_constraintMap |
DRC_VIOLATION_HANDLER | m_violationHandler |
REPORTER * | m_reporter |
PROGRESS_REPORTER * | m_progressReporter |
std::shared_ptr< KIGFX::VIEW_OVERLAY > | m_debugOverlay |
Private Member Functions | |
void | addRule (std::shared_ptr< DRC_RULE > &rule) |
void | loadRules (const wxFileName &aPath) |
Load and parse a rule set from an sexpr text file. | |
void | compileRules () |
void | loadImplicitRules () |
std::shared_ptr< DRC_RULE > | createImplicitRule (const wxString &name) |
Private Attributes | |
const EDA_IU_SCALE & | m_iuScale |
EDA_UNITS | m_userUnits |
Friends | |
class | DRC_TEST_PROVIDER_CLEARANCE_BASE |
class | DRC_TEST_PROVIDER_CREEPAGE |
Design Rule Checker object that performs all the DRC tests.
Optionally reports violations via a DRC_VIOLATION_HANDLER, user-level progress via a PROGRESS_REPORTER and rule parse errors via a REPORTER, all set through various setter calls.
Note that EvalRules() has yet another optional REPORTER for reporting resolution info to the user.
Definition at line 85 of file drc_engine.h.
DRC_ENGINE::DRC_ENGINE | ( | BOARD * | aBoard = nullptr , |
BOARD_DESIGN_SETTINGS * | aSettings = nullptr |
||
) |
Definition at line 78 of file drc_engine.cpp.
References DRCE_FIRST, DRCE_LAST, ERROR_LIMIT, and m_errorLimits.
|
virtual |
Definition at line 97 of file drc_engine.cpp.
References m_constraintMap, and m_rules.
|
inlineprivate |
Definition at line 213 of file drc_engine.h.
References m_rules.
Referenced by createImplicitRule(), and loadImplicitRules().
void DRC_ENGINE::AdvanceProgress | ( | ) |
Definition at line 1685 of file drc_engine.cpp.
References PROGRESS_REPORTER::AdvanceProgress(), and m_progressReporter.
|
inlineinherited |
Definition at line 188 of file units_provider.h.
References DEGREES_T, EDA_UNIT_UTILS::UI::DoubleValueFromString(), and UNITS_PROVIDER::GetIuScale().
Referenced by PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), and PCB_FIELDS_GRID_TABLE::SetValue().
|
inline |
Definition at line 122 of file drc_engine.h.
References m_violationHandler.
|
private |
Definition at line 521 of file drc_engine.cpp.
References DRC_RULE_CONDITION::Compile(), DRC_ENGINE::DRC_ENGINE_CONSTRAINT::condition, DRC_ENGINE::DRC_ENGINE_CONSTRAINT::constraint, DRC_ENGINE::DRC_ENGINE_CONSTRAINT::layerTest, m_constraintMap, m_rules, DRC_CONSTRAINT::m_Type, DRC_ENGINE::DRC_ENGINE_CONSTRAINT::parentRule, and ReportAux().
Referenced by InitEngine().
|
private |
Definition at line 140 of file drc_engine.cpp.
References addRule(), and name.
Referenced by loadImplicitRules().
DRC_CONSTRAINT DRC_ENGINE::EvalRules | ( | DRC_CONSTRAINT_T | aConstraintType, |
const BOARD_ITEM * | a, | ||
const BOARD_ITEM * | b, | ||
PCB_LAYER_ID | aLayer, | ||
REPORTER * | aReporter = nullptr |
||
) |
Definition at line 690 of file drc_engine.cpp.
References _, ANNULAR_WIDTH_CONSTRAINT, ASSERTION_CONSTRAINT, B_CrtYd, LSET::BackMask(), CLEARANCE_CONSTRAINT, CONNECTION_WIDTH_CONSTRAINT, COURTYARD_CLEARANCE_CONSTRAINT, CREEPAGE_CONSTRAINT, DIFF_PAIR_GAP_CONSTRAINT, DISALLOW_CONSTRAINT, DRC_DISALLOW_BB_VIAS, DRC_DISALLOW_FOOTPRINTS, DRC_DISALLOW_GRAPHICS, DRC_DISALLOW_HOLES, DRC_DISALLOW_MICRO_VIAS, DRC_DISALLOW_PADS, DRC_DISALLOW_TEXTS, DRC_DISALLOW_TRACKS, DRC_DISALLOW_VIAS, DRC_DISALLOW_ZONES, EDGE_CLEARANCE_CONSTRAINT, EscapeHTML(), F_CrtYd, LSET::FrontMask(), BOARD_CONNECTED_ITEM::GetClearanceOverrides(), FOOTPRINT::GetCourtyard(), BOARD::GetEnabledLayers(), EDA_ITEM::GetFlags(), EDA_ITEM::GetItemDescription(), FOOTPRINT::GetItemDescription(), ZONE::GetItemDescription(), BOARD_ITEM::GetLayerSet(), BOARD_CONNECTED_ITEM::GetLocalClearance(), FOOTPRINT::GetLocalZoneConnection(), ZONE::GetMinThickness(), FOOTPRINT::GetNetTieCache(), ZONE::GetPadConnection(), BOARD_ITEM::GetParentFootprint(), DRC_CONSTRAINT::GetParentRule(), ZONE::GetThermalReliefGap(), ZONE::GetThermalReliefSpokeWidth(), BOARD_ITEM::HasDrilledHole(), HOLE_CLEARANCE_CONSTRAINT, HOLE_PROXY, HOLE_SIZE_CONSTRAINT, HOLE_TO_HOLE_CONSTRAINT, BOARD_ITEM::IsConnected(), SHAPE_POLY_SET::IsEmpty(), isKeepoutZone(), BOARD_ITEM::IsOnCopperLayer(), LENGTH_CONSTRAINT, m_board, m_constraintMap, m_designSettings, DRC_CONSTRAINT::m_DisallowFlags, BOARD_DESIGN_SETTINGS::m_HoleClearance, DRC_RULE::m_Implicit, DRC_CONSTRAINT::m_ImplicitMin, BOARD_DESIGN_SETTINGS::m_MinClearance, DRC_CONSTRAINT::m_Type, DRC_CONSTRAINT::m_Value, DRC_CONSTRAINT::m_ZoneConnection, MAX_UNCOUPLED_CONSTRAINT, EDA_UNIT_UTILS::UI::MessageTextFromValue(), UNITS_PROVIDER::MessageTextFromValue(), MINOPTMAX< T >::Min(), MIN_RESOLVED_SPOKES_CONSTRAINT, NULL_CONSTRAINT, pad, PCB_ARC_T, PCB_FIELD_T, PCB_FOOTPRINT_T, PCB_LOCATE_HOLE_T, PCB_PAD_T, PCB_SHAPE_T, PCB_TABLE_T, PCB_TEXT_T, PCB_TEXTBOX_T, PCB_TRACE_T, PCB_VIA_T, PCB_ZONE_T, PHYSICAL_CLEARANCE_CONSTRAINT, PHYSICAL_HOLE_CLEARANCE_CONSTRAINT, PrintZoneConnection(), REPORT, MINOPTMAX< T >::SetMin(), DRC_CONSTRAINT::SetName(), MINOPTMAX< T >::SetOpt(), DRC_CONSTRAINT::SetParentRule(), SILK_CLEARANCE_CONSTRAINT, SKEW_CONSTRAINT, TEXT_HEIGHT_CONSTRAINT, TEXT_THICKNESS_CONSTRAINT, THERMAL_RELIEF_GAP_CONSTRAINT, THERMAL_SPOKE_WIDTH_CONSTRAINT, TRACK_WIDTH_CONSTRAINT, EDA_ITEM::Type(), UNDEFINED_LAYER, unityScale, VIA_DIAMETER_CONSTRAINT, and ZONE_CONNECTION_CONSTRAINT.
Referenced by DRC_TEST_PROVIDER_HOLE_SIZE::checkPadHole(), DRC_TEST_PROVIDER_HOLE_SIZE::checkViaHole(), EvalZoneConnection(), DRC_TEST_PROVIDER_ANNULAR_WIDTH::Run(), DRC_TEST_PROVIDER_CONNECTION_WIDTH::Run(), test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run(), DRC_TEST_PROVIDER_DISALLOW::Run(), DRC_TEST_PROVIDER_SILK_CLEARANCE::Run(), DRC_TEST_PROVIDER_TEXT_DIMS::Run(), DRC_TEST_PROVIDER_TRACK_ANGLE::Run(), DRC_TEST_PROVIDER_TRACK_SEGMENT_LENGTH::Run(), DRC_TEST_PROVIDER_TRACK_WIDTH::Run(), DRC_TEST_PROVIDER_VIA_DIAMETER::Run(), DRC_TEST_PROVIDER_MATCHED_LENGTH::runInternal(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::testAgainstEdge(), DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::testCourtyardClearances(), DRC_TEST_PROVIDER_CREEPAGE::testCreepage(), DRC_TEST_PROVIDER_HOLE_TO_HOLE::testHoleAgainstHole(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstItem(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testItemAgainstZone(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstZones(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testKnockoutTextAgainstZone(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testSingleLayerItemAgainstItem(), and DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZonesToZones().
DRC_CONSTRAINT DRC_ENGINE::EvalZoneConnection | ( | const BOARD_ITEM * | a, |
const BOARD_ITEM * | b, | ||
PCB_LAYER_ID | aLayer, | ||
REPORTER * | aReporter = nullptr |
||
) |
Definition at line 656 of file drc_engine.cpp.
References _, EscapeHTML(), EvalRules(), DRC_CONSTRAINT::m_ZoneConnection, pad, PCB_PAD_T, PrintZoneConnection(), REPORT, EDA_ITEM::Type(), and ZONE_CONNECTION_CONSTRAINT.
|
inline |
Definition at line 96 of file drc_engine.h.
References m_board.
Referenced by DRC_TEST_PROVIDER::forEachGeometryItem(), DRC_TEST_PROVIDER_CONNECTION_WIDTH::layerDesc(), DRC_TEST_PROVIDER_SLIVER_CHECKER::layerDesc(), DRC_CACHE_GENERATOR::Run(), DRC_TEST_PROVIDER_ANNULAR_WIDTH::Run(), DRC_TEST_PROVIDER_CONNECTION_WIDTH::Run(), DRC_TEST_PROVIDER_CONNECTIVITY::Run(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::Run(), DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::Run(), DRC_TEST_PROVIDER_CREEPAGE::Run(), test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run(), DRC_TEST_PROVIDER_DISALLOW::Run(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run(), DRC_TEST_PROVIDER_FOOTPRINT_CHECKS::Run(), DRC_TEST_PROVIDER_HOLE_SIZE::Run(), DRC_TEST_PROVIDER_HOLE_TO_HOLE::Run(), DRC_TEST_PROVIDER_LIBRARY_PARITY::Run(), DRC_TEST_PROVIDER_MISC::Run(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::Run(), DRC_TEST_PROVIDER_SILK_CLEARANCE::Run(), DRC_TEST_PROVIDER_SLIVER_CHECKER::Run(), DRC_TEST_PROVIDER_SOLDER_MASK::Run(), DRC_TEST_PROVIDER_TEXT_MIRRORING::Run(), DRC_TEST_PROVIDER_TRACK_ANGLE::Run(), DRC_TEST_PROVIDER_TRACK_SEGMENT_LENGTH::Run(), DRC_TEST_PROVIDER_TRACK_WIDTH::Run(), DRC_TEST_PROVIDER_VIA_DIAMETER::Run(), DRC_TEST_PROVIDER_ZONE_CONNECTIONS::Run(), DRC_TEST_PROVIDER_MATCHED_LENGTH::runInternal(), DRC_TEST_PROVIDER_SCHEMATIC_PARITY::testNetlist(), and DRC_TEST_PROVIDER_ZONE_CONNECTIONS::testZoneLayer().
|
inline |
Definition at line 112 of file drc_engine.h.
References m_debugOverlay.
Referenced by test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run().
|
inline |
Definition at line 99 of file drc_engine.h.
References m_designSettings.
Referenced by IsNetTieExclusion().
|
inline |
Definition at line 105 of file drc_engine.h.
References m_drawingSheet.
Referenced by DRC_TEST_PROVIDER_MISC::testTextVars().
|
inlineinherited |
Definition at line 59 of file units_provider.h.
References UNITS_PROVIDER::m_iuScale.
Referenced by UNITS_PROVIDER::AngleValueFromString(), GRID_MENU::BuildChoiceList(), RC_ITEM::GetJsonViolation(), UNITS_PROVIDER::MessageTextFromMinOptMax(), UNITS_PROVIDER::MessageTextFromValue(), UNIT_BINDER::onUnitsChanged(), PANEL_SETUP_BOARD_STACKUP::onUnitsChanged(), UNITS_PROVIDER::OptionalValueFromString(), PANEL_GRID_SETTINGS::RebuildGridSizes(), COMMON_TOOLS::Reset(), UNITS_PROVIDER::StringFromOptionalValue(), UNITS_PROVIDER::StringFromValue(), DIALOG_GRID_SETTINGS::TransferDataFromWindow(), DIALOG_GRID_SETTINGS::TransferDataToWindow(), GRID::UserUnitsMessageText(), and UNITS_PROVIDER::ValueFromString().
|
inlinevirtualinherited |
Reimplemented in EDA_BASE_FRAME, and PCB_BASE_FRAME.
Definition at line 62 of file units_provider.h.
|
inline |
Definition at line 131 of file drc_engine.h.
References m_progressReporter.
Referenced by DRC_CACHE_GENERATOR::Run(), and DRC_TEST_PROVIDER_SLIVER_CHECKER::Run().
|
inline |
Definition at line 170 of file drc_engine.h.
References m_reportAllTrackErrors.
Referenced by DRC_TEST_PROVIDER_EDGE_CLEARANCE::testAgainstEdge(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testSingleLayerItemAgainstItem(), and DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackClearances().
|
inline |
Definition at line 102 of file drc_engine.h.
References m_schematicNetlist.
Referenced by DRC_TEST_PROVIDER_SCHEMATIC_PARITY::Run().
|
inline |
Definition at line 171 of file drc_engine.h.
References m_testFootprints.
Referenced by DRC_TEST_PROVIDER_SCHEMATIC_PARITY::Run().
DRC_TEST_PROVIDER * DRC_ENGINE::GetTestProvider | ( | const wxString & | name | ) | const |
Definition at line 1882 of file drc_engine.cpp.
References m_testProviders, and name.
|
inline |
Definition at line 189 of file drc_engine.h.
References m_testProviders.
|
inlinevirtualinherited |
Reimplemented in EDA_DRAW_FRAME.
Definition at line 48 of file units_provider.h.
References UNITS_PROVIDER::GetUserUnits(), and EDA_UNIT_UTILS::IsImperialUnit().
Referenced by PANEL_GRID_SETTINGS::RebuildGridSizes().
|
inlineinherited |
Definition at line 45 of file units_provider.h.
References UNITS_PROVIDER::m_userUnits.
Referenced by DIALOG_BOOK_REPORTER::AddHTMLPage(), PANEL_SYMBOL_CHOOSER::constructRightPanel(), PG_UNIT_EDITOR::CreateControls(), PCB::IFACE::CreateKiWindow(), DIALOG_SHIM::DIALOG_SHIM(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), PL_EDITOR_FRAME::DisplayGridMsg(), EDA_DRAW_FRAME::DisplayUnitsMsg(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::drawOneBezier(), DRAWING_TOOL::drawShape(), DRAWING_TOOL::DrawSpecificationStackup(), EVT_GRID_CMD_CELL_CHANGED(), FOOTPRINT_PREVIEW_PANEL::FOOTPRINT_PREVIEW_PANEL(), PCB_NET_INSPECTOR_PANEL::generateReport(), RC_ITEM::GetJsonViolation(), GERBER_DRAW_ITEM::GetMsgPanelInfo(), WX_GRID::GetOptionalUnitValue(), UNITS_PROVIDER::GetUnitPair(), EDA_DRAW_FRAME::GetUnitPair(), WX_GRID::GetUnitValue(), GetUserUnits(), UNIT_BINDER::init(), FIELDS_GRID_TABLE::initGrid(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), UNITS_PROVIDER::MessageTextFromMinOptMax(), UNITS_PROVIDER::MessageTextFromValue(), PANEL_SETUP_BOARD_STACKUP::onAdjustDielectricThickness(), WX_GRID::onCellEditorHidden(), PANEL_SETUP_BOARD_STACKUP::onExportToClipboard(), DIALOG_ERC::OnSaveReport(), PANEL_PREVIEW_3D_MODEL::onUnitsChanged(), PANEL_SETUP_NETCLASSES::onUnitsChanged(), UNIT_BINDER::onUnitsChanged(), DIALOG_TRACK_VIA_PROPERTIES::onUnitsChanged(), PANEL_SETUP_BOARD_STACKUP::onUnitsChanged(), DIALOG_GENERATORS::onUnitsChanged(), UNITS_PROVIDER::OptionalValueFromString(), PANEL_FOOTPRINT_CHOOSER::PANEL_FOOTPRINT_CHOOSER(), PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL(), PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES(), PCB_FIELDS_GRID_TABLE::PCB_FIELDS_GRID_TABLE(), PG_UNIT_EDITOR::PG_UNIT_EDITOR(), PIN_TABLE_DATA_MODEL::PIN_TABLE_DATA_MODEL(), POSITION_RELATIVE_TOOL::PositionRelative(), DRC_TOOL::RunTests(), EDA_DRAW_FRAME::SaveSettings(), PCB_BASE_FRAME::SetBoard(), WX_GRID::SetUnitsProvider(), PIN_TABLE_DATA_MODEL::SetValue(), FIELDS_GRID_TABLE::SetValue(), PCB_FIELDS_GRID_TABLE::SetValue(), GERBVIEW_INSPECTION_TOOL::ShowDCodes(), UNITS_PROVIDER::StringFromOptionalValue(), UNITS_PROVIDER::StringFromValue(), COMMON_TOOLS::ToggleUnits(), EDA_DRAW_FRAME::ToggleUserUnits(), PCB_BASE_FRAME::unitsChangeRefresh(), EDITOR_CONDITIONS::unitsFunc(), GERBVIEW_FRAME::updateDCodeSelectBox(), PG_UNIT_EDITOR::UpdateFrame(), PL_EDITOR_FRAME::UpdateStatusBar(), DRC_TOOL::userUnits(), GRID::UserUnitsMessageText(), and UNITS_PROVIDER::ValueFromString().
bool DRC_ENGINE::HasRulesForConstraintType | ( | DRC_CONSTRAINT_T | constraintID | ) |
Definition at line 1727 of file drc_engine.cpp.
References m_constraintMap.
Referenced by DRC_TEST_PROVIDER_ANNULAR_WIDTH::Run(), DRC_TEST_PROVIDER_TEXT_DIMS::Run(), DRC_TEST_PROVIDER_TRACK_ANGLE::Run(), DRC_TEST_PROVIDER_TRACK_SEGMENT_LENGTH::Run(), DRC_TEST_PROVIDER_TRACK_WIDTH::Run(), and DRC_TEST_PROVIDER_VIA_DIAMETER::Run().
void DRC_ENGINE::InitEngine | ( | const wxFileName & | aRulePath | ) |
Initialize the DRC engine.
PARSE_ERROR | if the rules file contains errors |
Definition at line 552 of file drc_engine.cpp.
References compileRules(), DRCE_FIRST, DRCE_LAST, ERROR_LIMIT, DRC_TEST_PROVIDER_REGISTRY::GetTestProviders(), BOARD::IncrementTimeStamp(), DRC_TEST_PROVIDER_REGISTRY::Instance(), loadImplicitRules(), loadRules(), m_board, m_constraintMap, m_errorLimits, m_rules, m_rulesValid, m_testProviders, and ReportAux().
Referenced by DoCourtyardInvalidTest(), and DoCourtyardOverlapTest().
bool DRC_ENGINE::IsCancelled | ( | ) | const |
Definition at line 1721 of file drc_engine.cpp.
References PROGRESS_REPORTER::IsCancelled(), and m_progressReporter.
Referenced by DRC_CACHE_GENERATOR::Run(), DRC_TEST_PROVIDER_ANNULAR_WIDTH::Run(), DRC_TEST_PROVIDER_CONNECTION_WIDTH::Run(), DRC_TEST_PROVIDER_CONNECTIVITY::Run(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::Run(), DRC_TEST_PROVIDER_CREEPAGE::Run(), DRC_TEST_PROVIDER_DISALLOW::Run(), DRC_TEST_PROVIDER_FOOTPRINT_CHECKS::Run(), DRC_TEST_PROVIDER_HOLE_SIZE::Run(), DRC_TEST_PROVIDER_MISC::Run(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::Run(), DRC_TEST_PROVIDER_SCHEMATIC_PARITY::Run(), DRC_TEST_PROVIDER_SLIVER_CHECKER::Run(), DRC_TEST_PROVIDER_SOLDER_MASK::Run(), DRC_TEST_PROVIDER_TEXT_DIMS::Run(), DRC_TEST_PROVIDER_TEXT_MIRRORING::Run(), DRC_TEST_PROVIDER_TRACK_ANGLE::Run(), DRC_TEST_PROVIDER_TRACK_SEGMENT_LENGTH::Run(), DRC_TEST_PROVIDER_TRACK_WIDTH::Run(), DRC_TEST_PROVIDER_VIA_DIAMETER::Run(), DRC_TEST_PROVIDER_MATCHED_LENGTH::runInternal(), DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::testCourtyardClearances(), DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::testFootprintCourtyardDefinitions(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testGraphicClearances(), DRC_TEST_PROVIDER_HOLE_TO_HOLE::testHoleAgainstHole(), DRC_TEST_PROVIDER_SOLDER_MASK::testItemAgainstItems(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstZones(), DRC_TEST_PROVIDER_SOLDER_MASK::testMaskItemAgainstZones(), DRC_TEST_PROVIDER_MISC::testTextVars(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackClearances(), DRC_TEST_PROVIDER_ZONE_CONNECTIONS::testZoneLayer(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testZoneLayer(), and DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZonesToZones().
bool DRC_ENGINE::IsErrorLimitExceeded | ( | int | error_code | ) |
Definition at line 1624 of file drc_engine.cpp.
References DRCE_LAST, and m_errorLimits.
Referenced by DRC_TEST_PROVIDER_ANNULAR_WIDTH::Run(), DRC_TEST_PROVIDER_CONNECTION_WIDTH::Run(), DRC_TEST_PROVIDER_CONNECTIVITY::Run(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::Run(), DRC_TEST_PROVIDER_CREEPAGE::Run(), DRC_TEST_PROVIDER_DISALLOW::Run(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run(), DRC_TEST_PROVIDER_FOOTPRINT_CHECKS::Run(), DRC_TEST_PROVIDER_HOLE_SIZE::Run(), DRC_TEST_PROVIDER_HOLE_TO_HOLE::Run(), DRC_TEST_PROVIDER_LIBRARY_PARITY::Run(), DRC_TEST_PROVIDER_MISC::Run(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::Run(), DRC_TEST_PROVIDER_SILK_CLEARANCE::Run(), DRC_TEST_PROVIDER_SLIVER_CHECKER::Run(), DRC_TEST_PROVIDER_SOLDER_MASK::Run(), DRC_TEST_PROVIDER_TEXT_DIMS::Run(), DRC_TEST_PROVIDER_TEXT_MIRRORING::Run(), DRC_TEST_PROVIDER_TRACK_ANGLE::Run(), DRC_TEST_PROVIDER_TRACK_SEGMENT_LENGTH::Run(), DRC_TEST_PROVIDER_TRACK_WIDTH::Run(), DRC_TEST_PROVIDER_VIA_DIAMETER::Run(), DRC_TEST_PROVIDER_MISC::testAssertions(), DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::testCourtyardClearances(), DRC_TEST_PROVIDER_MISC::testDisabledLayers(), DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::testFootprintCourtyardDefinitions(), DRC_TEST_PROVIDER_HOLE_TO_HOLE::testHoleAgainstHole(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstItem(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testItemAgainstZone(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstZones(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testKnockoutTextAgainstZone(), DRC_TEST_PROVIDER_SOLDER_MASK::testMaskBridges(), DRC_TEST_PROVIDER_SCHEMATIC_PARITY::testNetlist(), DRC_TEST_PROVIDER_MISC::testOutline(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem(), DRC_TEST_PROVIDER_SOLDER_MASK::testSilkToMaskClearance(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testSingleLayerItemAgainstItem(), DRC_TEST_PROVIDER_MISC::testTextVars(), DRC_TEST_PROVIDER_ZONE_CONNECTIONS::testZoneLayer(), and DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZonesToZones().
|
static |
Definition at line 1824 of file drc_engine.cpp.
References dummy, BOARD::FindNet(), NETINFO_ITEM::GetNetCode(), NETINFO_ITEM::GetNetname(), and MatchDpSuffix().
Referenced by test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run().
bool DRC_ENGINE::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 net-tie pad.
Definition at line 1858 of file drc_engine.cpp.
References epsilon, GetDesignSettings(), BOARD_DESIGN_SETTINGS::GetDRCEpsilon(), BOARD_ITEM::GetParentFootprint(), FOOTPRINT::IsNetTie(), FOOTPRINT::MapPadNumbersToNetTieGroups(), pad, and FOOTPRINT::Pads().
Referenced by DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem(), and DRC_TEST_PROVIDER_COPPER_CLEARANCE::testSingleLayerItemAgainstItem().
bool DRC_ENGINE::KeepRefreshing | ( | bool | aWait = false | ) |
Definition at line 1676 of file drc_engine.cpp.
References PROGRESS_REPORTER::KeepRefreshing(), and m_progressReporter.
|
private |
Definition at line 153 of file drc_engine.cpp.
References _, addRule(), ANNULAR_WIDTH_CONSTRAINT, B_SilkS, CLEARANCE_CONSTRAINT, CONNECTION_WIDTH_CONSTRAINT, COURTYARD_CLEARANCE_CONSTRAINT, createImplicitRule(), DIFF_PAIR_GAP_CONSTRAINT, DISALLOW_CONSTRAINT, DRC_DISALLOW_FOOTPRINTS, DRC_DISALLOW_PADS, DRC_DISALLOW_TRACKS, DRC_DISALLOW_VIAS, DRC_DISALLOW_ZONES, EDGE_CLEARANCE_CONSTRAINT, F_SilkS, BOARD::Footprints(), BOARD::GetDesignSettings(), HOLE_CLEARANCE_CONSTRAINT, HOLE_SIZE_CONSTRAINT, HOLE_TO_HOLE_CONSTRAINT, isKeepoutZone(), m_board, BOARD_DESIGN_SETTINGS::m_CopperEdgeClearance, DRC_CONSTRAINT::m_DisallowFlags, BOARD_DESIGN_SETTINGS::m_HoleClearance, BOARD_DESIGN_SETTINGS::m_HoleToHoleMin, BOARD_DESIGN_SETTINGS::m_MicroViasMinDrill, BOARD_DESIGN_SETTINGS::m_MicroViasMinSize, BOARD_DESIGN_SETTINGS::m_MinClearance, BOARD_DESIGN_SETTINGS::m_MinConn, BOARD_DESIGN_SETTINGS::m_MinResolvedSpokes, BOARD_DESIGN_SETTINGS::m_MinSilkTextHeight, BOARD_DESIGN_SETTINGS::m_MinSilkTextThickness, BOARD_DESIGN_SETTINGS::m_MinThroughDrill, BOARD_DESIGN_SETTINGS::m_NetSettings, BOARD_DESIGN_SETTINGS::m_SilkClearance, BOARD_DESIGN_SETTINGS::m_TrackMinWidth, BOARD_DESIGN_SETTINGS::m_ViasMinAnnularWidth, BOARD_DESIGN_SETTINGS::m_ViasMinSize, MIN_RESOLVED_SPOKES_CONSTRAINT, name, ReportAux(), MINOPTMAX< T >::SetMin(), MINOPTMAX< T >::SetOpt(), SILK_CLEARANCE_CONSTRAINT, BOARD::SynchronizeNetsAndNetClasses(), TEXT_HEIGHT_CONSTRAINT, TEXT_THICKNESS_CONSTRAINT, TRACK_WIDTH_CONSTRAINT, DRC_CONSTRAINT::Value(), VIA_DIAMETER_CONSTRAINT, and BOARD::Zones().
Referenced by InitEngine().
|
private |
Load and parse a rule set from an sexpr text file.
PARSE_ERROR |
Definition at line 498 of file drc_engine.cpp.
References m_reporter, m_rules, and DRC_RULES_PARSER::Parse().
Referenced by InitEngine().
|
static |
Check if the given net is a diff pair, returning its polarity and complement if so.
aNetName | is the input net name, like DIFF_P |
aComplementNet | will be filled with the complement, like DIFF_N |
aBaseDpName | will be filled with the base name, like DIFF |
Definition at line 1774 of file drc_engine.cpp.
Referenced by inDiffPairFunc(), BOARD_INSPECTION_TOOL::InspectClearance(), isCoupledDiffPairFunc(), and IsNetADiffPair().
|
inlineinherited |
Definition at line 141 of file units_provider.h.
References UNITS_PROVIDER::GetIuScale(), UNITS_PROVIDER::GetUserUnits(), and EDA_UNIT_UTILS::UI::MessageTextFromMinOptMax().
Referenced by PCB_TUNING_PATTERN::GetMsgPanelInfo(), PCB_TRACK::GetMsgPanelInfo(), and PCB_CONTROL::UpdateMessagePanel().
|
inlineinherited |
Definition at line 134 of file units_provider.h.
References EDA_ANGLE::AsDegrees(), EDA_UNIT_UTILS::UI::MessageTextFromValue(), and unityScale.
|
inlineinherited |
A lower-precision version of StringFromValue().
Should ONLY be used for status text and messages. Not suitable for dialogs, files, etc. where the loss of precision matters.
Definition at line 127 of file units_provider.h.
References UNITS_PROVIDER::GetIuScale(), UNITS_PROVIDER::GetUserUnits(), and EDA_UNIT_UTILS::UI::MessageTextFromValue().
Referenced by CheckDuplicatePins(), CheckLibSymbol(), CheckLibSymbolGraphics(), DRC_TEST_PROVIDER_MATCHED_LENGTH::checkSkews(), DIALOG_BOARD_REANNOTATE::CoordTowxString(), GERBVIEW_FRAME::DisplayGridMsg(), GERBER_FILE_IMAGE::DisplayImageInfo(), DRAWING_TOOL::DrawBoardCharacteristics(), EvalRules(), PCB_NET_INSPECTOR_PANEL::formatLength(), DRC_TEST_PROVIDER::formatMsg(), SCH_LINE::GetItemDescription(), SCH_SHAPE::GetItemDescription(), DS_DRAW_ITEM_LINE::GetItemDescription(), DS_DRAW_ITEM_RECT::GetItemDescription(), PCB_TRACK::GetItemDescription(), SCH_BITMAP::GetMsgPanelInfo(), SCH_FIELD::GetMsgPanelInfo(), SCH_JUNCTION::GetMsgPanelInfo(), SCH_LABEL_BASE::GetMsgPanelInfo(), SCH_PIN::GetMsgPanelInfo(), SCH_TABLECELL::GetMsgPanelInfo(), SCH_TEXT::GetMsgPanelInfo(), SCH_TEXTBOX::GetMsgPanelInfo(), DS_DRAW_ITEM_BASE::GetMsgPanelInfo(), PCB_TUNING_PATTERN::GetMsgPanelInfo(), NETINFO_ITEM::GetMsgPanelInfo(), PAD::GetMsgPanelInfo(), PCB_DIMENSION_BASE::GetMsgPanelInfo(), PCB_DIM_ALIGNED::GetMsgPanelInfo(), PCB_DIM_LEADER::GetMsgPanelInfo(), PCB_REFERENCE_IMAGE::GetMsgPanelInfo(), PCB_TABLECELL::GetMsgPanelInfo(), PCB_TARGET::GetMsgPanelInfo(), PCB_TEXT::GetMsgPanelInfo(), PCB_TEXTBOX::GetMsgPanelInfo(), PCB_TRACK::GetMsgPanelInfo(), PCB_VIA::GetMsgPanelInfo(), ZONE::GetMsgPanelInfo(), STROKE_PARAMS::GetMsgPanelInfo(), GetNetNavigatorItemText(), SYMBOL_SEARCH_HANDLER::getResultCell(), POWER_SEARCH_HANDLER::getResultCell(), TEXT_SEARCH_HANDLER::getResultCell(), LABEL_SEARCH_HANDLER::getResultCell(), DIALOG_BOARD_REANNOTATE::MakeSampleText(), PCB_BASE_FRAME::MessageTextFromCoord(), test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run(), DRC_TEST_PROVIDER_MATCHED_LENGTH::runInternal(), DIALOG_BOARD_STATISTICS::saveReportClicked(), TUNING_STATUS_VIEW_ITEM::SetCurrent(), TUNING_STATUS_VIEW_ITEM::SetMinMax(), EDA_SHAPE::ShapeGetMsgPanelInfo(), showCoord(), TRACK_WIDTH_MENU::update(), DIFF_PAIR_MENU::update(), VIA_SIZE_MENU::update(), DIALOG_POSITION_RELATIVE::updateAnchorInfo(), BOARD_NETLIST_UPDATER::updateCopperZoneNets(), DIALOG_BOARD_STATISTICS::updateDrillGrid(), PCB_CONTROL::UpdateMessagePanel(), PL_EDITOR_FRAME::UpdateMsgPanelInfo(), SCH_BASE_FRAME::UpdateStatusBar(), GERBVIEW_FRAME::UpdateStatusBar(), PCB_BASE_FRAME::UpdateStatusBar(), and DIALOG_BOARD_STATISTICS::updateWidets().
|
inlineinherited |
Converts aTextValue in aUnits to internal units used by the frame.
Allows the return of an empty optional if the string represents a null value (currently empty string)
aType | is the type of this value, and controls the way the string is converted to a value |
aTextValue | A reference to a wxString object containing the string to convert. |
Definition at line 175 of file units_provider.h.
References EDA_UNIT_UTILS::UI::DoubleValueFromString(), UNITS_PROVIDER::GetIuScale(), UNITS_PROVIDER::GetUserUnits(), and UNITS_PROVIDER::NullUiString.
Referenced by WX_GRID::GetOptionalUnitValue(), and WX_GRID::onCellEditorHidden().
void DRC_ENGINE::ProcessAssertions | ( | const BOARD_ITEM * | a, |
std::function< void(const DRC_CONSTRAINT *)> | aFailureHandler, | ||
REPORTER * | aReporter = nullptr |
||
) |
Definition at line 1549 of file drc_engine.cpp.
References _, ASSERTION_CONSTRAINT, EscapeHTML(), BOARD_ITEM::GetLayer(), BOARD_ITEM::GetLayerSet(), m_constraintMap, and REPORT.
Referenced by DRC_TEST_PROVIDER_MISC::testAssertions().
std::set< int > DRC_ENGINE::QueryDistinctConstraints | ( | DRC_CONSTRAINT_T | aConstraintId | ) |
Definition at line 1759 of file drc_engine.cpp.
References m_constraintMap.
Referenced by DRC_TEST_PROVIDER_CONNECTION_WIDTH::Run().
bool DRC_ENGINE::QueryWorstConstraint | ( | DRC_CONSTRAINT_T | aRuleId, |
DRC_CONSTRAINT & | aConstraint | ||
) |
Definition at line 1737 of file drc_engine.cpp.
References m_constraintMap.
Referenced by DRC_CACHE_GENERATOR::Run(), DRC_INTERACTIVE_COURTYARD_CLEARANCE::Run(), DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::Run(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run(), DRC_TEST_PROVIDER_HOLE_TO_HOLE::Run(), DRC_TEST_PROVIDER_SILK_CLEARANCE::Run(), and DRC_TEST_PROVIDER_SOLDER_MASK::Run().
void DRC_ENGINE::ReportAux | ( | const wxString & | aStr | ) |
Definition at line 1667 of file drc_engine.cpp.
References m_reporter, REPORTER::Report(), and RPT_SEVERITY_INFO.
Referenced by compileRules(), InitEngine(), loadImplicitRules(), DRC_TEST_PROVIDER::reportAux(), DRC_TEST_PROVIDER::reportRuleStatistics(), and RunTests().
bool DRC_ENGINE::ReportPhase | ( | const wxString & | aMessage | ) |
Definition at line 1709 of file drc_engine.cpp.
References PROGRESS_REPORTER::AdvancePhase(), PROGRESS_REPORTER::KeepRefreshing(), and m_progressReporter.
Referenced by DRC_TEST_PROVIDER::reportPhase().
bool DRC_ENGINE::ReportProgress | ( | double | aProgress | ) |
Definition at line 1699 of file drc_engine.cpp.
References PROGRESS_REPORTER::KeepRefreshing(), m_progressReporter, and PROGRESS_REPORTER::SetCurrentProgress().
Referenced by DRC_TEST_PROVIDER::reportProgress().
void DRC_ENGINE::ReportViolation | ( | const std::shared_ptr< DRC_ITEM > & | aItem, |
const VECTOR2I & | aPos, | ||
int | aMarkerLayer, | ||
DRC_CUSTOM_MARKER_HANDLER * | aCustomHandler = nullptr |
||
) |
Definition at line 1631 of file drc_engine.cpp.
References m_errorLimits, DRC_RULE::m_Name, m_reporter, m_violationHandler, REPORTER::Report(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by DRC_TEST_PROVIDER::reportViolation().
|
inline |
Definition at line 173 of file drc_engine.h.
References m_rulesValid.
void DRC_ENGINE::RunTests | ( | EDA_UNITS | aUnits, |
bool | aReportAllTrackErrors, | ||
bool | aTestFootprints, | ||
BOARD_COMMIT * | aCommit = nullptr |
||
) |
Run the DRC tests.
Definition at line 605 of file drc_engine.cpp.
References DRCE_CLEARANCE, DRCE_FIRST, DRCE_LAST, DRCE_UNCONNECTED_ITEMS, ERROR_LIMIT, EXTENDED_ERROR_LIMIT, BOARD::GetTimeStamp(), BOARD_DESIGN_SETTINGS::Ignore(), BOARD::IncrementTimeStamp(), DRC_TEST_PROVIDER::Init(), m_board, m_designSettings, m_errorLimits, m_reportAllTrackErrors, m_testFootprints, m_testProviders, PROF_TIMER::msecs(), ReportAux(), DRC_CACHE_GENERATOR::Run(), DRC_TEST_PROVIDER::SetDRCEngine(), UNITS_PROVIDER::SetUserUnits(), PROF_TIMER::Stop(), and traceDrcProfile.
Referenced by DoCourtyardInvalidTest(), and DoCourtyardOverlapTest().
|
inline |
Definition at line 95 of file drc_engine.h.
References m_board.
|
inline |
Definition at line 107 of file drc_engine.h.
References m_debugOverlay.
|
inline |
Definition at line 98 of file drc_engine.h.
References m_designSettings.
|
inline |
Definition at line 104 of file drc_engine.h.
References m_drawingSheet.
|
inline |
Definition at line 140 of file drc_engine.h.
References m_reporter.
void DRC_ENGINE::SetMaxProgress | ( | int | aSize | ) |
Definition at line 1692 of file drc_engine.cpp.
References m_progressReporter, and PROGRESS_REPORTER::SetMaxProgress().
|
inline |
Set an optional reporter for user-level progress info.
Definition at line 130 of file drc_engine.h.
References m_progressReporter.
|
inline |
Definition at line 101 of file drc_engine.h.
References m_schematicNetlist.
|
inlineinherited |
Definition at line 46 of file units_provider.h.
References UNITS_PROVIDER::m_userUnits.
Referenced by EDA_BASE_FRAME::ChangeUserUnits(), SCH::IFACE::CreateKiWindow(), PCB::IFACE::CreateKiWindow(), PCB_DIMENSION_BASE::GetMsgPanelInfo(), PCB_DIM_ALIGNED::GetMsgPanelInfo(), IfaceOrAddress(), EDA_DRAW_FRAME::LoadSettings(), DRC_TEST_PROVIDER::RunTests(), RunTests(), SaveFileAs(), and EDA_DRAW_FRAME::ToggleUserUnits().
|
inline |
Set an optional DRC violation handler (receives DRC_ITEMs and positions).
Definition at line 117 of file drc_engine.h.
References m_violationHandler.
Referenced by DoCourtyardInvalidTest(), and DoCourtyardOverlapTest().
|
inlineinherited |
Converts an optional aValue in internal units into a united string.
For readability, trailing 0s are removed if the mantissa has 3 or more digits. This function should be used to display values in dialogs because a value entered in mm (for instance 2.0 mm) could need up to 8 digits mantissa if displayed in inch to avoid truncation or rounding made just by the printf function.
aValue | = optional value in internal units |
aAddUnitLabel | = true to add symbol unit to the string value |
aType | is the type of this value, and controls the way the value is converted to a string, and the suitable unit |
Definition at line 104 of file units_provider.h.
References UNITS_PROVIDER::GetIuScale(), UNITS_PROVIDER::GetUserUnits(), UNITS_PROVIDER::NullUiString, and EDA_UNIT_UTILS::UI::StringFromValue().
Referenced by WX_GRID::onCellEditorHidden(), and WX_GRID::SetOptionalUnitValue().
|
inlineinherited |
Definition at line 114 of file units_provider.h.
References EDA_ANGLE::AsDegrees(), EDA_UNIT_UTILS::UI::StringFromValue(), and unityScale.
|
inlineinherited |
Converts aValue in internal units into a united string.
For readability, trailing 0s are removed if the mantissa has 3 or more digits. This function should be used to display values in dialogs because a value entered in mm (for instance 2.0 mm) could need up to 8 digits mantissa if displayed in inch to avoid truncation or rounding made just by the printf function.
aValue | = value in internal units |
aAddUnitLabel | = true to add symbol unit to the string value |
aType | is the type of this value, and controls the way the value is converted to a string, and the suitable unit |
Definition at line 83 of file units_provider.h.
References UNITS_PROVIDER::GetIuScale(), UNITS_PROVIDER::GetUserUnits(), and EDA_UNIT_UTILS::UI::StringFromValue().
Referenced by DIALOG_PLOT::applyPlotSettings(), PANEL_SETUP_BOARD_STACKUP::computeBoardThickness(), MICROWAVE_TOOL::createFootprint(), MICROWAVE_TOOL::createMicrowaveInductor(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), PAD::doCheckPad(), DRAWING_TOOL::DrawSpecificationStackup(), VALIDATION_ERROR_TOO_LARGE< T >::Format(), VALIDATION_ERROR_TOO_SMALL< T >::Format(), DRC_TEST_PROVIDER::formatMsg(), PIN_TABLE_DATA_MODEL::GetValue(), FIELDS_GRID_TABLE::GetValue(), PCB_FIELDS_GRID_TABLE::GetValue(), BOARD_INSPECTION_TOOL::InspectClearance(), BOARD_INSPECTION_TOOL::InspectDRCError(), PANEL_SETUP_BOARD_STACKUP::lazyBuildRowUI(), PANEL_SETUP_BOARD_STACKUP::onAdjustDielectricThickness(), WX_GRID::onCellEditorHidden(), DIALOG_TRACK_VIA_PROPERTIES::onUnitsChanged(), reportMax(), reportMin(), reportOpt(), PANEL_SETUP_BOARD_STACKUP::setDefaultLayerWidths(), WX_GRID::SetUnitValue(), PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard(), PANEL_FP_EDITOR_GRAPHICS_DEFAULTS::TransferDataFromWindow(), PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataFromWindow(), PANEL_SETUP_CONSTRAINTS::TransferDataToWindow(), DIALOG_FOOTPRINT_PROPERTIES::Validate(), and DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::Validate().
|
inlineinherited |
Converts aTextValue in aUnits to internal units used by the frame.
aType | is the type of this value, and controls the way the string is converted to a value |
aTextValue | A reference to a wxString object containing the string to convert. |
Definition at line 155 of file units_provider.h.
References EDA_UNIT_UTILS::UI::DoubleValueFromString(), UNITS_PROVIDER::GetIuScale(), and UNITS_PROVIDER::GetUserUnits().
Referenced by PIN_TABLE_DATA_MODEL::compare(), PANEL_SETUP_BOARD_STACKUP::computeBoardThickness(), MICROWAVE_TOOL::createFootprint(), MICROWAVE_TOOL::createMicrowaveInductor(), WX_GRID::GetUnitValue(), PANEL_SETUP_BOARD_STACKUP::onAdjustDielectricThickness(), WX_GRID::onCellEditorHidden(), PANEL_SETUP_BOARD_STACKUP::onCopperLayersSelCount(), PANEL_SETUP_TRACKS_AND_VIAS::OnSortDiffPairsClick(), PANEL_SETUP_TRACKS_AND_VIAS::OnSortTrackWidthsClick(), PANEL_SETUP_TRACKS_AND_VIAS::OnSortViaSizesClick(), PANEL_SETUP_BOARD_STACKUP::onThicknessChange(), PANEL_SETUP_BOARD_STACKUP::setDefaultLayerWidths(), PIN_TABLE_DATA_MODEL::SetValue(), FIELDS_GRID_TABLE::SetValue(), PCB_FIELDS_GRID_TABLE::SetValue(), PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup(), and DIALOG_FOOTPRINT_PROPERTIES::Validate().
|
friend |
Definition at line 88 of file drc_engine.h.
|
friend |
Definition at line 89 of file drc_engine.h.
|
protected |
Definition at line 240 of file drc_engine.h.
Referenced by EvalRules(), GetBoard(), InitEngine(), loadImplicitRules(), RunTests(), and SetBoard().
|
protected |
Definition at line 253 of file drc_engine.h.
Referenced by compileRules(), EvalRules(), HasRulesForConstraintType(), InitEngine(), ProcessAssertions(), QueryDistinctConstraints(), QueryWorstConstraint(), and ~DRC_ENGINE().
|
protected |
Definition at line 259 of file drc_engine.h.
Referenced by GetDebugOverlay(), and SetDebugOverlay().
|
protected |
Definition at line 239 of file drc_engine.h.
Referenced by EvalRules(), GetDesignSettings(), RunTests(), and SetDesignSettings().
|
protected |
Definition at line 241 of file drc_engine.h.
Referenced by GetDrawingSheet(), and SetDrawingSheet().
|
protected |
Definition at line 248 of file drc_engine.h.
Referenced by DRC_ENGINE(), InitEngine(), IsErrorLimitExceeded(), ReportViolation(), and RunTests().
|
privateinherited |
Definition at line 200 of file units_provider.h.
Referenced by UNITS_PROVIDER::GetIuScale().
|
protected |
Definition at line 257 of file drc_engine.h.
Referenced by AdvanceProgress(), GetProgressReporter(), IsCancelled(), KeepRefreshing(), ReportPhase(), ReportProgress(), SetMaxProgress(), and SetProgressReporter().
|
protected |
Definition at line 249 of file drc_engine.h.
Referenced by GetReportAllTrackErrors(), and RunTests().
|
protected |
Definition at line 256 of file drc_engine.h.
Referenced by loadRules(), ReportAux(), ReportViolation(), and SetLogReporter().
|
protected |
Definition at line 244 of file drc_engine.h.
Referenced by addRule(), compileRules(), InitEngine(), loadRules(), and ~DRC_ENGINE().
|
protected |
Definition at line 245 of file drc_engine.h.
Referenced by InitEngine(), and RulesValid().
|
protected |
Definition at line 242 of file drc_engine.h.
Referenced by GetSchematicNetlist(), and SetSchematicNetlist().
|
protected |
Definition at line 250 of file drc_engine.h.
Referenced by GetTestFootprints(), and RunTests().
|
protected |
Definition at line 246 of file drc_engine.h.
Referenced by GetTestProvider(), GetTestProviders(), InitEngine(), and RunTests().
|
privateinherited |
Definition at line 201 of file units_provider.h.
Referenced by UNITS_PROVIDER::GetUserUnits(), and UNITS_PROVIDER::SetUserUnits().
|
protected |
Definition at line 255 of file drc_engine.h.
Referenced by ClearViolationHandler(), ReportViolation(), and SetViolationHandler().
|
inlinestaticinherited |
The string that is used in the UI to represent a null value.
Definition at line 197 of file units_provider.h.
Referenced by WX_GRID::GetOptionalUnitValue(), WX_GRID::onCellEditorHidden(), UNITS_PROVIDER::OptionalValueFromString(), and UNITS_PROVIDER::StringFromOptionalValue().