22#include "wx/html/m_templ.h"
23#include "wx/html/styleparams.h"
50 _HKI(
"Missing connection between items" ),
51 wxT(
"unconnected_items" ) );
54 _HKI(
"Items shorting two nets" ),
55 wxT(
"shorting_items" ) );
58 _HKI(
"Items not allowed" ),
59 wxT(
"items_not_allowed" ) );
62 wxT(
"text_on_edge_cuts" ) );
65 _HKI(
"Clearance violation" ),
69 _HKI(
"Creepage violation" ),
73 _HKI(
"Tracks crossing" ),
74 wxT(
"tracks_crossing" ) );
77 _HKI(
"Board edge clearance violation" ),
78 wxT(
"copper_edge_clearance" ) );
81 _HKI(
"Isolated copper fill" ),
82 wxT(
"isolated_copper" ) );
85 _HKI(
"Thermal relief connection to zone incomplete" ),
86 wxT(
"starved_thermal" ) );
89 _HKI(
"Via is not connected or connected on only one layer" ),
90 wxT(
"via_dangling" ) );
93 _HKI(
"Track has unconnected end" ),
94 wxT(
"track_dangling" ) );
97 _HKI(
"Hole clearance violation" ),
98 wxT(
"hole_clearance" ) );
101 _HKI(
"Drilled hole too close to other hole" ),
102 wxT(
"hole_to_hole" ) );
105 _HKI(
"Drilled holes co-located" ),
106 wxT(
"holes_co_located" ) );
109 _HKI(
"Copper connection too narrow" ),
110 wxT(
"connection_width" ) );
113 _HKI(
"Track width" ),
114 wxT(
"track_width" ) );
117 _HKI(
"Track angle" ),
118 wxT(
"track_angle" ) );
121 _HKI(
"Track segment length" ),
122 wxT(
"track_segment_length" ) );
125 _HKI(
"Annular width" ),
126 wxT(
"annular_width" ) );
129 _HKI(
"Hole size out of range" ),
130 wxT(
"drill_out_of_range" ) );
133 _HKI(
"Via diameter" ),
134 wxT(
"via_diameter" ) );
137 _HKI(
"Padstack is questionable" ),
141 _HKI(
"Padstack is not valid" ),
142 wxT(
"padstack_invalid" ) );
145 _HKI(
"Micro via hole size out of range" ),
146 wxT(
"microvia_drill_out_of_range" ) );
149 _HKI(
"Courtyards overlap" ),
150 wxT(
"courtyards_overlap" ) );
153 _HKI(
"Footprint has no courtyard defined" ),
154 wxT(
"missing_courtyard" ) );
157 _HKI(
"Footprint has malformed courtyard" ),
158 wxT(
"malformed_courtyard" ) );
161 _HKI(
"PTH inside courtyard" ),
162 wxT(
"pth_inside_courtyard" ) );
165 _HKI(
"NPTH inside courtyard" ),
166 wxT(
"npth_inside_courtyard" ) );
169 _HKI(
"Item on a disabled copper layer" ),
170 wxT(
"item_on_disabled_layer" ) );
173 _HKI(
"Board has malformed outline" ),
174 wxT(
"invalid_outline" ) );
177 _HKI(
"Duplicate footprints" ),
178 wxT(
"duplicate_footprints" ) );
181 _HKI(
"Missing footprint" ),
182 wxT(
"missing_footprint" ) );
185 _HKI(
"Extra footprint" ),
186 wxT(
"extra_footprint" ) );
189 _HKI(
"Pad net doesn't match schematic" ),
190 wxT(
"net_conflict" ) );
193 _HKI(
"Footprint attributes don't match symbol" ),
194 wxT(
"footprint_symbol_mismatch" ) );
197 _HKI(
"Footprint doesn't match symbol's footprint filters" ),
198 wxT(
"footprint_filters_mismatch" ) );
201 _HKI(
"Footprint field does not match symbol field" ),
202 wxT(
"footprint_symbol_field_mismatch" ) );
205 _HKI(
"Footprint not found in libraries" ),
206 wxT(
"lib_footprint_issues" ) );
209 _HKI(
"Footprint doesn't match copy in library" ),
210 wxT(
"lib_footprint_mismatch" ) );
213 _HKI(
"Unresolved text variable" ),
214 wxT(
"unresolved_variable" ) );
217 _HKI(
"Assertion failure" ),
218 wxT(
"assertion_failure" ) );
222 wxT(
"generic_warning" ) );
226 wxT(
"generic_error" ) );
229 _HKI(
"Copper sliver" ),
230 wxT(
"copper_sliver" ) );
233 _HKI(
"Solder mask aperture bridges items with different nets" ),
234 wxT(
"solder_mask_bridge" ) );
237 _HKI(
"Silkscreen clipped by solder mask" ),
238 wxT(
"silk_over_copper" ) );
241 _HKI(
"Silkscreen clipped by board edge" ),
242 wxT(
"silk_edge_clearance" ) );
245 _HKI(
"Silkscreen clearance" ),
246 wxT(
"silk_overlap" ) );
249 _HKI(
"Text height out of range" ),
250 wxT(
"text_height" ) );
253 _HKI(
"Text thickness out of range" ),
254 wxT(
"text_thickness" ) );
257 _HKI(
"Track length out of range" ),
258 wxT(
"length_out_of_range" ) );
261 _HKI(
"Net chain stub length out of range" ),
262 wxT(
"net_chain_stub_length" ) );
265 _HKI(
"Net chain routed without continuous copper on the required reference layer" ),
266 wxT(
"net_chain_return_path" ) );
269 _HKI(
"Net chain nets do not have consistent tuning profile assignment" ),
270 wxT(
"net_chain_tuning_profiles" ) );
273 _HKI(
"Skew between tracks out of range" ),
274 wxT(
"skew_out_of_range" ) );
278 _HKI(
"Too many or too few vias on a connection" ),
279 wxT(
"too_many_vias" ) );
282 _HKI(
"Differential pair gap out of range" ),
283 wxT(
"diff_pair_gap_out_of_range" ) );
286 _HKI(
"Differential uncoupled length too long" ),
287 wxT(
"diff_pair_uncoupled_length_too_long" ) );
290 _HKI(
"Footprint is not valid" ),
291 wxT(
"footprint" ) );
294 _HKI(
"Footprint component type doesn't match footprint pads" ),
295 wxT(
"footprint_type_mismatch" ) );
298 _HKI(
"Through hole pad has no hole" ),
299 wxT(
"through_hole_pad_without_hole" ) );
302 _HKI(
"Footprint with pads is scaled (physical part size unchanged)" ),
303 wxT(
"footprint_scaled_with_pads" ) );
306 _HKI(
"Mirrored text on front layer" ),
307 wxT(
"mirrored_text_on_front_layer" ) );
310 _HKI(
"Non-Mirrored text on back layer" ),
311 wxT(
"nonmirrored_text_on_back_layer" ) );
314 _HKI(
"Missing tuning profile" ),
315 wxT(
"missing_tuning_profile" ) );
318 _HKI(
"Tuning profile track geometries" ),
319 wxT(
"tuning_profile_track_geometries" ) );
322 _HKI(
"Track connected to post-machined or backdrilled layer" ),
323 wxT(
"track_on_post_machined_layer" ) );
326 _HKI(
"Track endpoint not centered on via" ),
327 wxT(
"track_not_centered_on_via" ) );
500 for(
const std::reference_wrapper<RC_ITEM>& item :
allItemTypes )
502 if( aErrorKey == item.get().GetSettingsKey() )
503 return std::make_shared<DRC_ITEM>(
static_cast<const DRC_ITEM&
>( item.get() ) );
538 return wxString::Format( aTranslate ?
_(
"Rule: %s" ) : wxString( wxT(
"Rule: %s" ) ),
m_violatingRule->m_Name );
540 return aTranslate ?
_(
"Local override" ) : wxString( wxT(
"Local override" ) );
554 for(
int layer : it->GetLayerSet() )
556 if(
pad->FlashLayer( layer ) )
564 return it->GetLayerSet();
569 aViolationLayers =
LSET();
599 aPrincipalLayer = markerLayer;
605 if( a || b || c || d )
613 LSET layersList = getActiveLayers( it );
614 aViolationLayers &= layersList;
617 aPrincipalLayer = layersList.
Seq().front();
622 if( aViolationLayers.count() )
623 aPrincipalLayer = aViolationLayers.
Seq().front();
624 else if( aPrincipalLayer >= 0 )
625 aViolationLayers.
set( aPrincipalLayer );
648 return a->GetSeverity() > b->GetSeverity();
669 && ( marker->GetSeverity() & aSeverity ) > 0 )
683 return marker ? marker->
GetRCItem() :
nullptr;
BASE_SET & set(size_t pos)
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.
Information pertinent to a Pcbnew printed circuit board.
BOARD_ITEM * ResolveItem(const KIID &aID, bool aAllowNullptrReturn=false) const
void SetSeverities(int aSeverities) override
std::vector< MARKER_BASE::MARKER_T > m_markerTypes
void DeleteItem(int aIndex, bool aDeep) override
Remove (and optionally deletes) the indexed item from the list.
int GetSeverities() const override
int GetCount(int aSeverity=-1) const override
std::vector< PCB_MARKER * > m_filteredMarkers
std::shared_ptr< RC_ITEM > GetItem(int aIndex) const override
Retrieve a RC_ITEM by index.
static DRC_ITEM lengthOutOfRange
KIID GetAuxItem3ID() const override
static DRC_ITEM viaDiameter
static DRC_ITEM silkEdgeClearance
static DRC_ITEM trackWidth
static DRC_ITEM heading_DFM
static DRC_ITEM annularWidth
static DRC_ITEM pthInsideCourtyard
static DRC_ITEM trackSegmentLength
static DRC_ITEM schematicParity
static DRC_ITEM netConflict
static void GetViolationLayers(BOARD *aBoard, const std::shared_ptr< RC_ITEM > &aItem, PCB_MARKER *aMarker, PCB_LAYER_ID &aPrincipalLayer, LSET &aViolationLayers)
Work out which layer to focus on and which layers a violation involves.
static DRC_ITEM copperSliver
static DRC_ITEM trackNotCenteredOnVia
static DRC_ITEM holeNearHole
static DRC_ITEM heading_signal_integrity
static DRC_ITEM courtyardsOverlap
static DRC_ITEM textThicknessOutOfRange
static DRC_ITEM trackOnPostMachinedLayer
static DRC_ITEM connectionWidth
static DRC_ITEM footprint
static DRC_ITEM unresolvedVariable
static DRC_ITEM assertionFailure
static DRC_ITEM npthInsideCourtyard
static DRC_ITEM footprintFilters
static std::shared_ptr< DRC_ITEM > Create(int aErrorCode)
Constructs a DRC_ITEM for the given error code.
static DRC_ITEM textOnEdgeCuts
static std::vector< std::reference_wrapper< RC_ITEM > > allItemTypes
A list of all DRC_ITEM types which are valid error codes.
static DRC_ITEM tuningProfileImplicitRules
static DRC_ITEM starvedThermal
static DRC_ITEM footprintScaledWithPads
static DRC_ITEM heading_deprecated
static DRC_ITEM shortingItems
static DRC_ITEM tracksCrossing
static DRC_ITEM missingCourtyard
static DRC_ITEM skewOutOfRange
static DRC_ITEM trackDangling
static DRC_ITEM netChainStubTooLong
static DRC_ITEM viaDangling
static DRC_ITEM genericError
static DRC_ITEM netChainReturnPathBreak
static DRC_ITEM drillTooSmall
static DRC_ITEM holesCoLocated
static DRC_ITEM missingFootprint
static DRC_ITEM textHeightOutOfRange
static DRC_ITEM diffPairGapOutOfRange
static DRC_ITEM heading_electrical
static DRC_ITEM itemOnDisabledLayer
static DRC_ITEM mirroredTextOnFrontLayer
static DRC_ITEM heading_readability
static DRC_ITEM itemsNotAllowed
DRC_ITEM(int aErrorCode=0, const wxString &aTitle="", const wxString &aSettingsKey="")
static DRC_ITEM extraFootprint
static DRC_ITEM diffPairUncoupledLengthTooLong
static DRC_ITEM netChainTuningProfiles
KIID GetAuxItem2ID() const override
static DRC_ITEM unconnectedItems
static DRC_ITEM clearance
DRC_RULE * m_violatingRule
static DRC_ITEM missingTuningProfile
static DRC_ITEM libFootprintMismatch
static DRC_ITEM viaCountOutOfRange
static DRC_ITEM edgeClearance
static DRC_ITEM silkMaskClearance
static DRC_ITEM unMirroredTextOnBackLayer
static DRC_ITEM genericWarning
static DRC_ITEM schematicFieldsParity
static DRC_ITEM invalidOutline
static DRC_ITEM isolatedCopper
static DRC_ITEM malformedCourtyard
static DRC_ITEM heading_internal
static DRC_ITEM holeClearance
static DRC_ITEM libFootprintIssues
static DRC_ITEM padstackInvalid
static DRC_ITEM trackAngle
static DRC_ITEM heading_schematic_parity
static DRC_ITEM microviaDrillTooSmall
wxString GetViolatingRuleDesc(bool aTranslate) const override
static DRC_ITEM solderMaskBridge
static DRC_ITEM heading_misc
static DRC_ITEM footprintTypeMismatch
static DRC_ITEM footprintTHPadhasNoHole
static DRC_ITEM silkClearance
static DRC_ITEM duplicateFootprints
EDA_ITEM_FLAGS GetFlags() const
LSET is a set of PCB_LAYER_IDs.
LSEQ Seq(const LSEQ &aSequence) const
Return an LSEQ from the union of this LSET and a desired sequence.
static const LSET & AllLayersMask()
std::shared_ptr< RC_ITEM > GetRCItem() const
int m_errorCode
The error code's numeric value.
@ DRCE_DISABLED_LAYER_ITEM
@ DRCE_FOOTPRINT_SCALED_WITH_PADS
@ DRCE_DP_UNCOUPLED_LENGTH_TOO_LONG
@ DRCE_TUNING_PROFILE_IMPLICIT_RULES
@ DRCE_SILK_EDGE_CLEARANCE
@ DRCE_SILK_MASK_CLEARANCE
@ DRCE_DP_GAP_OUT_OF_RANGE
@ DRCE_MIRRORED_TEXT_ON_FRONT_LAYER
@ DRCE_LIB_FOOTPRINT_ISSUES
@ DRCE_OVERLAPPING_FOOTPRINTS
@ DRCE_TRACK_ON_POST_MACHINED_LAYER
@ DRCE_NET_CHAIN_STUB_TOO_LONG
@ DRCE_DRILL_OUT_OF_RANGE
@ DRCE_NET_CHAIN_RETURN_PATH_BREAK
@ DRCE_TRACK_SEGMENT_LENGTH
@ DRCE_SCHEMATIC_FIELDS_PARITY
@ DRCE_TRACK_NOT_CENTERED_ON_VIA
@ DRCE_NET_CHAIN_TUNING_PROFILES
@ DRCE_MISSING_TUNING_PROFILE
@ DRCE_DRILLED_HOLES_TOO_CLOSE
@ DRCE_MICROVIA_DRILL_OUT_OF_RANGE
@ DRCE_MALFORMED_COURTYARD
@ DRCE_UNRESOLVED_VARIABLE
@ DRCE_FOOTPRINT_TYPE_MISMATCH
@ DRCE_DUPLICATE_FOOTPRINT
@ DRCE_DRILLED_HOLES_COLOCATED
@ DRCE_LENGTH_OUT_OF_RANGE
@ DRCE_LIB_FOOTPRINT_MISMATCH
@ DRCE_PAD_TH_WITH_NO_HOLE
@ DRCE_UNMIRRORED_TEXT_ON_BACK_LAYER
@ DRCE_VIA_COUNT_OUT_OF_RANGE
#define MALFORMED_F_COURTYARD
#define MALFORMED_B_COURTYARD
Some functions to handle hotkeys in KiCad.
PCB_LAYER_ID
A quick note on layer IDs:
bool contains(const _Container &__container, _Value __value)
Returns true if the container contains the given value.
@ PCB_PAD_T
class PAD, a pad in a footprint