57#include <wx/richmsgdlg.h>
61#define MULTICHANNEL_EXTRA_DEBUG
68 std::vector<wxString> refs;
75 refs.push_back( fp->GetReferenceAsString() );
78 std::sort( refs.begin(), refs.end(),
79 [](
const wxString& aLhs,
const wxString& aRhs )
81 return aLhs.CmpNoCase( aRhs ) < 0;
89 size_t componentsOnLine = 0;
91 for(
const wxString& ref : refs )
93 if( componentsOnLine == 10 )
100 componentsOnLine = 0;
107 if( !line.IsEmpty() )
120 const std::vector<wxString>& aReasons )
122 if( !aParent || aReasons.empty() )
127 for(
size_t idx = 0; idx < aReasons.size(); ++idx )
130 reasonText += wxT(
"\n" );
132 reasonText += aReasons[idx];
135 wxRichMessageDialog dlg( aParent, aSummary,
_(
"Topology mismatch" ), wxICON_ERROR | wxOK );
136 dlg.ShowDetailedText( reasonText );
152 const std::vector<wxString>& aReasons )
const
154 wxWindow* parent = aParent ? aParent :
frame();
167 std::set<FOOTPRINT*>& aComponents )
169 if( !aRuleArea || !aRuleArea->
m_zone )
180 aComponents.insert(
static_cast<FOOTPRINT*
>( item ) );
183 return (
int) aComponents.size();
192 [&](
const wxString& aMessage,
int aOffset )
222 auto ok = compiler.
Compile( ruleText, &ucode, &preflightCtx );
236 fp->GetSheetname() );
238 aComponents.insert( fp );
248 if( !aRuleArea || !aRuleArea->
m_zone )
268 if( !boardItem->IsConnected() || boardItem->Type() ==
PCB_ZONE_T )
269 aItems.insert( boardItem );
273 return aItems.size() > 0;
281 [&](
const wxString& aMessage,
int aOffset )
292 wxString ruleText = wxString::Format( wxT(
"A.enclosedByArea('%s')" ),
295 if( !compiler.
Compile( ruleText, &ucode, &preflightCtx ) )
302 auto val = ucode.
Run( &ctx );
304 if( val->AsDouble() != 0.0 )
305 aItems.insert( aItem );
310 if( zone == aRuleArea->
m_zone )
318 if( !drawing->IsConnected() )
319 testAndAdd( drawing );
328 std::set<FOOTPRINT*> rv;
330 if( aSheetName.EndsWith( wxT(
"/" ) ) )
331 aSheetName.RemoveLast();
333 wxString childPrefix = aSheetName + wxT(
"/" );
337 auto sn = fp->GetSheetname();
339 if( sn.EndsWith( wxT(
"/" ) ) )
342 if( sn == aSheetName || sn.StartsWith( childPrefix ) )
353 std::set<FOOTPRINT*> rv;
357 if( fp->GetComponentClass()->ContainsClassName( aComponentClassName ) )
367 std::set<FOOTPRINT*> rv;
371 if(
group->GetName() == aGroupName )
376 rv.insert(
static_cast<FOOTPRINT*
>( item ) );
387 std::set<BOARD_ITEM*> rv;
391 if(
group->GetName() != aGroupName )
396 if( item->IsBOARD_ITEM() )
397 rv.insert(
static_cast<BOARD_ITEM*
>( item ) );
407 std::vector<VECTOR2I> bbCorners;
408 bbCorners.reserve( aFootprints.size() * 4 );
412 const BOX2I bb = fp->GetBoundingBox(
false ).GetInflated( aMargin );
416 std::vector<VECTOR2I> hullVertices;
427 std::vector<VECTOR2I> bbCorners;
428 bbCorners.reserve( aItems.size() * 4 );
432 BOX2I bb = item->GetBoundingBox();
435 bb =
static_cast<FOOTPRINT*
>( item )->GetBoundingBox(
false );
440 std::vector<VECTOR2I> hullVertices;
452 using PathAndName = std::pair<wxString, wxString>;
453 std::set<PathAndName> uniqueSheets;
454 std::set<wxString> uniqueComponentClasses;
455 std::set<wxString> uniqueGroups;
461 uniqueSheets.insert( PathAndName( fp->GetSheetname(), fp->GetSheetfile() ) );
466 uniqueComponentClasses.insert( singleClass->GetName() );
468 if( fp->GetParentGroup() && !fp->GetParentGroup()->GetName().IsEmpty() )
469 uniqueGroups.insert( fp->GetParentGroup()->GetName() );
472 for(
const PathAndName& sheet : uniqueSheets )
481 m_areas.m_areas.push_back( ent );
486 (
int)
m_areas.m_areas.size() );
489 for(
const wxString& compClass : uniqueComponentClasses )
497 m_areas.m_areas.push_back( ent );
501 static_cast<int>(
m_areas.m_areas.size() ) );
504 for(
const wxString& groupName : uniqueGroups )
512 m_areas.m_areas.push_back( ent );
516 static_cast<int>(
m_areas.m_areas.size() ) );
527 if( !zone->GetIsRuleArea() )
530 if( !zone->GetPlacementAreaEnabled() )
538 area.
m_center = zone->Outline()->COutline( 0 ).Centre();
542 m_areas.m_areas.push_back( area );
572 std::vector<ZONE*> refRAs;
574 auto isSelectedItemAnRA =
580 ZONE* zone =
static_cast<ZONE*
>( aItem );
593 if(
ZONE* zone = isSelectedItemAnRA( item ) )
595 refRAs.push_back( zone );
603 if(
ZONE* grpZone = isSelectedItemAnRA( grpItem ) )
604 refRAs.push_back( grpZone );
609 if( refRAs.size() != 1 )
614 _(
"Select a reference Rule Area to copy from..." ),
617 return isSelectedItemAnRA( aItem ) !=
nullptr;
631 if(
m_areas.m_areas.size() <= 1 )
633 frame()->ShowInfoBarError(
_(
"No Rule Areas to repeat layout to have been found." ),
true );
653 if( ra.
m_zone == aRefZone )
665 std::vector<RULE_AREA*> targets;
672 targets.push_back( &ra );
676 if( targets.empty() )
679 int total =
static_cast<int>( targets.size() );
680 std::atomic<int> completed( 0 );
681 std::atomic<bool> cancelled(
false );
682 std::atomic<int> matchedComponents( 0 );
683 std::atomic<int> totalComponents( 0 );
698 auto future =
tp.submit_task(
699 [
this, refRA, &targets, &completed, &cancelled, &matchedComponents, &isoParams]()
703 if( cancelled.load( std::memory_order_relaxed ) )
706 matchedComponents.store( 0, std::memory_order_relaxed );
710 completed.fetch_add( 1, std::memory_order_relaxed );
716 std::unique_ptr<WX_PROGRESS_REPORTER> reporter;
717 auto startTime = std::chrono::steady_clock::now();
718 double highWaterMark = 0.0;
720 while( future.wait_for( std::chrono::milliseconds( 100 ) ) != std::future_status::ready )
724 auto elapsed = std::chrono::steady_clock::now() - startTime;
726 if( elapsed > std::chrono::seconds( 1 ) )
728 reporter = std::make_unique<WX_PROGRESS_REPORTER>(
734 wxLog::FlushActive();
740 int done = completed.load( std::memory_order_relaxed );
741 int matched = matchedComponents.load( std::memory_order_relaxed );
742 int compTotal = totalComponents.load( std::memory_order_relaxed );
744 double fraction = ( compTotal > 0 )
745 ?
static_cast<double>( matched ) / compTotal
747 double progress =
static_cast<double>( done + fraction ) / total;
749 if( progress > highWaterMark )
750 highWaterMark = progress;
752 reporter->SetCurrentProgress( highWaterMark );
753 reporter->Report( wxString::Format(
754 _(
"Resolving topology %d of %d (%d/%d components)" ),
755 done + 1, total, matched, compTotal ) );
757 if( !reporter->KeepRefreshing() )
758 cancelled.store(
true, std::memory_order_relaxed );
767 if( cancelled.load( std::memory_order_relaxed ) )
780 wxCHECK_MSG( aRefArea.
m_zone, -1, wxT(
"Reference Rule Area has no zone." ) );
781 wxCHECK_MSG( aTargetArea.
m_zone, -1, wxT(
"Target Rule Area has no zone." ) );
789 wxString summary = wxString::Format(
_(
"Rule Area topologies do not match: %s" ), compat.
m_errorMsg );
809 auto errMsg = wxString::Format(
_(
"Copy Rule Area contents failed between rule areas '%s' and '%s'." ),
815 frame()->ShowInfoBarError( errMsg,
true );
827 frame()->ShowInfoBarError(
_(
"Target group does not have a group." ),
true );
839 group->AddItem( item );
843 commit.
Push(
_(
"Repeat layout" ) );
855 for(
auto& [targetArea, compatData] :
m_areas.m_compatMap )
857 if( !compatData.m_doCopy )
860 targetArea->m_ruleName );
864 if( !compatData.m_isOk )
869 auto errMsg = wxString::Format(
_(
"Copy Rule Area contents failed between rule areas '%s' and '%s'." ),
870 m_areas.m_refRA->m_zone->GetZoneName(),
871 targetArea->m_zone->GetZoneName() );
876 frame()->ShowInfoBarError( errMsg,
true );
885 if(
m_areas.m_options.m_groupItems )
887 for(
const auto& [targetArea, compatData] :
m_areas.m_compatMap )
889 if( compatData.m_groupableItems.size() < 2 )
898 for(
BOARD_ITEM* item : compatData.m_groupableItems )
901 group->AddItem( item );
906 commit.
Push(
_(
"Repeat layout" ) );
909 frame()->ShowInfoBarMsg( wxString::Format(
_(
"Copied to %d Rule Areas." ), totalCopied ),
true );
929 if( ( c >=
'a' && c <=
'z' ) || ( c >=
'A' && c <=
'Z' ) || ( c ==
'_' ) )
940 std::shared_ptr<CONNECTIVITY_DATA> aConnectivity,
943 if( !aRuleArea || !aRuleArea->
m_zone )
971 if( bci->IsConnected() )
972 aOutput.insert( bci );
976 return (
int) aOutput.size();
984 [&](
const wxString& aMessage,
int aOffset )
995 wxString ruleText = wxString::Format( wxT(
"A.enclosedByArea('%s')" ),
1001 if( aOutput.contains( aItem ) )
1009 aOutput.insert( aItem );
1014 if( compiler.
Compile( ruleText, &ucode, &preflightCtx ) )
1017 testAndAdd( track );
1021 if( drawing->IsConnected() )
1027 if( generator->GetGeneratorType() != wxT(
"tuning_pattern" ) )
1030 if( !generator->HitTest( aRAPoly.
Outline( 0 ),
false ) )
1033 for(
EDA_ITEM* member : generator->GetItems() )
1037 if( !aOutput.contains( bci ) )
1039 aOutput.insert( bci );
1068 targetAnchorFp = targetFP;
1076 if( targetAnchorFp )
1083 disp = newpos - oldpos;
1096 newTargetOutline.
Move( disp );
1101 std::map<EDA_GROUP*, EDA_GROUP*> groupMap;
1107 auto fixupParentGroup =
1110 if( !preserveGroups )
1115 if( !groupMap.contains( parentGroup ) )
1118 static_cast<PCB_GROUP*
>( parentGroup->AsEdaItem() )->Duplicate(
false ) );
1125 newGroup->
Move( disp );
1128 groupMap[parentGroup] = newGroup;
1129 aCommit->
Add( newGroup );
1132 groupMap[parentGroup]->AddItem( destItem );
1139 bool targetZoneOnBoard =
false;
1141 if( aTargetArea->
m_zone )
1145 if( z == aTargetArea->
m_zone )
1147 targetZoneOnBoard =
true;
1153 if( targetZoneOnBoard )
1162 std::set<BOARD_CONNECTED_ITEM*> refRouting;
1163 std::set<BOARD_CONNECTED_ITEM*> targetRouting;
1169 std::set<int> targc;
1173 for(
PAD*
pad : refFP->Pads() )
1174 refc.insert(
pad->GetNetCode() );
1176 for(
PAD*
pad : targetFP->Pads() )
1177 targc.insert(
pad->GetNetCode() );
1229 fixupParentGroup( item,
copied );
1240 std::set<BOARD_ITEM*> sourceItems;
1241 std::set<BOARD_ITEM*> targetItems;
1260 ZONE* zone =
static_cast<ZONE*
>( item );
1291 ZONE* zone =
static_cast<ZONE*
>( item );
1298 ZONE* targetZone =
static_cast<ZONE*
>( item->Duplicate(
false ) );
1316 fixupParentGroup( item,
copied );
1334 refFP->GetReference() );
1340 refFP->GetReference() );
1347 && !refFP->GetEffectiveShape( refFP->GetLayer() )->Collide( &refPoly, 0 ) )
1355 aCommit->
Modify( targetFP );
1357 targetFP->SetLayerAndFlip( refFP->GetLayer() );
1358 targetFP->SetOrientation( refFP->GetOrientation() );
1359 targetFP->SetPosition( refFP->GetPosition() );
1360 targetFP->Rotate(
VECTOR2( 0, 0 ), rot );
1361 targetFP->Move( disp );
1363 for(
PCB_FIELD* refField : refFP->GetFields() )
1365 wxCHECK2( refField,
continue );
1367 PCB_FIELD* targetField = targetFP->GetField( refField->GetName() );
1372 targetField->
SetLayerSet( refField->GetLayerSet() );
1373 targetField->
SetVisible( refField->IsVisible() );
1375 targetField->
SetPosition( refField->GetPosition() );
1377 targetField->
Move( disp );
1382 for(
BOARD_ITEM* refItem : refFP->GraphicalItems() )
1389 for(
BOARD_ITEM* targetItem : targetFP->GraphicalItems() )
1404 targetText->
Move( disp );
1412 targetFP->Models() = refFP->Models();
1435 const std::vector<BOARD_CONNECTED_ITEM*> refConnectedPads = connectivity->
GetNetItems( aRef->
GetNetCode(),
1443 const PAD* refPad =
static_cast<const PAD*
>( refConItem );
1446 if( aComponentMatches.contains( sourceFootprint ) )
1448 const FOOTPRINT* targetFootprint = aComponentMatches[sourceFootprint];
1449 std::vector<const PAD*> targetFpPads = targetFootprint->
GetPads( refPad->
GetNumber() );
1451 if( !targetFpPads.empty() )
1453 int targetNetCode = targetFpPads[0]->GetNet()->GetNetCode();
1481 std::vector<TMATCH::TOPOLOGY_MISMATCH_REASON> mismatchReasons;
1485 mismatchReasons, aParams );
1491 aMatches.
m_isOk = status;
1502 for(
const auto& reason : mismatchReasons )
1504 if( reason.m_reason.IsEmpty() )
1507 if( !reason.m_reference.IsEmpty() && !reason.m_candidate.IsEmpty() )
1512 reason.m_reason ) );
1514 else if( !reason.m_reference.IsEmpty() )
1518 reason.m_reason ) );
1531 wxString::Format(
_(
"Reference area total components: %d" ), (
int) aRefArea->
m_components.size() ) );
1532 aMatches.
m_mismatchReasons.push_back( wxString::Format(
_(
"Reference area components:\n%s" ),
1535 wxString::Format(
_(
"Target area total components: %d" ), (
int) aTargetArea->
m_components.size() ) );
1536 aMatches.
m_mismatchReasons.push_back( wxString::Format(
_(
"Target area components:\n%s" ),
1547 const std::unordered_set<BOARD_ITEM*>& aItemsToRemove )
1553 std::vector<EDA_ITEM*> pruneList;
1559 if( refItem->m_Uuid == testItem->m_Uuid )
1560 pruneList.push_back( refItem );
1564 if( !pruneList.empty() )
1569 group->RemoveItem( item );
1571 if(
group->GetItems().size() < 2 )
1586 if(
m_areas.m_areas.size() <= 1 )
1588 frame()->ShowInfoBarError(
_(
"Cannot auto-generate any placement areas because the "
1589 "schematic has only one or no hierarchical sheets, "
1590 "groups, or component classes." ),
1598 if( ret != wxID_OK )
1604 if( !zone->GetIsRuleArea() )
1607 if( !zone->GetPlacementAreaEnabled() )
1610 std::set<FOOTPRINT*> components;
1613 zoneRA.
m_sourceType = zone->GetPlacementAreaSourceType();
1616 if( components.empty() )
1626 wxT(
"Placement rule area for sheet '%s' already exists as '%s'\n" ),
1632 wxT(
"Placement rule area for component class '%s' already exists as '%s'\n" ),
1638 wxT(
"Placement rule area for group '%s' already exists as '%s'\n" ),
1672 if( groupItems.empty() )
1675 wxT(
"Skipping placement rule area generation for source group '%s': group has no board items." ),
1687 std::unique_ptr<ZONE> newZone(
new ZONE(
board() ) );
1690 newZone->SetZoneName( wxString::Format( wxT(
"auto-placement-area-%s" ), ra.
m_sheetPath ) );
1692 newZone->SetZoneName( wxString::Format( wxT(
"auto-placement-area-%s" ), ra.
m_componentClass ) );
1694 newZone->SetZoneName( wxString::Format( wxT(
"auto-placement-area-%s" ), ra.
m_groupName ) );
1697 newZone->GetZoneName(),
1700 newZone->SetIsRuleArea(
true );
1702 newZone->SetPlacementAreaEnabled(
true );
1703 newZone->SetDoNotAllowZoneFills(
false );
1704 newZone->SetDoNotAllowVias(
false );
1705 newZone->SetDoNotAllowTracks(
false );
1706 newZone->SetDoNotAllowPads(
false );
1707 newZone->SetDoNotAllowFootprints(
false );
1712 newZone->SetPlacementAreaSource( ra.
m_sheetPath );
1722 newZone->SetPlacementAreaSource( ra.
m_groupName );
1725 newZone->AddPolygon( raOutline );
1733 ra.
m_zone = newZone.release();
1740 if(
m_areas.m_options.m_groupItems )
1754 std::unordered_set<BOARD_ITEM*> toPrune;
1759 toPrune.insert( ra.
m_zone );
1773 group->AddItem( fp );
1778 commit.
Push(
_(
"Auto-generate placement rule areas" ) );
virtual void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Execute the changes.
virtual void Revert() override
Revert the commit by restoring the modified items state.
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
bool SetNetCode(int aNetCode, bool aNoAssert)
Set net using a net code.
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 void SetLayerSet(const LSET &aLayers)
virtual bool IsKnockout() const
virtual void SetIsKnockout(bool aKnockout)
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
FOOTPRINT * GetParentFootprint() const
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Return a list of missing connections between components/tracks.
constexpr BOX2< Vec > GetInflated(coord_type aDx, coord_type aDy) const
Get a new rectangle that is this one, inflated by aDx and aDy.
Represent a set of changes (additions, deletions or modifications) of a data model (e....
COMMIT & Remove(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Remove a new item from the model.
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr, RECURSE_MODE aRecurse=RECURSE_MODE::NO_RECURSE)
Modify a given item in the model.
COMMIT & Add(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Add a new item to the model.
int GetStatus(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Returns status of an item.
A lightweight representation of a component class.
const std::vector< COMPONENT_CLASS * > & GetConstituentClasses() const
Fetches a vector of the constituent classes for this (effective) class.
const std::vector< BOARD_CONNECTED_ITEM * > GetNetItems(int aNetCode, const std::vector< KICAD_T > &aTypes) const
Function GetNetItems() Returns the list of items that belong to a certain net.
A set of EDA_ITEMs (i.e., without duplicates).
std::unordered_set< EDA_ITEM * > & GetItems()
A base class for most all the KiCad significant classes used in schematics and boards.
virtual EDA_GROUP * GetParentGroup() const
KICAD_T Type() const
Returns the type of object.
virtual void SetParentGroup(EDA_GROUP *aGroup)
virtual const wxString & GetText() const
Return the string associated with the text object.
virtual bool IsVisible() const
void SetAttributes(const EDA_TEXT &aSrc, bool aSetPosition=true)
Set the text attributes from another instance.
virtual void SetVisible(bool aVisible)
const TEXT_ATTRIBUTES & GetAttributes() const
wxString AsString() const
void SetErrorCallback(std::function< void(const wxString &aMessage, int aOffset)> aCallback)
bool Compile(const wxString &aString, UCODE *aCode, CONTEXT *aPreflightContext)
void SetErrorCallback(std::function< void(const wxString &aMessage, int aOffset)> aCallback)
VALUE * Run(CONTEXT *ctx)
virtual double AsDouble() const
LSET is a set of PCB_LAYER_IDs.
bool ContainsAll(const LSET &aLayers) const
See if this layer set contains all layers in another set.
static LSET AllCuMask(int aCuLayerCount)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
bool Contains(PCB_LAYER_ID aLayer) const
See if the layer set contains a PCB layer.
const wxString & GetNumber() const
void SetItems(BOARD_ITEM *a, BOARD_ITEM *b=nullptr)
static TOOL_ACTION repeatLayout
static TOOL_ACTION generatePlacementRuleAreas
static TOOL_ACTION selectItemInteractively
Selection of reference points/items.
A set of BOARD_ITEMs (i.e., without duplicates).
void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
void Move(const VECTOR2I &aMoveVector) override
Move this object.
virtual VECTOR2I GetPosition() const override
virtual void SetPosition(const VECTOR2I &aPos) override
void Move(const VECTOR2I &aMoveVector) override
Move this object.
void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
A small class to help profiling.
void Stop()
Save the time when this function was called, and set the counter stane to stop.
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
void Move(const VECTOR2I &aVector) override
void Rotate(const EDA_ANGLE &aAngle, const VECTOR2I &aCenter={ 0, 0 }) override
Rotate all vertices by a given angle.
Represent a set of closed polygons.
int AddOutline(const SHAPE_LINE_CHAIN &aOutline)
Adds a new outline to the set and returns its index.
virtual void CacheTriangulation(bool aSimplify=false, const TASK_SUBMITTER &aSubmitter={})
Build a polygon triangulation, needed to draw a polygon on OpenGL and in some other calculations.
SHAPE_LINE_CHAIN & Outline(int aIndex)
Return the reference to aIndex-th outline in the set.
const SHAPE_LINE_CHAIN & COutline(int aIndex) const
static std::unique_ptr< CONNECTION_GRAPH > BuildFromFootprintSet(const std::set< FOOTPRINT * > &aFps, const std::set< FOOTPRINT * > &aOtherChannelFps={})
Define a general 2D-vector/point.
Handle a list of polygons defining a copper zone.
bool GetIsRuleArea() const
Accessors to parameters used in Rule Area zones:
void AddPolygon(std::vector< VECTOR2I > &aPolygon)
Add a polygon to the zone outline.
wxString GetPlacementAreaSource() const
void HatchBorder()
Compute the hatch lines depending on the hatch parameters and stores it in the zone's attribute m_bor...
PLACEMENT_SOURCE_T GetPlacementAreaSourceType() const
SHAPE_POLY_SET * Outline()
const wxString & GetZoneName() const
bool GetPlacementAreaEnabled() const
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
void UnHatchBorder()
Clear the zone's hatch.
void RemoveAllContours(void)
void BuildConvexHull(std::vector< VECTOR2I > &aResult, const std::vector< VECTOR2I > &aPoly)
Calculate the convex hull of a list of points in counter-clockwise order.
SHAPE_LINE_CHAIN RectifyPolygon(const SHAPE_LINE_CHAIN &aPoly)
void CollectBoxCorners(const BOX2I &aBox, std::vector< VECTOR2I > &aCorners)
Add the 4 corners of a BOX2I to a vector.
std::map< FOOTPRINT *, FOOTPRINT * > COMPONENT_MATCHES
Class to handle a set of BOARD_ITEMs.
PGM_BASE & Pgm()
The global program "get" accessor.
Utility functions for working with shapes.
void AccumulateDescription(wxString &aDesc, const wxString &aItem)
Utility to build comma separated lists in messages.
bool m_connectedRoutingOnly
bool m_includeLockedItems
std::vector< wxString > m_mismatchReasons
std::unordered_set< BOARD_ITEM * > m_affectedItems
Filled in by copyRuleAreaContents with items that were affected by the copy operation.
TMATCH::COMPONENT_MATCHES m_matchingComponents
std::unordered_set< BOARD_ITEM * > m_groupableItems
Filled in by copyRuleAreaContents with affected items that can be grouped together.
std::unordered_set< EDA_ITEM * > m_designBlockItems
PLACEMENT_SOURCE_T m_sourceType
wxString m_componentClass
std::set< FOOTPRINT * > m_components
std::atomic< bool > * m_cancelled
std::atomic< int > * m_matchedComponents
std::atomic< int > * m_totalComponents
wxString result
Test unit parsing edge cases and error handling.
thread_pool & GetKiCadThreadPool()
Get a reference to the current thread pool.
BS::priority_thread_pool thread_pool
@ PCB_GENERATOR_T
class PCB_GENERATOR, generator on a layer
@ PCB_GROUP_T
class PCB_GROUP, a set of BOARD_ITEMs
@ PCB_ZONE_T
class ZONE, a copper pour area
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
@ PCB_PAD_T
class PAD, a pad in a footprint
VECTOR2< int32_t > VECTOR2I