KiCad PCB EDA Suite
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-2022 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 <unordered_set>
29#include <core/minoptmax.h>
30
33
34#include "pns_item.h"
35#include "pns_joint.h"
36#include "pns_itemset.h"
37
38namespace PNS {
39
40class ARC;
41class SEGMENT;
42class LINE;
43class SOLID;
44class VIA;
45class INDEX;
46class ROUTER;
47class NODE;
48
55{
56 CT_CLEARANCE = 1,
58 CT_LENGTH = 3,
59 CT_WIDTH = 4,
61 CT_VIA_HOLE = 6,
65};
66
68{
72 wxString m_RuleName;
73 wxString m_FromName;
74 wxString m_ToName;
75};
76
78{
79public:
80 virtual ~RULE_RESOLVER() {}
81
82 virtual int Clearance( const ITEM* aA, const ITEM* aB, bool aUseClearanceEpsilon = true ) = 0;
83 virtual int HoleClearance( const ITEM* aA, const ITEM* aB,
84 bool aUseClearanceEpsilon = true ) = 0;
85 virtual int HoleToHoleClearance( const ITEM* aA, const ITEM* aB,
86 bool aUseClearanceEpsilon = true ) = 0;
87
88 virtual int DpCoupledNet( int aNet ) = 0;
89 virtual int DpNetPolarity( int aNet ) = 0;
90 virtual bool DpNetPair( const ITEM* aItem, int& aNetP, int& aNetN ) = 0;
91
92 virtual bool IsDiffPair( const ITEM* aA, const ITEM* aB ) = 0;
93
94 virtual bool IsInNetTie( const ITEM* aA ) = 0;
95 virtual bool IsNetTieExclusion( const PNS::ITEM* aItem, const VECTOR2I& aCollisionPos,
96 const PNS::ITEM* aCollidingItem )= 0;
97
98
99 virtual bool QueryConstraint( CONSTRAINT_TYPE aType, const PNS::ITEM* aItemA,
100 const PNS::ITEM* aItemB, int aLayer,
101 PNS::CONSTRAINT* aConstraint ) = 0;
102
103 virtual wxString NetName( int aNet ) = 0;
104
105 virtual void ClearCacheForItem( const ITEM* aItem ) {}
106 virtual void ClearCaches() {}
107};
108
113{
114 const ITEM* m_head;
115
121};
122
124{
125public:
126 OBSTACLE_VISITOR( const ITEM* aItem );
127
129 {
130 }
131
132 void SetWorld( const NODE* aNode, const NODE* aOverride = nullptr );
133
134 virtual bool operator()( ITEM* aCandidate ) = 0;
135
136protected:
137 bool visit( ITEM* aCandidate );
138
139protected:
140 const ITEM* m_item;
141
142 const NODE* m_node;
144};
145
155class NODE
156{
157public:
158
161 {
164 };
165
166 typedef std::optional<OBSTACLE> OPT_OBSTACLE;
167 typedef std::vector<ITEM*> ITEM_VECTOR;
168 typedef std::vector<OBSTACLE> OBSTACLES;
169
170 NODE();
171 ~NODE();
172
174 int GetClearance( const ITEM* aA, const ITEM* aB, bool aUseClearanceEpsilon = true ) const;
175 int GetHoleClearance( const ITEM* aA, const ITEM* aB, bool aUseClearanceEpsilon = true ) const;
176 int GetHoleToHoleClearance( const ITEM* aA, const ITEM* aB,
177 bool aUseClearanceEpsilon = true ) const;
178
180 int GetMaxClearance() const
181 {
182 return m_maxClearance;
183 }
184
186 void SetMaxClearance( int aClearance )
187 {
188 m_maxClearance = aClearance;
189 }
190
193 {
194 m_ruleResolver = aFunc;
195 }
196
198 {
199 return m_ruleResolver;
200 }
201
203 int JointCount() const
204 {
205 return m_joints.size();
206 }
207
209 int Depth() const
210 {
211 return m_depth;
212 }
213
223 int QueryColliding( const ITEM* aItem, OBSTACLES& aObstacles, int aKindMask = ITEM::ANY_T,
224 int aLimitCount = -1, bool aDifferentNetsOnly = true, int aOverrideClearance = -1 );
225
226 int QueryJoints( const BOX2I& aBox, std::vector<JOINT*>& aJoints,
227 LAYER_RANGE aLayerMask = LAYER_RANGE::All(), int aKindMask = ITEM::ANY_T );
228
239 OPT_OBSTACLE NearestObstacle( const LINE* aLine, int aKindMask = ITEM::ANY_T,
240 const std::set<ITEM*>* aRestrictedSet = nullptr,
241 bool aUseClearanceEpsilon = true );
242
251 OPT_OBSTACLE CheckColliding( const ITEM* aItem, int aKindMask = ITEM::ANY_T );
252
253
262 OPT_OBSTACLE CheckColliding( const ITEM_SET& aSet, int aKindMask = ITEM::ANY_T );
263
270 const ITEM_SET HitTest( const VECTOR2I& aPoint ) const;
271
280 bool Add( std::unique_ptr< SEGMENT > aSegment, bool aAllowRedundant = false );
281 void Add( std::unique_ptr< SOLID > aSolid );
282 void Add( std::unique_ptr< VIA > aVia );
283 bool Add( std::unique_ptr< ARC > aArc, bool aAllowRedundant = false );
284
285 void Add( LINE& aLine, bool aAllowRedundant = false );
286
287 void AddEdgeExclusion( std::unique_ptr<SHAPE> aShape );
288
289 bool QueryEdgeExclusions( const VECTOR2I& aPos ) const;
290
294 void Remove( ARC* aArc );
295 void Remove( SOLID* aSolid );
296 void Remove( VIA* aVia );
297 void Remove( SEGMENT* aSegment );
298 void Remove( ITEM* aItem );
299
305 void Remove( LINE& aLine );
306
313 void Replace( ITEM* aOldItem, std::unique_ptr< ITEM > aNewItem );
314 void Replace( LINE& aOldLine, LINE& aNewLine );
315
324 NODE* Branch();
325
337 const LINE AssembleLine( LINKED_ITEM* aSeg, int* aOriginSegmentIndex = nullptr,
338 bool aStopAtLockedJoints = false,
339 bool aFollowLockedSegments = false );
340
342 void Dump( bool aLong = false );
343
350 void GetUpdatedItems( ITEM_VECTOR& aRemoved, ITEM_VECTOR& aAdded );
351
360 void Commit( NODE* aNode );
361
367 JOINT* FindJoint( const VECTOR2I& aPos, int aLayer, int aNet );
368
369 void LockJoint( const VECTOR2I& aPos, const ITEM* aItem, bool aLock );
370
376 JOINT* FindJoint( const VECTOR2I& aPos, const ITEM* aItem )
377 {
378 return FindJoint( aPos, aItem->Layers().Start(), aItem->Net() );
379 }
380
382 int FindLinesBetweenJoints( const JOINT& aA, const JOINT& aB, std::vector<LINE>& aLines );
383
385 void FindLineEnds( const LINE& aLine, JOINT& aA, JOINT& aB );
386
388 void KillChildren();
389
390 void AllItemsInNet( int aNet, std::set<ITEM*>& aItems, int aKindMask = -1 );
391
392 void ClearRanks( int aMarkerMask = MK_HEAD | MK_VIOLATION | MK_HOLE );
393
394 void RemoveByMarker( int aMarker );
395
396 ITEM* FindItemByParent( const BOARD_ITEM* aParent );
397
398 bool HasChildren() const
399 {
400 return !m_children.empty();
401 }
402
404 {
405 return m_parent;
406 }
407
409 bool Overrides( ITEM* aItem ) const
410 {
411 return m_override.find( aItem ) != m_override.end();
412 }
413
414 void FixupVirtualVias();
415
417 {
418 m_collisionQueryScope = aScope;
419 }
420
422 {
424 }
425
426 void Add( std::unique_ptr< ITEM > aItem, bool aAllowRedundant = false );
427
428private:
429
431 NODE( const NODE& aB );
432 NODE& operator=( const NODE& aB );
433
435 JOINT& touchJoint( const VECTOR2I& aPos, const LAYER_RANGE& aLayers, int aNet );
436
438 void linkJoint( const VECTOR2I& aPos, const LAYER_RANGE& aLayers, int aNet, ITEM* aWhere );
439
441 void unlinkJoint( const VECTOR2I& aPos, const LAYER_RANGE& aLayers, int aNet, ITEM* aWhere );
442
444 void addSolid( SOLID* aSeg );
445 void addSegment( SEGMENT* aSeg );
446 void addVia( VIA* aVia );
447 void addArc( ARC* aVia );
448
449 void removeSolidIndex( SOLID* aSeg );
450 void removeSegmentIndex( SEGMENT* aSeg );
451 void removeViaIndex( VIA* aVia );
452 void removeArcIndex( ARC* aVia );
453
454 void doRemove( ITEM* aItem );
455 void unlinkParent();
456 void releaseChildren();
457 void releaseGarbage();
458 void rebuildJoint( JOINT* aJoint, ITEM* aItem );
459
460 bool isRoot() const
461 {
462 return m_parent == nullptr;
463 }
464
465 SEGMENT* findRedundantSegment( const VECTOR2I& A, const VECTOR2I& B, const LAYER_RANGE& lr,
466 int aNet );
468
469 ARC* findRedundantArc( const VECTOR2I& A, const VECTOR2I& B, const LAYER_RANGE& lr, int aNet );
470 ARC* findRedundantArc( ARC* aSeg );
471
473 void followLine( LINKED_ITEM* aCurrent, bool aScanDirection, int& aPos, int aLimit,
474 VECTOR2I* aCorners, LINKED_ITEM** aSegments, bool* aArcReversed,
475 bool& aGuardHit, bool aStopAtLockedJoints, bool aFollowLockedSegments );
476
477private:
478 struct DEFAULT_OBSTACLE_VISITOR;
479 typedef std::unordered_multimap<JOINT::HASH_TAG, JOINT, JOINT::JOINT_TAG_HASH> JOINT_MAP;
480 typedef JOINT_MAP::value_type TagJointPair;
481
484
487 std::set<NODE*> m_children;
488
489 std::unordered_set<ITEM*> m_override;
491
497
498 std::vector< std::unique_ptr<SHAPE> > m_edgeExclusions;
499
500 std::unordered_set<ITEM*> m_garbageItems;
501
503};
504
505}
506
507#endif
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:58
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:56
const LAYER_RANGE & Layers() const
Definition: pns_item.h:156
int Net() const
Definition: pns_item.h:154
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:156
bool HasChildren() const
Definition: pns_node.h:398
NODE * Branch()
Create a lightweight copy (called branch) of self that tracks the changes (added/removed items) wrs t...
Definition: pns_node.cpp:139
COLLISION_QUERY_SCOPE GetCollisionQueryScope() const
Definition: pns_node.h:421
void linkJoint(const VECTOR2I &aPos, const LAYER_RANGE &aLayers, int aNet, ITEM *aWhere)
Unlink an item from a joint.
Definition: pns_node.cpp:1288
void RemoveByMarker(int aMarker)
Definition: pns_node.cpp:1504
NODE * m_root
root node of the whole hierarchy
Definition: pns_node.h:486
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:403
std::vector< ITEM * > ITEM_VECTOR
Definition: pns_node.h:167
int GetClearance(const ITEM *aA, const ITEM *aB, bool aUseClearanceEpsilon=true) const
Definition: pns_node.cpp:103
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 SetCollisionQueryScope(COLLISION_QUERY_SCOPE aScope)
Definition: pns_node.h:416
void addSolid(SOLID *aSeg)
Definition: pns_node.cpp:572
void Replace(ITEM *aOldItem, std::unique_ptr< ITEM > aNewItem)
Replace an item with another one.
Definition: pns_node.cpp:846
bool Overrides(ITEM *aItem) const
Definition: pns_node.h:409
int GetMaxClearance() const
Set the worst-case clearance between any pair of items.
Definition: pns_node.h:180
void removeSegmentIndex(SEGMENT *aSeg)
Definition: pns_node.cpp:767
void SetMaxClearance(int aClearance)
Assign a clearance resolution function object.
Definition: pns_node.h:186
COLLISION_QUERY_SCOPE
< Supported item types
Definition: pns_node.h:161
@ CQS_IGNORE_HOLE_CLEARANCE
check everything except hole2hole / hole2copper
Definition: pns_node.h:163
@ CQS_ALL_RULES
check all rules
Definition: pns_node.h:162
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:1392
void addSegment(SEGMENT *aSeg)
Definition: pns_node.cpp:655
std::vector< std::unique_ptr< SHAPE > > m_edgeExclusions
Definition: pns_node.h:498
void releaseChildren()
Definition: pns_node.cpp:1411
int QueryColliding(const ITEM *aItem, OBSTACLES &aObstacles, int aKindMask=ITEM::ANY_T, int aLimitCount=-1, bool aDifferentNetsOnly=true, int aOverrideClearance=-1)
Find items colliding (closer than clearance) with the item aItem.
Definition: pns_node.cpp:271
JOINT_MAP::value_type TagJointPair
Definition: pns_node.h:480
void addVia(VIA *aVia)
Definition: pns_node.cpp:588
COLLISION_QUERY_SCOPE m_collisionQueryScope
Definition: pns_node.h:502
bool QueryEdgeExclusions(const VECTOR2I &aPos) const
Definition: pns_node.cpp:734
void AllItemsInNet(int aNet, std::set< ITEM * > &aItems, int aKindMask=-1)
Definition: pns_node.cpp:1465
void doRemove(ITEM *aItem)
Definition: pns_node.cpp:746
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:472
std::optional< OBSTACLE > OPT_OBSTACLE
Definition: pns_node.h:166
std::unordered_set< ITEM * > m_garbageItems
Definition: pns_node.h:500
void Dump(bool aLong=false)
Definition: pns_node.cpp:1305
void rebuildJoint(JOINT *aJoint, ITEM *aItem)
Definition: pns_node.cpp:781
int GetHoleToHoleClearance(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:127
NODE(const NODE &aB)
nodes are not copyable
JOINT * FindJoint(const VECTOR2I &aPos, const ITEM *aItem)
Search for a joint at a given position, linked to given item.
Definition: pns_node.h:376
void ClearRanks(int aMarkerMask=MK_HEAD|MK_VIOLATION|MK_HOLE)
Definition: pns_node.cpp:1494
void releaseGarbage()
Definition: pns_node.cpp:1424
int Depth() const
Definition: pns_node.h:209
void addArc(ARC *aVia)
Definition: pns_node.cpp:683
void FindLineEnds(const LINE &aLine, JOINT &aA, JOINT &aB)
Destroy all child nodes. Applicable only to the root node.
Definition: pns_node.cpp:1077
RULE_RESOLVER * GetRuleResolver() const
Return the number of joints.
Definition: pns_node.h:197
std::vector< OBSTACLE > OBSTACLES
Definition: pns_node.h:168
int QueryJoints(const BOX2I &aBox, std::vector< JOINT * > &aJoints, LAYER_RANGE aLayerMask=LAYER_RANGE::All(), int aKindMask=ITEM::ANY_T)
Definition: pns_node.cpp:1589
bool Add(std::unique_ptr< SEGMENT > aSegment, bool aAllowRedundant=false)
Add an item to the current node.
Definition: pns_node.cpp:664
void FixupVirtualVias()
Definition: pns_node.cpp:1118
std::unordered_multimap< JOINT::HASH_TAG, JOINT, JOINT::JOINT_TAG_HASH > JOINT_MAP
Definition: pns_node.h:479
INDEX * m_index
Geometric/Net index of the items.
Definition: pns_node.h:494
std::unordered_set< ITEM * > m_override
hash of root's items that have been changed in this node
Definition: pns_node.h:489
void LockJoint(const VECTOR2I &aPos, const ITEM *aItem, bool aLock)
Definition: pns_node.cpp:1219
void SetRuleResolver(RULE_RESOLVER *aFunc)
Definition: pns_node.h:192
ARC * findRedundantArc(const VECTOR2I &A, const VECTOR2I &B, const LAYER_RANGE &lr, int aNet)
Definition: pns_node.cpp:1554
void removeArcIndex(ARC *aVia)
Definition: pns_node.cpp:774
int JointCount() const
Return the number of nodes in the inheritance chain (wrs to the root node).
Definition: pns_node.h:203
JOINT & touchJoint(const VECTOR2I &aPos, const LAYER_RANGE &aLayers, int aNet)
Touch a joint and links it to an m_item.
Definition: pns_node.cpp:1226
void AddEdgeExclusion(std::unique_ptr< SHAPE > aShape)
Definition: pns_node.cpp:728
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:492
OPT_OBSTACLE NearestObstacle(const LINE *aLine, int aKindMask=ITEM::ANY_T, const std::set< ITEM * > *aRestrictedSet=nullptr, bool aUseClearanceEpsilon=true)
Follow the line in search of an obstacle that is nearest to the starting to the line's starting point...
Definition: pns_node.cpp:301
void unlinkJoint(const VECTOR2I &aPos, const LAYER_RANGE &aLayers, int aNet, ITEM *aWhere)
Helpers for adding/removing items.
Definition: pns_node.cpp:1296
bool isRoot() const
Definition: pns_node.h:460
int GetHoleClearance(const ITEM *aA, const ITEM *aB, bool aUseClearanceEpsilon=true) const
Definition: pns_node.cpp:115
void removeViaIndex(VIA *aVia)
Definition: pns_node.cpp:826
void KillChildren()
Definition: pns_node.cpp:1459
void removeSolidIndex(SOLID *aSeg)
Definition: pns_node.cpp:834
int m_depth
depth of the node (number of parent nodes in the inheritance chain)
Definition: pns_node.h:495
std::set< NODE * > m_children
list of nodes branched from this one
Definition: pns_node.h:487
ITEM * FindItemByParent(const BOARD_ITEM *aParent)
Definition: pns_node.cpp:1627
JOINT_MAP m_joints
hash table with the joints, linking the items.
Definition: pns_node.h:482
NODE * m_parent
node this node was branched from
Definition: pns_node.h:485
JOINT * FindJoint(const VECTOR2I &aPos, int aLayer, int aNet)
Search for a joint at a given position, layer and belonging to given net.
Definition: pns_node.cpp:1189
void Remove(ARC *aArc)
Remove an item from this branch.
Definition: pns_node.cpp:881
void unlinkParent()
Definition: pns_node.cpp:176
void Commit(NODE *aNode)
Apply the changes from a given branch (aNode) to the root branch.
Definition: pns_node.cpp:1439
RULE_RESOLVER * m_ruleResolver
Design rules resolver.
Definition: pns_node.h:493
~NODE()
Return the expected clearance between items a and b.
Definition: pns_node.cpp:70
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
SEGMENT * findRedundantSegment(const VECTOR2I &A, const VECTOR2I &B, const LAYER_RANGE &lr, int aNet)
Definition: pns_node.cpp:1519
const ITEM_SET HitTest(const VECTOR2I &aPoint) const
Find all items that contain the point aPoint.
Definition: pns_node.cpp:543
OBSTACLE_VISITOR(const ITEM *aItem)
Definition: pns_node.cpp:185
const NODE * m_node
node we are searching in (either root or a branch)
Definition: pns_node.h:142
const ITEM * m_item
the item we are looking for collisions with
Definition: pns_node.h:140
virtual bool operator()(ITEM *aCandidate)=0
bool visit(ITEM *aCandidate)
Definition: pns_node.cpp:200
void SetWorld(const NODE *aNode, const NODE *aOverride=nullptr)
Definition: pns_node.cpp:193
const NODE * m_override
node that overrides root entries
Definition: pns_node.h:143
virtual ~OBSTACLE_VISITOR()
Definition: pns_node.h:128
virtual ~RULE_RESOLVER()
Definition: pns_node.h:80
virtual bool QueryConstraint(CONSTRAINT_TYPE aType, const PNS::ITEM *aItemA, const PNS::ITEM *aItemB, int aLayer, PNS::CONSTRAINT *aConstraint)=0
virtual int HoleToHoleClearance(const ITEM *aA, const ITEM *aB, bool aUseClearanceEpsilon=true)=0
virtual void ClearCacheForItem(const ITEM *aItem)
Definition: pns_node.h:105
virtual bool IsNetTieExclusion(const PNS::ITEM *aItem, const VECTOR2I &aCollisionPos, const PNS::ITEM *aCollidingItem)=0
virtual wxString NetName(int aNet)=0
virtual int Clearance(const ITEM *aA, const ITEM *aB, bool aUseClearanceEpsilon=true)=0
virtual int DpNetPolarity(int aNet)=0
virtual bool IsInNetTie(const ITEM *aA)=0
virtual int DpCoupledNet(int aNet)=0
virtual bool IsDiffPair(const ITEM *aA, const ITEM *aB)=0
virtual void ClearCaches()
Definition: pns_node.h:106
virtual bool DpNetPair(const ITEM *aItem, int &aNetP, int &aNetN)=0
virtual int HoleClearance(const ITEM *aA, const ITEM *aB, bool aUseClearanceEpsilon=true)=0
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
Push and Shove diff pair dimensions (gap) settings dialog.
CONSTRAINT_TYPE
An abstract function object, returning a design rule (clearance, diff pair gap, etc) required between...
Definition: pns_node.h:55
@ MK_VIOLATION
Definition: pns_item.h:42
@ MK_HEAD
Definition: pns_item.h:41
@ MK_HOLE
Definition: pns_item.h:45
wxString m_FromName
Definition: pns_node.h:73
bool m_Allowed
Definition: pns_node.h:71
wxString m_RuleName
Definition: pns_node.h:72
wxString m_ToName
Definition: pns_node.h:74
MINOPTMAX< int > m_Value
Definition: pns_node.h:70
CONSTRAINT_TYPE m_Type
Definition: pns_node.h:69
Hold an object colliding with another object, along with some useful data about the collision.
Definition: pns_node.h:113
int m_distFirst
... and the distance thereof
Definition: pns_node.h:119
int m_maxFanoutWidth
worst case (largest) width of the tracks connected to the item
Definition: pns_node.h:120
VECTOR2I m_ipFirst
First intersection between m_head and m_hull.
Definition: pns_node.h:118
ITEM * m_item
Item found to be colliding with m_head.
Definition: pns_node.h:116
const ITEM * m_head
Item we search collisions with.
Definition: pns_node.h:114
SHAPE_LINE_CHAIN m_hull
Hull of the colliding m_item.
Definition: pns_node.h:117