69 wxLogWarning( wxT(
"Attempting to call fromTo() with non-existent from-to cache." ) );
83#define MISSING_LAYER_ARG( f ) wxString::Format( _( "Missing layer name argument to %s." ), f )
98 if( !arg || arg->
AsString().IsEmpty() )
107 [item, arg, aCtx]() ->
double
109 const wxString& layerName = arg->
AsString();
118 bool anyMatch =
false;
120 for(
unsigned ii = 0; ii < layerMap.GetCount(); ++ii )
122 wxPGChoiceEntry& entry = layerMap[ ii ];
124 if( entry.GetText().Matches( layerName ))
135 aCtx->
ReportError( wxString::Format(
_(
"Unrecognized layer '%s'" ),
150 std::shared_lock<std::shared_mutex> readLock( board->
m_CachesMutex );
155 return ( item->
GetLayerSet() & i->second ).any() ? 1.0 : 0.0;
160 for(
unsigned ii = 0; ii < layerMap.GetCount(); ++ii )
162 wxPGChoiceEntry& entry = layerMap[ ii ];
164 if( entry.GetText().Matches( layerName ) )
169 std::unique_lock<std::shared_mutex> writeLock( board->
m_CachesMutex );
173 return ( item->
GetLayerSet() & mask ).any() ? 1.0 : 0.0;
210 if(
ZONE* zone =
dynamic_cast<ZONE*
>( aItem ) )
211 aItemShape.reset( zone->Outline()->Clone() );
216 return footprintCourtyard.
Collide( aItemShape.get() );
229 if( aSelector.IsEmpty() )
233 if( aSelector[0] ==
'$' && aSelector.Last() ==
'}' && aSelector.Upper().StartsWith( wxT(
"${CLASS:" ) ) )
235 wxString
name = aSelector.Mid( 8, aSelector.Length() - 9 );
246 else if( aSelector.Find(
':' ) != wxNOT_FOUND && aFp->
GetFPIDAsString().Matches( aSelector ) )
256 const std::function<
bool(
FOOTPRINT* )>& aFunc )
258 if( aArg == wxT(
"A" ) )
262 if( fp && aFunc( fp ) )
265 else if( aArg == wxT(
"B" ) )
269 if( fp && aFunc( fp ) )
282#define MISSING_FP_ARG( f ) \
283 wxString::Format( _( "Missing footprint argument (A, B, or reference designator) to %s." ), f )
294 if( !arg || arg->
AsString().IsEmpty() )
309 [item, arg, context]() ->
double
312 std::shared_ptr<SHAPE> itemShape;
317 PTR_PTR_CACHE_KEY key = { fp, item };
321 std::shared_lock<std::shared_mutex> readLock( board->m_CachesMutex );
323 auto i = board->m_IntersectsCourtyardCache.find( key );
325 if( i != board->m_IntersectsCourtyardCache.end() )
334 std::unique_lock<std::shared_mutex> cacheLock( board->m_CachesMutex );
335 board->m_IntersectsCourtyardCache[ key ] = res;
358 if( !arg || arg->
AsString().IsEmpty() )
373 [item, arg, context]() ->
double
376 std::shared_ptr<SHAPE> itemShape;
381 PTR_PTR_CACHE_KEY key = { fp, item };
385 std::shared_lock<std::shared_mutex> readLock( board->m_CachesMutex );
387 auto i = board->m_IntersectsFCourtyardCache.find( key );
389 if( i != board->m_IntersectsFCourtyardCache.end() )
399 std::unique_lock<std::shared_mutex> writeLock( board->m_CachesMutex );
400 board->m_IntersectsFCourtyardCache[ key ] = res;
423 if( !arg || arg->
AsString().IsEmpty() )
438 [item, arg, context]() ->
double
441 std::shared_ptr<SHAPE> itemShape;
446 PTR_PTR_CACHE_KEY key = { fp, item };
450 std::shared_lock<std::shared_mutex> readLock( board->m_CachesMutex );
452 auto i = board->m_IntersectsBCourtyardCache.find( key );
454 if( i != board->m_IntersectsBCourtyardCache.end() )
464 std::unique_lock<std::shared_mutex> writeLock( board->m_CachesMutex );
465 board->m_IntersectsBCourtyardCache[ key ] = res;
483 std::shared_lock<std::shared_mutex> readLock( aBoard->
m_CachesMutex );
498 std::unique_lock<std::shared_mutex> writeLock( aBoard->
m_CachesMutex );
544 aCtx->
ReportError(
_(
"Footprint's courtyard is not a single, closed shape." ) );
556 aCtx->
ReportError(
_(
"Footprint has no front courtyard." ) );
571 aCtx->
ReportError(
_(
"Footprint has no back courtyard." ) );
584 ZONE* zone =
static_cast<ZONE*
>( aItem );
610 const std::function<
bool(
ZONE* )>& aFunc )
612 if( aArg == wxT(
"A" ) )
614 return aFunc(
dynamic_cast<ZONE*
>( aCtx->
GetItem( 0 ) ) );
616 else if( aArg == wxT(
"B" ) )
618 return aFunc(
dynamic_cast<ZONE*
>( aCtx->
GetItem( 1 ) ) );
627 auto it = cache.find( target );
629 if( it != cache.end() && it->second->Type() ==
PCB_ZONE_T )
630 return aFunc(
static_cast<ZONE*
>( it->second ) );
638 std::vector<ZONE*> matchingZones;
639 bool cacheHit =
false;
642 std::shared_lock<std::shared_mutex> readLock( aBoard->
m_CachesMutex );
647 matchingZones = it->second;
656 if( area->GetZoneName().Matches( aArg ) )
657 matchingZones.push_back( area );
662 for(
ZONE* area : footprint->Zones() )
664 if( area->GetZoneName().Matches( aArg ) )
665 matchingZones.push_back( area );
671 std::unique_lock<std::shared_mutex> writeLock( aBoard->
m_CachesMutex );
676 for(
ZONE* area : matchingZones )
703 m_item->SetLayerSet(
m_item->GetLayerSet().set( aLayer ) );
712#define MISSING_AREA_ARG( f ) \
713 wxString::Format( _( "Missing rule-area argument (A, B, or rule-area name) to %s." ), f )
724 if( !arg || arg->
AsString().IsEmpty() )
739 [item, arg, context]() ->
double
748 if( !aArea || aArea == item || aArea->GetParent() == item )
751 SCOPED_LAYERSET scopedLayerSet( aArea );
753 if( context->GetConstraint() == SILK_CLEARANCE_CONSTRAINT )
756 if( ( aArea->IsOnLayer( F_SilkS ) && IsFrontLayer( aLayer ) )
757 || ( aArea->IsOnLayer( B_SilkS ) && IsBackLayer( aLayer ) ) )
759 scopedLayerSet.Add( aLayer );
765 if( !commonLayers.any() )
774 testLayers.
set( aLayer );
776 testLayers = commonLayers;
779 std::vector<PCB_LAYER_ID> layersToCompute;
783 std::shared_lock<std::shared_mutex> readLock( board->m_CachesMutex );
785 for( PCB_LAYER_ID layer : testLayers.UIOrder() )
787 PTR_PTR_LAYER_CACHE_KEY key = { aArea, item, layer };
788 auto i = board->m_IntersectsAreaCache.find( key );
790 if( i != board->m_IntersectsAreaCache.end() )
797 layersToCompute.push_back( layer );
804 layersToCompute.push_back( layer );
807 std::vector<std::pair<PTR_PTR_LAYER_CACHE_KEY, bool>> results;
808 bool anyCollision =
false;
815 results.push_back( { { aArea, item, layer }, collides } );
821 if( !isTransient && !results.empty() )
823 std::unique_lock<std::shared_mutex> writeLock( board->m_CachesMutex );
825 for( const auto& [key, collides] : results )
826 board->m_IntersectsAreaCache[key] = collides;
849 if( !arg || arg->
AsString().IsEmpty() )
864 [item, arg, context]() ->
double
874 if( !aArea || aArea == item || aArea->GetParent() == item )
877 if( item->Type() != PCB_FOOTPRINT_T )
879 if( !( aArea->GetLayerSet() & item->GetLayerSet() ).any() )
890 std::shared_lock<std::shared_mutex> readLock( board->m_CachesMutex );
892 auto i = board->m_EnclosedByAreaCache.find( key );
894 if( i != board->m_EnclosedByAreaCache.end() )
903 itemShape = *static_cast<ZONE*>( item )->Outline();
907 FOOTPRINT* fp = static_cast<FOOTPRINT*>( item );
909 for( PCB_LAYER_ID testLayer : aArea->GetLayerSet() )
911 fp->TransformPadsToPolySet( itemShape, testLayer, 0,
912 maxError, ERROR_OUTSIDE );
913 fp->TransformFPShapesToPolySet( itemShape, testLayer, 0,
914 maxError, ERROR_OUTSIDE );
923 if( itemShape.IsEmpty() )
926 enclosedByArea = false;
930 itemShape.BooleanSubtract( *aArea->Outline() );
932 enclosedByArea = itemShape.IsEmpty();
937 std::unique_lock<std::shared_mutex> writeLock( board->m_CachesMutex );
938 board->m_EnclosedByAreaCache[ key ] = enclosedByArea;
941 return enclosedByArea;
952#define MISSING_GROUP_ARG( f ) \
953 wxString::Format( _( "Missing group name argument to %s." ), f )
963 if( !arg || arg->
AsString().IsEmpty() )
978 [item, arg]() ->
double
998#define MISSING_SHEET_ARG( f ) \
999 wxString::Format( _( "Missing sheet name argument to %s." ), f )
1009 if( !arg || arg->
AsString().IsEmpty() )
1024 [item, arg]() ->
double
1035 wxString refName = arg->
AsString();
1037 if( sheetName.EndsWith( wxT(
"/" ) ) )
1038 sheetName.RemoveLast();
1039 if( refName.EndsWith( wxT(
"/" ) ) )
1040 refName.RemoveLast();
1042 if( sheetName.Matches( refName ) )
1045 if( ( refName.Matches( wxT(
"/" ) ) || refName.IsEmpty() )
1046 && sheetName.IsEmpty() )
1064 if( !arg || arg->
AsString().IsEmpty() )
1079 [item, arg]() ->
double
1090 wxString refName = arg->
AsString();
1092 if( sheetName.EndsWith( wxT(
"/" ) ) )
1093 sheetName.RemoveLast();
1094 if( refName.EndsWith( wxT(
"/" ) ) )
1095 refName.RemoveLast();
1097 wxArrayString sheetPath = wxSplit( sheetName,
'/' );
1098 wxArrayString refPath = wxSplit( refName,
'/' );
1100 if( refPath.size() > sheetPath.size() )
1103 if( ( refName.Matches( wxT(
"/" ) ) || refName.IsEmpty() ) && sheetName.IsEmpty() )
1108 for(
size_t i = 0; i < refPath.size(); i++ )
1110 if( !sheetPath[i].Matches( refPath[i] ) )
1119#define MISSING_REF_ARG( f ) \
1120 wxString::Format( _( "Missing footprint argument (reference designator) to %s." ), f )
1130 if( !arg || arg->
AsString().IsEmpty() )
1145 [item, arg]() ->
double
1210 if(
via->IsBlindVia() ||
via->IsBuriedVia() )
1227 [a, b, context]() ->
double
1234 wxString coupledNet;
1249 if( board->FindNet( coupledNet ) )
1262#define MISSING_DP_ARG( f ) \
1263 wxString::Format( _( "Missing diff-pair name argument to %s." ), f )
1275 if( !argv || argv->
AsString().IsEmpty() )
1287 [item, argv]() ->
double
1298 wxString baseName, coupledNet;
1303 if( baseName.Matches( arg ) )
1306 if( baseName.EndsWith(
"_" ) && baseName.BeforeLast(
'_' ).Matches( arg ) )
1326 if( !argv || argv->
AsString().IsEmpty() )
1330 _(
"Missing argument to '%s'" ), wxT(
"inNetChain()" ) ) );
1339 [item, argv]() ->
double
1350 const wxString& chainName = netinfo->
GetNetChain();
1352 if( chainName.IsEmpty() )
1357 return chainName.Matches( arg ) ? 1.0 : 0.0;
1383 return ( netinfo && !netinfo->
GetNetChain().IsEmpty() ) ? 1.0 : 0.0;
1398 if( !argv || argv->
AsString().IsEmpty() )
1402 _(
"Missing argument to '%s'" ), wxT(
"inNetChainClass()" ) ) );
1411 [item, argv]() ->
double
1422 const wxString& chainName = netinfo->
GetNetChain();
1424 if( chainName.IsEmpty() )
1429 std::shared_ptr<NET_SETTINGS> ns = board->GetDesignSettings().m_NetSettings;
1433 const wxString& className = ns->GetNetChainClass( chainName );
1435 if( className.IsEmpty() )
1440 return className.Matches( arg ) ? 1.0 : 0.0;
1463 aCtx->
ReportError( wxString::Format(
_(
"Missing field name argument to %s." ),
1464 wxT(
"getField()" ) ) );
1474 [item, arg]() -> wxString
1499 if( !arg || arg->
AsString().IsEmpty() )
1502 aCtx->
ReportError(
_(
"Missing netclass name argument to hasNetclass()" ) );
1514 [item, arg]() ->
double
1538 if( !arg || arg->
AsString().IsEmpty() )
1541 aCtx->
ReportError(
_(
"Missing netclass name argument to hasExactNetclass()" ) );
1553 [item, arg]() ->
double
1560 wxString netclassName;
1564 std::shared_lock<std::shared_mutex> readLock( board->
m_CachesMutex );
1569 netclassName = it->second;
1572 if( netclassName.empty() )
1577 netclassName = netclass->
GetName();
1581 std::unique_lock<std::shared_mutex> writeLock( board->
m_CachesMutex );
1586 return ( netclassName == arg->
AsString() ) ? 1.0 : 0.0;
1599 if( !arg || arg->
AsString().IsEmpty() )
1602 aCtx->
ReportError(
_(
"Missing component class name argument to hasComponentClass()" ) );
1614 [item, arg]() ->
double
1619 footprint =
static_cast<FOOTPRINT*
>( item );
constexpr int ARC_LOW_DEF
BASE_SET & set(size_t pos)
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
virtual NETCLASS * GetEffectiveNetClass() const
Return the NETCLASS for this item.
wxString GetNetname() const
NETINFO_ITEM * GetNet() const
Return #NET_INFO object for a given item.
int GetDRCEpsilon() const
Return an epsilon which accounts for rounding errors, etc.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual bool IsConnected() const
Returns information if the object is derived from BOARD_CONNECTED_ITEM.
virtual void TransformShapeToPolygon(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aError, ERROR_LOC aErrorLoc, bool ignoreLineWidth=false) const
Convert the item shape to a closed polygon.
virtual bool IsOnLayer(PCB_LAYER_ID aLayer) const
Test to see if this object is on the given layer.
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.
virtual const BOARD * GetBoard() const
Return the BOARD in which this BOARD_ITEM resides, or NULL if none.
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
Information pertinent to a Pcbnew printed circuit board.
std::unordered_map< const BOARD_ITEM *, wxString > m_ItemNetclassCache
NETINFO_ITEM * FindNet(int aNetcode) const
Search for a net with the given netcode.
const ZONES & Zones() const
const FOOTPRINTS & Footprints() const
std::unordered_map< wxString, LSET > m_LayerExpressionCache
std::unordered_map< const ZONE *, SHAPE_POLY_SET > m_DeflatedZoneOutlineCache
std::unordered_map< ZONE *, std::unique_ptr< DRC_RTREE > > m_CopperZoneRTreeCache
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
std::shared_mutex m_CachesMutex
const std::unordered_map< KIID, BOARD_ITEM * > & GetItemByIdCache() const
std::unordered_map< wxString, std::vector< ZONE * > > m_ZonesByNameCache
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Return a list of missing connections between components/tracks.
constexpr bool Intersects(const BOX2< Vec > &aRect) const
A lightweight representation of a component class.
bool ContainsClassName(const wxString &className) const
Determines if this (effective) component class contains a specific constituent class.
std::shared_ptr< FROM_TO_CACHE > GetFromToCache()
static int MatchDpSuffix(const wxString &aNetName, wxString &aComplementNet, wxString &aBaseDpName)
Check if the given net is a diff pair, returning its polarity and complement if so.
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.
A set of EDA_ITEMs (i.e., without duplicates).
virtual const BOX2I GetBoundingBox() const
Return the orthogonal bounding box of this object for display purposes.
virtual EDA_GROUP * GetParentGroup() const
KICAD_T Type() const
Returns the type of object.
EDA_ITEM_FLAGS GetFlags() const
virtual const wxString & GetText() const
Return the string associated with the text object.
static ENUM_MAP< T > & Instance()
static bool SniffTest(const wxString &aCandidate)
Returns true if a string has the correct formatting to be a KIID.
void ReportError(const wxString &aErrorMsg)
virtual const wxString & AsString() const
LSET is a set of PCB_LAYER_IDs.
static const LSET & FrontMask()
Return a mask holding all technical layers and the external CU layer on front side.
static const LSET & BackMask()
Return a mask holding all technical layers and the external CU layer on back side.
bool Contains(PCB_LAYER_ID aLayer) const
See if the layer set contains a PCB layer.
A collection of nets and the parameters used to route or test these nets.
bool ContainsNetclassWithName(const wxString &netclass) const
Determines if the given netclass name is a constituent of this (maybe aggregate) netclass.
const wxString GetName() const
Gets the name of this (maybe aggregate) netclass in a format for internal usage or for export to exte...
Handle the data for a net.
const wxString & GetNetChain() const
const wxString & GetNetname() const
PAD_ATTRIB GetAttribute() const
PCBEXPR_BUILTIN_FUNCTIONS()
void RegisterAllFunctions()
std::map< wxString, LIBEVAL::FUNC_CALL_REF > m_funcs
void RegisterFunc(const wxString &funcSignature, LIBEVAL::FUNC_CALL_REF funcPtr, bool aIsGeometryDependent=false)
int GetConstraint() const
PCB_LAYER_ID GetLayer() const
BOARD_ITEM * GetItem(int index) const
BOARD_ITEM * GetObject(const LIBEVAL::CONTEXT *aCtx) const
void Add(PCB_LAYER_ID aLayer)
SCOPED_LAYERSET(BOARD_ITEM *aItem)
Represent a set of closed polygons.
void ClearArcs()
Removes all arc references from all the outlines and holes in the polyset.
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,...
SHAPE_LINE_CHAIN & Outline(int aIndex)
Return the reference to aIndex-th outline in the set.
void Deflate(int aAmount, CORNER_STRATEGY aCornerStrategy, int aMaxError)
int OutlineCount() const
Return the number of outlines in the set.
SHAPE_POLY_SET CloneDropTriangulation() const
Handle a list of polygons defining a copper zone.
const BOX2I GetBoundingBox() const override
SHAPE_POLY_SET * Outline()
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
@ ALLOW_ACUTE_CORNERS
just inflate the polygon. Acute angles create spikes
@ DIFF_PAIR_GAP_CONSTRAINT
@ NET_CHAIN_LENGTH_CONSTRAINT
#define ROUTER_TRANSIENT
transient items that should NOT be cached
#define HOLE_PROXY
Indicates the BOARD_ITEM is a proxy for its hole.
#define MALFORMED_COURTYARDS
PCB_LAYER_ID
A quick note on layer IDs:
PCB_LAYER_ID ToLAYER_ID(int aLayer)
@ PTH
Plated through hole pad.
Class to handle a set of BOARD_ITEMs.
static void intersectsFrontCourtyardFunc(LIBEVAL::CONTEXT *aCtx, void *self)
#define MISSING_SHEET_ARG(f)
bool collidesWithCourtyard(BOARD_ITEM *aItem, std::shared_ptr< SHAPE > &aItemShape, PCBEXPR_CONTEXT *aCtx, FOOTPRINT *aFootprint, PCB_LAYER_ID aSide)
#define MISSING_LAYER_ARG(f)
static SHAPE_POLY_SET getDeflatedZoneOutline(BOARD *aBoard, ZONE *aArea)
static void intersectsBackCourtyardFunc(LIBEVAL::CONTEXT *aCtx, void *self)
static void memberOfGroupFunc(LIBEVAL::CONTEXT *aCtx, void *self)
#define MISSING_AREA_ARG(f)
static void isCoupledDiffPairFunc(LIBEVAL::CONTEXT *aCtx, void *self)
static void isPlatedFunc(LIBEVAL::CONTEXT *aCtx, void *self)
bool searchAreas(BOARD *aBoard, const wxString &aArg, PCBEXPR_CONTEXT *aCtx, const std::function< bool(ZONE *)> &aFunc)
static void isBuriedVia(LIBEVAL::CONTEXT *aCtx, void *self)
static void existsOnLayerFunc(LIBEVAL::CONTEXT *aCtx, void *self)
#define MISSING_GROUP_ARG(f)
static bool testFootprintSelector(FOOTPRINT *aFp, const wxString &aSelector)
static void isBlindBuriedViaFunc(LIBEVAL::CONTEXT *aCtx, void *self)
static void memberOfSheetFunc(LIBEVAL::CONTEXT *aCtx, void *self)
static void hasComponentClassFunc(LIBEVAL::CONTEXT *aCtx, void *self)
static void isBlindVia(LIBEVAL::CONTEXT *aCtx, void *self)
static void hasExactNetclassFunc(LIBEVAL::CONTEXT *aCtx, void *self)
static void inNetChainFunc(LIBEVAL::CONTEXT *aCtx, void *self)
#define MISSING_REF_ARG(f)
#define MISSING_DP_ARG(f)
static void enclosedByAreaFunc(LIBEVAL::CONTEXT *aCtx, void *self)
static void memberOfSheetOrChildrenFunc(LIBEVAL::CONTEXT *aCtx, void *self)
static void memberOfFootprintFunc(LIBEVAL::CONTEXT *aCtx, void *self)
static void hasNetChainFunc(LIBEVAL::CONTEXT *aCtx, void *self)
static void isMicroVia(LIBEVAL::CONTEXT *aCtx, void *self)
static void getFieldFunc(LIBEVAL::CONTEXT *aCtx, void *self)
bool collidesWithArea(BOARD_ITEM *aItem, PCB_LAYER_ID aLayer, PCBEXPR_CONTEXT *aCtx, ZONE *aArea)
static void hasNetclassFunc(LIBEVAL::CONTEXT *aCtx, void *self)
bool fromToFunc(LIBEVAL::CONTEXT *aCtx, void *self)
static void intersectsCourtyardFunc(LIBEVAL::CONTEXT *aCtx, void *self)
static void inNetChainClassFunc(LIBEVAL::CONTEXT *aCtx, void *self)
static bool searchFootprints(BOARD *aBoard, const wxString &aArg, PCBEXPR_CONTEXT *aCtx, const std::function< bool(FOOTPRINT *)> &aFunc)
static void inDiffPairFunc(LIBEVAL::CONTEXT *aCtx, void *self)
static void intersectsAreaFunc(LIBEVAL::CONTEXT *aCtx, void *self)
#define MISSING_FP_ARG(f)
std::vector< FAB_LAYER_COLOR > dummy
wxString result
Test unit parsing edge cases and error handling.
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
@ PCB_ZONE_T
class ZONE, a copper pour area
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
@ PCB_PAD_T
class PAD, a pad in a footprint