66 virtual bool Run()
override;
68 virtual const wxString
GetName()
const override {
return wxT(
"clearance" ); };
111 if(
m_board->m_DRCMaxClearance <= 0 )
113 REPORT_AUX( wxT(
"No Clearance constraints found. Tests not run." ) );
121 if( !
reportPhase(
_(
"Checking track & via clearances..." ) ) )
128 if( !
reportPhase(
_(
"Checking hole clearances..." ) ) )
152 if( !
reportPhase(
_(
"Checking copper graphic clearances..." ) ) )
159 if( !
reportPhase(
_(
"Checking copper graphic hole clearances..." ) ) )
167 if( !
reportPhase(
_(
"Checking copper zone clearances..." ) ) )
172 if( !
reportPhase(
_(
"Checking teardrop clearances..." ) ) )
192 bool has_error =
false;
202 if( itemNet == otherNet )
203 testClearance = testShorting =
false;
205 std::shared_ptr<SHAPE> otherShape_shared_ptr;
211 if( !
pad->FlashLayer( layer ) )
214 testClearance = testShorting =
false;
216 otherShape_shared_ptr =
pad->GetEffectiveHoleShape();
223 if( !
via->FlashLayer( layer ) )
224 otherShape_shared_ptr =
via->GetEffectiveHoleShape();
227 if( !otherShape_shared_ptr )
230 SHAPE* otherShape = otherShape_shared_ptr.get();
236 std::swap( item, other );
237 std::swap( itemShape, otherShape );
238 std::swap( itemNet, otherNet );
241 if( testClearance || testShorting )
261 drcItem->SetItems( item, other );
276 else if(
actual == 0 && otherNet && testShorting )
279 drcItem->SetErrorDetail( wxString::Format(
_(
"(nets %s and %s)" ),
281 otherNet ? otherNet->
GetNetname() :
_(
"<no net>" ) ) );
282 drcItem->SetItems( item, other );
289 else if( testClearance )
292 drcItem->SetErrorDetail(
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
296 drcItem->SetItems( item, other );
309 std::array<BOARD_ITEM*, 2> a{ item, other };
310 std::array<BOARD_ITEM*, 2> b{ other, item };
311 std::array<NETINFO_ITEM*, 2> b_net{ otherNet, itemNet };
312 std::array<SHAPE*, 2> a_shape{ itemShape, otherShape };
314 for(
size_t ii = 0; ii < 2; ++ii )
316 std::shared_ptr<SHAPE_SEGMENT> holeShape;
320 if( b[ii]->GetLayerSet().Contains( layer ) )
321 holeShape = b[ii]->GetEffectiveHoleShape();
327 if( b[ii]->HasHole() )
328 holeShape = b[ii]->GetEffectiveHoleShape();
333 int netcode = b_net[ii] ? b_net[ii]->GetNetCode() : 0;
335 if( netcode &&
m_drcEngine->IsNetTieExclusion( netcode, layer, holeShape->Centre(), a[ii] ) )
349 :
_(
"(%s clearance %s; actual < 0)" ),
353 drcItem->SetItems( a[ii], b[ii] );
379 BOX2I worstCaseBBox = itemBBox;
391 std::set<PAD*> allowedNetTiePads;
397 if(
pad->IsOnLayer( aLayer ) )
398 allowedNetTiePads.insert(
pad );
402 if( other->IsOnLayer( aLayer ) )
403 allowedNetTiePads.insert( other );
408 if( !allowedNetTiePads.empty() )
412 for(
PAD*
pad : allowedNetTiePads )
414 if(
pad->GetBoundingBox().Intersects( itemBBox )
415 &&
pad->GetEffectiveShape( aLayer )->Collide( itemShape.get() ) )
426 if( !testClearance && !testHoles )
442 bool flashedPad =
pad->FlashLayer( aLayer );
445 if( !flashedPad && !platedHole )
446 testClearance =
false;
462 drcItem->SetErrorDetail(
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
466 drcItem->SetItems( aItem, aZone );
472 if( testHoles && aItem->
HasHole() )
474 std::shared_ptr<SHAPE_SEGMENT> holeShape;
496 drcItem->SetErrorDetail(
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
500 drcItem->SetItems( aItem, aZone );
524 if( !testClearance && !testShorts )
533 BOX2I worstCaseBBox = itemBBox;
547 if( *aInheritedNet ==
nullptr )
549 if( zoneTree->
QueryColliding( itemBBox, itemShape.get(), layer ) )
550 *aInheritedNet = aZone->
GetNet();
553 if( *aInheritedNet == aZone->
GetNet() )
565 std::shared_ptr<DRC_ITEM> drcItem;
567 if( testShorts &&
actual == 0 && *aInheritedNet )
570 drcItem->SetErrorDetail( wxString::Format(
_(
"(nets %s and %s)" ),
571 ( *aInheritedNet )->GetNetname(),
577 drcItem->SetErrorDetail(
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
583 drcItem->SetItems( aText, aZone );
593 std::map<BOARD_ITEM*, int> freePadsUsageMap;
594 std::mutex freePadsUsageMapMutex;
595 std::atomic<size_t> done( 0 );
596 size_t count =
m_board->Tracks().size();
598 REPORT_AUX( wxString::Format( wxT(
"Testing %d tracks & vias..." ), count ) );
603 [&](
const int trackIdx )
611 m_board->m_CopperItemRTreeCache->QueryColliding( track, layer, layer,
628 &&
static_cast<void*
>( track ) >
static_cast<void*
>( other ) )
645 std::lock_guard<std::mutex> lock( freePadsUsageMapMutex );
646 auto it = freePadsUsageMap.find( other );
648 if( it == freePadsUsageMap.end() )
650 freePadsUsageMap[ other ] = track->
GetNetCode();
670 auto zoneIt =
m_board->m_DRCCopperZonesByLayer.find( layer );
672 if( zoneIt !=
m_board->m_DRCCopperZonesByLayer.end() )
674 for(
ZONE* zone : zoneIt->second )
689 auto track_futures =
tp.submit_loop( 0,
m_board->Tracks().size(), testTrack,
m_board->Tracks().size() );
691 while( done < count )
698 track_futures.wait();
702 track_futures.wait_for( std::chrono::milliseconds( 250 ) );
719 int padGroupIdx = padToNetTieGroupMap[
pad->GetNumber() ];
723 PAD* otherPad =
static_cast<PAD*
>( other );
725 if( padGroupIdx >= 0 && padGroupIdx == padToNetTieGroupMap[ otherPad->
GetNumber() ] )
726 testClearance = testShorting =
false;
728 if(
pad->SameLogicalPadAs( otherPad ) )
733 testClearance = testShorting =
false;
738 PAD* otherPad =
nullptr;
742 otherPad =
static_cast<PAD*
>( other );
745 otherVia =
static_cast<PCB_VIA*
>( other );
748 testClearance = testShorting =
false;
752 testClearance = testShorting =
false;
755 testClearance = testShorting =
false;
759 testClearance = testShorting =
false;
763 testClearance = testShorting =
false;
765 int padNet =
pad->GetNetCode();
766 int otherNet = otherCItem ? otherCItem->
GetNetCode() : 0;
769 if( otherNet && otherNet == padNet )
771 testClearance = testShorting =
false;
775 if( !(
pad->GetDrillSize().x > 0 )
777 && !( otherVia && otherVia->
GetDrill() > 0 ) )
782 if( !testClearance && !testShorting && !testHoles )
790 bool has_error =
false;
792 if( otherPad &&
pad->SameLogicalPadAs( otherPad ) )
802 if(
pad->GetShortNetname().StartsWith( wxS(
"unconnected-(" ) )
809 drcItem->SetErrorDetail( wxString::Format(
_(
"(nets %s and %s)" ),
812 drcItem->SetItems(
pad, otherPad );
820 if( testClearance || testShorting )
829 if(
m_drcEngine->IsNetTieExclusion(
pad->GetNetCode(), aLayer, pos, other ) )
834 else if(
actual == 0 && padNet && otherNet && testShorting )
837 drcItem->SetErrorDetail( wxString::Format(
_(
"(nets %s and %s)" ),
840 drcItem->SetItems(
pad, other );
845 else if( testClearance )
848 drcItem->SetErrorDetail(
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
852 drcItem->SetItems(
pad, other );
865 if( shape->Collide( aOtherShape,
sub_e( aClearance ), &
actual, &pos ) )
868 drcItem->SetErrorDetail(
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
872 drcItem->SetItems( item, otherItem );
888 if( testHoles && otherPad && otherPad->
HasHole() &&
pad->FlashLayer( aLayer ) )
898 if( testHoles &&
pad->HasHole() && otherPad && otherPad->
FlashLayer( aLayer ) )
903 doTestHole( otherPad, otherShape.get(),
pad,
pad->GetEffectiveHoleShape().get(),
clearance );
906 if( testHoles && otherVia && otherVia->
HasHole() )
924 std::atomic<size_t> done( 1 );
928 const auto fp_check =
943 std::shared_ptr<SHAPE> padShape =
pad->GetEffectiveShape( layer );
945 m_board->m_CopperItemRTreeCache->QueryColliding(
pad, layer, layer,
952 &&
static_cast<void*
>(
pad ) >
static_cast<void*
>( other ) )
967 auto zoneIt =
m_board->m_DRCCopperZonesByLayer.find( layer );
969 if( zoneIt !=
m_board->m_DRCCopperZonesByLayer.end() )
971 for(
ZONE* zone : zoneIt->second )
985 size_t numFootprints =
m_board->Footprints().size();
986 auto returns =
tp.submit_loop( 0, numFootprints, fp_check, numFootprints );
989 for(
const std::future<void>& ret : returns )
991 while( ret.wait_for( std::chrono::milliseconds( 250 ) ) != std::future_status::ready )
1000 size_t count =
m_board->Drawings().size();
1001 std::atomic<size_t> done( 1 );
1004 count += footprint->GraphicalItems().size() + footprint->GetFields().size();
1006 REPORT_AUX( wxString::Format( wxT(
"Testing %d graphics..." ), count ) );
1008 auto isKnockoutText =
1014 auto testGraphicAgainstZone =
1029 auto zoneIt =
m_board->m_DRCCopperZonesByLayer.find( layer );
1031 if( zoneIt !=
m_board->m_DRCCopperZonesByLayer.end() )
1033 for(
ZONE* zone : zoneIt->second )
1035 if( isKnockoutText( item ) )
1046 auto testCopperGraphic =
1051 m_board->m_CopperItemRTreeCache->QueryColliding( graphic, layer, layer,
1059 && graphic->GetParentFootprint()
1073 int graphicNet = graphic->IsConnected()
1080 if( graphicNet && graphicNet == otherNet )
1087 &&
static_cast<void*
>( graphic ) >
static_cast<void*
>( other ) )
1107 (void)
tp.submit_task(
1108 [
this, item, &done, testGraphicAgainstZone, testCopperGraphic]()
1110 if( !m_drcEngine->IsCancelled() )
1112 testGraphicAgainstZone( item );
1114 if( ( item->Type() == PCB_SHAPE_T || item->Type() == PCB_BARCODE_T )
1115 && item->IsOnCopperLayer() )
1117 testCopperGraphic( static_cast<PCB_SHAPE*>( item ) );
1120 done.fetch_add( 1 );
1125 for(
FOOTPRINT* footprint : m_board->Footprints() )
1127 (void)
tp.submit_task(
1128 [
this, footprint, &done, testGraphicAgainstZone, testCopperGraphic]()
1130 for( BOARD_ITEM* item : footprint->GraphicalItems() )
1132 if( !m_drcEngine->IsCancelled() )
1134 testGraphicAgainstZone( item );
1136 if( ( item->Type() == PCB_SHAPE_T || item->Type() == PCB_BARCODE_T )
1137 && item->IsOnCopperLayer() )
1139 testCopperGraphic( static_cast<PCB_SHAPE*>( item ) );
1142 done.fetch_add( 1 );
1148 for(
PCB_FIELD* field : footprint->GetFields() )
1150 if( !m_drcEngine->IsCancelled() )
1152 testGraphicAgainstZone( field );
1153 done.fetch_add( 1 );
1161 reportProgress( done, count );
1163 if( m_drcEngine->IsCancelled() )
1166 if(
tp.wait_for( std::chrono::milliseconds( 250 ) ) )
1186 auto zoneIt =
m_board->m_DRCCopperZonesByLayer.find( layer );
1188 if( zoneIt ==
m_board->m_DRCCopperZonesByLayer.end() )
1191 for(
ZONE* zone : zoneIt->second )
1193 if( zone == teardrop )
1215 std::vector<std::map<PCB_LAYER_ID, std::vector<SEG>>> poly_segments(
m_board->m_DRCCopperZones.size() );
1216 std::vector<std::map<PCB_LAYER_ID, SEG_RTREE>> seg_rtrees(
m_board->m_DRCCopperZones.size() );
1219 std::atomic<size_t> done( 0 );
1222 auto reportZoneZoneViolation =
1226 std::shared_ptr<DRC_ITEM> drcItem;
1229 drcItem->SetErrorDetail(
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
1230 constraint.GetName(),
1231 constraint.GetValue().Min(),
1232 std::max(
actual, 0 ) ) );
1233 drcItem->SetItems( zoneA, zoneB );
1234 drcItem->SetViolatingRule( constraint.GetParentRule() );
1239 [
this, reportZoneZoneViolation, &poly_segments, &seg_rtrees, &done]
1240 (
size_t zoneA_idx,
size_t zoneB_idx,
PCB_LAYER_ID layer ) ->
void
1242 ZONE* zoneA =
m_board->m_DRCCopperZones[zoneA_idx];
1243 ZONE* zoneB =
m_board->m_DRCCopperZones[zoneB_idx];
1251 std::vector<SEG>& refSegments = poly_segments[zoneA_idx][layer];
1252 std::vector<SEG>& testSegments = poly_segments[zoneB_idx][layer];
1254 auto testIt = seg_rtrees[zoneB_idx].find( layer );
1256 if( testIt != seg_rtrees[zoneB_idx].
end() && !testIt->second.empty() )
1258 const SEG_RTREE& testTree = testIt->second;
1260 for(
SEG& refSegment : refSegments )
1262 int minX = std::min( refSegment.A.x, refSegment.B.x ) -
clearance;
1263 int minY = std::min( refSegment.A.y, refSegment.B.y ) -
clearance;
1264 int maxX = std::max( refSegment.A.x, refSegment.B.x ) +
clearance;
1265 int maxY = std::max( refSegment.A.y, refSegment.B.y ) +
clearance;
1266 int qmin[2] = { minX, minY };
1267 int qmax[2] = { maxX, maxY };
1271 [&](
size_t segIdx ) ->
bool
1273 SEG& testSegment = testSegments[segIdx];
1274 int64_t dist_sq = 0;
1277 refSegment.NearestPoints( testSegment, pt, other_pt, dist_sq );
1278 actual = std::floor( std::sqrt( dist_sq ) + 0.5 );
1289 testTree.Search( qmin, qmax, visitor );
1293 done.fetch_add( 1 );
1294 reportZoneZoneViolation( zoneA, zoneB, pt,
actual, constraint, layer );
1301 done.fetch_add( 1 );
1305 std::map<PCB_LAYER_ID, std::vector<size_t>> zone_idx_by_layer;
1307 for (
size_t ii = 0; ii <
m_board->m_DRCCopperZones.size(); ii++ )
1320 zone_idx_by_layer[layer].push_back( ii );
1327 if( !
m_board->IsLayerEnabled( layer ) )
1330 for(
size_t ii : zone_idx_by_layer[layer] )
1334 std::vector<SEG>& zone_layer_poly_segs = poly_segments[ii][layer];
1335 zone_layer_poly_segs.reserve( poly->FullPointCount() );
1337 for(
auto it = poly->IterateSegmentsWithHoles(); it; it++ )
1341 if( seg.
A.
x > seg.
B.
x )
1344 zone_layer_poly_segs.push_back( seg );
1347 SEG_RTREE::Builder builder;
1348 builder.Reserve( zone_layer_poly_segs.size() );
1350 for(
size_t si = 0; si < zone_layer_poly_segs.size(); ++si )
1352 const SEG& seg = zone_layer_poly_segs[si];
1353 int smin[2] = { std::min( seg.
A.
x, seg.
B.
x ), std::min( seg.
A.
y, seg.
B.
y ) };
1354 int smax[2] = { std::max( seg.
A.
x, seg.
B.
x ), std::max( seg.
A.
y, seg.
B.
y ) };
1355 builder.Add( smin, smax, si );
1358 seg_rtrees[ii][layer] = builder.Build();
1362 for(
auto it_a = zone_idx_by_layer[layer].begin(); it_a != zone_idx_by_layer[layer].end(); ++it_a )
1367 for(
auto it_a2 = std::next( it_a ); it_a2 != zone_idx_by_layer[layer].end(); ++it_a2 )
1369 size_t ia2 = *it_a2;
1391 (void)
tp.submit_task(
1392 [checkZones, ia, ia2, layer]()
1394 checkZones( ia, ia2, layer );
1407 if(
tp.wait_for( std::chrono::milliseconds( 250 ) ) )
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
wxString GetNetname() const
NETINFO_ITEM * GetNet() const
Return #NET_INFO object for a given item.
const wxString & GetShortNetname() const
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.
virtual std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER, FLASHING aFlash=FLASHING::DEFAULT) const
Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
FOOTPRINT * GetParentFootprint() const
virtual LSET GetLayerSet() const
Return a std::bitset of all layers on which the item physically resides.
BOARD_ITEM_CONTAINER * GetParent() const
virtual std::shared_ptr< SHAPE_SEGMENT > GetEffectiveHoleShape() const
virtual bool HasHole() const
constexpr BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Inflates the rectangle horizontally by dx and vertically by dy.
constexpr bool Intersects(const BOX2< Vec > &aRect) const
SEVERITY GetSeverity() const
const MINOPTMAX< int > & GetValue() const
DRC_RULE * GetParentRule() const
static std::shared_ptr< DRC_ITEM > Create(int aErrorCode)
Constructs a DRC_ITEM for the given error code.
Implement an R-tree for fast spatial and layer indexing of connectable items.
int QueryColliding(BOARD_ITEM *aRefItem, PCB_LAYER_ID aRefLayer, PCB_LAYER_ID aTargetLayer, std::function< bool(BOARD_ITEM *)> aFilter=nullptr, std::function< bool(BOARD_ITEM *)> aVisitor=nullptr, int aClearance=0) const
This is a fast test which essentially does bounding-box overlap given a worst-case clearance.
virtual bool Run() override
Run this provider against the given PCB with configured options (if any).
DRC_TEST_PROVIDER_COPPER_CLEARANCE()
bool testSingleLayerItemAgainstItem(BOARD_ITEM *item, SHAPE *itemShape, PCB_LAYER_ID layer, BOARD_ITEM *other)
Checks for track/via/hole <-> clearance.
int sub_e(int aClearance)
void testItemAgainstZone(BOARD_ITEM *aItem, ZONE *aZone, PCB_LAYER_ID aLayer)
void testTeardropClearances()
void testGraphicClearances()
void testTrackClearances()
virtual ~DRC_TEST_PROVIDER_COPPER_CLEARANCE()=default
virtual const wxString GetName() const override
bool testPadAgainstItem(PAD *pad, SHAPE *padShape, PCB_LAYER_ID layer, BOARD_ITEM *other)
void testKnockoutTextAgainstZone(BOARD_ITEM *aText, NETINFO_ITEM **aInheritedNet, ZONE *aZone)
virtual bool reportPhase(const wxString &aStageName)
void reportTwoShapeGeometry(std::shared_ptr< DRC_ITEM > &aDrcItem, const VECTOR2I &aMarkerPos, const SHAPE *aShape1, const SHAPE *aShape2, PCB_LAYER_ID aLayer, int aDistance)
void reportTwoItemGeometry(std::shared_ptr< DRC_ITEM > &aDrcItem, const VECTOR2I &aMarkerPos, const BOARD_ITEM *aItem1, const BOARD_ITEM *aItem2, PCB_LAYER_ID aLayer, int aDistance)
void reportViolation(std::shared_ptr< DRC_ITEM > &item, const VECTOR2I &aMarkerPos, int aMarkerLayer, const std::function< void(PCB_MARKER *)> &aPathGenerator=[](PCB_MARKER *){})
void reportTwoPointGeometry(std::shared_ptr< DRC_ITEM > &aDrcItem, const VECTOR2I &aMarkerPos, const VECTOR2I &ptA, const VECTOR2I &ptB, PCB_LAYER_ID aLayer)
bool isInvisibleText(const BOARD_ITEM *aItem) const
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 const BOX2I GetBoundingBox() const
Return the orthogonal bounding box of this object for display purposes.
KICAD_T Type() const
Returns the type of object.
Static (immutable) packed R-tree built via Hilbert-curve bulk loading.
LSET is a set of PCB_LAYER_IDs.
static const LSET & AllCuMask()
return AllCuMask( MAX_CU_LAYERS );
bool Contains(PCB_LAYER_ID aLayer) const
See if the layer set contains a PCB layer.
Handle the data for a net.
const wxString & GetNetname() const
bool FlashLayer(int aLayer, bool aOnlyCheckIfPermitted=false) const
Check to see whether the pad should be flashed on the specific layer.
PAD_ATTRIB GetAttribute() const
const wxString & GetNumber() const
VECTOR2I GetPosition() const override
VECTOR2I GetDrillSize() const
bool HasHole() const override
std::shared_ptr< SHAPE_SEGMENT > GetEffectiveHoleShape() const override
Return a SHAPE_SEGMENT object representing the pad's hole.
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
const VECTOR2I & GetStart() const
std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER, FLASHING aFlash=FLASHING::DEFAULT) const override
Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
const VECTOR2I & GetEnd() const
int GetDrill() const
Return the local drill setting for this PCB_VIA.
std::shared_ptr< SHAPE_SEGMENT > GetEffectiveHoleShape() const override
bool HasHole() const override
bool IsOnLayer(PCB_LAYER_ID aLayer) const override
Test to see if this object is on the given layer.
OPT_VECTOR2I Intersect(const SEG &aSeg, bool aIgnoreEndpoints=false, bool aLines=false) const
Compute intersection point of segment (this) with segment aSeg.
Represent a set of closed polygons.
const BOX2I BBoxFromCaches() const
An abstract shape on 2D plane.
virtual bool Collide(const VECTOR2I &aP, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const
Check if the boundary of shape (this) lies closer to the point aP than aClearance,...
Handle a list of polygons defining a copper zone.
bool GetIsRuleArea() const
Accessors to parameters used in Rule Area zones:
const BOX2I GetBoundingBox() const override
SHAPE_POLY_SET * GetFill(PCB_LAYER_ID aLayer)
bool IsTeardropArea() const
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
virtual std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER, FLASHING aFlash=FLASHING::DEFAULT) const override
Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
@ HOLE_CLEARANCE_CONSTRAINT
@ DEFAULT
Flashing follows connectivity.
bool IsCopperLayer(int aLayerId)
Test whether a layer is a copper layer.
PCB_LAYER_ID
A quick note on layer IDs:
static DRC_REGISTER_TEST_PROVIDER< DRC_TEST_PROVIDER_ANNULAR_WIDTH > dummy
@ NPTH
like PAD_PTH, but not plated mechanical use only, no connection allowed
@ PTH
Plated through hole pad.
std::optional< VECTOR2I > OPT_VECTOR2I
static bool Collide(const SHAPE_CIRCLE &aA, const SHAPE_CIRCLE &aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV)
thread_pool & GetKiCadThreadPool()
Get a reference to the current thread pool.
BS::priority_thread_pool thread_pool
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
@ PCB_REFERENCE_IMAGE_T
class PCB_REFERENCE_IMAGE, bitmap 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_PAD_T
class PAD, a pad in a footprint
@ PCB_ARC_T
class PCB_ARC, an arc track segment on a copper layer
@ PCB_TRACE_T
class PCB_TRACK, a track segment (segment on a copper layer)
VECTOR2< int32_t > VECTOR2I