33 if( !item->IsBOARD_ITEM() )
37 ids.insert( boardItem->
m_Uuid );
48 const std::vector<CONSTRAINT_MEMBER>& members = aConstraint->
GetMembers();
50 return !members.empty()
51 && std::all_of( members.begin(), members.end(),
54 return aScopeIds.count( aMember.m_item ) > 0;
60 const std::map<KIID, KIID>& aIdMap )
62 std::set<KIID> scopeIds;
64 for(
const auto& [origId, dupeId] : aIdMap )
65 scopeIds.insert( origId );
67 std::vector<PCB_CONSTRAINT*> clones;
80 clones.push_back( clone );
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual void RunOnChildren(const std::function< void(BOARD_ITEM *)> &aFunction, RECURSE_MODE aMode) const
Invoke a function on all children.
A base class for most all the KiCad significant classes used in schematics and boards.
A geometric constraint between board items (issue #2329).
const std::vector< CONSTRAINT_MEMBER > & GetMembers() const
void RemapKIIDs(const std::map< KIID, KIID > &aIdMap) override
Remap KIIDs this item stores to reference other items (e.g.
std::set< KIID > CollectConstraintScopeIds(const PCB_SELECTION &aSelection)
Shared logic deciding which constraints follow items through copy paste or duplicate.
std::vector< PCB_CONSTRAINT * > CloneFullySelectedConstraints(const CONSTRAINTS &aSource, const std::map< KIID, KIID > &aIdMap)
Clone the constraints in aSource that a duplicate should carry.
bool ConstraintFullySelected(const PCB_CONSTRAINT *aConstraint, const std::set< KIID > &aScopeIds)
True when aConstraint has members and every one of them is present in aScopeIds, so the whole relatio...
std::deque< PCB_CONSTRAINT * > CONSTRAINTS
One participant in a constraint: a referenced board item plus the feature of that item that participa...