47 virtual bool Run()
override;
49 virtual const wxString
GetName()
const override 56 return "Tests for disallowed items (e.g. keepouts)";
69 reportAux(
"Disallow violations ignored. Tests not run." );
75 reportAux(
"No disallow constraints found. Skipping check." );
79 if( !
reportPhase(
_(
"Checking keepouts & disallow constraints..." ) ) )
88 if( constraint.m_DisallowFlags )
92 m_msg.Printf( drcItem->GetErrorText() + wxS(
" (%s)" ),
93 constraint.GetName() );
95 drcItem->SetErrorMessage(
m_msg );
96 drcItem->SetItems( item );
97 drcItem->SetViolatingRule( constraint.GetParentRule() );
111 ZONE* zone = static_cast<ZONE*>( item );
122 switch( item->Type() )
125 case PCB_PAD_T: hasHole = static_cast<PAD*>( item )->GetDrillSizeX() > 0;
break;
126 default: hasHole =
false;
break;
static std::shared_ptr< DRC_ITEM > Create(int aErrorCode)
Constructs a DRC_ITEM for the given error code.
virtual std::set< DRC_CONSTRAINT_T > GetConstraintTypes() const override
bool GetIsRuleArea() const
Accessors to parameters used in Rule Area zones:
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
static DRC_REGISTER_TEST_PROVIDER< DRC_TEST_PROVIDER_ANNULUS > dummy
bool IsErrorLimitExceeded(int error_code)
virtual ~DRC_TEST_PROVIDER_DISALLOW()
class PAD, a pad in a footprint
virtual void reportRuleStatistics()
bool HasRulesForConstraintType(DRC_CONSTRAINT_T constraintID)
virtual const wxString GetName() const override
virtual bool reportPhase(const wxString &aStageName)
virtual const wxString GetDescription() const override
int GetNumPhases() const override
static LSET AllLayersMask()
DRC_TEST_PROVIDER_DISALLOW()
Handle a list of polygons defining a copper zone.
class ZONE, a copper pour area
DRC_CONSTRAINT EvalRules(DRC_CONSTRAINT_T aConstraintId, const BOARD_ITEM *a, const BOARD_ITEM *b, PCB_LAYER_ID aLayer, REPORTER *aReporter=nullptr)
#define HOLE_PROXY
Indicates the BOARD_ITEM is a proxy for its hole.
virtual void reportViolation(std::shared_ptr< DRC_ITEM > &item, wxPoint aMarkerPos)
int forEachGeometryItem(const std::vector< KICAD_T > &aTypes, LSET aLayers, const std::function< bool(BOARD_ITEM *)> &aFunc)
DRC_TEST_PROVIDER is a base class that represents a DRC "provider" which runs some DRC functions over...
class ZONE, managed by a footprint
virtual bool Run() override
Runs this provider against the given PCB with configured options (if any).
class VIA, a via (like a track segment on a copper layer)
virtual void reportAux(wxString fmt,...)