46 const wxString
GetName()
const override {
return wxT(
"line_width" ); }
52 const int progressDelta = 250;
58 REPORT_AUX( wxT(
"Line width violations ignored. Tests not run." ) );
64 REPORT_AUX( wxT(
"No line width constraints found. Tests not run." ) );
68 if( !
reportPhase(
_(
"Checking graphic line widths..." ) ) )
81 [&](
const wxString& aFormat,
int aLimit )
84 drcItem->SetErrorDetail(
formatMsg( aFormat, constraint.
GetName(), aLimit, aWidth ) );
85 drcItem->SetItems( aItem );
92 report(
_(
"(%s min width %s; actual %s)" ), constraint.
Value().
Min() );
95 report(
_(
"(%s max width %s; actual %s)" ), constraint.
Value().
Max() );
130 checkLineWidth( shape, shape->
GetWidth() );
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.
SEVERITY GetSeverity() const
MINOPTMAX< int > & Value()
DRC_RULE * GetParentRule() const
static std::shared_ptr< DRC_ITEM > Create(int aErrorCode)
Constructs a DRC_ITEM for the given error code.
bool Run() override
Run this provider against the given PCB with configured options (if any).
~DRC_TEST_PROVIDER_LINE_WIDTH() override=default
const wxString GetName() const override
DRC_TEST_PROVIDER_LINE_WIDTH()=default
virtual bool reportPhase(const wxString &aStageName)
int forEachGeometryItem(const std::vector< KICAD_T > &aTypes, const LSET &aLayers, const std::function< bool(BOARD_ITEM *)> &aFunc)
void reportViolation(std::shared_ptr< DRC_ITEM > &item, const VECTOR2I &aMarkerPos, int aMarkerLayer, const std::function< void(PCB_MARKER *)> &aPathGenerator=[](PCB_MARKER *){})
wxString formatMsg(const wxString &aFormatString, const wxString &aSource, double aConstraint, double aActual, EDA_DATA_TYPE aDataType=EDA_DATA_TYPE::DISTANCE)
virtual bool reportProgress(size_t aCount, size_t aSize, size_t aDelta=1)
virtual VECTOR2I GetPosition() const
KICAD_T Type() const
Returns the type of object.
static const LSET & AllLayersMask()
int GetWidth() const override
bool IsBorderEnabled() const
Tests whether the border is disabled, as configured by the stroke.
int GetBorderWidth() const
static DRC_REGISTER_TEST_PROVIDER< DRC_TEST_PROVIDER_ANNULAR_WIDTH > dummy
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer