|
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 () |
| DRC_ENGINE (const DRC_ENGINE &)=delete | |
| DRC_ENGINE & | operator= (const DRC_ENGINE &)=delete |
| 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 | InitEngine (const std::shared_ptr< DRC_RULE > &rule) |
| 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) |
| DRC_CLEARANCE_BATCH | EvalClearanceBatch (const BOARD_ITEM *a, const BOARD_ITEM *b, PCB_LAYER_ID aLayer) |
| Evaluate all clearance-related constraints in a single batch call. | |
| int | GetCachedOwnClearance (const BOARD_ITEM *aItem, PCB_LAYER_ID aLayer, wxString *aSource=nullptr) |
| Get the cached own clearance for an item on a specific layer. | |
| void | InvalidateClearanceCache (const KIID &aUuid) |
| Invalidate the clearance cache for a specific item. | |
| void | ClearClearanceCache () |
| Clear the entire clearance cache. | |
| void | InitializeClearanceCache () |
| Initialize the clearance cache for all items on the board. | |
| 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, const std::function< void(PCB_MARKER *)> &aPathGenerator={}) |
| bool | KeepRefreshing (bool aWait=false) |
| void | AdvanceProgress () |
| void | SetMaxProgress (int aSize) |
| bool | ReportProgress (double aProgress) |
| bool | ReportPhase (const wxString &aMessage) |
| bool | IsCancelled () const |
| REPORTER * | GetLogReporter () 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 |
| 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. | |
| 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 | MessageTextFromUnscaledValue (double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const |
| wxString | MessageTextFromMinOptMax (const MINOPTMAX< int > &aValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) 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 |
| EDA_UNITS | GetUnitsFromType (EDA_DATA_TYPE aType) const |
| Gets the units to use in the conversion based on the underlying user units. | |
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 EDA_DATA_TYPE | GetTypeFromUnits (const EDA_UNITS aUnits) |
| Gets the inferred type from the given units. | |
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 |
| std::mutex | m_errorLimitsMutex |
| 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_logReporter |
| PROGRESS_REPORTER * | m_progressReporter |
| std::shared_ptr< KIGFX::VIEW_OVERLAY > | m_debugOverlay |
| std::unordered_map< DRC_OWN_CLEARANCE_CACHE_KEY, int > | m_ownClearanceCache |
| std::unordered_map< wxString, int > | m_netclassClearances |
| std::shared_mutex | m_clearanceCacheMutex |
| bool | m_hasExplicitClearanceRules = false |
| bool | m_hasDiffPairClearanceOverrides = false |
| std::map< DRC_CONSTRAINT_T, std::vector< DRC_ENGINE_CONSTRAINT * > > | m_explicitConstraints |
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, DRC_IMPLICIT_SOURCE aImplicitSource) |
Private Attributes | |
| const EDA_IU_SCALE & | m_iuScale |
| EDA_UNITS | m_userUnits |
Friends | |
| 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 132 of file drc_engine.h.
| DRC_ENGINE::DRC_ENGINE | ( | BOARD * | aBoard = nullptr, |
| BOARD_DESIGN_SETTINGS * | aSettings = nullptr ) |
Definition at line 84 of file drc_engine.cpp.
References DRCE_FIRST, DRCE_LAST, ERROR_LIMIT, m_board, m_designSettings, m_drawingSheet, m_errorLimits, m_logReporter, m_progressReporter, m_reportAllTrackErrors, m_rulesValid, m_schematicNetlist, m_testFootprints, MM, pcbIUScale, and UNITS_PROVIDER::UNITS_PROVIDER().
Referenced by DRC_ENGINE(), and operator=().
|
virtual |
Definition at line 103 of file drc_engine.cpp.
References m_constraintMap, and m_rules.
|
delete |
References DRC_ENGINE().
|
inlineprivate |
Definition at line 328 of file drc_engine.h.
References m_rules.
Referenced by createImplicitRule(), and loadImplicitRules().
| void DRC_ENGINE::AdvanceProgress | ( | ) |
Definition at line 2192 of file drc_engine.cpp.
References m_progressReporter.
|
inlineinherited |
Definition at line 195 of file units_provider.h.
References DEGREES, DEGREES_T, EDA_UNIT_UTILS::UI::DoubleValueFromString(), and GetIuScale().
| void DRC_ENGINE::ClearClearanceCache | ( | ) |
Clear the entire clearance cache.
Called when DRC rules change or board design settings change.
Definition at line 2567 of file drc_engine.cpp.
References m_clearanceCacheMutex, and m_ownClearanceCache.
|
inline |
Definition at line 173 of file drc_engine.h.
References m_violationHandler.
Referenced by BOOST_DATA_TEST_CASE_F(), and BOOST_FIXTURE_TEST_CASE().
|
private |
Definition at line 702 of file drc_engine.cpp.
References CLEARANCE_CONSTRAINT, DRC_RULE_CONDITION::Compile(), DRC_ENGINE::DRC_ENGINE_CONSTRAINT::condition, DRC_ENGINE::DRC_ENGINE_CONSTRAINT::constraint, REPORTER::HasMessageOfSeverity(), DRC_ENGINE::DRC_ENGINE_CONSTRAINT::layerTest, m_constraintMap, m_explicitConstraints, m_hasExplicitClearanceRules, m_logReporter, m_rules, DRC_CONSTRAINT::m_Type, DRC_ENGINE::DRC_ENGINE_CONSTRAINT::parentRule, RPT_SEVERITY_ERROR, THROW_PARSE_ERROR, and TO_UTF8.
Referenced by InitEngine(), and InitEngine().
|
private |
Definition at line 146 of file drc_engine.cpp.
References addRule(), and name.
Referenced by loadImplicitRules().
| DRC_CLEARANCE_BATCH DRC_ENGINE::EvalClearanceBatch | ( | const BOARD_ITEM * | a, |
| const BOARD_ITEM * | b, | ||
| PCB_LAYER_ID | aLayer ) |
Evaluate all clearance-related constraints in a single batch call.
This reduces per-call overhead during interactive PNS routing.
| a | First board item |
| b | Second board item (may be nullptr) |
| aLayer | Layer to evaluate constraints on |
Definition at line 2027 of file drc_engine.cpp.
References CLEARANCE_CONSTRAINT, EDGE_CLEARANCE_CONSTRAINT, EvalRules(), MINOPTMAX< T >::HasMin(), HOLE_CLEARANCE_CONSTRAINT, HOLE_TO_HOLE_CONSTRAINT, DRC_CONSTRAINT::m_Value, MINOPTMAX< T >::Min(), PHYSICAL_CLEARANCE_CONSTRAINT, and result.
| 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 959 of file drc_engine.cpp.
References _, ANNULAR_WIDTH_CONSTRAINT, ASSERTION_CONSTRAINT, B_CrtYd, LSET::BackMask(), clearance, CLEARANCE_CONSTRAINT, CONNECTION_WIDTH_CONSTRAINT, COURTYARD_CLEARANCE_CONSTRAINT, CREEPAGE_CONSTRAINT, DIFF_PAIR_GAP_CONSTRAINT, DISALLOW_CONSTRAINT, DRC_DISALLOW_BLIND_VIAS, DRC_DISALLOW_BURIED_VIAS, DRC_DISALLOW_FOOTPRINTS, DRC_DISALLOW_GRAPHICS, DRC_DISALLOW_HOLES, DRC_DISALLOW_MICRO_VIAS, DRC_DISALLOW_PADS, DRC_DISALLOW_TEXTS, DRC_DISALLOW_THROUGH_VIAS, DRC_DISALLOW_TRACKS, DRC_DISALLOW_ZONES, EDGE_CLEARANCE_CONSTRAINT, EscapeHTML(), F_CrtYd, LSET::FrontMask(), BOARD_CONNECTED_ITEM::GetClearanceOverrides(), FOOTPRINT::GetCourtyard(), BOARD_CONNECTED_ITEM::GetEffectiveNetClass(), EDA_ITEM::GetFlags(), EDA_ITEM::GetItemDescription(), FOOTPRINT::GetItemDescription(), ZONE::GetItemDescription(), BOARD_ITEM::GetLayerSet(), BOARD_CONNECTED_ITEM::GetLocalClearance(), PCB_SHAPE::GetLocalSolderMaskMargin(), FOOTPRINT::GetLocalZoneConnection(), ZONE::GetMinThickness(), NETCLASS::GetName(), 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, INHERITED, BOARD_ITEM::IsConnected(), SHAPE_POLY_SET::IsEmpty(), DRC_RULE::IsImplicit(), isKeepoutZone(), BOARD_ITEM::IsOnCopperLayer(), IsPcbLayer(), KiROUND(), LENGTH_CONSTRAINT, m_board, m_clearanceCacheMutex, m_constraintMap, m_designSettings, DRC_CONSTRAINT::m_DisallowFlags, m_hasDiffPairClearanceOverrides, m_hasExplicitClearanceRules, DRC_CONSTRAINT::m_ImplicitMin, m_netclassClearances, DRC_CONSTRAINT::m_Type, DRC_CONSTRAINT::m_Value, DRC_CONSTRAINT::m_ZoneConnection, MAX_UNCOUPLED_CONSTRAINT, MAXIMUM_CLEARANCE, UNITS_PROVIDER::MessageTextFromUnscaledValue(), UNITS_PROVIDER::MessageTextFromValue(), MINOPTMAX< T >::Min(), MIN_RESOLVED_SPOKES_CONSTRAINT, NULL_CONSTRAINT, pad, PCB_ARC_T, PCB_BARCODE_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 >::SetMax(), MINOPTMAX< T >::SetMin(), DRC_CONSTRAINT::SetName(), MINOPTMAX< T >::SetOpt(), DRC_CONSTRAINT::SetOptionsFromOther(), DRC_CONSTRAINT::SetParentRule(), SILK_CLEARANCE_CONSTRAINT, SKEW_CONSTRAINT, SOLDER_MASK_EXPANSION_CONSTRAINT, SOLDER_PASTE_ABS_MARGIN_CONSTRAINT, SOLDER_PASTE_REL_MARGIN_CONSTRAINT, TEXT_HEIGHT_CONSTRAINT, TEXT_THICKNESS_CONSTRAINT, THERMAL_RELIEF_GAP_CONSTRAINT, THERMAL_SPOKE_WIDTH_CONSTRAINT, TRACK_WIDTH_CONSTRAINT, EDA_ITEM::Type(), via, VIA_DIAMETER_CONSTRAINT, and ZONE_CONNECTION_CONSTRAINT.
Referenced by ZONE_FILLER::buildCopperItemClearances(), ZONE_FILLER::buildDifferentNetZoneClearances(), ZONE_FILLER::buildHatchZoneThermalRings(), ZONE_FILLER::buildThermalSpokes(), PCB_TUNING_PATTERN::CreateNew(), EvalClearanceBatch(), EvalZoneConnection(), GetCachedOwnClearance(), PCB_VIA::GetDrillConstraint(), PCB_VIA::GetMinAnnulus(), PCB_TRACK::GetWidthConstraint(), PCB_VIA::GetWidthConstraint(), ROUTER_TOOL::handleLayerSwitch(), InitializeClearanceCache(), ZONE_FILLER::knockoutThermalReliefs(), and DRC_TEST_PROVIDER_ZONE_CONNECTIONS::testZoneLayer().
| DRC_CONSTRAINT DRC_ENGINE::EvalZoneConnection | ( | const BOARD_ITEM * | a, |
| const BOARD_ITEM * | b, | ||
| PCB_LAYER_ID | aLayer, | ||
| REPORTER * | aReporter = nullptr ) |
Definition at line 925 of file drc_engine.cpp.
References _, EvalRules(), FULL, DRC_CONSTRAINT::m_ZoneConnection, pad, PCB_PAD_T, PrintZoneConnection(), PTH, REPORT, THERMAL, THT_THERMAL, EDA_ITEM::Type(), and ZONE_CONNECTION_CONSTRAINT.
Referenced by ZONE_FILLER::knockoutThermalReliefs(), and DRC_TEST_PROVIDER_ZONE_CONNECTIONS::testZoneLayer().
|
inline |
Definition at line 147 of file drc_engine.h.
References m_board.
| int DRC_ENGINE::GetCachedOwnClearance | ( | const BOARD_ITEM * | aItem, |
| PCB_LAYER_ID | aLayer, | ||
| wxString * | aSource = nullptr ) |
Get the cached own clearance for an item on a specific layer.
This is used by BOARD_CONNECTED_ITEM::GetOwnClearance() to avoid re-evaluating DRC rules on every paint refresh.
| aItem | the item to get clearance for. |
| aLayer | the layer in question. |
| aSource | optionally reports the source as a user-readable string. |
Definition at line 2494 of file drc_engine.cpp.
References clearance, CLEARANCE_CONSTRAINT, EvalRules(), DRC_CONSTRAINT::GetName(), MINOPTMAX< T >::HasMin(), HOLE_CLEARANCE_CONSTRAINT, m_clearanceCacheMutex, m_ownClearanceCache, EDA_ITEM::m_Uuid, MINOPTMAX< T >::Min(), NPTH, pad, PCB_PAD_T, EDA_ITEM::Type(), and DRC_CONSTRAINT::Value().
Referenced by BOARD_CONNECTED_ITEM::GetOwnClearance().
|
inline |
Definition at line 163 of file drc_engine.h.
References m_debugOverlay.
|
inline |
Definition at line 150 of file drc_engine.h.
References m_designSettings.
Referenced by IsNetTieExclusion().
|
inline |
Definition at line 156 of file drc_engine.h.
References m_drawingSheet.
| std::vector< BOARD_ITEM * > DRC_ENGINE::GetItemsMatchingCondition | ( | const wxString & | aExpression, |
| DRC_CONSTRAINT_T | aConstraint = ASSERTION_CONSTRAINT, | ||
| REPORTER * | aReporter = nullptr ) |
Evaluate a DRC condition against all board items and return matches.
| aExpression | Expression to evaluate |
| aConstraint | Constraint context for expression evaluation |
| aReporter | Reporter for compile or evaluation errors |
Definition at line 2400 of file drc_engine.cpp.
References DRC_RULE_CONDITION::Compile(), DRC_RULE_CONDITION::EvaluateFor(), BASE_SET::FmtHex(), m_board, m_logReporter, PCB_GENERATOR_T, PCB_GROUP_T, and PCB_NETINFO_T.
|
inlineinherited |
Definition at line 55 of file units_provider.h.
References m_iuScale.
Referenced by AngleValueFromString(), GRID_MENU::BuildChoiceList(), RC_ITEM::GetJsonViolation(), DRC_ENGINE::loadImplicitRules(), MessageTextFromMinOptMax(), MessageTextFromValue(), MARGIN_OFFSET_BINDER::onUnitsChanged(), UNIT_BINDER::onUnitsChanged(), OptionalValueFromString(), StringFromOptionalValue(), StringFromValue(), GRID::UserUnitsMessageText(), and ValueFromString().
|
inline |
Definition at line 288 of file drc_engine.h.
References m_logReporter.
|
inlinevirtualinherited |
Reimplemented in EDA_BASE_FRAME, and PCB_BASE_FRAME.
Definition at line 58 of file units_provider.h.
|
inline |
Definition at line 182 of file drc_engine.h.
References m_progressReporter.
|
inline |
Definition at line 273 of file drc_engine.h.
References m_reportAllTrackErrors.
|
inline |
Definition at line 153 of file drc_engine.h.
References m_schematicNetlist.
|
inline |
Definition at line 274 of file drc_engine.h.
References m_testFootprints.
| DRC_TEST_PROVIDER * DRC_ENGINE::GetTestProvider | ( | const wxString & | name | ) | const |
Definition at line 2388 of file drc_engine.cpp.
References m_testProviders, and name.
|
inline |
Definition at line 293 of file drc_engine.h.
References m_testProviders.
|
inlinestaticinherited |
Gets the inferred type from the given units.
Note: will always return the most simple type (e.g. a DISTANCE rather than AREA or VOLUME for a measurement unit).
Definition at line 228 of file units_provider.h.
References CM, DEGREES, DISTANCE, FS, INCH, LENGTH_DELAY, MILS, MM, PERCENT, PS, PS_PER_CM, PS_PER_INCH, PS_PER_MM, TIME, UM, UNITLESS, and UNSCALED.
Referenced by DRC_RULES_PARSER::parseConstraint(), and WX_GRID::SetAutoEvalColUnits().
|
inlinevirtualinherited |
Reimplemented in EDA_DRAW_FRAME.
Definition at line 48 of file units_provider.h.
References GetUserUnits(), EDA_UNIT_UTILS::IsImperialUnit(), MILS, and MM.
|
inlineinherited |
Gets the units to use in the conversion based on the underlying user units.
Definition at line 206 of file units_provider.h.
References GetUserUnits(), EDA_UNIT_UTILS::IsMetricUnit(), LENGTH_DELAY, PS, PS_PER_CM, PS_PER_INCH, and TIME.
Referenced by PANEL_SETUP_TUNING_PROFILE_INFO::initPanel(), MessageTextFromMinOptMax(), MessageTextFromValue(), OptionalValueFromString(), StringFromOptionalValue(), StringFromValue(), and ValueFromString().
|
inlineinherited |
Definition at line 45 of file units_provider.h.
References m_userUnits.
Referenced by DIALOG_SHIM::DIALOG_SHIM(), PL_EDITOR_FRAME::DisplayGridMsg(), EDA_DRAW_FRAME::DisplayUnitsMsg(), EVT_GRID_CMD_CELL_CHANGED(), FOOTPRINT_PREVIEW_PANEL::FOOTPRINT_PREVIEW_PANEL(), WX_GRID::getColumnUnits(), RC_ITEM::GetJsonViolation(), GERBER_DRAW_ITEM::GetMsgPanelInfo(), EDA_DRAW_FRAME::GetUnitPair(), GetUnitPair(), GetUnitsFromType(), IfaceOrAddress(), PCB_VIEWER_TOOLS::MeasureTool(), PCB_POINT_EDITOR::OnSelectionChange(), MARGIN_OFFSET_BINDER::onUnitsChanged(), PANEL_PREVIEW_3D_MODEL::onUnitsChanged(), UNIT_BINDER::onUnitsChanged(), POSITION_RELATIVE_TOOL::PositionRelative(), SaveFileAs(), EDA_DRAW_FRAME::SaveSettings(), PCB_BASE_FRAME::SetBoard(), WX_GRID::SetUnitsProvider(), EDA_DRAW_FRAME::ToggleUserUnits(), EDA_DRAW_FRAME::unitsChangeRefresh(), PCB_BASE_FRAME::unitsChangeRefresh(), EDITOR_CONDITIONS::unitsFunc(), GERBVIEW_FRAME::updateDCodeSelectBox(), PL_EDITOR_FRAME::UpdateStatusBar(), and GRID::UserUnitsMessageText().
| bool DRC_ENGINE::HasRulesForConstraintType | ( | DRC_CONSTRAINT_T | constraintID | ) |
Definition at line 2234 of file drc_engine.cpp.
References m_constraintMap.
| void DRC_ENGINE::InitEngine | ( | const std::shared_ptr< DRC_RULE > & | rule | ) |
Definition at line 759 of file drc_engine.cpp.
References compileRules(), DRCE_FIRST, DRCE_LAST, ERROR_LIMIT, DRC_SHOWMATCHES_PROVIDER_REGISTRY::GetShowMatchesProviders(), DRC_SHOWMATCHES_PROVIDER_REGISTRY::Instance(), m_board, m_constraintMap, m_errorLimits, m_logReporter, m_rules, m_rulesValid, and m_testProviders.
| void DRC_ENGINE::InitEngine | ( | const wxFileName & | aRulePath | ) |
Initialize the DRC engine.
| PARSE_ERROR | if the rules file contains errors |
Definition at line 803 of file drc_engine.cpp.
References compileRules(), DRCE_FIRST, DRCE_LAST, ERROR_LIMIT, DRC_TEST_PROVIDER_REGISTRY::GetTestProviders(), DRC_TEST_PROVIDER_REGISTRY::Instance(), loadImplicitRules(), loadRules(), m_board, m_clearanceCacheMutex, m_constraintMap, m_errorLimits, m_explicitConstraints, m_hasDiffPairClearanceOverrides, m_hasExplicitClearanceRules, m_logReporter, m_netclassClearances, m_ownClearanceCache, m_rules, m_rulesValid, and m_testProviders.
Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), PCB_EDIT_FRAME::CommonSettingsChanged(), DoCourtyardInvalidTest(), DoCourtyardOverlapTest(), LoadBoard(), PCB_EDIT_FRAME::OnBoardLoaded(), PCB_EDIT_FRAME::OnNetlistChanged(), DIALOG_DRC::OnRunDRCClick(), and DRC_BASE_FIXTURE::runDrcOnBoard().
| void DRC_ENGINE::InitializeClearanceCache | ( | ) |
Initialize the clearance cache for all items on the board.
Pre-populates the cache to avoid delays during first render. Should be called after InitEngine() when a board is loaded.
Definition at line 2574 of file drc_engine.cpp.
References LSET::AllCuMask(), clearance, CLEARANCE_CONSTRAINT, EvalRules(), GetKiCadThreadPool(), MINOPTMAX< T >::HasMin(), HOLE_CLEARANCE_CONSTRAINT, m_board, m_clearanceCacheMutex, m_ownClearanceCache, EDA_ITEM::m_Uuid, MINOPTMAX< T >::Min(), NPTH, pad, PCB_PAD_T, PCB_VIA_T, LSET::Seq(), tp, EDA_ITEM::Type(), and DRC_CONSTRAINT::Value().
| void DRC_ENGINE::InvalidateClearanceCache | ( | const KIID & | aUuid | ) |
Invalidate the clearance cache for a specific item.
Called when item properties that could affect clearance (net, type, layer) change.
| aUuid | the UUID of the item to invalidate. |
Definition at line 2550 of file drc_engine.cpp.
References m_clearanceCacheMutex, and m_ownClearanceCache.
| bool DRC_ENGINE::IsCancelled | ( | ) | const |
Definition at line 2228 of file drc_engine.cpp.
References m_progressReporter.
| bool DRC_ENGINE::IsErrorLimitExceeded | ( | int | error_code | ) |
Definition at line 2137 of file drc_engine.cpp.
References DRCE_LAST, m_errorLimits, and m_errorLimitsMutex.
|
static |
Definition at line 2330 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 2364 of file drc_engine.cpp.
References epsilon, GetDesignSettings(), BOARD_DESIGN_SETTINGS::GetDRCEpsilon(), BOARD_ITEM::GetParentFootprint(), FOOTPRINT::IsNetTie(), FOOTPRINT::MapPadNumbersToNetTieGroups(), pad, and FOOTPRINT::Pads().
| bool DRC_ENGINE::KeepRefreshing | ( | bool | aWait = false | ) |
Definition at line 2183 of file drc_engine.cpp.
References m_progressReporter.
|
private |
Definition at line 160 of file drc_engine.cpp.
References _, addRule(), ANNULAR_WIDTH_CONSTRAINT, KIID::AsString(), B_SilkS, BARCODE_DEFAULTS, BOARD_SETUP_CONSTRAINT, CLEARANCE_CONSTRAINT, CONNECTION_WIDTH_CONSTRAINT, COURTYARD_CLEARANCE_CONSTRAINT, createImplicitRule(), DescribeRef(), DIFF_PAIR_GAP_CONSTRAINT, DISALLOW_CONSTRAINT, DRC_DISALLOW_FOOTPRINTS, DRC_DISALLOW_PADS, DRC_DISALLOW_TRACKS, DRC_DISALLOW_VIAS, DRC_DISALLOW_ZONES, DRCE_TUNING_PROFILE_IMPLICIT_RULES, EDGE_CLEARANCE_CONSTRAINT, F_SilkS, NET_SETTINGS::GetCompositeNetclasses(), NET_SETTINGS::GetDefaultNetclass(), DELAY_PROFILE_TRACK_PROPAGATION_ENTRY::GetDiffPairGap(), ZONE::GetDoNotAllowFootprints(), ZONE::GetDoNotAllowPads(), ZONE::GetDoNotAllowTracks(), ZONE::GetDoNotAllowVias(), ZONE::GetDoNotAllowZoneFills(), UNITS_PROVIDER::GetIuScale(), ZONE::GetLayerSet(), NET_SETTINGS::GetNetclasses(), DELAY_PROFILE_TRACK_PROPAGATION_ENTRY::GetSignalLayer(), DELAY_PROFILE_TRACK_PROPAGATION_ENTRY::GetWidth(), ZONE::GetZoneName(), HOLE_CLEARANCE_CONSTRAINT, HOLE_SIZE_CONSTRAINT, HOLE_TO_HOLE_CONSTRAINT, isKeepoutZone(), KEEPOUT, m_board, m_clearanceCacheMutex, BOARD_DESIGN_SETTINGS::m_CopperEdgeClearance, DRC_CONSTRAINT::m_DisallowFlags, BOARD_DESIGN_SETTINGS::m_DRCSeverities, m_hasDiffPairClearanceOverrides, 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, m_netclassClearances, BOARD_DESIGN_SETTINGS::m_NetSettings, BOARD_DESIGN_SETTINGS::m_SilkClearance, BOARD_DESIGN_SETTINGS::m_TrackMinWidth, TUNING_PROFILE::m_TrackPropagationEntries, TUNING_PROFILE::m_Type, EDA_ITEM::m_Uuid, BOARD_DESIGN_SETTINGS::m_ViasMinAnnularWidth, BOARD_DESIGN_SETTINGS::m_ViasMinSize, MIN_RESOLVED_SPOKES_CONSTRAINT, LSET::Name(), name, NET_CLASS, PHYSICAL_CLEARANCE_CONSTRAINT, project, MINOPTMAX< T >::SetMax(), MINOPTMAX< T >::SetMin(), MINOPTMAX< T >::SetOpt(), SILK_CLEARANCE_CONSTRAINT, TUNING_PROFILE::SINGLE, TEXT_HEIGHT_CONSTRAINT, TEXT_THICKNESS_CONSTRAINT, TRACK_WIDTH_CONSTRAINT, TUNING_PROFILE, DRC_CONSTRAINT::Value(), and VIA_DIAMETER_CONSTRAINT.
Referenced by InitEngine().
|
private |
Load and parse a rule set from an sexpr text file.
| PARSE_ERROR |
Definition at line 663 of file drc_engine.cpp.
References ExpandTextVars(), m_board, m_logReporter, m_rules, DRC_RULES_PARSER::Parse(), FILE_LINE_READER::ReadLine(), and resolver.
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 2280 of file drc_engine.cpp.
Referenced by inDiffPairFunc(), isCoupledDiffPairFunc(), IsNetADiffPair(), and BOARD_INSPECTION_TOOL::reportClearance().
|
inlineinherited |
Definition at line 148 of file units_provider.h.
References DISTANCE, GetIuScale(), GetUnitsFromType(), and EDA_UNIT_UTILS::UI::MessageTextFromMinOptMax().
Referenced by PCB_TRACK::GetMsgPanelInfo(), and PCB_TUNING_PATTERN::GetMsgPanelInfo().
|
inlineinherited |
Definition at line 141 of file units_provider.h.
References DISTANCE, EDA_UNIT_UTILS::UI::MessageTextFromValue(), unityScale, and UNSCALED.
Referenced by DRC_ENGINE::EvalRules().
|
inlineinherited |
Definition at line 134 of file units_provider.h.
References EDA_ANGLE::AsDegrees(), DEGREES, DISTANCE, 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 DISTANCE, GetIuScale(), GetUnitsFromType(), and EDA_UNIT_UTILS::UI::MessageTextFromValue().
Referenced by Build_Board_Characteristics_Table(), CheckDuplicatePins(), CheckLibSymbol(), CheckLibSymbolGraphics(), DRC_TEST_PROVIDER_MATCHED_LENGTH::checkSkews(), GERBVIEW_FRAME::DisplayGridMsg(), GERBER_FILE_IMAGE::DisplayImageInfo(), DRC_ENGINE::EvalRules(), FormatBoardStatisticsJson(), FormatBoardStatisticsReport(), DRC_TEST_PROVIDER::formatMsg(), DRC_TEST_PROVIDER::formatMsg(), DS_DRAW_ITEM_LINE::GetItemDescription(), DS_DRAW_ITEM_RECT::GetItemDescription(), PCB_TRACK::GetItemDescription(), SCH_LINE::GetItemDescription(), SCH_SHAPE::GetItemDescription(), DS_DRAW_ITEM_BASE::GetMsgPanelInfo(), NETINFO_ITEM::GetMsgPanelInfo(), PAD::GetMsgPanelInfo(), PCB_BARCODE::GetMsgPanelInfo(), PCB_DIM_ALIGNED::GetMsgPanelInfo(), PCB_DIM_LEADER::GetMsgPanelInfo(), PCB_DIMENSION_BASE::GetMsgPanelInfo(), PCB_POINT::GetMsgPanelInfo(), PCB_REFERENCE_IMAGE::GetMsgPanelInfo(), PCB_TABLECELL::GetMsgPanelInfo(), PCB_TARGET::GetMsgPanelInfo(), PCB_TEXT::GetMsgPanelInfo(), PCB_TEXTBOX::GetMsgPanelInfo(), PCB_TRACK::GetMsgPanelInfo(), PCB_TUNING_PATTERN::GetMsgPanelInfo(), PCB_VIA::GetMsgPanelInfo(), 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(), STROKE_PARAMS::GetMsgPanelInfo(), ZONE::GetMsgPanelInfo(), GetNetNavigatorItemText(), PCB_BASE_FRAME::MessageTextFromCoord(), test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run(), DRC_TEST_PROVIDER_MATCHED_LENGTH::runInternal(), EDA_SHAPE::ShapeGetMsgPanelInfo(), showCoord(), DRC_TEST_PROVIDER_MISC::testOutline(), VIA_SIZE_MENU::update(), PL_EDITOR_FRAME::UpdateMsgPanelInfo(), GERBVIEW_FRAME::UpdateStatusBar(), PCB_BASE_FRAME::UpdateStatusBar(), and SCH_BASE_FRAME::UpdateStatusBar().
|
delete |
References DRC_ENGINE().
|
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 182 of file units_provider.h.
References DISTANCE, EDA_UNIT_UTILS::UI::DoubleValueFromString(), GetIuScale(), GetUnitsFromType(), KiROUND(), and 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 2062 of file drc_engine.cpp.
References _, ASSERTION_CONSTRAINT, EscapeHTML(), BOARD_ITEM::GetLayer(), BOARD_ITEM::GetLayerSet(), m_constraintMap, and REPORT.
| std::set< int > DRC_ENGINE::QueryDistinctConstraints | ( | DRC_CONSTRAINT_T | aConstraintId | ) |
Definition at line 2264 of file drc_engine.cpp.
References DRC_ENGINE::DRC_ENGINE_CONSTRAINT::constraint, DRC_CONSTRAINT::GetValue(), m_constraintMap, and MINOPTMAX< T >::Min().
| bool DRC_ENGINE::QueryWorstConstraint | ( | DRC_CONSTRAINT_T | aRuleId, |
| DRC_CONSTRAINT & | aConstraint ) |
Definition at line 2241 of file drc_engine.cpp.
References DRC_ENGINE::DRC_ENGINE_CONSTRAINT::constraint, DRC_CONSTRAINT::GetValue(), m_constraintMap, and MINOPTMAX< T >::Min().
| bool DRC_ENGINE::ReportPhase | ( | const wxString & | aMessage | ) |
Definition at line 2216 of file drc_engine.cpp.
References m_progressReporter.
| bool DRC_ENGINE::ReportProgress | ( | double | aProgress | ) |
Definition at line 2206 of file drc_engine.cpp.
References m_progressReporter.
| void DRC_ENGINE::ReportViolation | ( | const std::shared_ptr< DRC_ITEM > & | aItem, |
| const VECTOR2I & | aPos, | ||
| int | aMarkerLayer, | ||
| const std::function< void(PCB_MARKER *)> & | aPathGenerator = {} ) |
Definition at line 2145 of file drc_engine.cpp.
References m_errorLimits, m_errorLimitsMutex, m_logReporter, DRC_RULE::m_Name, m_violationHandler, VECTOR2< T >::x, and VECTOR2< T >::y.
|
inline |
Definition at line 276 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 870 of file drc_engine.cpp.
References DRCE_CLEARANCE, DRCE_FIRST, DRCE_LAST, DRCE_UNCONNECTED_ITEMS, ERROR_LIMIT, EXTENDED_ERROR_LIMIT, DRC_TEST_PROVIDER::Init(), m_board, m_designSettings, m_errorLimits, m_logReporter, m_reportAllTrackErrors, m_testFootprints, m_testProviders, PROF_TIMER::msecs(), DRC_CACHE_GENERATOR::Run(), DRC_TEST_PROVIDER::SetDRCEngine(), UNITS_PROVIDER::SetUserUnits(), PROF_TIMER::Stop(), and traceDrcProfile.
Referenced by BOOST_DATA_TEST_CASE_F(), BOOST_DATA_TEST_CASE_F(), BOOST_DATA_TEST_CASE_F(), BOOST_DATA_TEST_CASE_F(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), DoCourtyardInvalidTest(), DoCourtyardOverlapTest(), BACKDRILL_TEST_FIXTURE::RunDRCForErrorCode(), and DRC_BASE_FIXTURE::runDrcOnBoard().
|
inline |
Definition at line 146 of file drc_engine.h.
References m_board.
|
inline |
Definition at line 158 of file drc_engine.h.
References m_debugOverlay.
|
inline |
Definition at line 149 of file drc_engine.h.
References m_designSettings.
|
inline |
Definition at line 155 of file drc_engine.h.
References m_drawingSheet.
|
inline |
Definition at line 191 of file drc_engine.h.
References m_logReporter.
| void DRC_ENGINE::SetMaxProgress | ( | int | aSize | ) |
Definition at line 2199 of file drc_engine.cpp.
References m_progressReporter.
|
inline |
Set an optional reporter for user-level progress info.
Definition at line 181 of file drc_engine.h.
References m_progressReporter.
|
inline |
Definition at line 152 of file drc_engine.h.
References m_schematicNetlist.
|
inlineinherited |
Definition at line 46 of file units_provider.h.
References m_userUnits.
Referenced by EDA_BASE_FRAME::ChangeUserUnits(), EDA_DRAW_FRAME::EDA_DRAW_FRAME(), PCB_DIM_ALIGNED::GetMsgPanelInfo(), PCB_DIMENSION_BASE::GetMsgPanelInfo(), IfaceOrAddress(), EDA_DRAW_FRAME::LoadSettings(), PL_EDITOR_FRAME::PL_EDITOR_FRAME(), DRC_ENGINE::RunTests(), DRC_TEST_PROVIDER::RunTests(), SaveFileAs(), and EDA_DRAW_FRAME::ToggleUserUnits().
|
inline |
Set an optional DRC violation handler (receives DRC_ITEMs and positions).
Definition at line 168 of file drc_engine.h.
References m_violationHandler.
Referenced by BOOST_DATA_TEST_CASE_F(), BOOST_DATA_TEST_CASE_F(), BOOST_DATA_TEST_CASE_F(), BOOST_DATA_TEST_CASE_F(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), DoCourtyardInvalidTest(), DoCourtyardOverlapTest(), and BACKDRILL_TEST_FIXTURE::RunDRCForErrorCode().
|
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 100 of file units_provider.h.
References DISTANCE, GetIuScale(), GetUnitsFromType(), NullUiString, and EDA_UNIT_UTILS::UI::StringFromValue().
Referenced by WX_GRID::onCellEditorHidden().
|
inlineinherited |
Definition at line 114 of file units_provider.h.
References EDA_ANGLE::AsDegrees(), DEGREES, DISTANCE, 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 79 of file units_provider.h.
References DISTANCE, GetIuScale(), GetUnitsFromType(), and EDA_UNIT_UTILS::UI::StringFromValue().
Referenced by Build_Board_Stackup_Table(), MICROWAVE_TOOL::createFootprint(), MICROWAVE_TOOL::createMicrowaveInductor(), PAD::doCheckPad(), VALIDATION_ERROR_TOO_LARGE< T >::Format(), VALIDATION_ERROR_TOO_SMALL< T >::Format(), formatBBox(), DRC_TEST_PROVIDER::formatMsg(), DRC_TEST_PROVIDER::formatMsg(), WX_GRID::onCellEditorHidden(), reportMax(), reportMin(), reportOpt(), and PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataFromWindow().
|
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 163 of file units_provider.h.
References DISTANCE, EDA_UNIT_UTILS::UI::DoubleValueFromString(), GetIuScale(), GetUnitsFromType(), and KiROUND().
Referenced by PIN_TABLE_DATA_MODEL::compare(), MICROWAVE_TOOL::createFootprint(), MICROWAVE_TOOL::createMicrowaveInductor(), WX_GRID::GetUnitValue(), and WX_GRID::onCellEditorHidden().
|
friend |
Definition at line 135 of file drc_engine.h.
References DRC_TEST_PROVIDER_CREEPAGE.
Referenced by DRC_TEST_PROVIDER_CREEPAGE.
|
protected |
Definition at line 355 of file drc_engine.h.
Referenced by DRC_ENGINE(), EvalRules(), GetBoard(), GetItemsMatchingCondition(), InitEngine(), InitEngine(), InitializeClearanceCache(), loadImplicitRules(), loadRules(), RunTests(), and SetBoard().
|
mutableprotected |
Definition at line 389 of file drc_engine.h.
Referenced by ClearClearanceCache(), EvalRules(), GetCachedOwnClearance(), InitEngine(), InitializeClearanceCache(), InvalidateClearanceCache(), and loadImplicitRules().
|
protected |
Definition at line 369 of file drc_engine.h.
Referenced by compileRules(), EvalRules(), HasRulesForConstraintType(), InitEngine(), InitEngine(), ProcessAssertions(), QueryDistinctConstraints(), QueryWorstConstraint(), and ~DRC_ENGINE().
|
protected |
Definition at line 375 of file drc_engine.h.
Referenced by GetDebugOverlay(), and SetDebugOverlay().
|
protected |
Definition at line 354 of file drc_engine.h.
Referenced by DRC_ENGINE(), EvalRules(), GetDesignSettings(), RunTests(), and SetDesignSettings().
|
protected |
Definition at line 356 of file drc_engine.h.
Referenced by DRC_ENGINE(), GetDrawingSheet(), and SetDrawingSheet().
|
protected |
Definition at line 363 of file drc_engine.h.
Referenced by DRC_ENGINE(), InitEngine(), InitEngine(), IsErrorLimitExceeded(), ReportViolation(), and RunTests().
|
mutableprotected |
Definition at line 364 of file drc_engine.h.
Referenced by IsErrorLimitExceeded(), and ReportViolation().
|
protected |
Definition at line 392 of file drc_engine.h.
Referenced by compileRules(), and InitEngine().
|
protected |
Definition at line 391 of file drc_engine.h.
Referenced by EvalRules(), InitEngine(), and loadImplicitRules().
|
protected |
Definition at line 390 of file drc_engine.h.
Referenced by compileRules(), EvalRules(), and InitEngine().
|
privateinherited |
Definition at line 260 of file units_provider.h.
Referenced by GetIuScale(), and UNITS_PROVIDER().
|
protected |
Definition at line 372 of file drc_engine.h.
Referenced by compileRules(), DRC_ENGINE(), GetItemsMatchingCondition(), GetLogReporter(), InitEngine(), InitEngine(), loadRules(), ReportViolation(), RunTests(), and SetLogReporter().
|
protected |
Definition at line 385 of file drc_engine.h.
Referenced by EvalRules(), InitEngine(), and loadImplicitRules().
|
protected |
Definition at line 380 of file drc_engine.h.
Referenced by ClearClearanceCache(), GetCachedOwnClearance(), InitEngine(), InitializeClearanceCache(), and InvalidateClearanceCache().
|
protected |
Definition at line 373 of file drc_engine.h.
Referenced by AdvanceProgress(), DRC_ENGINE(), GetProgressReporter(), IsCancelled(), KeepRefreshing(), ReportPhase(), ReportProgress(), SetMaxProgress(), and SetProgressReporter().
|
protected |
Definition at line 365 of file drc_engine.h.
Referenced by DRC_ENGINE(), GetReportAllTrackErrors(), and RunTests().
|
protected |
Definition at line 359 of file drc_engine.h.
Referenced by addRule(), compileRules(), InitEngine(), InitEngine(), loadRules(), and ~DRC_ENGINE().
|
protected |
Definition at line 360 of file drc_engine.h.
Referenced by DRC_ENGINE(), InitEngine(), InitEngine(), and RulesValid().
|
protected |
Definition at line 357 of file drc_engine.h.
Referenced by DRC_ENGINE(), GetSchematicNetlist(), and SetSchematicNetlist().
|
protected |
Definition at line 366 of file drc_engine.h.
Referenced by DRC_ENGINE(), GetTestFootprints(), and RunTests().
|
protected |
Definition at line 361 of file drc_engine.h.
Referenced by GetTestProvider(), GetTestProviders(), InitEngine(), InitEngine(), and RunTests().
|
privateinherited |
Definition at line 261 of file units_provider.h.
Referenced by GetUserUnits(), SetUserUnits(), and UNITS_PROVIDER().
|
protected |
Definition at line 371 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 257 of file units_provider.h.
Referenced by WX_GRID::GetOptionalUnitValue(), WX_GRID::onCellEditorHidden(), OptionalValueFromString(), and StringFromOptionalValue().