KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pns_node.h
Go to the documentation of this file.
1/*
2 * KiRouter - a push-and-(sometimes-)shove PCB router
3 *
4 * Copyright (C) 2013-2014 CERN
5 * Copyright (C) 2016-2023 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * @author Tomasz Wlostowski <[email protected]>
8 *
9 * This program is free software: you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation, either version 3 of the License, or (at your
12 * option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program. If not, see <http://www.gnu.org/licenses/>.
21 */
22
23#ifndef __PNS_NODE_H
24#define __PNS_NODE_H
25
26#include <vector>
27#include <list>
28#include <set>
29#include <core/minoptmax.h>
30
33
34#include "pns_item.h"
35#include "pns_joint.h"
36#include "pns_itemset.h"
37
38class ZONE;
39namespace PNS {
40
41class ARC;
42class SEGMENT;
43class LINE;
44class SOLID;
45class VIA;
46class INDEX;
47class ROUTER;
48class NODE;
49
50
52{
53 CT_CLEARANCE = 1,
55 CT_LENGTH = 3,
56 CT_WIDTH = 4,
58 CT_VIA_HOLE = 6,
62};
63
70{
74 wxString m_RuleName;
75 wxString m_FromName;
76 wxString m_ToName;
77};
78
79
84{
85 ITEM* m_head = nullptr;
86 ITEM* m_item = nullptr;
92
94
95 bool operator==(const OBSTACLE& other) const
96 {
97 return m_head == other.m_head && m_item == other.m_item;
98 }
99
100 bool operator<(const OBSTACLE& other) const
101 {
102 if( (uintptr_t)m_head < (uintptr_t)other.m_head )
103 return true;
104 else if ( m_head == other.m_head )
105 return (uintptr_t)m_item < (uintptr_t)other.m_item;
106 return false;
107 }
108};
109
110
112{
115 int m_limitCount = -1;
116 int m_kindMask = -1;
118 std::set<ITEM*>* m_restrictedSet = nullptr;
119};
120
121
123{
124 COLLISION_SEARCH_CONTEXT( std::set<OBSTACLE>& aObs, const COLLISION_SEARCH_OPTIONS aOpts ) :
125 obstacles( aObs ),
126 options( aOpts )
127 {
128 }
129
130 std::set<OBSTACLE>& obstacles;
132};
133
134
136{
137public:
138 virtual ~RULE_RESOLVER() {}
139
140 virtual int Clearance( const ITEM* aA, const ITEM* aB, bool aUseClearanceEpsilon = true ) = 0;
141
142 virtual NET_HANDLE DpCoupledNet( NET_HANDLE aNet ) = 0;
143 virtual int DpNetPolarity( NET_HANDLE aNet ) = 0;
144 virtual bool DpNetPair( const ITEM* aItem, NET_HANDLE& aNetP, NET_HANDLE& aNetN ) = 0;
145
146 virtual int NetCode( NET_HANDLE aNet ) = 0;
147 virtual wxString NetName( NET_HANDLE aNet ) = 0;
148
149 virtual bool IsInNetTie( const ITEM* aA ) = 0;
150 virtual bool IsNetTieExclusion( const ITEM* aItem, const VECTOR2I& aCollisionPos,
151 const ITEM* aCollidingItem )= 0;
152
153 virtual bool IsKeepout( const ITEM* aA, const ITEM* aB ) = 0;
154
155 virtual bool QueryConstraint( CONSTRAINT_TYPE aType, const ITEM* aItemA, const ITEM* aItemB,
156 int aLayer, CONSTRAINT* aConstraint ) = 0;
157
158 virtual void ClearCacheForItems( std::vector<const ITEM*>& aItems ) {}
159 virtual void ClearCaches() {}
160
161 virtual int ClearanceEpsilon() const { return 0; }
162};
163
164
166{
167public:
168 OBSTACLE_VISITOR( const ITEM* aItem );
169
171 {
172 }
173
174 void SetWorld( const NODE* aNode, const NODE* aOverride = nullptr );
175
176 virtual bool operator()( ITEM* aCandidate ) = 0;
177
178protected:
179 bool visit( ITEM* aCandidate );
180
181protected:
182 const ITEM* m_item;
183
184 const NODE* m_node;
186};
187
197class NODE : public ITEM_OWNER
198{
199public:
200
203 {
206 };
207
208 typedef std::optional<OBSTACLE> OPT_OBSTACLE;
209 typedef std::vector<ITEM*> ITEM_VECTOR;
210 typedef std::set<OBSTACLE> OBSTACLES;
211
212 NODE();
213 ~NODE();
214
216 int GetClearance( const ITEM* aA, const ITEM* aB, bool aUseClearanceEpsilon = true ) const;
217
219 int GetMaxClearance() const
220 {
221 return m_maxClearance;
222 }
223
225 void SetMaxClearance( int aClearance )
226 {
227 m_maxClearance = aClearance;
228 }
229
232 {
233 m_ruleResolver = aFunc;
234 }
235
237 {
238 return m_ruleResolver;
239 }
240
242 int JointCount() const
243 {
244 return m_joints.size();
245 }
246
248 int Depth() const
249 {
250 return m_depth;
251 }
252
262 int QueryColliding( const ITEM* aItem, OBSTACLES& aObstacles,
263 const COLLISION_SEARCH_OPTIONS& aOpts = COLLISION_SEARCH_OPTIONS() ) const;
264
265 int QueryJoints( const BOX2I& aBox, std::vector<JOINT*>& aJoints,
266 LAYER_RANGE aLayerMask = LAYER_RANGE::All(), int aKindMask = ITEM::ANY_T );
267
277 OPT_OBSTACLE NearestObstacle( const LINE* aLine,
279
288 OPT_OBSTACLE CheckColliding( const ITEM* aItem, int aKindMask = ITEM::ANY_T );
289
290
299 OPT_OBSTACLE CheckColliding( const ITEM_SET& aSet, int aKindMask = ITEM::ANY_T );
300
307 const ITEM_SET HitTest( const VECTOR2I& aPoint ) const;
308
317 bool Add( std::unique_ptr< SEGMENT >&& aSegment, bool aAllowRedundant = false );
318 void Add( std::unique_ptr< SOLID >&& aSolid );
319 void Add( std::unique_ptr< VIA >&& aVia );
320 bool Add( std::unique_ptr< ARC >&& aArc, bool aAllowRedundant = false );
321
322 void Add( LINE& aLine, bool aAllowRedundant = false );
323
324 void AddEdgeExclusion( std::unique_ptr<SHAPE> aShape );
325 bool QueryEdgeExclusions( const VECTOR2I& aPos ) const;
326
330 void Remove( ARC* aArc );
331 void Remove( SOLID* aSolid );
332 void Remove( VIA* aVia );
333 void Remove( SEGMENT* aSegment );
334 void Remove( ITEM* aItem );
335
341 void Remove( LINE& aLine );
342
349 void Replace( ITEM* aOldItem, std::unique_ptr< ITEM >&& aNewItem );
350 void Replace( LINE& aOldLine, LINE& aNewLine );
351
360 NODE* Branch();
361
373 const LINE AssembleLine( LINKED_ITEM* aSeg, int* aOriginSegmentIndex = nullptr,
374 bool aStopAtLockedJoints = false,
375 bool aFollowLockedSegments = false );
376
378 void Dump( bool aLong = false );
379
386 void GetUpdatedItems( ITEM_VECTOR& aRemoved, ITEM_VECTOR& aAdded );
387
396 void Commit( NODE* aNode );
397
403 const JOINT* FindJoint( const VECTOR2I& aPos, int aLayer, NET_HANDLE aNet ) const;
404
405 void LockJoint( const VECTOR2I& aPos, const ITEM* aItem, bool aLock );
406
412 const JOINT* FindJoint( const VECTOR2I& aPos, const ITEM* aItem ) const
413 {
414 return FindJoint( aPos, aItem->Layers().Start(), aItem->Net() );
415 }
416
418 int FindLinesBetweenJoints( const JOINT& aA, const JOINT& aB, std::vector<LINE>& aLines );
419
421 void FindLineEnds( const LINE& aLine, JOINT& aA, JOINT& aB );
422
424 void KillChildren();
425
426 void AllItemsInNet( NET_HANDLE aNet, std::set<ITEM*>& aItems, int aKindMask = -1 );
427
428 void ClearRanks( int aMarkerMask = MK_HEAD | MK_VIOLATION );
429
430 void RemoveByMarker( int aMarker );
431
432 ITEM* FindItemByParent( const BOARD_ITEM* aParent );
433
434 std::vector<ITEM*> FindItemsByZone( const ZONE* aParent );
435
436 bool HasChildren() const
437 {
438 return !m_children.empty();
439 }
440
442 {
443 return m_parent;
444 }
445
447 bool Overrides( ITEM* aItem ) const
448 {
449 return m_override.find( aItem ) != m_override.end();
450 }
451
452 void FixupVirtualVias();
453
454 void AddRaw( ITEM* aItem, bool aAllowRedundant = false )
455 {
456 add( aItem, aAllowRedundant );
457 }
458
459private:
460 void add( ITEM* aItem, bool aAllowRedundant = false );
461
463 NODE( const NODE& aB );
464 NODE& operator=( const NODE& aB );
465
467 JOINT& touchJoint( const VECTOR2I& aPos, const LAYER_RANGE& aLayers, NET_HANDLE aNet );
468
470 void linkJoint( const VECTOR2I& aPos, const LAYER_RANGE& aLayers, NET_HANDLE aNet,
471 ITEM* aWhere );
472
474 void unlinkJoint( const VECTOR2I& aPos, const LAYER_RANGE& aLayers, NET_HANDLE aNet,
475 ITEM* aWhere );
476
478 void addSolid( SOLID* aSeg );
479 void addSegment( SEGMENT* aSeg );
480 void addVia( VIA* aVia );
481 void addArc( ARC* aVia );
482 void addHole( HOLE* aHole );
483
484 void removeSolidIndex( SOLID* aSeg );
485 void removeSegmentIndex( SEGMENT* aSeg );
486 void removeViaIndex( VIA* aVia );
487 void removeArcIndex( ARC* aVia );
488
489 void doRemove( ITEM* aItem );
490 void unlinkParent();
491 void releaseChildren();
492 void releaseGarbage();
493 void rebuildJoint( const JOINT* aJoint, const ITEM* aItem );
494
495 bool isRoot() const
496 {
497 return m_parent == nullptr;
498 }
499
500 SEGMENT* findRedundantSegment( const VECTOR2I& A, const VECTOR2I& B, const LAYER_RANGE& lr,
501 NET_HANDLE aNet );
503
504 ARC* findRedundantArc( const VECTOR2I& A, const VECTOR2I& B, const LAYER_RANGE& lr,
505 NET_HANDLE aNet );
506 ARC* findRedundantArc( ARC* aSeg );
507
509 void followLine( LINKED_ITEM* aCurrent, bool aScanDirection, int& aPos, int aLimit,
510 VECTOR2I* aCorners, LINKED_ITEM** aSegments, bool* aArcReversed,
511 bool& aGuardHit, bool aStopAtLockedJoints, bool aFollowLockedSegments );
512
513private:
514 struct DEFAULT_OBSTACLE_VISITOR;
515 typedef std::unordered_multimap<JOINT::HASH_TAG, JOINT, JOINT::JOINT_TAG_HASH> JOINT_MAP;
516 typedef JOINT_MAP::value_type TagJointPair;
517
520
523 std::set<NODE*> m_children;
524
525 std::unordered_set<ITEM*> m_override;
527
533
534 std::vector< std::unique_ptr<SHAPE> > m_edgeExclusions;
535
536 std::unordered_set<ITEM*> m_garbageItems;
537};
538
539}
540
541#endif
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:77
Represent a contiguous set of PCB layers.
Definition: pns_layerset.h:32
int Start() const
Definition: pns_layerset.h:82
static LAYER_RANGE All()
Definition: pns_layerset.h:125
INDEX.
Definition: pns_index.h:46
Base class for PNS router board items.
Definition: pns_item.h:97
virtual NET_HANDLE Net() const
Definition: pns_item.h:193
const LAYER_RANGE & Layers() const
Definition: pns_item.h:195
A 2D point on a given set of layers and belonging to a certain net, that links together a number of b...
Definition: pns_joint.h:43
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads,...
Definition: pns_line.h:61
Keep the router "world" - i.e.
Definition: pns_node.h:198
bool HasChildren() const
Definition: pns_node.h:436
NODE * Branch()
Create a lightweight copy (called branch) of self that tracks the changes (added/removed items) wrs t...
Definition: pns_node.cpp:143
void RemoveByMarker(int aMarker)
Definition: pns_node.cpp:1518
NODE * m_root
root node of the whole hierarchy
Definition: pns_node.h:522
SEGMENT * findRedundantSegment(const VECTOR2I &A, const VECTOR2I &B, const LAYER_RANGE &lr, NET_HANDLE aNet)
Definition: pns_node.cpp:1533
int FindLinesBetweenJoints(const JOINT &aA, const JOINT &aB, std::vector< LINE > &aLines)
Find the joints corresponding to the ends of line aLine.
Definition: pns_node.cpp:1084
NODE * GetParent() const
Check if this branch contains an updated version of the m_item from the root branch.
Definition: pns_node.h:441
std::vector< ITEM * > ITEM_VECTOR
Definition: pns_node.h:209
int GetClearance(const ITEM *aA, const ITEM *aB, bool aUseClearanceEpsilon=true) const
Return the pre-set worst case clearance between any pair of items.
Definition: pns_node.cpp:129
void followLine(LINKED_ITEM *aCurrent, bool aScanDirection, int &aPos, int aLimit, VECTOR2I *aCorners, LINKED_ITEM **aSegments, bool *aArcReversed, bool &aGuardHit, bool aStopAtLockedJoints, bool aFollowLockedSegments)
Definition: pns_node.cpp:942
void addSolid(SOLID *aSeg)
Definition: pns_node.cpp:495
bool Overrides(ITEM *aItem) const
Definition: pns_node.h:447
int GetMaxClearance() const
Set the worst-case clearance between any pair of items.
Definition: pns_node.h:219
void removeSegmentIndex(SEGMENT *aSeg)
Definition: pns_node.cpp:742
void SetMaxClearance(int aClearance)
Assign a clearance resolution function object.
Definition: pns_node.h:225
COLLISION_QUERY_SCOPE
< Supported item types
Definition: pns_node.h:203
@ CQS_IGNORE_HOLE_CLEARANCE
check everything except hole2hole / hole2copper
Definition: pns_node.h:205
@ CQS_ALL_RULES
check all rules
Definition: pns_node.h:204
void rebuildJoint(const JOINT *aJoint, const ITEM *aItem)
Definition: pns_node.cpp:756
void GetUpdatedItems(ITEM_VECTOR &aRemoved, ITEM_VECTOR &aAdded)
Return the list of items removed and added in this branch with respect to the root branch.
Definition: pns_node.cpp:1393
void addSegment(SEGMENT *aSeg)
Definition: pns_node.cpp:629
std::vector< std::unique_ptr< SHAPE > > m_edgeExclusions
Definition: pns_node.h:534
void releaseChildren()
Definition: pns_node.cpp:1412
JOINT_MAP::value_type TagJointPair
Definition: pns_node.h:516
void addVia(VIA *aVia)
Definition: pns_node.cpp:518
bool QueryEdgeExclusions(const VECTOR2I &aPos) const
Definition: pns_node.cpp:690
void doRemove(ITEM *aItem)
Definition: pns_node.cpp:702
OPT_OBSTACLE CheckColliding(const ITEM *aItem, int aKindMask=ITEM::ANY_T)
Check if the item collides with anything else in the world, and if found, returns the obstacle.
Definition: pns_node.cpp:393
const JOINT * FindJoint(const VECTOR2I &aPos, int aLayer, NET_HANDLE aNet) const
Search for a joint at a given position, layer and belonging to given net.
Definition: pns_node.cpp:1189
void addHole(HOLE *aHole)
Definition: pns_node.cpp:536
std::optional< OBSTACLE > OPT_OBSTACLE
Definition: pns_node.h:208
std::unordered_set< ITEM * > m_garbageItems
Definition: pns_node.h:536
void Dump(bool aLong=false)
Definition: pns_node.cpp:1306
void AddRaw(ITEM *aItem, bool aAllowRedundant=false)
Definition: pns_node.h:454
NODE(const NODE &aB)
nodes are not copyable
void releaseGarbage()
Definition: pns_node.cpp:1425
int Depth() const
Definition: pns_node.h:248
void addArc(ARC *aVia)
Definition: pns_node.cpp:658
void FindLineEnds(const LINE &aLine, JOINT &aA, JOINT &aB)
Destroy all child nodes. Applicable only to the root node.
Definition: pns_node.cpp:1077
JOINT & touchJoint(const VECTOR2I &aPos, const LAYER_RANGE &aLayers, NET_HANDLE aNet)
Touch a joint and links it to an m_item.
Definition: pns_node.cpp:1226
RULE_RESOLVER * GetRuleResolver() const
Return the number of joints.
Definition: pns_node.h:236
int QueryJoints(const BOX2I &aBox, std::vector< JOINT * > &aJoints, LAYER_RANGE aLayerMask=LAYER_RANGE::All(), int aKindMask=ITEM::ANY_T)
Definition: pns_node.cpp:1603
void FixupVirtualVias()
Definition: pns_node.cpp:1118
std::set< OBSTACLE > OBSTACLES
Definition: pns_node.h:210
std::unordered_multimap< JOINT::HASH_TAG, JOINT, JOINT::JOINT_TAG_HASH > JOINT_MAP
Definition: pns_node.h:515
INDEX * m_index
Geometric/Net index of the items.
Definition: pns_node.h:530
std::vector< ITEM * > FindItemsByZone(const ZONE *aParent)
Definition: pns_node.cpp:1661
std::unordered_set< ITEM * > m_override
hash of root's items that have been changed in this node
Definition: pns_node.h:525
void AllItemsInNet(NET_HANDLE aNet, std::set< ITEM * > &aItems, int aKindMask=-1)
Definition: pns_node.cpp:1479
OPT_OBSTACLE NearestObstacle(const LINE *aLine, const COLLISION_SEARCH_OPTIONS &aOpts=COLLISION_SEARCH_OPTIONS())
Follow the line in search of an obstacle that is nearest to the starting to the line's starting point...
Definition: pns_node.cpp:283
void LockJoint(const VECTOR2I &aPos, const ITEM *aItem, bool aLock)
Definition: pns_node.cpp:1219
void SetRuleResolver(RULE_RESOLVER *aFunc)
Definition: pns_node.h:231
void removeArcIndex(ARC *aVia)
Definition: pns_node.cpp:749
int JointCount() const
Return the number of nodes in the inheritance chain (wrs to the root node).
Definition: pns_node.h:242
void AddEdgeExclusion(std::unique_ptr< SHAPE > aShape)
Definition: pns_node.cpp:684
int QueryColliding(const ITEM *aItem, OBSTACLES &aObstacles, const COLLISION_SEARCH_OPTIONS &aOpts=COLLISION_SEARCH_OPTIONS()) const
Find items colliding (closer than clearance) with the item aItem.
Definition: pns_node.cpp:252
NODE & operator=(const NODE &aB)
Try to find matching joint and creates a new one if not found.
int m_maxClearance
worst case item-item clearance
Definition: pns_node.h:528
const JOINT * FindJoint(const VECTOR2I &aPos, const ITEM *aItem) const
Search for a joint at a given position, linked to given item.
Definition: pns_node.h:412
bool isRoot() const
Definition: pns_node.h:495
void removeViaIndex(VIA *aVia)
Definition: pns_node.cpp:801
void unlinkJoint(const VECTOR2I &aPos, const LAYER_RANGE &aLayers, NET_HANDLE aNet, ITEM *aWhere)
Helpers for adding/removing items.
Definition: pns_node.cpp:1296
void add(ITEM *aItem, bool aAllowRedundant=false)
Definition: pns_node.cpp:552
void KillChildren()
Definition: pns_node.cpp:1473
void removeSolidIndex(SOLID *aSeg)
Definition: pns_node.cpp:809
int m_depth
depth of the node (number of parent nodes in the inheritance chain)
Definition: pns_node.h:531
bool Add(std::unique_ptr< SEGMENT > &&aSegment, bool aAllowRedundant=false)
Add an item to the current node.
Definition: pns_node.cpp:640
std::set< NODE * > m_children
list of nodes branched from this one
Definition: pns_node.h:523
ITEM * FindItemByParent(const BOARD_ITEM *aParent)
Definition: pns_node.cpp:1641
JOINT_MAP m_joints
hash table with the joints, linking the items.
Definition: pns_node.h:518
ARC * findRedundantArc(const VECTOR2I &A, const VECTOR2I &B, const LAYER_RANGE &lr, NET_HANDLE aNet)
Definition: pns_node.cpp:1568
NODE * m_parent
node this node was branched from
Definition: pns_node.h:521
void ClearRanks(int aMarkerMask=MK_HEAD|MK_VIOLATION)
Definition: pns_node.cpp:1508
void Replace(ITEM *aOldItem, std::unique_ptr< ITEM > &&aNewItem)
Replace an item with another one.
Definition: pns_node.cpp:821
void Remove(ARC *aArc)
Remove an item from this branch.
Definition: pns_node.cpp:861
void unlinkParent()
Definition: pns_node.cpp:179
void Commit(NODE *aNode)
Apply the changes from a given branch (aNode) to the root branch.
Definition: pns_node.cpp:1448
RULE_RESOLVER * m_ruleResolver
Design rules resolver.
Definition: pns_node.h:529
~NODE()
Return the expected clearance between items a and b.
Definition: pns_node.cpp:70
void linkJoint(const VECTOR2I &aPos, const LAYER_RANGE &aLayers, NET_HANDLE aNet, ITEM *aWhere)
Unlink an item from a joint.
Definition: pns_node.cpp:1287
const LINE AssembleLine(LINKED_ITEM *aSeg, int *aOriginSegmentIndex=nullptr, bool aStopAtLockedJoints=false, bool aFollowLockedSegments=false)
Follow the joint map to assemble a line connecting two non-trivial joints starting from segment aSeg.
Definition: pns_node.cpp:991
const ITEM_SET HitTest(const VECTOR2I &aPoint) const
Find all items that contain the point aPoint.
Definition: pns_node.cpp:466
const NODE * m_node
node we are searching in (either root or a branch)
Definition: pns_node.h:184
const ITEM * m_item
the item we are looking for collisions with
Definition: pns_node.h:182
virtual bool operator()(ITEM *aCandidate)=0
bool visit(ITEM *aCandidate)
Definition: pns_node.cpp:203
void SetWorld(const NODE *aNode, const NODE *aOverride=nullptr)
Definition: pns_node.cpp:196
const NODE * m_override
node that overrides root entries
Definition: pns_node.h:185
virtual ~OBSTACLE_VISITOR()
Definition: pns_node.h:170
virtual int NetCode(NET_HANDLE aNet)=0
virtual ~RULE_RESOLVER()
Definition: pns_node.h:138
virtual void ClearCacheForItems(std::vector< const ITEM * > &aItems)
Definition: pns_node.h:158
virtual int ClearanceEpsilon() const
Definition: pns_node.h:161
virtual bool IsKeepout(const ITEM *aA, const ITEM *aB)=0
virtual int Clearance(const ITEM *aA, const ITEM *aB, bool aUseClearanceEpsilon=true)=0
virtual bool IsNetTieExclusion(const ITEM *aItem, const VECTOR2I &aCollisionPos, const ITEM *aCollidingItem)=0
virtual bool DpNetPair(const ITEM *aItem, NET_HANDLE &aNetP, NET_HANDLE &aNetN)=0
virtual bool QueryConstraint(CONSTRAINT_TYPE aType, const ITEM *aItemA, const ITEM *aItemB, int aLayer, CONSTRAINT *aConstraint)=0
virtual bool IsInNetTie(const ITEM *aA)=0
virtual NET_HANDLE DpCoupledNet(NET_HANDLE aNet)=0
virtual int DpNetPolarity(NET_HANDLE aNet)=0
virtual void ClearCaches()
Definition: pns_node.h:159
virtual wxString NetName(NET_HANDLE aNet)=0
Handle a list of polygons defining a copper zone.
Definition: zone.h:72
Push and Shove diff pair dimensions (gap) settings dialog.
CONSTRAINT_TYPE
Definition: pns_node.h:52
void * NET_HANDLE
Definition: pns_item.h:54
@ MK_VIOLATION
Definition: pns_item.h:43
@ MK_HEAD
Definition: pns_item.h:42
@ VIA
Normal via.
Definition: router_tool.cpp:92
const COLLISION_SEARCH_OPTIONS options
Definition: pns_node.h:131
std::set< OBSTACLE > & obstacles
Definition: pns_node.h:130
COLLISION_SEARCH_CONTEXT(std::set< OBSTACLE > &aObs, const COLLISION_SEARCH_OPTIONS aOpts)
Definition: pns_node.h:124
std::set< ITEM * > * m_restrictedSet
Definition: pns_node.h:118
An abstract function object, returning a design rule (clearance, diff pair gap, etc) required between...
Definition: pns_node.h:70
wxString m_FromName
Definition: pns_node.h:75
bool m_Allowed
Definition: pns_node.h:73
wxString m_RuleName
Definition: pns_node.h:74
wxString m_ToName
Definition: pns_node.h:76
MINOPTMAX< int > m_Value
Definition: pns_node.h:72
CONSTRAINT_TYPE m_Type
Definition: pns_node.h:71
Hold an object colliding with another object, along with some useful data about the collision.
Definition: pns_node.h:84
VECTOR2I m_pos
Definition: pns_node.h:89
int m_distFirst
... and the distance thereof
Definition: pns_node.h:90
int m_clearance
Definition: pns_node.h:88
int m_maxFanoutWidth
worst case (largest) width of the tracks connected to the item
Definition: pns_node.h:91
CONSTRAINT_TYPE m_violatingConstraint
Definition: pns_node.h:93
bool operator==(const OBSTACLE &other) const
Definition: pns_node.h:95
ITEM * m_head
Line we search collisions against.
Definition: pns_node.h:85
bool operator<(const OBSTACLE &other) const
Definition: pns_node.h:100
VECTOR2I m_ipFirst
First intersection between m_head and m_hull.
Definition: pns_node.h:87
ITEM * m_item
Item found to be colliding with m_head.
Definition: pns_node.h:86