70 virtual bool Run()
override;
72 virtual const wxString
GetName()
const override {
return wxT(
"clearance" ); };
109 if(
m_board->m_DRCMaxClearance <= 0 )
111 REPORT_AUX( wxT(
"No Clearance constraints found. Tests not run." ) );
119 if( !
reportPhase(
_(
"Checking track & via clearances..." ) ) )
126 if( !
reportPhase(
_(
"Checking hole clearances..." ) ) )
150 if( !
reportPhase(
_(
"Checking copper graphic clearances..." ) ) )
158 if( !
reportPhase(
_(
"Checking copper zone clearances..." ) ) )
187 bool has_error =
false;
192 net = connectedItem->GetNet();
197 otherNet = connectedItem->GetNet();
200 SHAPE* otherShape = otherShapeStorage.get();
207 testClearance = testShorting =
false;
210 if( testClearance || testShorting )
222 std::swap( item, other );
223 std::swap( itemShape, otherShape );
224 std::swap( net, otherNet );
239 drcItem->SetItems( item, other );
255 else if(
actual == 0 && otherNet && testShorting )
260 msg.Printf(
_(
"(nets %s and %s)" ),
262 otherNet ? otherNet->
GetNetname() :
_(
"<no net>" ) );
264 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
265 drce->SetItems( item, other );
273 else if( testClearance )
276 wxString msg =
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
281 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
282 drce->SetItems( item, other );
296 std::array<BOARD_ITEM*, 2> a{ item, other };
297 std::array<BOARD_ITEM*, 2> b{ other, item };
298 std::array<SHAPE*, 2> a_shape{ itemShape, otherShape };
300 for(
size_t ii = 0; ii < 2; ++ii )
302 std::shared_ptr<SHAPE_SEGMENT> holeShape;
306 if( !(
dynamic_cast<PCB_TRACK*
>( a[ii] ) ) || !b[ii]->HasHole() )
311 if( b[ii]->GetLayerSet().Contains( layer ) )
312 holeShape = b[ii]->GetEffectiveHoleShape();
316 holeShape = b[ii]->GetEffectiveHoleShape();
331 :
_(
"(%s clearance %s; actual < 0)" ),
336 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
337 drce->SetItems( a[ii], b[ii] );
364 BOX2I worstCaseBBox = itemBBox;
376 std::set<PAD*> allowedNetTiePads;
382 if(
pad->IsOnLayer( aLayer ) )
383 allowedNetTiePads.insert(
pad );
387 if( other->IsOnLayer( aLayer ) )
388 allowedNetTiePads.insert( other );
393 if( !allowedNetTiePads.empty() )
397 for(
PAD*
pad : allowedNetTiePads )
399 if(
pad->GetBoundingBox().Intersects( itemBBox )
400 &&
pad->GetEffectiveShape( aLayer )->Collide( itemShape.get() ) )
411 if( !testClearance && !testHoles )
427 bool flashedPad =
pad->FlashLayer( aLayer );
430 if( !flashedPad && !platedHole )
431 testClearance =
false;
448 wxString msg =
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
453 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
454 drce->SetItems( aItem, aZone );
460 if( testHoles && aItem->
HasHole() )
462 std::shared_ptr<SHAPE_SEGMENT> holeShape;
486 wxString msg =
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
491 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
492 drce->SetItems( aItem, aZone );
514 if( !testClearance && !testShorts )
523 BOX2I worstCaseBBox = itemBBox;
537 if( *aInheritedNet ==
nullptr )
539 if( zoneTree->
QueryColliding( itemBBox, itemShape.get(), layer ) )
540 *aInheritedNet = aZone->
GetNet();
543 if( *aInheritedNet == aZone->
GetNet() )
556 std::shared_ptr<DRC_ITEM> drce;
559 if( testShorts &&
actual == 0 && *aInheritedNet )
562 msg.Printf(
_(
"(nets %s and %s)" ),
563 ( *aInheritedNet )->GetNetname(),
569 msg =
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
575 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
576 drce->SetItems( aText, aZone );
586 std::map<BOARD_ITEM*, int> freePadsUsageMap;
587 std::unordered_map<PTR_PTR_CACHE_KEY, LAYERS_CHECKED> checkedPairs;
588 std::mutex checkedPairsMutex;
589 std::mutex freePadsUsageMapMutex;
590 std::atomic<size_t> done( 0 );
591 size_t count =
m_board->Tracks().size();
593 REPORT_AUX( wxString::Format( wxT(
"Testing %d tracks & vias..." ), count ) );
598 [&](
const int trackIdx )
606 m_board->m_CopperItemRTreeCache->QueryColliding( track, layer, layer,
620 if(
static_cast<void*
>( a ) >
static_cast<void*
>( b ) )
623 std::lock_guard<std::mutex> lock( checkedPairsMutex );
624 auto it = checkedPairs.find( { a, b } );
626 if( it != checkedPairs.end()
627 && ( it->second.layers.test( layer ) || ( it->second.has_error ) ) )
633 checkedPairs[ { a, b } ].layers.set( layer );
647 std::lock_guard<std::mutex> lock( freePadsUsageMapMutex );
648 auto it = freePadsUsageMap.find( other );
650 if( it == freePadsUsageMap.end() )
652 freePadsUsageMap[ other ] = track->
GetNetCode();
672 if(
static_cast<void*
>( a ) >
static_cast<void*
>( b ) )
675 std::lock_guard<std::mutex> lock( checkedPairsMutex );
676 auto it = checkedPairs.find( { a, b } );
678 if( it != checkedPairs.end() )
679 it->second.has_error =
true;
703 auto track_futures =
tp.submit_loop( 0,
m_board->Tracks().size(), testTrack );
705 while( done < count )
712 track_futures.wait();
716 std::this_thread::sleep_for( std::chrono::milliseconds( 250 ) );
734 int padGroupIdx = padToNetTieGroupMap[
pad->GetNumber() ];
738 PAD* otherPad =
static_cast<PAD*
>( other );
740 if( padGroupIdx >= 0 && padGroupIdx == padToNetTieGroupMap[ otherPad->
GetNumber() ] )
741 testClearance = testShorting =
false;
743 if(
pad->SameLogicalPadAs( otherPad ) )
748 testClearance = testShorting =
false;
752 PAD* otherPad =
nullptr;
756 otherPad =
static_cast<PAD*
>( other );
759 otherVia =
static_cast<PCB_VIA*
>( other );
762 testClearance = testShorting =
false;
766 testClearance = testShorting =
false;
769 testClearance = testShorting =
false;
773 testClearance = testShorting =
false;
775 int padNet =
pad->GetNetCode();
776 int otherNet = otherCItem ? otherCItem->
GetNetCode() : 0;
779 if( otherNet && otherNet == padNet )
781 testClearance = testShorting =
false;
785 if( !(
pad->GetDrillSize().x > 0 )
787 && !( otherVia && otherVia->
GetDrill() > 0 ) )
792 if( !testClearance && !testShorting && !testHoles )
800 bool has_error =
false;
802 if( otherPad &&
pad->SameLogicalPadAs( otherPad ) )
812 if(
pad->GetShortNetname().StartsWith( wxS(
"unconnected-(" ) )
821 msg.Printf(
_(
"(nets %s and %s)" ),
825 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
826 drce->SetItems(
pad, otherPad );
835 if( testClearance || testShorting )
845 if(
m_drcEngine->IsNetTieExclusion(
pad->GetNetCode(), aLayer, pos, other ) )
850 else if(
actual == 0 && padNet && otherNet && testShorting )
853 wxString msg = wxString::Format(
_(
"(nets %s and %s)" ),
857 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
858 drce->SetItems(
pad, other );
864 else if( testClearance )
867 wxString msg =
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
872 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
873 drce->SetItems(
pad, other );
892 if( testHoles && otherPad &&
pad->FlashLayer( aLayer ) && otherPad->
HasHole() )
899 wxString msg =
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
904 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
905 drce->SetItems(
pad, other );
913 if( testHoles && otherPad && otherPad->
FlashLayer( aLayer ) &&
pad->HasHole() )
915 if(
clearance > 0 && otherShape->Collide(
pad->GetEffectiveHoleShape().get(),
920 wxString msg =
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
925 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
926 drce->SetItems(
pad, other );
935 if( testHoles && otherVia && otherVia->
IsOnLayer( aLayer ) )
942 wxString msg =
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
947 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
948 drce->SetItems(
pad, otherVia );
962 std::atomic<size_t> done( 1 );
964 std::unordered_map<PTR_PTR_CACHE_KEY, LAYERS_CHECKED> checkedPairs;
965 std::mutex checkedPairsMutex;
969 const auto fp_check =
981 std::shared_ptr<SHAPE> padShape =
pad->GetEffectiveShape( layer );
983 m_board->m_CopperItemRTreeCache->QueryColliding(
pad, layer, layer,
992 if(
static_cast<void*
>( a ) >
static_cast<void*
>( b ) )
995 std::lock_guard<std::mutex> lock( checkedPairsMutex );
996 auto it = checkedPairs.find( { a, b } );
998 if( it != checkedPairs.end()
999 && ( it->second.layers.test( layer ) || it->second.has_error ) )
1005 checkedPairs[ { a, b } ].layers.set( layer );
1017 std::lock_guard<std::mutex> lock( checkedPairsMutex );
1018 auto it = checkedPairs.find( { a, b } );
1020 if( it != checkedPairs.end() )
1021 it->second.has_error =
true;
1038 done.fetch_add( 1 );
1041 size_t numFootprints =
m_board->Footprints().size();
1042 auto returns =
tp.submit_loop( 0, numFootprints, fp_check );
1045 for(
size_t ii = 0; ii < returns.size(); ++ii )
1047 while( returns[ii].wait_for( std::chrono::milliseconds( 250 ) ) != std::future_status::ready )
1056 size_t count =
m_board->Drawings().size();
1057 std::atomic<size_t> done( 1 );
1060 count += footprint->GraphicalItems().size();
1062 REPORT_AUX( wxString::Format( wxT(
"Testing %d graphics..." ), count ) );
1064 auto isKnockoutText =
1070 auto testGraphicAgainstZone =
1086 if( isKnockoutText( item ) )
1096 std::unordered_map<PTR_PTR_CACHE_KEY, LAYERS_CHECKED> checkedPairs;
1097 std::mutex checkedPairsMutex;
1099 auto testCopperGraphic =
1100 [
this, &checkedPairs, &checkedPairsMutex](
PCB_SHAPE* aShape )
1104 m_board->m_CopperItemRTreeCache->QueryColliding( aShape, layer, layer,
1110 if( otherCItem && otherCItem->GetNetCode() == aShape->GetNetCode() )
1125 if(
static_cast<void*
>( a ) >
static_cast<void*
>( b ) )
1128 std::lock_guard<std::mutex> lock( checkedPairsMutex );
1129 auto it = checkedPairs.find( { a, b } );
1131 if( it != checkedPairs.end() && it->second.layers.test( layer ) )
1137 checkedPairs[ { a, b } ].layers.set( layer );
1154 (void)
tp.submit_task(
1155 [
this, item, &done, testGraphicAgainstZone, testCopperGraphic]()
1157 if( !m_drcEngine->IsCancelled() )
1159 testGraphicAgainstZone( item );
1161 if( item->Type() == PCB_SHAPE_T && item->IsOnCopperLayer() )
1162 testCopperGraphic( static_cast<PCB_SHAPE*>( item ) );
1164 done.fetch_add( 1 );
1169 for(
FOOTPRINT* footprint : m_board->Footprints() )
1171 (void)
tp.submit_task(
1172 [
this, footprint, &done, testGraphicAgainstZone]()
1174 for( BOARD_ITEM* item : footprint->GraphicalItems() )
1176 if( !m_drcEngine->IsCancelled() )
1178 testGraphicAgainstZone( item );
1180 done.fetch_add( 1 );
1188 reportProgress( done, count );
1190 if( m_drcEngine->IsCancelled() )
1193 if(
tp.wait_for( std::chrono::milliseconds( 250 ) ) )
1204 std::vector<std::map<PCB_LAYER_ID, std::vector<SEG>>> poly_segments;
1205 poly_segments.resize(
m_board->m_DRCCopperZones.size() );
1208 std::atomic<size_t> done( 0 );
1211 auto reportZoneZoneViolation =
1215 std::shared_ptr<DRC_ITEM> drce;
1217 if( constraint.IsNull() )
1220 wxString msg =
_(
"(intersecting zones must have distinct priorities)" );
1221 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
1222 drce->SetItems( zoneA, zoneB );
1228 wxString msg =
formatMsg(
_(
"(%s clearance %s; actual %s)" ),
1229 constraint.GetName(),
1230 constraint.GetValue().Min(),
1233 drce->SetErrorMessage( drce->GetErrorText() + wxS(
" " ) + msg );
1234 drce->SetItems( zoneA, zoneB );
1235 drce->SetViolatingRule( constraint.GetParentRule() );
1241 [
this, testClearance, testIntersects, reportZoneZoneViolation, &poly_segments, &done]
1242 (
int zoneA_idx,
int zoneB_idx,
bool sameNet,
PCB_LAYER_ID layer ) ->
void
1244 ZONE* zoneA =
m_board->m_DRCCopperZones[zoneA_idx];
1245 ZONE* zoneB =
m_board->m_DRCCopperZones[zoneB_idx];
1249 if( sameNet && testIntersects )
1253 done.fetch_add( 1 );
1258 else if( !sameNet && testClearance )
1265 std::map<VECTOR2I, int> conflictPoints;
1267 std::vector<SEG>& refSegments = poly_segments[zoneA_idx][layer];
1268 std::vector<SEG>& testSegments = poly_segments[zoneB_idx][layer];
1271 for(
SEG& refSegment : refSegments )
1274 for(
SEG& testSegment : testSegments )
1278 if( refSegment.B.x < testSegment.A.x )
1281 int64_t dist_sq = 0;
1283 refSegment.NearestPoints( testSegment, pt, other_pt, dist_sq );
1284 actual = std::floor( std::sqrt( dist_sq ) + 0.5 );
1288 done.fetch_add( 1 );
1289 reportZoneZoneViolation( zoneA, zoneB, pt,
actual, constraint, layer );
1297 done.fetch_add( 1 );
1301 std::map<PCB_LAYER_ID, std::vector<size_t>> zone_idx_by_layer;
1303 for (
size_t ii = 0; ii <
m_board->m_DRCCopperZones.size(); ii++ )
1312 zone_idx_by_layer[layer].push_back( ii );
1319 if( !
m_board->IsLayerEnabled( layer ) )
1322 for(
size_t ii : zone_idx_by_layer[layer] )
1326 std::vector<SEG>& zone_layer_poly_segs = poly_segments[ii][layer];
1327 zone_layer_poly_segs.reserve( poly->FullPointCount() );
1329 for(
auto it = poly->IterateSegmentsWithHoles(); it; it++ )
1333 if( seg.
A.
x > seg.
B.
x )
1336 zone_layer_poly_segs.push_back( seg );
1339 std::sort( zone_layer_poly_segs.begin(), zone_layer_poly_segs.end() );
1343 for(
auto it_a = zone_idx_by_layer[layer].begin(); it_a != zone_idx_by_layer[layer].end(); ++it_a )
1348 for(
auto it_a2 = std::next( it_a ); it_a2 != zone_idx_by_layer[layer].end(); ++it_a2 )
1350 size_t ia2 = *it_a2;
1373 polyA = zoneA->
GetFill( layer );
1374 polyB = zoneB->
GetFill( layer );
1381 (void)
tp.submit_task(
1382 [checkZones, ia, ia2, sameNet, layer]()
1384 checkZones( ia, ia2, sameNet, layer );
1397 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.
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)
DRC_TEST_PROVIDER_CLEARANCE_BASE()
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.
void testItemAgainstZone(BOARD_ITEM *aItem, ZONE *aZone, PCB_LAYER_ID aLayer)
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)
virtual void reportViolation(std::shared_ptr< DRC_ITEM > &item, const VECTOR2I &aMarkerPos, int aMarkerLayer, const std::vector< PCB_SHAPE > &aShapes={})
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.
LSET is a set of PCB_LAYER_IDs.
static 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.
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.
bool Collide(const SHAPE *aShape, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override
Check if the boundary of shape (this) lies closer to the shape aShape than aClearance,...
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.
SHAPE_POLY_SET * Outline()
SHAPE_POLY_SET * GetFill(PCB_LAYER_ID aLayer)
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
unsigned GetAssignedPriority() const
@ 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::thread_pool< 0 > 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