59 virtual bool Run()
override;
61 virtual const wxString
GetName()
const override 63 return wxT(
"miscellaneous" );
68 return wxT(
"Misc checks (board outline, missing textvars)" );
87 bool errorHandled =
false;
94 drcItem->SetErrorMessage( drcItem->GetErrorText() + wxS(
" " ) + msg );
95 drcItem->SetItems( itemA, itemB );
106 chainingEpsilon, &errorHandler ) )
117 msg.Printf(
_(
"(no edges found on Edge.Cuts layer)" ) );
119 drcItem->SetErrorMessage( drcItem->GetErrorText() + wxS(
" " ) + msg );
131 const int delta = 2000;
148 auto checkDisabledLayers =
161 PAD*
pad = static_cast<PAD*>( item );
166 if( disabledLayers.test( item->GetLayer() ) )
167 badLayer = item->GetLayer();
180 via->LayerPair( &top, &bottom );
182 if( disabledLayers.test( top ) )
184 else if( disabledLayers.test( bottom ) )
194 LSET badLayers = disabledLayers & item->GetLayerSet();
196 if( badLayers.any() )
197 badLayer = badLayers.
Seq().front();
205 msg.Printf(
_(
"(layer %s)" ),
LayerName( badLayer ) );
207 drcItem->SetErrorMessage( drcItem->GetErrorText() + wxS(
" " ) + msg );
208 drcItem->SetItems( item );
224 const int delta = 2000;
229 static const std::vector<KICAD_T> itemTypes = {
250 BOARD_ITEM* boardItem = dynamic_cast<BOARD_ITEM*>( item );
253 if(
text &&
text->GetShownText().Matches( wxT(
"*${*}*" ) ) )
256 drcItem->SetItems( item );
276 drawItems.
BuildDrawItemsList( drawingSheet->GetPageInfo(), drawingSheet->GetTitleBlock() );
285 if(
text &&
text->GetShownText().Matches( wxT(
"*${*}*" ) ) )
288 drcItem->SetItems(
text );
310 if( !
reportPhase(
_(
"Checking disabled layers..." ) ) )
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
const EDA_RECT GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
DS_PROXY_VIEW_ITEM * GetDrawingSheet() const
static std::shared_ptr< DRC_ITEM > Create(int aErrorCode)
Constructs a DRC_ITEM for the given error code.
class FP_TEXT, text in a footprint
void SetMilsToIUfactor(double aMils2Iu)
Set the scalar to convert pages units (mils) to draw/plot units.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual void reportViolation(std::shared_ptr< DRC_ITEM > &item, const wxPoint &aMarkerPos)
void SetFileName(const wxString &aFileName)
Set the filename to draw/plot.
bool IsErrorLimitExceeded(int error_code)
void testDisabledLayers()
Like smd, does not appear on the solder paste layer (default)
Smd pad, appears on the solder paste layer (default)
PROJECT * GetProject() const
class PCB_TEXT, text on a layer
virtual std::set< DRC_CONSTRAINT_T > GetConstraintTypes() const override
virtual bool reportProgress(int aCount, int aSize, int aDelta)
class PAD, a pad in a footprint
LSET GetEnabledLayers() const
A proxy function that calls the corresponding function in m_BoardSettings.
virtual wxPoint GetPosition() const
virtual const wxString GetDescription() const override
LSEQ Seq(const PCB_LAYER_ID *aWishListSequence, unsigned aCount) const
Return an LSEQ from the union of this LSET and a desired sequence.
int GetNumPhases() const override
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
static DRC_REGISTER_TEST_PROVIDER< DRC_TEST_PROVIDER_ANNULAR_WIDTH > dummy
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Base class to handle basic graphic items.
bool BuildBoardPolygonOutlines(BOARD *aBoard, SHAPE_POLY_SET &aOutlines, int aErrorMax, int aChainingEpsilon, OUTLINE_ERROR_HANDLER *aErrorHandler)
Extracts the board outlines and build a closed polygon from lines, arcs and circle items on edge cut ...
LSET is a set of PCB_LAYER_IDs.
DS_DRAW_ITEM_BASE * GetNext()
virtual bool reportPhase(const wxString &aStageName)
Represent a set of closed polygons.
void SetPageNumber(const wxString &aPageNumber)
Set the value of the sheet number.
virtual const wxString GetName() const override
virtual ~DRC_TEST_PROVIDER_MISC()
wxString LayerName(int aLayer)
Returns the default display name for a given layer.
static LSET AllLayersMask()
class PCB_DIMENSION_BASE: abstract dimension meta-type
void SetSheetName(const wxString &aSheetName)
Set the sheet name to draw/plot.
int forEachGeometryItem(const std::vector< KICAD_T > &aTypes, LSET aLayers, const std::function< bool(BOARD_ITEM *)> &aFunc)
void BuildDrawItemsList(const PAGE_INFO &aPageInfo, const TITLE_BLOCK &aTitleBlock)
Drawing or plot the drawing sheet.
Represent a DRC "provider" which runs some DRC functions over a BOARD and spits out #DRC_ITEMs and po...
void SetSheetLayer(const wxString &aSheetLayer)
Set the sheet layer to draw/plot.
Information pertinent to a Pcbnew printed circuit board.
static std::vector< KICAD_T > s_allBasicItems
PCB_LAYER_ID
A quick note on layer IDs:
class ZONE, managed by a footprint
void SetProject(const PROJECT *aProject)
virtual bool Run() override
Run this provider against the given PCB with configured options (if any).
void SetSheetCount(int aSheetCount)
Set the value of the count of sheets, for basic inscriptions.
Store the list of graphic items: rect, lines, polygons and texts to draw/plot the title block and fra...
const std::function< void(const wxString &msg, BOARD_ITEM *itemA, BOARD_ITEM *itemB, const wxPoint &pt)> OUTLINE_ERROR_HANDLER
class PCB_VIA, a via (like a track segment on a copper layer)
DS_DRAW_ITEM_BASE * GetFirst()
static constexpr int Millimeter2iu(double mm)