KiCad PCB EDA Suite
Loading...
Searching...
No Matches
drc_rtree.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2020-2022 KiCad Developers, see AUTHORS.txt for contributors.
5 * Copyright (C) 2020 CERN
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 3
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-3.0.html
20 * or you may search the http://www.gnu.org website for the version 3 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25#ifndef DRC_RTREE_H_
26#define DRC_RTREE_H_
27
28#include <board_item.h>
29#include <pad.h>
30#include <pcb_text.h>
31#include <memory>
32#include <unordered_set>
33#include <set>
34#include <vector>
35
36#include <geometry/rtree.h>
37#include <geometry/shape.h>
39#include <math/vector2d.h>
40#include "geometry/shape_null.h"
41#include "board.h"
42
48{
49
50public:
51
53 {
54 ITEM_WITH_SHAPE( BOARD_ITEM *aParent, const SHAPE* aShape,
55 std::shared_ptr<SHAPE> aParentShape = nullptr ) :
56 parent( aParent ),
57 shape( aShape ),
58 shapeStorage( nullptr ),
59 parentShape( std::move( aParentShape ) )
60 {};
61
62 ITEM_WITH_SHAPE( BOARD_ITEM *aParent, const std::shared_ptr<SHAPE>& aShape,
63 std::shared_ptr<SHAPE> aParentShape = nullptr ) :
64 parent( aParent ),
65 shape( aShape.get() ),
66 shapeStorage( aShape ),
67 parentShape( std::move( aParentShape ) )
68 {};
69
71 const SHAPE* shape;
72 std::shared_ptr<SHAPE> shapeStorage;
73 std::shared_ptr<SHAPE> parentShape;
74 };
75
76private:
77
78 using drc_rtree = RTree<ITEM_WITH_SHAPE*, int, 2, double>;
79
80public:
81
83 {
84 for( int layer : LSET::AllLayersMask().Seq() )
85 m_tree[layer] = new drc_rtree();
86
87 m_count = 0;
88 }
89
91 {
92 for( drc_rtree* tree : m_tree )
93 {
94 for( DRC_RTREE::ITEM_WITH_SHAPE* el : *tree )
95 delete el;
96
97 delete tree;
98 }
99 }
100
104 void Insert( BOARD_ITEM* aItem, PCB_LAYER_ID aLayer, int aWorstClearance = 0 )
105 {
106 Insert( aItem, aLayer, aLayer, aWorstClearance );
107 }
108
113 void Insert( BOARD_ITEM* aItem, PCB_LAYER_ID aRefLayer, PCB_LAYER_ID aTargetLayer,
114 int aWorstClearance )
115 {
116 wxCHECK( aTargetLayer != UNDEFINED_LAYER, /* void */ );
117
118 if( ( aItem->Type() == PCB_FIELD_T || aItem->Type() == PCB_TEXT_T )
119 && !static_cast<PCB_TEXT*>( aItem )->IsVisible() )
120 {
121 return;
122 }
123
124 std::vector<const SHAPE*> subshapes;
125 std::shared_ptr<SHAPE> shape = aItem->GetEffectiveShape( aRefLayer );
126
127 if( shape->HasIndexableSubshapes() )
128 shape->GetIndexableSubshapes( subshapes );
129 else
130 subshapes.push_back( shape.get() );
131
132 for( const SHAPE* subshape : subshapes )
133 {
134 if( dynamic_cast<const SHAPE_NULL*>( subshape ) )
135 continue;
136
137 BOX2I bbox = subshape->BBox();
138
139 bbox.Inflate( aWorstClearance );
140
141 const int mmin[2] = { bbox.GetX(), bbox.GetY() };
142 const int mmax[2] = { bbox.GetRight(), bbox.GetBottom() };
143 ITEM_WITH_SHAPE* itemShape = new ITEM_WITH_SHAPE( aItem, subshape, shape );
144
145 m_tree[aTargetLayer]->Insert( mmin, mmax, itemShape );
146 m_count++;
147 }
148
149 if( aItem->Type() == PCB_PAD_T && aItem->HasHole() )
150 {
151 std::shared_ptr<SHAPE_SEGMENT> hole = aItem->GetEffectiveHoleShape();
152 BOX2I bbox = hole->BBox();
153
154 bbox.Inflate( aWorstClearance );
155
156 const int mmin[2] = { bbox.GetX(), bbox.GetY() };
157 const int mmax[2] = { bbox.GetRight(), bbox.GetBottom() };
158 ITEM_WITH_SHAPE* itemShape = new ITEM_WITH_SHAPE( aItem, hole, shape );
159
160 m_tree[aTargetLayer]->Insert( mmin, mmax, itemShape );
161 m_count++;
162
163 }
164 }
165
169 void clear()
170 {
171 for( auto tree : m_tree )
172 tree->RemoveAll();
173
174 m_count = 0;
175 }
176
177 bool CheckColliding( SHAPE* aRefShape, PCB_LAYER_ID aTargetLayer, int aClearance = 0,
178 std::function<bool( BOARD_ITEM*)> aFilter = nullptr ) const
179 {
180 BOX2I box = aRefShape->BBox();
181 box.Inflate( aClearance );
182
183 int min[2] = { box.GetX(), box.GetY() };
184 int max[2] = { box.GetRight(), box.GetBottom() };
185
186 int count = 0;
187
188 auto visit =
189 [&] ( ITEM_WITH_SHAPE* aItem ) -> bool
190 {
191 if( !aFilter || aFilter( aItem->parent ) )
192 {
193 int actual;
194
195 if( aRefShape->Collide( aItem->shape, aClearance, &actual ) )
196 {
197 count++;
198 return false;
199 }
200 }
201
202 return true;
203 };
204
205 this->m_tree[aTargetLayer]->Search( min, max, visit );
206 return count > 0;
207 }
208
214 int QueryColliding( BOARD_ITEM* aRefItem, PCB_LAYER_ID aRefLayer, PCB_LAYER_ID aTargetLayer,
215 std::function<bool( BOARD_ITEM* )> aFilter = nullptr,
216 std::function<bool( BOARD_ITEM* )> aVisitor = nullptr,
217 int aClearance = 0 ) const
218 {
219 // keep track of BOARD_ITEMs that have already been found to collide (some items might
220 // be built of COMPOUND/triangulated shapes and a single subshape collision means we have
221 // a hit)
222 std::unordered_set<BOARD_ITEM*> collidingCompounds;
223
224 // keep track of results of client filter so we don't ask more than once for compound
225 // shapes
226 std::unordered_map<BOARD_ITEM*, bool> filterResults;
227
228 BOX2I box = aRefItem->GetBoundingBox();
229 box.Inflate( aClearance );
230
231 int min[2] = { box.GetX(), box.GetY() };
232 int max[2] = { box.GetRight(), box.GetBottom() };
233
234 std::shared_ptr<SHAPE> refShape = aRefItem->GetEffectiveShape( aRefLayer );
235
236 int count = 0;
237
238 auto visit =
239 [&]( ITEM_WITH_SHAPE* aItem ) -> bool
240 {
241 if( aItem->parent == aRefItem )
242 return true;
243
244 if( collidingCompounds.find( aItem->parent ) != collidingCompounds.end() )
245 return true;
246
247 bool filtered;
248 auto it = filterResults.find( aItem->parent );
249
250 if( it == filterResults.end() )
251 {
252 filtered = aFilter && !aFilter( aItem->parent );
253 filterResults[ aItem->parent ] = filtered;
254 }
255 else
256 {
257 filtered = it->second;
258 }
259
260 if( filtered )
261 return true;
262
263 if( refShape->Collide( aItem->shape, aClearance ) )
264 {
265 collidingCompounds.insert( aItem->parent );
266 count++;
267
268 if( aVisitor )
269 return aVisitor( aItem->parent );
270 }
271
272 return true;
273 };
274
275 this->m_tree[aTargetLayer]->Search( min, max, visit );
276 return count;
277 }
278
285 bool QueryColliding( const BOX2I& aBox, SHAPE* aRefShape, PCB_LAYER_ID aLayer, int aClearance,
286 int* aActual, VECTOR2I* aPos ) const
287 {
288 BOX2I bbox = aBox;
289 bbox.Inflate( aClearance );
290
291 int min[2] = { bbox.GetX(), bbox.GetY() };
292 int max[2] = { bbox.GetRight(), bbox.GetBottom() };
293
294 bool collision = false;
295 int actual = INT_MAX;
296 VECTOR2I pos;
297
298 auto visit =
299 [&]( ITEM_WITH_SHAPE* aItem ) -> bool
300 {
301 int curActual;
302 VECTOR2I curPos;
303
304 if( aRefShape->Collide( aItem->shape, aClearance, &curActual, &curPos ) )
305 {
306 collision = true;
307
308 if( curActual < actual )
309 {
310 actual = curActual;
311 pos = curPos;
312 }
313
314 // Stop looking after we have a true collision
315 if( actual <= 0 )
316 return false;
317 }
318
319 return true;
320 };
321
322 this->m_tree[aLayer]->Search( min, max, visit );
323
324 if( collision )
325 {
326 if( aActual )
327 *aActual = std::max( 0, actual );
328
329 if( aPos )
330 *aPos = pos;
331
332 return true;
333 }
334
335 return false;
336 }
337
341 bool QueryColliding( const BOX2I& aBox, SHAPE* aRefShape, PCB_LAYER_ID aLayer ) const
342 {
343 SHAPE_POLY_SET* poly = dynamic_cast<SHAPE_POLY_SET*>( aRefShape );
344
345 int min[2] = { aBox.GetX(), aBox.GetY() };
346 int max[2] = { aBox.GetRight(), aBox.GetBottom() };
347 bool collision = false;
348
349 // Special case the polygon case. Otherwise we'll call its Collide() method which will
350 // triangulate it as well and then do triangle/triangle collisions. This ends up being
351 // *much* slower than 3 segment Collide()s and a PointInside().
352 auto polyVisitor =
353 [&]( ITEM_WITH_SHAPE* aItem ) -> bool
354 {
355 const SHAPE* shape = aItem->shape;
356 wxASSERT( dynamic_cast<const SHAPE_POLY_SET::TRIANGULATED_POLYGON::TRI*>( shape ) );
357 auto tri = static_cast<const SHAPE_POLY_SET::TRIANGULATED_POLYGON::TRI*>( shape );
358
359 const SHAPE_LINE_CHAIN& outline = poly->Outline( 0 );
360
361 for( int ii = 0; ii < (int) tri->GetSegmentCount(); ++ii )
362 {
363 if( outline.Collide( tri->GetSegment( ii ) ) )
364 {
365 collision = true;
366 return false;
367 }
368 }
369
370 // Also must check for poly being completely inside the triangle
371 if( tri->PointInside( outline.CPoint( 0 ) ) )
372 {
373 collision = true;
374 return false;
375 }
376
377 return true;
378 };
379
380 auto visitor =
381 [&]( ITEM_WITH_SHAPE* aItem ) -> bool
382 {
383 if( aRefShape->Collide( aItem->shape, 0 ) )
384 {
385 collision = true;
386 return false;
387 }
388
389 return true;
390 };
391
392 if( poly && poly->OutlineCount() == 1 && poly->HoleCount( 0 ) == 0 )
393 this->m_tree[aLayer]->Search( min, max, polyVisitor );
394 else
395 this->m_tree[aLayer]->Search( min, max, visitor );
396
397 return collision;
398 }
399
406 std::unordered_set<BOARD_ITEM*> GetObjectsAt( const VECTOR2I& aPt, PCB_LAYER_ID aLayer,
407 int aClearance = 0 )
408 {
409 std::unordered_set<BOARD_ITEM*> retval;
410 int min[2] = { aPt.x - aClearance, aPt.y - aClearance };
411 int max[2] = { aPt.x + aClearance, aPt.y + aClearance };
412
413 auto visitor =
414 [&]( ITEM_WITH_SHAPE* aItem ) -> bool
415 {
416 retval.insert( aItem->parent );
417 return true;
418 };
419
420 m_tree[aLayer]->Search( min, max, visitor );
421
422 return retval;
423 }
424
425 typedef std::pair<PCB_LAYER_ID, PCB_LAYER_ID> LAYER_PAIR;
426
428 {
430 layerPair( aPair ),
431 refItem( aRef ),
432 testItem( aTest )
433 { };
434
438 };
439
440 int QueryCollidingPairs( DRC_RTREE* aRefTree, std::vector<LAYER_PAIR> aLayerPairs,
441 std::function<bool( const LAYER_PAIR&, ITEM_WITH_SHAPE*,
442 ITEM_WITH_SHAPE*, bool* aCollision )> aVisitor,
443 int aMaxClearance,
444 std::function<bool(int, int )> aProgressReporter ) const
445 {
446 std::vector<PAIR_INFO> pairsToVisit;
447
448 for( LAYER_PAIR& layerPair : aLayerPairs )
449 {
450 const PCB_LAYER_ID refLayer = layerPair.first;
451 const PCB_LAYER_ID targetLayer = layerPair.second;
452
453 for( ITEM_WITH_SHAPE* refItem : aRefTree->OnLayer( refLayer ) )
454 {
455 BOX2I box = refItem->shape->BBox();
456 box.Inflate( aMaxClearance );
457
458 int min[2] = { box.GetX(), box.GetY() };
459 int max[2] = { box.GetRight(), box.GetBottom() };
460
461 auto visit =
462 [&]( ITEM_WITH_SHAPE* aItemToTest ) -> bool
463 {
464 // don't collide items against themselves
465 if( aItemToTest->parent == refItem->parent )
466 return true;
467
468 pairsToVisit.emplace_back( layerPair, refItem, aItemToTest );
469 return true;
470 };
471
472 this->m_tree[targetLayer]->Search( min, max, visit );
473 };
474 }
475
476 // keep track of BOARD_ITEMs pairs that have been already found to collide (some items
477 // might be build of COMPOUND/triangulated shapes and a single subshape collision
478 // means we have a hit)
479 std::unordered_map<PTR_PTR_CACHE_KEY, int> collidingCompounds;
480
481 int progress = 0;
482 int count = pairsToVisit.size();
483
484 for( const PAIR_INFO& pair : pairsToVisit )
485 {
486 if( !aProgressReporter( progress++, count ) )
487 break;
488
489 BOARD_ITEM* a = pair.refItem->parent;
490 BOARD_ITEM* b = pair.testItem->parent;
491
492 // store canonical order so we don't collide in both directions (a:b and b:a)
493 if( static_cast<void*>( a ) > static_cast<void*>( b ) )
494 std::swap( a, b );
495
496 // don't report multiple collisions for compound or triangulated shapes
497 if( collidingCompounds.count( { a, b } ) )
498 continue;
499
500 bool collisionDetected = false;
501
502 if( !aVisitor( pair.layerPair, pair.refItem, pair.testItem, &collisionDetected ) )
503 break;
504
505 if( collisionDetected )
506 collidingCompounds[ { a, b } ] = 1;
507 }
508
509 return 0;
510 }
511
517 size_t size() const
518 {
519 return m_count;
520 }
521
522 bool empty() const
523 {
524 return m_count == 0;
525 }
526
527 using iterator = typename drc_rtree::Iterator;
528
538 {
539 DRC_LAYER( drc_rtree* aTree ) : layer_tree( aTree )
540 {
541 m_rect = { { INT_MIN, INT_MIN }, { INT_MAX, INT_MAX } };
542 };
543
544 DRC_LAYER( drc_rtree* aTree, const BOX2I& aRect ) : layer_tree( aTree )
545 {
546 m_rect = { { aRect.GetX(), aRect.GetY() },
547 { aRect.GetRight(), aRect.GetBottom() } };
548 };
549
550 drc_rtree::Rect m_rect;
552
554 {
555 return layer_tree->begin( m_rect );
556 }
557
559 {
560 return layer_tree->end( m_rect );
561 }
562 };
563
565 {
566 return DRC_LAYER( m_tree[int( aLayer )] );
567 }
568
569 DRC_LAYER Overlapping( PCB_LAYER_ID aLayer, const VECTOR2I& aPoint, int aAccuracy = 0 ) const
570 {
571 BOX2I rect( aPoint, VECTOR2I( 0, 0 ) );
572 rect.Inflate( aAccuracy );
573 return DRC_LAYER( m_tree[int( aLayer )], rect );
574 }
575
576 DRC_LAYER Overlapping( PCB_LAYER_ID aLayer, const BOX2I& aRect ) const
577 {
578 return DRC_LAYER( m_tree[int( aLayer )], aRect );
579 }
580
581
582private:
584 size_t m_count;
585};
586
587
588#endif /* DRC_RTREE_H_ */
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:77
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.
Definition: board_item.cpp:228
virtual std::shared_ptr< SHAPE_SEGMENT > GetEffectiveHoleShape() const
Definition: board_item.cpp:238
virtual bool HasHole() const
Definition: board_item.h:156
coord_type GetY() const
Definition: box2.h:182
BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Inflates the rectangle horizontally by dx and vertically by dy.
Definition: box2.h:507
coord_type GetX() const
Definition: box2.h:181
coord_type GetRight() const
Definition: box2.h:190
coord_type GetBottom() const
Definition: box2.h:191
Implement an R-tree for fast spatial and layer indexing of connectable items.
Definition: drc_rtree.h:48
DRC_LAYER OnLayer(PCB_LAYER_ID aLayer) const
Definition: drc_rtree.h:564
void Insert(BOARD_ITEM *aItem, PCB_LAYER_ID aLayer, int aWorstClearance=0)
Insert an item into the tree on a particular layer with an optional worst clearance.
Definition: drc_rtree.h:104
void Insert(BOARD_ITEM *aItem, PCB_LAYER_ID aRefLayer, PCB_LAYER_ID aTargetLayer, int aWorstClearance)
Insert an item into the tree on a particular layer with a worst clearance.
Definition: drc_rtree.h:113
RTree< ITEM_WITH_SHAPE *, int, 2, double > drc_rtree
Definition: drc_rtree.h:78
size_t size() const
Return the number of items in the tree.
Definition: drc_rtree.h:517
typename drc_rtree::Iterator iterator
Definition: drc_rtree.h:527
bool empty() const
Definition: drc_rtree.h:522
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.
Definition: drc_rtree.h:214
DRC_RTREE()
Definition: drc_rtree.h:82
bool CheckColliding(SHAPE *aRefShape, PCB_LAYER_ID aTargetLayer, int aClearance=0, std::function< bool(BOARD_ITEM *)> aFilter=nullptr) const
Definition: drc_rtree.h:177
~DRC_RTREE()
Definition: drc_rtree.h:90
DRC_LAYER Overlapping(PCB_LAYER_ID aLayer, const BOX2I &aRect) const
Definition: drc_rtree.h:576
std::unordered_set< BOARD_ITEM * > GetObjectsAt(const VECTOR2I &aPt, PCB_LAYER_ID aLayer, int aClearance=0)
Gets the BOARD_ITEMs that overlap the specified point/layer.
Definition: drc_rtree.h:406
drc_rtree * m_tree[PCB_LAYER_ID_COUNT]
Definition: drc_rtree.h:583
bool QueryColliding(const BOX2I &aBox, SHAPE *aRefShape, PCB_LAYER_ID aLayer) const
Quicker version of above that just reports a raw yes/no.
Definition: drc_rtree.h:341
void clear()
Remove all items from the RTree.
Definition: drc_rtree.h:169
std::pair< PCB_LAYER_ID, PCB_LAYER_ID > LAYER_PAIR
Definition: drc_rtree.h:425
size_t m_count
Definition: drc_rtree.h:584
DRC_LAYER Overlapping(PCB_LAYER_ID aLayer, const VECTOR2I &aPoint, int aAccuracy=0) const
Definition: drc_rtree.h:569
int QueryCollidingPairs(DRC_RTREE *aRefTree, std::vector< LAYER_PAIR > aLayerPairs, std::function< bool(const LAYER_PAIR &, ITEM_WITH_SHAPE *, ITEM_WITH_SHAPE *, bool *aCollision)> aVisitor, int aMaxClearance, std::function< bool(int, int)> aProgressReporter) const
Definition: drc_rtree.h:440
bool QueryColliding(const BOX2I &aBox, SHAPE *aRefShape, PCB_LAYER_ID aLayer, int aClearance, int *aActual, VECTOR2I *aPos) const
This one is for tessellated items.
Definition: drc_rtree.h:285
virtual const BOX2I GetBoundingBox() const
Return the orthogonal bounding box of this object for display purposes.
Definition: eda_item.cpp:74
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:97
virtual bool IsVisible() const
Definition: eda_text.h:148
static LSET AllLayersMask()
Definition: lset.cpp:898
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
virtual bool Collide(const VECTOR2I &aP, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override
Check if point aP lies closer to us than aClearance.
const VECTOR2I & CPoint(int aIndex) const
Return a reference to a given point in the line chain.
Represent a set of closed polygons.
int HoleCount(int aOutline) const
Returns the number of holes in a given outline.
SHAPE_LINE_CHAIN & Outline(int aIndex)
Return the reference to aIndex-th outline in the set.
int OutlineCount() const
Return the number of outlines in the set.
An abstract shape on 2D plane.
Definition: shape.h:126
virtual bool Collide(const VECTOR2I &aP, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const
Check if the boundary of shape (this) lies closer to the point aP than aClearance,...
Definition: shape.h:181
virtual const BOX2I BBox(int aClearance=0) const =0
Compute a bounding box of the shape, with a margin of aClearance a collision.
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:60
@ UNDEFINED_LAYER
Definition: layer_ids.h:61
@ PCB_LAYER_ID_COUNT
Definition: layer_ids.h:138
STL namespace.
The DRC_LAYER struct provides a layer-specific auto-range iterator to the RTree.
Definition: drc_rtree.h:538
iterator begin()
Definition: drc_rtree.h:553
drc_rtree::Rect m_rect
Definition: drc_rtree.h:550
drc_rtree * layer_tree
Definition: drc_rtree.h:551
DRC_LAYER(drc_rtree *aTree)
Definition: drc_rtree.h:539
DRC_LAYER(drc_rtree *aTree, const BOX2I &aRect)
Definition: drc_rtree.h:544
ITEM_WITH_SHAPE(BOARD_ITEM *aParent, const SHAPE *aShape, std::shared_ptr< SHAPE > aParentShape=nullptr)
Definition: drc_rtree.h:54
std::shared_ptr< SHAPE > parentShape
Definition: drc_rtree.h:73
ITEM_WITH_SHAPE(BOARD_ITEM *aParent, const std::shared_ptr< SHAPE > &aShape, std::shared_ptr< SHAPE > aParentShape=nullptr)
Definition: drc_rtree.h:62
std::shared_ptr< SHAPE > shapeStorage
Definition: drc_rtree.h:72
ITEM_WITH_SHAPE * refItem
Definition: drc_rtree.h:436
PAIR_INFO(LAYER_PAIR aPair, ITEM_WITH_SHAPE *aRef, ITEM_WITH_SHAPE *aTest)
Definition: drc_rtree.h:429
ITEM_WITH_SHAPE * testItem
Definition: drc_rtree.h:437
LAYER_PAIR layerPair
Definition: drc_rtree.h:435
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
Definition: typeinfo.h:92
@ PCB_FIELD_T
class PCB_FIELD, text associated with a footprint property
Definition: typeinfo.h:90
@ PCB_PAD_T
class PAD, a pad in a footprint
Definition: typeinfo.h:87
VECTOR2< int > VECTOR2I
Definition: vector2d.h:588