48#define ERROR_LIMIT 199
49#define EXTENDED_ERROR_LIMIT 499
56 if( wxGetEnv( wxT(
"DRC_DEBUG" ), &valueStr ) )
58 int setLevel = wxAtoi( valueStr );
60 if( level <= setLevel )
61 printf(
"%-30s:%d | %s\n", function, line, (
const char *) msg.c_str() );
68 m_designSettings ( aSettings ),
70 m_drawingSheet( nullptr ),
71 m_schematicNetlist( nullptr ),
72 m_rulesValid( false ),
73 m_reportAllTrackErrors( false ),
74 m_testFootprints( false ),
75 m_reporter( nullptr ),
76 m_progressReporter( nullptr )
107 const ZONE* zone =
static_cast<const ZONE*
>( aItem );
130 std::shared_ptr<DRC_RULE> rule = std::make_shared<DRC_RULE>();
133 rule->m_Implicit =
true;
153 rule->AddConstraint( widthConstraint );
157 rule->AddConstraint( connectionConstraint );
161 rule->AddConstraint( drillConstraint );
165 rule->AddConstraint( annulusConstraint );
169 rule->AddConstraint( diameterConstraint );
173 rule->AddConstraint( holeToHoleConstraint );
178 rule->AddConstraint( thermalSpokeCountConstraint );
184 rule->AddConstraint( silkClearanceConstraint );
190 rule->AddConstraint( silkTextHeightConstraint );
196 rule->AddConstraint( silkTextThicknessConstraint );
201 rule->AddConstraint( holeClearanceConstraint );
206 rule->AddConstraint( edgeClearanceConstraint );
211 rule->AddConstraint( courtyardClearanceConstraint );
215 std::shared_ptr<DRC_RULE> uViaRule =
createImplicitRule(
_(
"board setup micro-via constraints" ) );
221 uViaRule->AddConstraint( uViaDrillConstraint );
225 uViaRule->AddConstraint( uViaDiameterConstraint );
229 std::vector<std::shared_ptr<DRC_RULE>> netclassClearanceRules;
230 std::vector<std::shared_ptr<DRC_RULE>> netclassItemSpecificRules;
232 auto makeNetclassRules =
233 [&](
const std::shared_ptr<NETCLASS>& nc,
bool isDefault )
235 wxString ncName = nc->GetName();
238 if( nc->GetClearance() || nc->GetTrackWidth() )
240 std::shared_ptr<DRC_RULE> netclassRule = std::make_shared<DRC_RULE>();
242 netclassRule->m_Implicit =
true;
246 netclassClearanceRules.push_back( netclassRule );
248 if( nc->GetClearance() )
252 netclassRule->AddConstraint( constraint );
255 if( nc->GetTrackWidth() )
260 netclassRule->AddConstraint( constraint );
264 if( nc->GetDiffPairWidth() )
266 std::shared_ptr<DRC_RULE> netclassRule = std::make_shared<DRC_RULE>();
269 netclassRule->m_Implicit =
true;
274 netclassItemSpecificRules.push_back( netclassRule );
278 constraint.
Value().
SetOpt( nc->GetDiffPairWidth() );
279 netclassRule->AddConstraint( constraint );
282 if( nc->GetDiffPairGap() )
284 std::shared_ptr<DRC_RULE> netclassRule = std::make_shared<DRC_RULE>();
287 netclassRule->m_Implicit =
true;
291 netclassItemSpecificRules.push_back( netclassRule );
296 netclassRule->AddConstraint( constraint );
299 if( nc->GetDiffPairGap() < nc->GetClearance() )
301 netclassRule = std::make_shared<DRC_RULE>();
304 netclassRule->m_Implicit =
true;
306 expr =
wxString::Format( wxT(
"A.NetClass == '%s' && AB.isCoupledDiffPair()" ),
309 netclassItemSpecificRules.push_back( netclassRule );
312 min_clearanceConstraint.
Value().
SetMin( nc->GetDiffPairGap() );
313 netclassRule->AddConstraint( min_clearanceConstraint );
317 if( nc->GetViaDiameter() || nc->GetViaDrill() )
319 std::shared_ptr<DRC_RULE> netclassRule = std::make_shared<DRC_RULE>();
321 netclassRule->m_Implicit =
true;
323 expr =
wxString::Format( wxT(
"A.NetClass == '%s' && A.Via_Type != 'Micro'" ),
326 netclassItemSpecificRules.push_back( netclassRule );
328 if( nc->GetViaDiameter() )
333 netclassRule->AddConstraint( constraint );
336 if( nc->GetViaDrill() )
341 netclassRule->AddConstraint( constraint );
345 if( nc->GetuViaDiameter() || nc->GetuViaDrill() )
347 std::shared_ptr<DRC_RULE> netclassRule = std::make_shared<DRC_RULE>();
349 netclassRule->m_Implicit =
true;
351 expr =
wxString::Format( wxT(
"A.NetClass == '%s' && A.Via_Type == 'Micro'" ),
354 netclassItemSpecificRules.push_back( netclassRule );
356 if( nc->GetuViaDiameter() )
360 constraint.
Value().
SetMin( nc->GetuViaDiameter() );
361 netclassRule->AddConstraint( constraint );
364 if( nc->GetuViaDrill() )
369 netclassRule->AddConstraint( constraint );
375 makeNetclassRules( bds.
m_NetSettings->m_DefaultNetClass,
true );
378 makeNetclassRules( netclass,
false );
385 std::sort( netclassClearanceRules.begin(), netclassClearanceRules.end(),
386 [](
const std::shared_ptr<DRC_RULE>& lhs,
const std::shared_ptr<DRC_RULE>& rhs )
388 return lhs->m_Constraints[0].m_Value.Min()
389 < rhs->m_Constraints[0].m_Value.Min();
392 for( std::shared_ptr<DRC_RULE>& ncRule : netclassClearanceRules )
395 for( std::shared_ptr<DRC_RULE>& ncRule : netclassItemSpecificRules )
400 std::vector<ZONE*> keepoutZones;
405 keepoutZones.push_back( zone );
410 for(
ZONE* zone : footprint->Zones() )
413 keepoutZones.push_back( zone );
417 for(
ZONE* zone : keepoutZones )
419 wxString
name = zone->GetZoneName();
426 rule->m_ImplicitItemId = zone->m_Uuid;
429 zone->m_Uuid.AsString() ) );
431 rule->m_LayerCondition = zone->GetLayerSet();
433 int disallowFlags = 0;
435 if( zone->GetDoNotAllowTracks() )
438 if( zone->GetDoNotAllowVias() )
441 if( zone->GetDoNotAllowPads() )
444 if( zone->GetDoNotAllowCopperPour() )
447 if( zone->GetDoNotAllowFootprints() )
452 rule->AddConstraint( disallowConstraint );
456 (
int) netclassClearanceRules.size() ) );
462 if( aPath.FileExists() )
464 std::vector<std::shared_ptr<DRC_RULE>> rules;
466 FILE* fp = wxFopen( aPath.GetFullPath(), wxT(
"rt" ) );
477 for( std::shared_ptr<DRC_RULE>& rule : rules )
487 for( std::shared_ptr<DRC_RULE>& rule :
m_rules )
491 if( rule->m_Condition && !rule->m_Condition->GetExpression().IsEmpty() )
493 condition = rule->m_Condition;
504 engineConstraint->
layerTest = rule->m_LayerCondition;
521 provider->SetDRCEngine(
this );
554 wxFAIL_MSG( wxT(
"Compiling implicit rules failed." ) );
557 throw original_parse_error;
591 if( !cacheGenerator.
Run() )
600 if( !provider->RunTests( aUnits ) )
610#define REPORT( s ) { if( aReporter ) { aReporter->Report( s ); } }
626 pad =
static_cast<const PAD*
>( a );
628 pad =
static_cast<const PAD*
>( b );
651 switch( aItem->
Type() )
662 const PAD*
pad =
static_cast<const PAD*
>( aItem );
664 return pad->GetDrillSizeX() ==
pad->GetDrillSizeY();
691 const ZONE* zone =
nullptr;
692 const FOOTPRINT* parentFootprint =
nullptr;
699 pad =
static_cast<const PAD*
>( a );
701 zone =
static_cast<const ZONE*
>( a );
704 pad =
static_cast<const PAD*
>( b );
706 zone =
static_cast<const ZONE*
>( b );
709 parentFootprint =
static_cast<FOOTPRINT*
>(
pad->GetParentFootprint() );
713 constraint.
m_Type = aConstraintType;
718 int override_val = 0;
722 if( ac && !b_is_non_copper )
725 if( bc && !a_is_non_copper )
728 if( overrideA > 0 || overrideB > 0 )
749 if( overrideB > override_val )
757 if( override_val < m_designSettings->m_MinClearance )
760 msg =
_(
"board minimum" );
769 if( override_val < m_designSettings->m_HoleClearance )
772 msg =
_(
"board minimum hole" );
805 if(
pad &&
pad->GetLocalThermalGapOverride(
nullptr ) > 0 )
808 int gap_override =
pad->GetLocalThermalGapOverride( &msg );
822 if(
pad &&
pad->GetLocalSpokeWidthOverride(
nullptr ) > 0 )
825 int spoke_override =
pad->GetLocalSpokeWidthOverride( &msg );
852 EscapeHTML( c->constraint.m_Test->GetExpression() ) ) )
854 if( c->constraint.m_Test->EvaluateFor( a, b, c->constraint.m_Type, aLayer,
857 REPORT(
_(
"Assertion passed." ) )
865 auto processConstraint =
868 bool implicit = c->parentRule && c->parentRule->m_Implicit;
872 switch( c->constraint.m_Type )
885 if( c->constraint.GetValue().Min() < 0 )
888 REPORT( implicit ? wxS(
"Negative clearance specified; constraint ignored." )
889 : wxS(
"Negative clearance specified; rule ignored." ) )
923 c->constraint.m_Value.Min() ) ) )
945 wxString min = wxT(
"<i>" ) +
_(
"undefined" ) + wxT(
"</i>" );
946 wxString opt = wxT(
"<i>" ) +
_(
"undefined" ) + wxT(
"</i>" );
947 wxString max = wxT(
"<i>" ) +
_(
"undefined" ) + wxT(
"</i>" );
954 switch( c->constraint.m_Type )
957 if( c->constraint.m_Value.HasOpt() )
963 else if( c->constraint.m_Value.HasMin() )
966 "track width: min %s." ),
979 if( c->constraint.m_Value.HasOpt() )
985 else if( c->constraint.m_Value.HasMin() )
988 "via diameter: min %s." ),
994 if( c->constraint.m_Value.HasOpt() )
1000 else if( c->constraint.m_Value.HasMin() )
1003 "hole size: min %s." ),
1018 if( c->constraint.m_Value.HasOpt() )
1025 else if( c->constraint.m_Value.HasMin() )
1028 "clearance: min %s." ),
1036 "hole to hole: min %s." ),
1047 if( c->constraint.m_Value.HasMin() )
1050 if( c->constraint.m_Value.HasOpt() )
1053 if( c->constraint.m_Value.HasMax() )
1073 if( implicit && ( a_is_non_copper || b_is_non_copper ) )
1075 REPORT(
_(
"Board and netclass clearances apply only between copper "
1092 switch(
static_cast<const PCB_VIA*
>( a )->GetViaType() )
1116 const ZONE* test_zone =
static_cast<const ZONE*
>( a );
1128 default: mask = 0;
break;
1132 if( ( c->constraint.m_DisallowFlags & mask ) == 0 )
1135 REPORT(
_(
"Keepout constraint not met." ) )
1137 REPORT(
_(
"Disallow constraint not met." ) )
1155 if( !( c->layerTest & itemLayers ).any() )
1159 REPORT(
_(
"Keepout layer(s) not matched." ) )
1161 else if( c->parentRule )
1164 EscapeHTML( c->parentRule->m_LayerSource ) ) )
1168 REPORT(
_(
"Rule layer not matched; rule ignored." ) )
1181 REPORT( wxS(
"Constraint layer not matched." ) )
1183 else if( c->parentRule )
1186 EscapeHTML( c->parentRule->m_LayerSource ) ) )
1190 REPORT(
_(
"Rule layer not matched; rule ignored." ) )
1210 else if( !c->condition || c->condition->GetExpression().IsEmpty() )
1216 REPORT(
_(
"Unconditional constraint applied." ) )
1220 REPORT(
_(
"Unconditional rule applied." ) )
1225 REPORT(
_(
"Unconditional rule applied; overrides previous constraints." ) )
1229 constraint = c->constraint;
1241 EscapeHTML( c->condition->GetExpression() ) ) )
1244 if( c->condition->EvaluateFor( a, b, c->constraint.m_Type, aLayer, aReporter ) )
1250 REPORT(
_(
"Constraint applied." ) )
1254 REPORT(
_(
"Rule applied." ) )
1259 REPORT(
_(
"Rule applied; overrides previous constraints." ) )
1263 if( c->constraint.m_Value.HasMin() )
1266 if( c->constraint.m_Value.HasOpt() )
1269 if( c->constraint.m_Value.HasMax() )
1285 REPORT( implicit ?
_(
"Membership not satisfied; constraint ignored." )
1286 :
_(
"Condition not satisfied; rule ignored." ) )
1295 std::vector<DRC_ENGINE_CONSTRAINT*>* ruleset =
m_constraintMap[ aConstraintType ];
1297 for(
int ii = 0; ii < (int) ruleset->size(); ++ii )
1298 processConstraint( ruleset->at( ii ) );
1313 a = parentFootprint;
1315 b = parentFootprint;
1319 std::vector<DRC_ENGINE_CONSTRAINT*>* ruleset =
m_constraintMap[ aConstraintType ];
1321 for(
int ii = 0; ii < (int) ruleset->size(); ++ii )
1322 processConstraint( ruleset->at( ii ) );
1337 int clearance = global;
1346 if( localA > clearance )
1363 if( localB > clearance )
1377 if( clearance < m_designSettings->m_MinClearance )
1380 constraint.
SetName(
_(
"board minimum" ) );
1395 constraint.
SetName(
_(
"board minimum" ) );
1403 if(
pad && parentFootprint )
1415 constraint.
SetName(
_(
"footprint" ) );
1490 auto testAssertion =
1494 EscapeHTML( c->constraint.m_Test->GetExpression() ) ) )
1496 if( c->constraint.m_Test->EvaluateFor( a,
nullptr, c->constraint.m_Type,
1499 REPORT(
_(
"Assertion passed." ) )
1504 aFailureHandler( &c->constraint );
1508 auto processConstraint =
1517 EscapeHTML( c->parentRule->m_LayerSource ) ) )
1520 if( !c->condition || c->condition->GetExpression().IsEmpty() )
1522 REPORT(
_(
"Unconditional rule applied." ) )
1528 EscapeHTML( c->condition->GetExpression() ) ) )
1530 if( c->condition->EvaluateFor( a,
nullptr, c->constraint.m_Type,
1533 REPORT(
_(
"Rule applied." ) )
1538 REPORT(
_(
"Condition not satisfied; rule ignored." ) )
1547 for(
int ii = 0; ii < (int) ruleset->size(); ++ii )
1548 processConstraint( ruleset->at( ii ) );
1558 assert( error_code >= 0 && error_code <=
DRCE_LAST );
1566 static std::mutex globalLock;
1572 std::lock_guard<std::mutex> guard( globalLock );
1579 aItem->GetViolatingTest()->GetName(),
1580 aItem->GetErrorMessage(),
1581 aItem->GetErrorCode() );
1583 DRC_RULE* rule = aItem->GetViolatingRule();
1590 wxString violatingItemsStr = wxT(
"Violating items: " );
1675 int current = c->constraint.GetValue().Min();
1677 if( current > worst )
1680 aConstraint = c->constraint;
1691 std::set<int> distinctMinimums;
1696 distinctMinimums.emplace( c->constraint.GetValue().Min() );
1699 return distinctMinimums;
1705 wxString& aBaseDpName )
1710 for(
auto it = aNetName.rbegin(); it != aNetName.rend() && rv == 0; ++it, ++count )
1714 if( ( ch >=
'0' && ch <=
'9' ) || ch ==
'_' )
1718 else if( ch ==
'+' )
1720 aComplementNet = wxT(
"-" );
1723 else if( ch ==
'-' )
1725 aComplementNet = wxT(
"+" );
1728 else if( ch ==
'N' )
1730 aComplementNet = wxT(
"P" );
1733 else if ( ch ==
'P' )
1735 aComplementNet = wxT(
"N" );
1744 if( rv != 0 && count >= 1 )
1746 aBaseDpName = aNetName.Left( aNetName.Length() - count );
1747 aComplementNet = wxString( aBaseDpName ) << aComplementNet << aNetName.Right( count - 1 );
1757 wxString
dummy, coupledNetName;
1793 if( parentFootprint && parentFootprint->
IsNetTie() )
1799 if( padToNetTieGroupMap[
pad->GetNumber() ] >= 0 && aTrackNetCode ==
pad->GetNetCode() )
1801 if(
pad->GetEffectiveShape( aTrackLayer )->Collide( aCollisionPos, 0 ) )
1815 if(
name == prov->GetName() )
constexpr EDA_IU_SCALE pcbIUScale
constexpr EDA_IU_SCALE unityScale
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
virtual int GetLocalClearanceOverrides(wxString *aSource) const
Return any local clearance overrides set in the "classic" (ie: pre-rule) system.
virtual int GetLocalClearance(wxString *aSource) const
Return any local clearances set in the "classic" (ie: pre-rule) system.
Container for design settings for a BOARD object.
std::shared_ptr< NET_SETTINGS > m_NetSettings
int m_CopperEdgeClearance
int m_MinSilkTextThickness
bool Ignore(int aDRCErrorCode)
Return true if the DRC error code's severity is SEVERITY_IGNORE.
int m_ViasMinAnnularWidth
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
virtual bool IsConnected() const
Returns information if the object is derived from BOARD_CONNECTED_ITEM.
virtual LSET GetLayerSet() const
Return a std::bitset of all layers on which the item physically resides.
BOARD_ITEM_CONTAINER * GetParentFootprint() const
virtual bool IsOnCopperLayer() const
virtual bool HasHole() const
Information pertinent to a Pcbnew printed circuit board.
LSET GetEnabledLayers() const
A proxy function that calls the corresponding function in m_BoardSettings.
NETINFO_ITEM * FindNet(int aNetcode) const
Search for a net with the given netcode.
void SynchronizeNetsAndNetClasses(bool aResetTrackAndViaSizes)
Copy NETCLASS info to each NET, based on NET membership in a NETCLASS.
FOOTPRINTS & Footprints()
void IncrementTimeStamp()
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
virtual bool Run() override
Run this provider against the given PCB with configured options (if any).
void SetParentRule(DRC_RULE *aParentRule)
MINOPTMAX< int > & Value()
ZONE_CONNECTION m_ZoneConnection
void SetName(const wxString &aName)
DRC_RULE * GetParentRule() const
std::map< DRC_CONSTRAINT_T, std::vector< DRC_ENGINE_CONSTRAINT * > * > m_constraintMap
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::set< int > QueryDistinctConstraints(DRC_CONSTRAINT_T aConstraintId)
bool KeepRefreshing(bool aWait=false)
bool m_reportAllTrackErrors
bool ReportProgress(double aProgress)
DRC_TEST_PROVIDER * GetTestProvider(const wxString &name) const
bool HasRulesForConstraintType(DRC_CONSTRAINT_T constraintID)
void RunTests(EDA_UNITS aUnits, bool aReportAllTrackErrors, bool aTestFootprints)
Run the DRC tests.
void ReportViolation(const std::shared_ptr< DRC_ITEM > &aItem, const VECTOR2I &aPos, int aMarkerLayer)
void SetMaxProgress(int aSize)
void ReportAux(const wxString &aStr)
DRC_ENGINE(BOARD *aBoard=nullptr, BOARD_DESIGN_SETTINGS *aSettings=nullptr)
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)
static bool IsNetADiffPair(BOARD *aBoard, NETINFO_ITEM *aNet, int &aNetP, int &aNetN)
static 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 ...
bool QueryWorstConstraint(DRC_CONSTRAINT_T aRuleId, DRC_CONSTRAINT &aConstraint)
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)
BOARD_DESIGN_SETTINGS * m_designSettings
void Parse(std::vector< std::shared_ptr< DRC_RULE > > &aRules, REPORTER *aReporter)
bool Compile(REPORTER *aReporter, int aSourceLine=0, int aSourceOffset=0)
std::vector< DRC_TEST_PROVIDER * > GetTestProviders() const
static DRC_TEST_PROVIDER_REGISTRY & Instance()
Represent a DRC "provider" which runs some DRC functions over a BOARD and spits out #DRC_ITEMs and po...
void SetDRCEngine(DRC_ENGINE *engine)
KICAD_T Type() const
Returns the type of object.
virtual wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider) const
Return a user-visible description string of this item.
EDA_ITEM_FLAGS GetFlags() const
LSET is a set of PCB_LAYER_IDs.
static LSET FrontMask()
Return a mask holding all technical layers and the external CU layer on front side.
static LSET BackMask()
Return a mask holding all technical layers and the external CU layer on back side.
Handle the data for a net.
const wxString & GetNetname() const
virtual bool IsCancelled() const =0
virtual bool KeepRefreshing(bool aWait=false)=0
Update the UI (if any).
virtual void AdvancePhase()=0
Use the next available virtual zone of the dialog progress bar.
virtual void AdvanceProgress()=0
Increment the progress bar length (inside the current virtual zone).
virtual void SetCurrentProgress(double aProgress)=0
Set the progress value to aProgress (0..1).
virtual void SetMaxProgress(int aMaxProgress)=0
Fix the value that gives the 100 percent progress bar length (inside the current virtual zone).
A pure virtual class used to derive REPORTER objects from.
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Report a string with a given severity.
wxString MessageTextFromValue(double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
A lower-precision version of StringFromValue().
void SetUserUnits(EDA_UNITS aUnits)
Handle a list of polygons defining a copper zone.
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider) const override
Return a user-visible description string of this item.
bool GetIsRuleArea() const
Accessors to parameters used in Rule Area zones:
bool GetDoNotAllowVias() const
bool GetDoNotAllowPads() const
bool GetDoNotAllowTracks() const
int GetMinThickness() const
ZONE_CONNECTION GetPadConnection() const
bool IsTeardropArea() const
int GetThermalReliefSpokeWidth() const
bool GetDoNotAllowFootprints() const
bool GetDoNotAllowCopperPour() const
int GetThermalReliefGap() const
void drcPrintDebugMessage(int level, const wxString &msg, const char *function, int line)
#define EXTENDED_ERROR_LIMIT
static bool isKeepoutZone(const BOARD_ITEM *aItem, bool aCheckFlags)
bool hasDrilledHole(const BOARD_ITEM *aItem)
@ DRC_DISALLOW_FOOTPRINTS
@ DRC_DISALLOW_MICRO_VIAS
@ ANNULAR_WIDTH_CONSTRAINT
@ COURTYARD_CLEARANCE_CONSTRAINT
@ VIA_DIAMETER_CONSTRAINT
@ ZONE_CONNECTION_CONSTRAINT
@ DIFF_PAIR_MAX_UNCOUPLED_CONSTRAINT
@ DIFF_PAIR_GAP_CONSTRAINT
@ SILK_CLEARANCE_CONSTRAINT
@ EDGE_CLEARANCE_CONSTRAINT
@ MIN_RESOLVED_SPOKES_CONSTRAINT
@ TEXT_THICKNESS_CONSTRAINT
@ PHYSICAL_HOLE_CLEARANCE_CONSTRAINT
@ THERMAL_SPOKE_WIDTH_CONSTRAINT
@ CONNECTION_WIDTH_CONSTRAINT
@ THERMAL_RELIEF_GAP_CONSTRAINT
@ HOLE_CLEARANCE_CONSTRAINT
@ PHYSICAL_CLEARANCE_CONSTRAINT
@ HOLE_TO_HOLE_CONSTRAINT
#define HOLE_PROXY
Indicates the BOARD_ITEM is a proxy for its hole.
PCB_LAYER_ID
A quick note on layer IDs:
wxString MessageTextFromValue(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnits, double aValue, bool aAddUnitsText=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
A helper to convert the double length aValue to a string in inches, millimeters, or unscaled units.
@ PTH
Plated through hole pad.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
std::vector< FAB_LAYER_COLOR > dummy
wxString EscapeHTML(const wxString &aString)
Return a new wxString escaped for embedding in HTML.
std::shared_ptr< DRC_RULE > parentRule
DRC_RULE_CONDITION * condition
DRC_CONSTRAINT constraint
A filename or source description, a problem input line, a line number, a byte offset,...
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
@ PCB_FP_SHAPE_T
class FP_SHAPE, a footprint edge
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
@ PCB_FP_TEXTBOX_T
class FP_TEXTBOX, wrapped text in a footprint
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
@ PCB_ZONE_T
class ZONE, a copper pour area
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
@ PCB_FP_ZONE_T
class ZONE, managed by a footprint
@ PCB_PAD_T
class PAD, a pad in a footprint
@ PCB_FP_TEXT_T
class FP_TEXT, text in a footprint
@ PCB_ARC_T
class PCB_ARC, an arc track segment on a copper layer
@ PCB_TRACE_T
class PCB_TRACK, a track segment (segment on a copper layer)
wxString PrintZoneConnection(ZONE_CONNECTION aConnection)
ZONE_CONNECTION
How pads are covered by copper in zone.
@ THERMAL
Use thermal relief for pads.
@ THT_THERMAL
Thermal relief only for THT pads.
@ FULL
pads are covered by copper