25#include <math_for_graphics.h>
74 virtual bool Run()
override;
76 virtual const wxString
GetName()
const override
78 return wxT(
"clearance" );
83 return wxT(
"Tests copper item clearance" );
135 reportAux( wxT(
"No Clearance constraints found. Tests not run." ) );
143 if( !
reportPhase(
_(
"Checking track & via clearances..." ) ) )
150 if( !
reportPhase(
_(
"Checking hole clearances..." ) ) )
174 if( !
reportPhase(
_(
"Checking copper graphic clearances..." ) ) )
182 if( !
reportPhase(
_(
"Checking copper zone clearances..." ) ) )
213 bool has_error =
false;
217 otherNet = connectedItem->GetNetCode();
225 if(
pad->GetAttribute() == PAD_ATTRIB::NPTH && !
pad->FlashLayer( layer ) )
226 testClearance = testShorting =
false;
229 if( testClearance || testShorting )
249 drcItem->SetItems( item, other );
265 else if( actual == 0 && otherNet && testShorting )
270 msg.Printf(
_(
"(nets %s and %s)" ), item->
GetNetname(),
273 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
274 drce->SetItems( item, other );
282 else if( testClearance )
285 wxString msg =
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
290 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
291 drce->SetItems( item, other );
305 std::array<BOARD_ITEM*, 2> a{ item, other };
306 std::array<BOARD_ITEM*, 2> b{ other, item };
307 std::array<SHAPE*, 2> a_shape{ itemShape, otherShape.get() };
309 for(
size_t ii = 0; ii < 2; ++ii )
311 std::shared_ptr<SHAPE_SEGMENT> holeShape;
315 if( !(
dynamic_cast<PCB_TRACK*
>( a[ii] ) ) || !b[ii]->HasHole() )
321 if( b[ii]->GetLayerSet().Contains( layer ) )
322 holeShape = b[ii]->GetEffectiveHoleShape();
326 holeShape = b[ii]->GetEffectiveHoleShape();
340 wxString msg =
formatMsg( clearance ?
_(
"(%s clearance %s; actual %s)" )
341 :
_(
"(%s clearance %s; actual < 0)" ),
346 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
347 drce->SetItems( a[ii], b[ii] );
374 BOX2I worstCaseBBox = itemBBox;
386 std::set<PAD*> allowedNetTiePads;
392 if(
pad->IsOnLayer( aLayer ) )
393 allowedNetTiePads.insert(
pad );
397 if( other->IsOnLayer( aLayer ) )
398 allowedNetTiePads.insert( other );
403 if( !allowedNetTiePads.empty() )
407 for(
PAD*
pad : allowedNetTiePads )
409 if(
pad->GetBoundingBox().Intersects( itemBBox )
410 &&
pad->GetEffectiveShape( aLayer )->Collide( itemShape.get() ) )
421 if( !testClearance && !testHoles )
437 bool flashedPad =
pad->FlashLayer( aLayer );
438 bool platedHole =
pad->HasHole() &&
pad->GetAttribute() == PAD_ATTRIB::PTH;
440 if( !flashedPad && !platedHole )
441 testClearance =
false;
452 std::shared_ptr<SHAPE> itemShape = aItem->
GetEffectiveShape( aLayer, FLASHING::DEFAULT );
455 std::max( 0, clearance -
m_drcEpsilon ), &actual, &pos ) )
458 wxString msg =
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
463 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
464 drce->SetItems( aItem, aZone );
470 if( testHoles && aItem->
HasHole() )
472 std::shared_ptr<SHAPE_SEGMENT> holeShape;
496 wxString msg =
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
501 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
502 drce->SetItems( aItem, aZone );
524 if( !testClearance && !testShorts )
533 BOX2I worstCaseBBox = itemBBox;
545 std::shared_ptr<SHAPE> itemShape = aText->
GetEffectiveShape( layer, FLASHING::DEFAULT );
547 if( *aInheritedNet ==
nullptr )
549 if( zoneTree->
QueryColliding( itemBBox, itemShape.get(), layer ) )
550 *aInheritedNet = aZone->
GetNet();
553 if( *aInheritedNet == aZone->
GetNet() )
564 std::max( 0, clearance -
m_drcEpsilon ), &actual, &pos ) )
566 std::shared_ptr<DRC_ITEM> drce;
569 if( testShorts && actual == 0 && *aInheritedNet )
572 msg.Printf(
_(
"(nets %s and %s)" ),
573 ( *aInheritedNet )->GetNetname(),
579 msg =
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
585 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
586 drce->SetItems( aText, aZone );
596 std::map<BOARD_ITEM*, int> freePadsUsageMap;
597 std::unordered_map<PTR_PTR_CACHE_KEY, layers_checked> checkedPairs;
598 std::mutex checkedPairsMutex;
599 std::mutex freePadsUsageMapMutex;
600 std::atomic<size_t> done( 0 );
603 reportAux( wxT(
"Testing %d tracks & vias..." ), count );
607 auto testTrack = [&](
const int start_idx,
const int end_idx )
609 for(
int trackIdx = start_idx; trackIdx < end_idx; ++trackIdx )
623 if( otherCItem && otherCItem->GetNetCode() == track->
GetNetCode() )
631 if(
static_cast<void*
>( a ) >
static_cast<void*
>( b ) )
634 std::lock_guard<std::mutex> lock( checkedPairsMutex );
635 auto it = checkedPairs.find( { a, b } );
637 if( it != checkedPairs.end() && ( it->second.layers.test( layer )
644 checkedPairs[ { a, b } ].layers.set( layer );
658 std::lock_guard<std::mutex> lock( freePadsUsageMapMutex );
659 auto it = freePadsUsageMap.find( other );
661 if( it == freePadsUsageMap.end() )
663 freePadsUsageMap[ other ] = track->
GetNetCode();
678 if(
static_cast<void*
>( a ) >
static_cast<void*
>( b ) )
684 std::lock_guard<std::mutex> lock( checkedPairsMutex );
685 auto it = checkedPairs.find( { a, b } );
687 if( it != checkedPairs.end() )
688 it->second.has_error =
true;
715 while( done < count )
725 std::this_thread::sleep_for( std::chrono::milliseconds( 250 ) );
743 int padGroupIdx = padToNetTieGroupMap[
pad->GetNumber() ];
747 PAD* otherPad =
static_cast<PAD*
>( other );
749 if( padGroupIdx >= 0 && padGroupIdx == padToNetTieGroupMap[ otherPad->
GetNumber() ] )
750 testClearance = testShorting =
false;
752 if(
pad->SameLogicalPadAs( otherPad ) )
757 testClearance = testShorting =
false;
760 PAD* otherPad =
nullptr;
764 otherPad =
static_cast<PAD*
>( other );
767 otherVia =
static_cast<PCB_VIA*
>( other );
770 testClearance = testShorting =
false;
773 if(
pad->GetAttribute() == PAD_ATTRIB::NPTH && !
pad->FlashLayer( aLayer ) )
774 testClearance = testShorting =
false;
777 testClearance = testShorting =
false;
781 testClearance = testShorting =
false;
783 int padNet =
pad->GetNetCode();
787 otherNet = connectedItem->GetNetCode();
790 if( otherNet && otherNet == padNet )
792 testClearance = testShorting =
false;
796 if( !(
pad->GetDrillSize().x > 0 )
798 && !( otherVia && otherVia->
GetDrill() > 0 ) )
803 if( !testClearance && !testShorting && !testHoles )
812 if( otherPad &&
pad->SameLogicalPadAs( otherPad ) )
822 if(
pad->GetShortNetname().StartsWith( wxS(
"unconnected-(" ) )
831 msg.Printf(
_(
"(nets %s and %s)" ),
835 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
836 drce->SetItems(
pad, otherPad );
844 if( testClearance || testShorting )
859 else if( actual == 0 && otherNet && testShorting )
864 msg.Printf(
_(
"(nets %s and %s)" ),
868 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
869 drce->SetItems(
pad, other );
874 else if( testClearance )
877 wxString msg =
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
882 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
883 drce->SetItems(
pad, other );
901 if( testHoles && otherPad &&
pad->FlashLayer( aLayer ) && otherPad->
HasHole() )
908 wxString msg =
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
913 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
914 drce->SetItems(
pad, other );
921 if( testHoles && otherPad && otherPad->
FlashLayer( aLayer ) &&
pad->HasHole() )
923 if( clearance > 0 && otherShape->Collide(
pad->GetEffectiveHoleShape().get(),
928 wxString msg =
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
933 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
934 drce->SetItems(
pad, other );
942 if( testHoles && otherVia && otherVia->
IsOnLayer( aLayer ) )
949 wxString msg =
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
954 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
955 drce->SetItems(
pad, otherVia );
967 std::atomic<size_t> done( 1 );
970 count += footprint->Pads().size();
972 reportAux( wxT(
"Testing %d pads..." ), count );
974 std::unordered_map<PTR_PTR_CACHE_KEY, int> checkedPairs;
978 std::future<void> retn =
tp.submit(
983 for( PAD* pad : footprint->Pads() )
985 for( PCB_LAYER_ID layer : LSET( pad->GetLayerSet() & boardCopperLayers ).Seq() )
987 if( m_drcEngine->IsCancelled() )
990 std::shared_ptr<SHAPE> padShape = pad->GetEffectiveShape( layer );
992 m_board->m_CopperItemRTreeCache->QueryColliding( pad, layer, layer,
994 [&]( BOARD_ITEM* other ) -> bool
997 BOARD_ITEM* b = other;
1001 if( static_cast<void*>( a ) > static_cast<void*>( b ) )
1004 if( checkedPairs.find( { a, b } ) != checkedPairs.end() )
1010 checkedPairs[ { a, b } ] = 1;
1015 [&]( BOARD_ITEM* other ) -> bool
1017 testPadAgainstItem( pad, padShape.get(), layer, other );
1019 return !m_drcEngine->IsCancelled();
1021 m_board->m_DRCMaxClearance );
1023 for( ZONE* zone : m_board->m_DRCCopperZones )
1025 testItemAgainstZone( pad, zone, layer );
1027 if( m_drcEngine->IsCancelled() )
1032 done.fetch_add( 1 );
1037 std::future_status status = retn.wait_for( std::chrono::milliseconds( 250 ) );
1039 while( status != std::future_status::ready )
1041 reportProgress( done, count );
1042 status = retn.wait_for( std::chrono::milliseconds( 250 ) );
1051 std::atomic<size_t> done( 1 );
1054 count += footprint->GraphicalItems().size();
1056 reportAux( wxT(
"Testing %d graphics..." ), count );
1058 auto isKnockoutText =
1064 auto testGraphicAgainstZone =
1080 if( isKnockoutText( item ) )
1090 std::unordered_map<PTR_PTR_CACHE_KEY, layers_checked> checkedPairs;
1092 auto testCopperGraphic =
1103 if( otherCItem && otherCItem->GetNetCode() == aShape->GetNetCode() )
1118 if(
static_cast<void*
>( a ) >
static_cast<void*
>( b ) )
1121 auto it = checkedPairs.find( { a, b } );
1123 if( it != checkedPairs.end() && it->second.layers.test( layer ) )
1129 checkedPairs[ { a, b } ].layers.set( layer );
1141 if(
static_cast<void*
>( a ) >
static_cast<void*
>( b ) )
1144 auto it = checkedPairs.find( { a, b } );
1147 aShape->GetEffectiveShape().get(),
1150 if( it != checkedPairs.end() )
1151 it->second.has_error =
true;
1159 std::future<void> retn =
tp.submit(
1164 testGraphicAgainstZone( item );
1166 if( item->Type() ==
PCB_SHAPE_T && item->IsOnCopperLayer() )
1167 testCopperGraphic(
static_cast<PCB_SHAPE*
>( item ) );
1169 done.fetch_add( 1 );
1177 for(
BOARD_ITEM* item : footprint->GraphicalItems() )
1179 testGraphicAgainstZone( item );
1181 done.fetch_add( 1 );
1189 std::future_status status = retn.wait_for( std::chrono::milliseconds( 250 ) );
1191 while( status != std::future_status::ready )
1194 status = retn.wait_for( std::chrono::milliseconds( 250 ) );
1205 std::vector<std::map<PCB_LAYER_ID, std::vector<SEG>>> poly_segments;
1210 using report_data = std::tuple<int, int, VECTOR2I, int, int, PCB_LAYER_ID>;
1212 std::vector<std::future<report_data>> futures;
1214 std::atomic<size_t> done( 1 );
1217 [
this, testClearance, testIntersects, &poly_segments, &done]
1218 (
int zoneA,
int zoneB,
int clearance,
PCB_LAYER_ID layer ) -> report_data
1221 std::map<VECTOR2I, int> conflictPoints;
1223 std::vector<SEG>& refSegments = poly_segments[zoneA][layer];
1224 std::vector<SEG>& testSegments = poly_segments[zoneB][layer];
1225 bool reported =
false;
1226 auto invalid_result = std::make_tuple( -1, -1,
VECTOR2I(), 0, 0,
F_Cu );
1228 for(
SEG& refSegment : refSegments )
1230 int ax1 = refSegment.A.x;
1231 int ay1 = refSegment.A.y;
1232 int ax2 = refSegment.B.x;
1233 int ay2 = refSegment.B.y;
1236 for(
SEG& testSegment : testSegments )
1241 int bx1 = testSegment.A.
x;
1242 int by1 = testSegment.A.y;
1243 int bx2 = testSegment.B.x;
1244 int by2 = testSegment.B.y;
1252 int d = GetClearanceBetweenSegments( bx1, by1, bx2, by2, 0,
1253 ax1, ay1, ax2, ay2, 0,
1254 clearance, &pt.
x, &pt.
y );
1258 if( d == 0 && testIntersects )
1260 else if( testClearance )
1265 done.fetch_add( 1 );
1266 return std::make_tuple( zoneA, zoneB, pt, d, clearance, layer );
1271 return invalid_result;
1275 done.fetch_add( 1 );
1276 return invalid_result;
1282 int zone2zoneClearance;
1293 std::vector<SEG>& zone_layer_poly_segs = poly_segments[ii][layer];
1302 if( seg.
A.
x > seg.
B.
x )
1305 zone_layer_poly_segs.push_back( seg );
1308 std::sort( zone_layer_poly_segs.begin(), zone_layer_poly_segs.end() );
1312 std::vector<std::pair<int, int>> zonePairs;
1351 futures.push_back(
tp.submit( checkZones, ia, ia2, zone2zoneClearance, layer ) );
1356 size_t count = futures.size();
1358 for(
auto& task : futures )
1363 std::future_status result;
1367 result = task.wait_for( std::chrono::milliseconds( 250 ) );
1374 if( result == std::future_status::ready )
1376 report_data data = task.get();
1377 int zoneA_idx = std::get<0>( data );
1378 int zoneB_idx = std::get<1>( data );
1380 int actual = std::get<3>( data );
1381 int required = std::get<4>( data );
1384 if( zoneA_idx >= 0 )
1390 std::shared_ptr<DRC_ITEM> drce;
1392 if( actual <= 0 && testIntersects )
1396 else if( testClearance )
1399 wxString msg =
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
1402 std::max( actual, 0 ) );
1404 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
1409 drce->SetItems( zoneA, zoneB );
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
int GetDRCEpsilon() 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
std::vector< ZONE * > m_DRCCopperZones
bool IsLayerEnabled(PCB_LAYER_ID aLayer) const
A proxy function that calls the correspondent function in m_BoardSettings tests whether a given layer...
int GetCopperLayerCount() const
const FOOTPRINTS & Footprints() const
const TRACKS & Tracks() const
std::shared_ptr< DRC_RTREE > m_CopperItemRTreeCache
std::unordered_map< ZONE *, std::unique_ptr< DRC_RTREE > > m_CopperZoneRTreeCache
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
const DRAWINGS & Drawings() 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
bool GetReportAllTrackErrors() const
bool IsErrorLimitExceeded(int error_code)
DRC_CONSTRAINT EvalRules(DRC_CONSTRAINT_T aConstraintType, const BOARD_ITEM *a, const BOARD_ITEM *b, PCB_LAYER_ID aLayer, REPORTER *aReporter=nullptr)
bool IsNetTieExclusion(int aTrackNetCode, PCB_LAYER_ID aTrackLayer, const VECTOR2I &aCollisionPos, BOARD_ITEM *aCollidingItem)
Check if the given collision between a track and another item occurs during the track's entry into a ...
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.
void ReportAndShowPathCuToCu(std::shared_ptr< DRC_ITEM > &aDrce, const VECTOR2I &aMarkerPos, int aMarkerLayer, const BOARD_ITEM *aItem1, const BOARD_ITEM *aItem2, PCB_LAYER_ID layer, int aDistance)
void testPadAgainstItem(PAD *pad, SHAPE *padShape, PCB_LAYER_ID layer, BOARD_ITEM *other)
struct DRC_TEST_PROVIDER_COPPER_CLEARANCE::checked layers_checked
virtual bool Run() override
Run this provider against the given PCB with configured options (if any).
DRC_TEST_PROVIDER_COPPER_CLEARANCE()
void testItemAgainstZone(BOARD_ITEM *aItem, ZONE *aZone, PCB_LAYER_ID aLayer)
void testGraphicClearances()
void testTrackClearances()
virtual ~DRC_TEST_PROVIDER_COPPER_CLEARANCE()
virtual const wxString GetDescription() const override
virtual const wxString GetName() const override
void testKnockoutTextAgainstZone(BOARD_ITEM *aText, NETINFO_ITEM **aInheritedNet, ZONE *aZone)
bool testSingleLayerItemAgainstItem(BOARD_CONNECTED_ITEM *item, SHAPE *itemShape, PCB_LAYER_ID layer, BOARD_ITEM *other)
Checks for track/via/hole <-> clearance.
wxString formatMsg(const wxString &aFormatString, const wxString &aSource, double aConstraint, double aActual)
virtual bool reportPhase(const wxString &aStageName)
virtual void reportViolation(std::shared_ptr< DRC_ITEM > &item, const VECTOR2I &aMarkerPos, int aMarkerLayer)
void reportAux(const wxString &aMsg)
virtual void reportRuleStatistics()
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.
LSET is a set of PCB_LAYER_IDs.
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
LSEQ Seq(const LSEQ &aSequence) const
Return an LSEQ from the union of this LSET and a desired sequence.
bool Contains(PCB_LAYER_ID aLayer) const
See if the layer set contains a PCB layer.
Handle the data for a net.
bool FlashLayer(int aLayer, bool aOnlyCheckIfPermitted=false) const
Check to see whether the pad should be flashed on the specific layer.
const VECTOR2I & GetDrillSize() const
PAD_ATTRIB GetAttribute() const
const wxString & GetNumber() const
VECTOR2I GetPosition() const override
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 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.
int FullPointCount() const
Return the number of points in the shape poly set.
void BuildBBoxCaches() const
Construct BBoxCaches for Contains(), below.
SEGMENT_ITERATOR IterateSegmentsWithHoles()
Returns an iterator object, for all outlines in the set (with holes)
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
virtual PCB_LAYER_ID GetLayer() const override
Return the primary layer this item is on.
virtual bool IsOnLayer(PCB_LAYER_ID) const override
Test to see if this object is on the given layer.
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
@ HOLE_CLEARANCE_CONSTRAINT
bool IsCopperLayer(int aLayerId)
Tests 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
std::optional< VECTOR2I > OPT_VECTOR2I
static bool Collide(const SHAPE_CIRCLE &aA, const SHAPE_CIRCLE &aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV)
checked(PCB_LAYER_ID aLayer)
BS::thread_pool thread_pool
thread_pool & GetKiCadThreadPool()
Get a reference to the current thread pool.
@ 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_TEXT_T
class PCB_TEXT, text on a layer
@ PCB_REFERENCE_IMAGE_T
class PCB_REFERENCE_IMAGE, bitmap on a layer
@ 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