58#define ERROR_LIMIT 199
59#define EXTENDED_ERROR_LIMIT 499
76 if( wxGetEnv( wxT(
"DRC_DEBUG" ), &valueStr ) )
78 int setLevel = wxAtoi( valueStr );
80 if( level <= setLevel )
81 printf(
"%-30s:%d | %s\n", function, line, (
const char *) msg.c_str() );
124 const ZONE* zone =
static_cast<const ZONE*
>( aItem );
151 std::shared_ptr<DRC_RULE> rule = std::make_shared<DRC_RULE>();
154 rule->SetImplicitSource( aImplicitSource );
165 wxString expr, expr2, ncName;
169 std::shared_ptr<DRC_RULE> rule =
174 rule->AddConstraint( widthConstraint );
178 rule->AddConstraint( connectionConstraint );
182 rule->AddConstraint( drillConstraint );
186 rule->AddConstraint( annulusConstraint );
190 rule->AddConstraint( diameterConstraint );
194 rule->AddConstraint( holeToHoleConstraint );
200 rule->AddConstraint( thermalSpokeCountConstraint );
206 rule->AddConstraint( silkClearanceConstraint );
213 rule->AddConstraint( silkTextHeightConstraint );
220 rule->AddConstraint( silkTextThicknessConstraint );
225 rule->AddConstraint( holeClearanceConstraint );
230 rule->AddConstraint( edgeClearanceConstraint );
235 rule->AddConstraint( courtyardClearanceConstraint );
239 std::shared_ptr<DRC_RULE> uViaRule =
246 uViaRule->AddConstraint( uViaDrillConstraint );
250 uViaRule->AddConstraint( uViaDiameterConstraint );
254 std::shared_ptr<DRC_RULE> barcodeRule =
258 barcodeRule->AddConstraint( barcodeSeparationConstraint );
263 std::vector<std::shared_ptr<DRC_RULE>> netclassClearanceRules;
264 std::vector<std::shared_ptr<DRC_RULE>> netclassItemSpecificRules;
266 auto makeNetclassRules =
267 [&](
const std::shared_ptr<NETCLASS>& nc,
bool isDefault )
269 ncName = nc->GetName();
270 ncName.Replace(
"'",
"\\'" );
272 if( nc->HasClearance() )
274 std::shared_ptr<DRC_RULE> netclassRule = std::make_shared<DRC_RULE>();
275 netclassRule->m_Name = wxString::Format(
_(
"netclass '%s'" ),
276 nc->GetClearanceParent()->GetHumanReadableName() );
279 expr = wxString::Format( wxT(
"A.hasExactNetclass('%s')" ), ncName );
281 netclassClearanceRules.push_back( netclassRule );
285 netclassRule->AddConstraint( constraint );
293 if( nc->HasTrackWidth() )
295 std::shared_ptr<DRC_RULE> netclassRule = std::make_shared<DRC_RULE>();
296 netclassRule->m_Name = wxString::Format(
_(
"netclass '%s'" ),
297 nc->GetTrackWidthParent()->GetHumanReadableName() );
300 expr = wxString::Format( wxT(
"A.hasExactNetclass('%s')" ), ncName );
302 netclassClearanceRules.push_back( netclassRule );
307 netclassRule->AddConstraint( constraint );
310 if( nc->HasDiffPairWidth() )
312 std::shared_ptr<DRC_RULE> netclassRule = std::make_shared<DRC_RULE>();
313 netclassRule->m_Name = wxString::Format(
_(
"netclass '%s' (diff pair)" ),
314 nc->GetDiffPairWidthParent()->GetHumanReadableName() );
317 expr = wxString::Format( wxT(
"A.hasExactNetclass('%s') && A.inDiffPair('*')" ), ncName );
319 netclassItemSpecificRules.push_back( netclassRule );
323 constraint.
Value().
SetOpt( nc->GetDiffPairWidth() );
324 netclassRule->AddConstraint( constraint );
327 if( nc->HasDiffPairGap() )
329 std::shared_ptr<DRC_RULE> netclassRule = std::make_shared<DRC_RULE>();
330 netclassRule->m_Name = wxString::Format(
_(
"netclass '%s' (diff pair)" ),
331 nc->GetDiffPairGapParent()->GetHumanReadableName() );
334 expr = wxString::Format( wxT(
"A.hasExactNetclass('%s')" ), ncName );
336 netclassItemSpecificRules.push_back( netclassRule );
341 netclassRule->AddConstraint( constraint );
344 if( nc->GetDiffPairGap() < nc->GetClearance() )
346 netclassRule = std::make_shared<DRC_RULE>();
347 netclassRule->m_Name = wxString::Format(
_(
"netclass '%s' (diff pair)" ),
348 nc->GetDiffPairGapParent()->GetHumanReadableName() );
351 expr = wxString::Format( wxT(
"A.hasExactNetclass('%s') && AB.isCoupledDiffPair()" ), ncName );
353 netclassItemSpecificRules.push_back( netclassRule );
356 min_clearanceConstraint.
Value().
SetMin( nc->GetDiffPairGap() );
357 netclassRule->AddConstraint( min_clearanceConstraint );
363 if( nc->HasViaDiameter() )
365 std::shared_ptr<DRC_RULE> netclassRule = std::make_shared<DRC_RULE>();
366 netclassRule->m_Name = wxString::Format(
_(
"netclass '%s'" ),
367 nc->GetViaDiameterParent()->GetHumanReadableName() );
370 expr = wxString::Format( wxT(
"A.hasExactNetclass('%s') && A.Via_Type != 'Micro'" ), ncName );
372 netclassItemSpecificRules.push_back( netclassRule );
377 netclassRule->AddConstraint( constraint );
380 if( nc->HasViaDrill() )
382 std::shared_ptr<DRC_RULE> netclassRule = std::make_shared<DRC_RULE>();
383 netclassRule->m_Name = wxString::Format(
_(
"netclass '%s'" ),
384 nc->GetViaDrillParent()->GetHumanReadableName() );
387 expr = wxString::Format( wxT(
"A.hasExactNetclass('%s') && A.Via_Type != 'Micro'" ), ncName );
389 netclassItemSpecificRules.push_back( netclassRule );
394 netclassRule->AddConstraint( constraint );
397 if( nc->HasuViaDiameter() )
399 std::shared_ptr<DRC_RULE> netclassRule = std::make_shared<DRC_RULE>();
400 netclassRule->m_Name = wxString::Format(
_(
"netclass '%s' (uvia)" ),
401 nc->GetuViaDiameterParent()->GetHumanReadableName() );
404 expr = wxString::Format( wxT(
"A.hasExactNetclass('%s') && A.Via_Type == 'Micro'" ), ncName );
406 netclassItemSpecificRules.push_back( netclassRule );
410 constraint.
Value().
SetMin( nc->GetuViaDiameter() );
411 netclassRule->AddConstraint( constraint );
414 if( nc->HasuViaDrill() )
416 std::shared_ptr<DRC_RULE> netclassRule = std::make_shared<DRC_RULE>();
417 netclassRule->m_Name = wxString::Format(
_(
"netclass '%s' (uvia)" ),
418 nc->GetuViaDrillParent()->GetHumanReadableName() );
421 expr = wxString::Format( wxT(
"A.hasExactNetclass('%s') && A.Via_Type == 'Micro'" ), ncName );
423 netclassItemSpecificRules.push_back( netclassRule );
428 netclassRule->AddConstraint( constraint );
432 m_board->SynchronizeNetsAndNetClasses(
false );
436 makeNetclassRules( netclass,
false );
439 makeNetclassRules( netclass,
false );
446 std::sort( netclassClearanceRules.begin(), netclassClearanceRules.end(),
447 [](
const std::shared_ptr<DRC_RULE>& lhs,
const std::shared_ptr<DRC_RULE>& rhs )
449 return lhs->m_Constraints[0].m_Value.Min()
450 < rhs->m_Constraints[0].m_Value.Min();
453 for( std::shared_ptr<DRC_RULE>& ncRule : netclassClearanceRules )
456 for( std::shared_ptr<DRC_RULE>& ncRule : netclassItemSpecificRules )
460 auto addTuningSingleRule =
462 const wxString& aNetclassName )
467 std::shared_ptr<DRC_RULE> tuningRule = std::make_shared<DRC_RULE>();
469 tuningRule->m_Name = wxString::Format(
_(
"tuning profile '%s'" ), aProfileName );
472 expr = wxString::Format( wxT(
"A.hasExactNetclass('%s') && A.Layer == '%s'" ),
481 tuningRule->AddConstraint( constraint );
486 auto addTuningDifferentialRules =
493 std::shared_ptr<DRC_RULE> tuningRule = std::make_shared<DRC_RULE>();
495 tuningRule->m_Name = wxString::Format(
_(
"tuning profile '%s'" ), aProfileName );
498 expr = wxString::Format( wxT(
"A.hasExactNetclass('%s') && A.Layer == '%s' && A.inDiffPair('*')" ),
499 aNetclass->GetName(),
507 tuningRule->AddConstraint( constraint );
511 std::shared_ptr<DRC_RULE> tuningRule2 = std::make_shared<DRC_RULE>();
513 tuningRule2->m_Name = wxString::Format(
_(
"tuning profile '%s'" ), aProfileName );
516 expr2 = wxString::Format( wxT(
"A.hasExactNetclass('%s') && A.Layer == '%s' && A.inDiffPair('*')" ),
517 aNetclass->GetName(),
525 tuningRule2->AddConstraint( constraint2 );
532 std::shared_ptr<DRC_RULE> diffPairClearanceRule = std::make_shared<DRC_RULE>();
534 diffPairClearanceRule->m_Name = wxString::Format(
_(
"tuning profile '%s'" ), aProfileName );
537 expr = wxString::Format( wxT(
"A.hasExactNetclass('%s') && A.Layer == '%s' && A.inDiffPair('*')" ),
538 aNetclass->GetName(),
544 diffPairClearanceRule->AddConstraint( min_clearanceConstraint );
546 addRule( diffPairClearanceRule );
552 std::shared_ptr<TUNING_PROFILES> tuningParams =
project->GetProjectFile().TuningProfileParameters();
554 auto addNetclassTuningProfileRules =
555 [&tuningParams, &addTuningSingleRule, &addTuningDifferentialRules](
NETCLASS* aNetclass )
557 if( aNetclass->HasTuningProfile() )
559 const wxString delayProfileName = aNetclass->GetTuningProfile();
560 const TUNING_PROFILE& profile = tuningParams->GetTuningProfile( delayProfileName );
568 addTuningSingleRule( entry, delayProfileName, aNetclass->GetName() );
570 addTuningDifferentialRules( entry, delayProfileName, aNetclass );
578 addNetclassTuningProfileRules( netclass.get() );
581 addNetclassTuningProfileRules( netclass.get() );
585 auto addKeepoutZoneRule =
595 wxString::Format(
_(
"keepout area of %s" ),
DescribeRef( parentFP->GetReference() ) ),
619 rule->m_ImplicitItemId = zone->
m_Uuid;
621 rule->m_Condition =
new DRC_RULE_CONDITION( wxString::Format( wxT(
"A.intersectsArea('%s')" ),
626 int disallowFlags = 0;
645 rule->AddConstraint( disallowConstraint );
651 addKeepoutZoneRule( zone,
nullptr );
656 for(
ZONE* zone : footprint->Zones() )
659 addKeepoutZoneRule( zone, footprint );
667 if(
m_board && aPath.FileExists() )
669 std::vector<std::shared_ptr<DRC_RULE>> rules;
671 if( FILE* fp = wxFopen( aPath.GetFullPath(), wxT(
"rt" ) ) )
676 std::function<bool( wxString* )>
resolver =
677 [&]( wxString* token ) ->
bool
679 return m_board->ResolveTextVar( token, 0 );
682 while(
char* line = lineReader.
ReadLine() )
684 wxString str( line );
685 str =
m_board->ConvertCrossReferencesToKIIDs( str );
688 rulesText << str <<
'\n';
698 for( std::shared_ptr<DRC_RULE>& rule : rules )
711 for( std::shared_ptr<DRC_RULE>& rule :
m_rules )
715 if( rule->m_Condition && !rule->m_Condition->GetExpression().IsEmpty() )
717 condition = rule->m_Condition;
718 condition->
Compile( &error_semaphore );
723 TO_UTF8( rule->m_Condition->GetExpression() ), 0, 0 );
730 ruleVec =
new std::vector<DRC_ENGINE_CONSTRAINT*>();
734 engineConstraint->
layerTest = rule->m_LayerCondition;
738 ruleVec->push_back( engineConstraint );
749 if( c->parentRule && !c->parentRule->IsImplicit() )
768 m_logReporter->Report( wxString::Format( wxT(
"Create DRC provider: '%s'" ), provider->GetName() ) );
770 provider->SetDRCEngine(
this );
795 throw original_parse_error;
812 m_logReporter->Report( wxString::Format( wxT(
"Create DRC provider: '%s'" ), provider->GetName() ) );
814 provider->SetDRCEngine(
this );
859 wxFAIL_MSG( wxT(
"Compiling implicit rules failed." ) );
862 throw original_parse_error;
899 if( !cacheGenerator.
Run() )
903 m_board->GetComponentClassManager().ForceComponentClassRecalculation();
905 int timestamp =
m_board->GetTimeStamp();
910 m_logReporter->Report( wxString::Format( wxT(
"Run DRC provider: '%s'" ), provider->GetName() ) );
912 if( !provider->RunTests( aUnits ) )
921 wxASSERT( timestamp ==
m_board->GetTimeStamp() );
925#define REPORT( s ) { if( aReporter ) { aReporter->Report( s ); } }
933 REPORT( wxString::Format(
_(
"Resolved zone connection type: %s." ),
941 pad =
static_cast<const PAD*
>( a );
943 pad =
static_cast<const PAD*
>( b );
951 REPORT( wxString::Format(
_(
"Pad is not a through hole pad; connection will be: %s." ),
977 const ZONE* zone =
nullptr;
978 const FOOTPRINT* parentFootprint =
nullptr;
988 pad =
static_cast<const PAD*
>( a );
990 zone =
static_cast<const ZONE*
>( a );
993 pad =
static_cast<const PAD*
>( b );
995 zone =
static_cast<const ZONE*
>( b );
998 parentFootprint =
pad->GetParentFootprint();
1002 constraint.
m_Type = aConstraintType;
1004 auto applyConstraint =
1007 if( c->constraint.m_Value.HasMin() )
1009 if( c->parentRule && c->parentRule->IsImplicit() )
1015 if( c->constraint.m_Value.HasOpt() )
1018 if( c->constraint.m_Value.HasMax() )
1021 switch( c->constraint.m_Type )
1056 && ( ( ( !ac ) ^ ( !bc ) )
1059 || ( ( footprints[0] == footprints[1] )
1060 && footprints[0] ) )
1062 && !b_is_non_copper )
1069 for(
int ii = 0; ii < 2; ++ii )
1072 if( !footprints[ii] || !alt_items[ii] )
1075 const std::set<int>& netcodes = footprints[ii]->
GetNetTieCache( child_items[ii] );
1077 auto it = netcodes.find( alt_items[ii]->GetNetCode() );
1079 if( it != netcodes.end() )
1082 REPORT( wxString::Format(
_(
"Net tie on %s; clearance: 0." ),
1083 EscapeHTML( footprints[ii]->GetItemDescription(
this,
true ) ) ) )
1085 constraint.
SetName(
_(
"net tie" ) );
1095 int override_val = 0;
1096 std::optional<int> overrideA;
1097 std::optional<int> overrideB;
1099 if( ac && !b_is_non_copper )
1102 if( bc && !a_is_non_copper )
1105 if( overrideA.has_value() || overrideB.has_value() )
1109 if( overrideA.has_value() )
1112 REPORT( wxString::Format(
_(
"Local override on %s; clearance: %s." ),
1119 if( overrideB.has_value() )
1122 REPORT( wxString::Format(
_(
"Local override on %s; clearance: %s." ),
1126 if( overrideB > override_val )
1134 if( override_val < m_designSettings->m_MinClearance )
1137 msg =
_(
"board minimum" );
1140 REPORT( wxString::Format(
_(
"Board minimum clearance: %s." ),
1146 if( override_val < m_designSettings->m_HoleClearance )
1149 msg =
_(
"board minimum hole" );
1152 REPORT( wxString::Format(
_(
"Board minimum hole clearance: %s." ),
1171 REPORT( wxString::Format(
_(
"Local override on %s; zone connection: %s." ),
1182 if(
pad &&
pad->GetLocalThermalGapOverride(
nullptr ) > 0 )
1185 int gap_override =
pad->GetLocalThermalGapOverride( &msg );
1188 REPORT( wxString::Format(
_(
"Local override on %s; thermal relief gap: %s." ),
1199 if(
pad &&
pad->GetLocalSpokeWidthOverride(
nullptr ) > 0 )
1202 int spoke_override =
pad->GetLocalSpokeWidthOverride( &msg );
1205 REPORT( wxString::Format(
_(
"Local override on %s; thermal spoke width: %s." ),
1214 REPORT( wxString::Format(
_(
"%s min thickness: %s." ),
1226 std::optional<int>
override;
1230 override =
pad->GetLocalSolderMaskMargin();
1232 override =
static_cast<const PCB_SHAPE*
>( a )->GetLocalSolderMaskMargin();
1236 if( !
override.has_value() &&
pad )
1238 if(
FOOTPRINT* overrideFootprint =
pad->GetParentFootprint() )
1240 override = overrideFootprint->GetLocalSolderMaskMargin();
1241 overrideItem = overrideFootprint;
1248 REPORT( wxString::Format(
_(
"Local override on %s; solder mask expansion: %s." ),
1258 std::optional<int>
override;
1262 override =
pad->GetLocalSolderPasteMargin();
1264 if( !
override.has_value() &&
pad )
1266 if(
FOOTPRINT* overrideFootprint =
pad->GetParentFootprint() )
1268 override = overrideFootprint->GetLocalSolderPasteMargin();
1269 overrideItem = overrideFootprint;
1276 REPORT( wxString::Format(
_(
"Local override on %s; solder paste absolute clearance: %s." ),
1286 std::optional<double> overrideRatio;
1290 overrideRatio =
pad->GetLocalSolderPasteMarginRatio();
1292 if( !overrideRatio.has_value() &&
pad )
1294 if(
FOOTPRINT* overrideFootprint =
pad->GetParentFootprint() )
1296 overrideRatio = overrideFootprint->GetLocalSolderPasteMarginRatio();
1297 overrideItem = overrideFootprint;
1304 REPORT( wxString::Format(
_(
"Local override on %s; solder paste relative clearance: %s." ),
1313 auto testAssertion =
1316 REPORT( wxString::Format(
_(
"Checking assertion '%s'." ),
1317 EscapeHTML( c->constraint.m_Test->GetExpression() ) ) )
1319 if( c->constraint.m_Test->EvaluateFor( a, b, c->constraint.m_Type, aLayer, aReporter ) )
1320 REPORT(
_(
"Assertion passed." ) )
1325 auto processConstraint =
1328 bool implicit = c->parentRule && c->parentRule->IsImplicit();
1332 switch( c->constraint.m_Type )
1341 REPORT( wxString::Format(
_(
"Checking %s clearance: %s." ),
1346 REPORT( wxString::Format(
_(
"Checking %s creepage: %s." ),
1351 REPORT( wxString::Format(
_(
"Checking %s max uncoupled length: %s." ),
1357 REPORT( wxString::Format(
_(
"Checking %s max skew: %s." ),
1363 REPORT( wxString::Format(
_(
"Checking %s gap: %s." ),
1369 REPORT( wxString::Format(
_(
"Checking %s thermal spoke width: %s." ),
1375 REPORT( wxString::Format(
_(
"Checking %s solder mask expansion: %s." ),
1381 REPORT( wxString::Format(
_(
"Checking %s solder paste absolute clearance: %s." ),
1387 REPORT( wxString::Format(
_(
"Checking %s solder paste relative clearance: %s." ),
1393 REPORT( wxString::Format(
_(
"Checking %s min spoke count: %s." ),
1399 REPORT( wxString::Format(
_(
"Checking %s zone connection: %s." ),
1417 switch( c->constraint.m_Type )
1420 if( c->constraint.m_Value.HasOpt() )
1422 REPORT( wxString::Format(
_(
"Checking %s track width: opt %s." ),
1426 else if( c->constraint.m_Value.HasMin() )
1428 REPORT( wxString::Format(
_(
"Checking %s track width: min %s." ),
1436 REPORT( wxString::Format(
_(
"Checking %s annular width: min %s." ),
1442 if( c->constraint.m_Value.HasOpt() )
1444 REPORT( wxString::Format(
_(
"Checking %s via diameter: opt %s." ),
1448 else if( c->constraint.m_Value.HasMin() )
1450 REPORT( wxString::Format(
_(
"Checking %s via diameter: min %s." ),
1457 if( c->constraint.m_Value.HasOpt() )
1459 REPORT( wxString::Format(
_(
"Checking %s hole size: opt %s." ),
1463 else if( c->constraint.m_Value.HasMin() )
1465 REPORT( wxString::Format(
_(
"Checking %s hole size: min %s." ),
1475 REPORT( wxString::Format(
_(
"Checking %s: min %s." ),
1481 if( c->constraint.m_Value.HasOpt() )
1483 REPORT( wxString::Format(
_(
"Checking %s diff pair gap: opt %s." ),
1487 else if( c->constraint.m_Value.HasMin() )
1489 REPORT( wxString::Format(
_(
"Checking %s clearance: min %s." ),
1497 REPORT( wxString::Format(
_(
"Checking %s hole to hole: min %s." ),
1503 REPORT( wxString::Format(
_(
"Checking %s." ),
1509 REPORT( wxString::Format(
_(
"Checking %s: min %s; opt %s; max %s." ),
1511 c->constraint.m_Value.HasMin()
1513 : wxT(
"<i>" ) +
_(
"undefined" ) + wxT(
"</i>" ),
1514 c->constraint.m_Value.HasOpt()
1516 : wxT(
"<i>" ) +
_(
"undefined" ) + wxT(
"</i>" ),
1517 c->constraint.m_Value.HasMax()
1519 : wxT(
"<i>" ) +
_(
"undefined" ) + wxT(
"</i>" ) ) )
1525 REPORT( wxString::Format(
_(
"Checking %s." ),
1531 if( a_is_non_copper || b_is_non_copper )
1535 REPORT(
_(
"Netclass clearances apply only between copper items." ) )
1537 else if( a_is_non_copper )
1539 REPORT( wxString::Format(
_(
"%s contains no copper. Rule ignored." ),
1542 else if( b_is_non_copper )
1544 REPORT( wxString::Format(
_(
"%s contains no copper. Rule ignored." ),
1563 if(
via->IsMicroVia() )
1565 else if(
via->IsBlindVia() )
1567 else if(
via->IsBuriedVia() )
1589 if(
static_cast<const ZONE*
>( a )->IsTeardropArea() )
1597 default: mask = 0;
break;
1601 if( ( c->constraint.m_DisallowFlags & mask ) == 0 )
1604 REPORT(
_(
"Keepout constraint not met." ) )
1606 REPORT(
_(
"Disallow constraint not met." ) )
1624 if( !( c->layerTest & itemLayers ).any() )
1628 REPORT(
_(
"Keepout layer(s) not matched." ) )
1630 else if( c->parentRule )
1632 REPORT( wxString::Format(
_(
"Rule layer '%s' not matched; rule ignored." ),
1633 EscapeHTML( c->parentRule->m_LayerSource ) ) )
1637 REPORT(
_(
"Rule layer not matched; rule ignored." ) )
1644 if( (
IsPcbLayer( aLayer ) && !c->layerTest.test( aLayer ) )
1645 || (
m_board->GetEnabledLayers() & c->layerTest ).count() == 0 )
1649 REPORT(
_(
"Constraint layer not matched." ) )
1651 else if( c->parentRule )
1653 REPORT( wxString::Format(
_(
"Rule layer '%s' not matched; rule ignored." ),
1654 EscapeHTML( c->parentRule->m_LayerSource ) ) )
1658 REPORT(
_(
"Rule layer not matched; rule ignored." ) )
1665 REPORT( wxString::Format(
_(
"%s is not a drilled hole; rule ignored." ),
1668 else if( !c->condition || c->condition->GetExpression().IsEmpty() )
1674 REPORT(
_(
"Unconditional constraint applied." ) )
1678 REPORT(
_(
"Unconditional rule applied." ) )
1683 REPORT(
_(
"Unconditional rule applied; overrides previous constraints." ) )
1687 applyConstraint( c );
1697 REPORT( wxString::Format(
_(
"Checking rule condition '%s'." ),
1698 EscapeHTML( c->condition->GetExpression() ) ) )
1701 if( c->condition->EvaluateFor( a, b, c->constraint.m_Type, aLayer, aReporter ) )
1707 REPORT(
_(
"Constraint applied." ) )
1711 REPORT(
_(
"Rule applied." ) )
1716 REPORT(
_(
"Rule applied; overrides previous constraints." ) )
1720 applyConstraint( c );
1724 REPORT( implicit ?
_(
"Membership not satisfied; constraint ignored." )
1725 :
_(
"Condition not satisfied; rule ignored." ) )
1736 && ( !b || !b_is_non_copper ) )
1761 if( !ncNameA.empty() || !ncNameB.empty() )
1765 if( !ncNameA.empty() )
1773 if( !ncNameB.empty() )
1795 processConstraint( rule );
1813 REPORT( wxString::Format(
_(
"Inheriting from parent: %s." ),
1817 a = parentFootprint;
1819 b = parentFootprint;
1826 processConstraint( rule );
1836 constraint.
SetName(
_(
"board setup" ) );
1843 constraint.
SetName(
_(
"board setup" ) );
1850 constraint.
SetName(
_(
"board setup" ) );
1863 bool needBlankLine =
true;
1872 needBlankLine =
false;
1875 REPORT( wxString::Format(
_(
"Local clearance on %s: %s." ),
1896 needBlankLine =
false;
1899 REPORT( wxString::Format(
_(
"Local clearance on %s: %s." ),
1913 if( !a_is_non_copper && !b_is_non_copper )
1918 needBlankLine =
false;
1921 REPORT( wxString::Format(
_(
"Board minimum clearance: %s." ),
1927 constraint.
SetName(
_(
"board minimum" ) );
1937 REPORT( wxString::Format(
_(
"Board minimum clearance: %s." ),
1943 constraint.
SetName(
_(
"board minimum" ) );
1951 if(
pad && parentFootprint )
1958 REPORT( wxString::Format(
_(
"%s zone connection: %s." ),
1963 constraint.
SetName(
_(
"footprint" ) );
1974 REPORT( wxString::Format(
_(
"%s pad connection: %s." ),
1991 REPORT( wxString::Format(
_(
"%s thermal relief gap: %s." ),
2008 REPORT( wxString::Format(
_(
"%s thermal spoke width: %s." ),
2073 auto testAssertion =
2076 REPORT( wxString::Format(
_(
"Checking rule assertion '%s'." ),
2077 EscapeHTML( c->constraint.m_Test->GetExpression() ) ) )
2079 if( c->constraint.m_Test->EvaluateFor( a,
nullptr, c->constraint.m_Type,
2082 REPORT(
_(
"Assertion passed." ) )
2087 aFailureHandler( &c->constraint );
2091 auto processConstraint =
2095 REPORT( wxString::Format(
_(
"Checking %s." ), c->constraint.GetName() ) )
2099 REPORT( wxString::Format(
_(
"Rule layer '%s' not matched; rule ignored." ),
2100 EscapeHTML( c->parentRule->m_LayerSource ) ) )
2103 if( !c->condition || c->condition->GetExpression().IsEmpty() )
2105 REPORT(
_(
"Unconditional rule applied." ) )
2110 REPORT( wxString::Format(
_(
"Checking rule condition '%s'." ),
2111 EscapeHTML( c->condition->GetExpression() ) ) )
2113 if( c->condition->EvaluateFor( a,
nullptr, c->constraint.m_Type,
2116 REPORT(
_(
"Rule applied." ) )
2121 REPORT(
_(
"Condition not satisfied; rule ignored." ) )
2130 for(
int ii = 0; ii < (int) it->second->size(); ++ii )
2131 processConstraint( it->second->at( ii ) );
2141 assert( error_code >= 0 && error_code <=
DRCE_LAST );
2148 int aMarkerLayer,
const std::function<
void(
PCB_MARKER* )>& aPathGenerator )
2157 static std::mutex handlerLock;
2158 std::lock_guard<std::mutex> guard( handlerLock );
2164 wxString msg = wxString::Format( wxT(
"Test '%s': %s (code %d)" ),
2165 aItem->GetViolatingTest()->GetName(),
2166 aItem->GetErrorMessage(
false ),
2167 aItem->GetErrorCode() );
2169 DRC_RULE* rule = aItem->GetViolatingRule();
2172 msg += wxString::Format( wxT(
", violating rule: '%s'" ), rule->
m_Name );
2176 wxString violatingItemsStr = wxT(
"Violating items: " );
2178 m_logReporter->Report( wxString::Format( wxT(
" |- violating position (%d, %d)" ),
2225 wxSafeYield(
nullptr,
true );
2254 if( current > worst )
2268 std::set<int> distinctMinimums;
2277 return distinctMinimums;
2283 wxString& aBaseDpName )
2288 for(
auto it = aNetName.rbegin(); it != aNetName.rend() && rv == 0; ++it, ++count )
2292 if( ( ch >=
'0' && ch <=
'9' ) || ch ==
'_' )
2296 else if( ch ==
'+' )
2298 aComplementNet = wxT(
"-" );
2301 else if( ch ==
'-' )
2303 aComplementNet = wxT(
"+" );
2306 else if( ch ==
'N' )
2308 aComplementNet = wxT(
"P" );
2311 else if ( ch ==
'P' )
2313 aComplementNet = wxT(
"N" );
2322 if( rv != 0 && count >= 1 )
2324 aBaseDpName = aNetName.Left( aNetName.Length() - count );
2325 aComplementNet = wxString( aBaseDpName ) << aComplementNet << aNetName.Right( count - 1 );
2335 wxString
dummy, coupledNetName;
2371 if( parentFootprint && parentFootprint->
IsNetTie() )
2378 if( padToNetTieGroupMap[
pad->GetNumber() ] >= 0 && aTrackNetCode ==
pad->GetNetCode() )
2380 if(
pad->GetEffectiveShape( aTrackLayer )->Collide( aCollisionPos,
epsilon ) )
2394 if(
name == prov->GetName() )
2406 wxLogTrace( wxS(
"KI_TRACE_DRC_RULE_EDITOR" ),
2407 wxS(
"[ShowMatches] engine enter: expr='%s', constraint=%d" ), aExpression, (
int) aConstraint );
2408 std::vector<BOARD_ITEM*> matches;
2417 wxLogTrace( wxS(
"KI_TRACE_DRC_RULE_EDITOR" ), wxS(
"[ShowMatches] engine: compile failed" ) );
2424 if(
auto connectivity =
m_board->GetConnectivity() )
2426 if(
auto ftCache = connectivity->GetFromToCache() )
2431 size_t totalItems = 0;
2432 size_t skippedItems = 0;
2433 size_t noLayerItems = 0;
2434 size_t checkedItems = 0;
2436 for(
auto& [kiid, item] :
m_board->GetItemByIdCache() )
2441 switch( item->Type() )
2453 LSET itemLayers = item->GetLayerSet();
2455 if( itemLayers.none() )
2462 bool matched =
false;
2466 if( condition.
EvaluateFor( item,
nullptr,
static_cast<int>( aConstraint ), layer,
2469 matches.push_back( item );
2470 wxLogTrace( wxS(
"KI_TRACE_DRC_RULE_EDITOR" ),
2471 wxS(
"[ShowMatches] engine: match type=%d kiid=%s layer=%d" ),
2472 (
int) item->Type(), kiid.AsString(), (
int) layer );
2479 if( !matched && matches.size() == 0 && checkedItems <= 5 )
2481 wxLogTrace( wxS(
"KI_TRACE_DRC_RULE_EDITOR" ),
2482 wxS(
"[ShowMatches] engine: no-match sample type=%d kiid=%s layers=%s" ),
2483 (
int) item->Type(), kiid.AsString(), itemLayers.
FmtHex() );
2487 wxLogTrace( wxS(
"KI_TRACE_DRC_RULE_EDITOR" ),
2488 wxS(
"[ShowMatches] engine stats: total=%zu skipped=%zu noLayer=%zu checked=%zu" ),
2489 totalItems, skippedItems, noLayerItems, checkedItems );
2491 wxLogTrace( wxS(
"KI_TRACE_DRC_RULE_EDITOR" ), wxS(
"[ShowMatches] engine exit: total=%zu" ), matches.size() );
2520 const PAD*
pad =
static_cast<const PAD*
>( aItem );
2535 *aSource = constraint.
GetName();
2569 if( it->first.m_uuid == aUuid )
2595 using CLEARANCE_MAP = std::unordered_map<DRC_OWN_CLEARANCE_CACHE_KEY, int>;
2599 std::vector<std::pair<const BOARD_ITEM*, PCB_LAYER_ID>> itemsToProcess;
2600 size_t estimatedPads = 0;
2603 estimatedPads += footprint->Pads().size();
2605 itemsToProcess.reserve(
m_board->Tracks().size() + estimatedPads * 2 );
2612 itemsToProcess.emplace_back( track, layer );
2616 itemsToProcess.emplace_back( track, track->GetLayer() );
2622 for(
PAD*
pad : footprint->Pads() )
2625 itemsToProcess.emplace_back(
pad, layer );
2629 if( itemsToProcess.empty() )
2639 auto processItems = [
this](
size_t aStart,
size_t aEnd,
2640 const std::vector<std::pair<const BOARD_ITEM*, PCB_LAYER_ID>>& aItems )
2643 CLEARANCE_MAP localCache;
2645 for(
size_t i = aStart; i < aEnd; ++i )
2654 const PAD*
pad =
static_cast<const PAD*
>( item );
2673 auto results =
tp.submit_blocks( 0, itemsToProcess.size(),
2674 [&](
size_t aStart,
size_t aEnd ) -> CLEARANCE_MAP
2676 return processItems( aStart, aEnd, itemsToProcess );
2683 std::vector<CLEARANCE_MAP> collectedResults;
2684 collectedResults.reserve( results.size() );
2686 for(
size_t i = 0; i < results.size(); ++i )
2688 if( results[i].valid() )
2689 collectedResults.push_back( results[i].get() );
2696 for(
const auto& localCache : collectedResults )
constexpr EDA_IU_SCALE pcbIUScale
std::set< BOARD_ITEM *, CompareByUuid > BOARD_ITEM_SET
Set of BOARD_ITEMs ordered by UUID.
#define MAXIMUM_CLEARANCE
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
std::string FmtHex() const
Return a hex string showing contents of this set.
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
virtual std::optional< int > GetClearanceOverrides(wxString *aSource) const
Return any clearance overrides set in the "classic" (ie: pre-rule) system.
virtual NETCLASS * GetEffectiveNetClass() const
Return the NETCLASS for this item.
virtual std::optional< int > GetLocalClearance() 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
std::map< int, SEVERITY > m_DRCSeverities
int m_MinSilkTextThickness
int GetDRCEpsilon() const
Return an epsilon which accounts for rounding errors, etc.
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.
FOOTPRINT * GetParentFootprint() const
virtual LSET GetLayerSet() const
Return a std::bitset of all layers on which the item physically resides.
virtual bool HasDrilledHole() const
virtual bool IsOnCopperLayer() const
Information pertinent to a Pcbnew printed circuit board.
NETINFO_ITEM * FindNet(int aNetcode) const
Search for a net with the given netcode.
Represents a single line in a time domain profile track propagation setup.
int GetDiffPairGap() const
PCB_LAYER_ID GetSignalLayer() 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()
const MINOPTMAX< int > & GetValue() const
ZONE_CONNECTION m_ZoneConnection
void SetName(const wxString &aName)
void SetOptionsFromOther(const DRC_CONSTRAINT &aOther)
DRC_RULE * GetParentRule() const
std::map< DRC_CONSTRAINT_T, std::vector< DRC_ENGINE_CONSTRAINT * > * > m_constraintMap
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.
std::shared_ptr< DRC_RULE > createImplicitRule(const wxString &name, DRC_IMPLICIT_SOURCE aImplicitSource)
void RunTests(EDA_UNITS aUnits, bool aReportAllTrackErrors, bool aTestFootprints, BOARD_COMMIT *aCommit=nullptr)
Run the DRC tests.
std::unordered_map< DRC_OWN_CLEARANCE_CACHE_KEY, int > m_ownClearanceCache
bool m_hasDiffPairClearanceOverrides
void addRule(std::shared_ptr< DRC_RULE > &rule)
PROGRESS_REPORTER * m_progressReporter
void ClearClearanceCache()
Clear the entire clearance cache.
void loadRules(const wxFileName &aPath)
Load and parse a rule set from an sexpr text file.
std::vector< DRC_TEST_PROVIDER * > m_testProviders
std::map< DRC_CONSTRAINT_T, std::vector< DRC_ENGINE_CONSTRAINT * > > m_explicitConstraints
std::set< int > QueryDistinctConstraints(DRC_CONSTRAINT_T aConstraintId)
DS_PROXY_VIEW_ITEM * m_drawingSheet
NETLIST * m_schematicNetlist
std::shared_mutex m_clearanceCacheMutex
bool KeepRefreshing(bool aWait=false)
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.
bool m_reportAllTrackErrors
bool ReportProgress(double aProgress)
DRC_TEST_PROVIDER * GetTestProvider(const wxString &name) const
bool HasRulesForConstraintType(DRC_CONSTRAINT_T constraintID)
BOARD_DESIGN_SETTINGS * GetDesignSettings() const
void SetMaxProgress(int aSize)
DRC_ENGINE(BOARD *aBoard=nullptr, BOARD_DESIGN_SETTINGS *aSettings=nullptr)
bool m_hasExplicitClearanceRules
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::unordered_map< wxString, int > m_netclassClearances
static bool IsNetADiffPair(BOARD *aBoard, NETINFO_ITEM *aNet, int &aNetP, int &aNetN)
bool IsNetTieExclusion(int aTrackNetCode, PCB_LAYER_ID aTrackLayer, const VECTOR2I &aCollisionPos, BOARD_ITEM *aCollidingItem)
Check if the given collision between a track and another item occurs during the track's entry into a ...
bool QueryWorstConstraint(DRC_CONSTRAINT_T aRuleId, DRC_CONSTRAINT &aConstraint)
std::vector< BOARD_ITEM * > GetItemsMatchingCondition(const wxString &aExpression, DRC_CONSTRAINT_T aConstraint=ASSERTION_CONSTRAINT, REPORTER *aReporter=nullptr)
Evaluate a DRC condition against all board items and return matches.
void InitEngine(const wxFileName &aRulePath)
Initialize the DRC engine.
DRC_CONSTRAINT EvalZoneConnection(const BOARD_ITEM *a, const BOARD_ITEM *b, PCB_LAYER_ID aLayer, REPORTER *aReporter=nullptr)
static int MatchDpSuffix(const wxString &aNetName, wxString &aComplementNet, wxString &aBaseDpName)
Check if the given net is a diff pair, returning its polarity and complement if so.
bool ReportPhase(const wxString &aMessage)
void InitializeClearanceCache()
Initialize the clearance cache for all items on the board.
void InvalidateClearanceCache(const KIID &aUuid)
Invalidate the clearance cache for a specific item.
BOARD_DESIGN_SETTINGS * m_designSettings
void ReportViolation(const std::shared_ptr< DRC_ITEM > &aItem, const VECTOR2I &aPos, int aMarkerLayer, const std::function< void(PCB_MARKER *)> &aPathGenerator={})
std::mutex m_errorLimitsMutex
void Parse(std::vector< std::shared_ptr< DRC_RULE > > &aRules, REPORTER *aReporter)
bool Compile(REPORTER *aReporter, int aSourceLine=0, int aSourceOffset=0)
bool EvaluateFor(const BOARD_ITEM *aItemA, const BOARD_ITEM *aItemB, int aConstraint, PCB_LAYER_ID aLayer, REPORTER *aReporter=nullptr)
std::vector< DRC_TEST_PROVIDER * > GetShowMatchesProviders() const
static DRC_SHOWMATCHES_PROVIDER_REGISTRY & Instance()
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_ITEM and posi...
void SetDRCEngine(DRC_ENGINE *engine)
virtual wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const
Return a user-visible description string of this item.
KICAD_T Type() const
Returns the type of object.
EDA_ITEM_FLAGS GetFlags() const
A LINE_READER that reads from an open file.
char * ReadLine() override
Read a line of text into the buffer and increments the line number counter.
wxString AsString() const
LSET is a set of PCB_LAYER_IDs.
static const LSET & FrontMask()
Return a mask holding all technical layers and the external CU layer on front side.
static const LSET & BackMask()
Return a mask holding all technical layers and the external CU layer on back side.
LSEQ Seq(const LSEQ &aSequence) const
Return an LSEQ from the union of this LSET and a desired sequence.
static LSET AllCuMask()
return AllCuMask( MAX_CU_LAYERS );
static wxString Name(PCB_LAYER_ID aLayerId)
Return the fixed name association with aLayerId.
A collection of nets and the parameters used to route or test these nets.
const wxString GetName() const
Gets the name of this (maybe aggregate) netclass in a format for internal usage or for export to exte...
Handle the data for a net.
const wxString & GetNetname() const
const std::map< wxString, std::shared_ptr< NETCLASS > > & GetCompositeNetclasses() const
Gets all composite (multiple assignment / missing defaults) netclasses.
const std::map< wxString, std::shared_ptr< NETCLASS > > & GetNetclasses() const
Gets all netclasses.
std::shared_ptr< NETCLASS > GetDefaultNetclass()
Gets the default netclass for the project.
std::optional< int > GetLocalSolderMaskMargin() const
A small class to help profiling.
void Stop()
Save the time when this function was called, and set the counter stane to stop.
double msecs(bool aSinceLast=false)
Container for project specific data.
A pure virtual class used to derive REPORTER objects from.
virtual bool HasMessageOfSeverity(int aSeverityMask) const
Returns true if the reporter has one or more messages matching the specified severity mask.
bool IsEmpty() const
Return true if the set is empty (no polygons at all)
const EDA_IU_SCALE & GetIuScale() const
wxString MessageTextFromUnscaledValue(double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
UNITS_PROVIDER(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnits)
wxString MessageTextFromValue(double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
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, bool aFull) 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
const wxString & GetZoneName() const
int GetMinThickness() const
ZONE_CONNECTION GetPadConnection() const
int GetThermalReliefSpokeWidth() const
bool GetDoNotAllowFootprints() const
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
bool HasKeepoutParametersSet() const
Accessor to determine if any keepout parameters are set.
bool GetDoNotAllowZoneFills() const
int GetThermalReliefGap() const
wxString ExpandTextVars(const wxString &aSource, const PROJECT *aProject, int aFlags)
wxString DescribeRef(const wxString &aRef)
Returns a user-visible HTML string describing a footprint reference designator.
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)
@ DRCE_TUNING_PROFILE_IMPLICIT_RULES
@ DRC_DISALLOW_BURIED_VIAS
@ DRC_DISALLOW_BLIND_VIAS
@ DRC_DISALLOW_THROUGH_VIAS
@ DRC_DISALLOW_FOOTPRINTS
@ DRC_DISALLOW_MICRO_VIAS
@ ANNULAR_WIDTH_CONSTRAINT
@ COURTYARD_CLEARANCE_CONSTRAINT
@ VIA_DIAMETER_CONSTRAINT
@ ZONE_CONNECTION_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
@ MAX_UNCOUPLED_CONSTRAINT
@ HOLE_CLEARANCE_CONSTRAINT
@ SOLDER_PASTE_ABS_MARGIN_CONSTRAINT
@ SOLDER_MASK_EXPANSION_CONSTRAINT
@ PHYSICAL_CLEARANCE_CONSTRAINT
@ SOLDER_PASTE_REL_MARGIN_CONSTRAINT
@ HOLE_TO_HOLE_CONSTRAINT
constexpr int DRC_DISALLOW_VIAS
#define HOLE_PROXY
Indicates the BOARD_ITEM is a proxy for its hole.
static FILENAME_RESOLVER * resolver
static const wxChar * traceDrcProfile
Flag to enable DRC profile timing logging.
#define THROW_PARSE_ERROR(aProblem, aSource, aInputLine, aLineNumber, aByteIndex)
bool IsPcbLayer(int aLayer)
Test whether a layer is a valid layer for Pcbnew.
PCB_LAYER_ID
A quick note on layer IDs:
@ NPTH
like PAD_PTH, but not plated mechanical use only, no connection allowed
@ PTH
Plated through hole pad.
std::vector< FAB_LAYER_COLOR > dummy
wxString EscapeHTML(const wxString &aString)
Return a new wxString escaped for embedding in HTML.
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
Batch result for clearance-related constraints to reduce per-query overhead during PNS routing.
std::shared_ptr< DRC_RULE > parentRule
DRC_RULE_CONDITION * condition
DRC_CONSTRAINT constraint
Cache key for own clearance lookups, combining item UUID and layer.
A filename or source description, a problem input line, a line number, a byte offset,...
Represents a single line in the tuning profile configuration grid.
std::vector< DELAY_PROFILE_TRACK_PROPAGATION_ENTRY > m_TrackPropagationEntries
wxString result
Test unit parsing edge cases and error handling.
thread_pool & GetKiCadThreadPool()
Get a reference to the current thread pool.
BS::priority_thread_pool thread_pool
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
@ PCB_GENERATOR_T
class PCB_GENERATOR, generator on a layer
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
@ PCB_GROUP_T
class PCB_GROUP, a set of BOARD_ITEMs
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
@ PCB_ZONE_T
class ZONE, a copper pour area
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
@ PCB_FIELD_T
class PCB_FIELD, text associated with a footprint property
@ PCB_BARCODE_T
class PCB_BARCODE, a barcode (graphic item)
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
@ PCB_PAD_T
class PAD, a pad in a footprint
@ PCB_ARC_T
class PCB_ARC, an arc track segment on a copper layer
@ PCB_TABLE_T
class PCB_TABLE, table of PCB_TABLECELLs
@ PCB_NETINFO_T
class NETINFO_ITEM, a description of a net
@ PCB_TRACE_T
class PCB_TRACK, a track segment (segment on a copper layer)
VECTOR2< int32_t > VECTOR2I
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