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_TEXT_T && !static_cast<PCB_TEXT*>( aItem )->IsVisible() )
119 return;
120
121 std::vector<const SHAPE*> subshapes;
122 std::shared_ptr<SHAPE> shape = aItem->GetEffectiveShape( aRefLayer );
123
124 if( shape->HasIndexableSubshapes() )
125 shape->GetIndexableSubshapes( subshapes );
126 else
127 subshapes.push_back( shape.get() );
128
129 for( const SHAPE* subshape : subshapes )
130 {
131 if( dynamic_cast<const SHAPE_NULL*>( subshape ) )
132 continue;
133
134 BOX2I bbox = subshape->BBox();
135
136 bbox.Inflate( aWorstClearance );
137
138 const int mmin[2] = { bbox.GetX(), bbox.GetY() };
139 const int mmax[2] = { bbox.GetRight(), bbox.GetBottom() };
140 ITEM_WITH_SHAPE* itemShape = new ITEM_WITH_SHAPE( aItem, subshape, shape );
141
142 m_tree[aTargetLayer]->Insert( mmin, mmax, itemShape );
143 m_count++;
144 }
145
146 if( aItem->Type() == PCB_PAD_T && aItem->HasHole() )
147 {
148 std::shared_ptr<SHAPE_SEGMENT> hole = aItem->GetEffectiveHoleShape();
149 BOX2I bbox = hole->BBox();
150
151 bbox.Inflate( aWorstClearance );
152
153 const int mmin[2] = { bbox.GetX(), bbox.GetY() };
154 const int mmax[2] = { bbox.GetRight(), bbox.GetBottom() };
155 ITEM_WITH_SHAPE* itemShape = new ITEM_WITH_SHAPE( aItem, hole, shape );
156
157 m_tree[aTargetLayer]->Insert( mmin, mmax, itemShape );
158 m_count++;
159
160 }
161 }
162
166 void clear()
167 {
168 for( auto tree : m_tree )
169 tree->RemoveAll();
170
171 m_count = 0;
172 }
173
174 bool CheckColliding( SHAPE* aRefShape, PCB_LAYER_ID aTargetLayer, int aClearance = 0,
175 std::function<bool( BOARD_ITEM*)> aFilter = nullptr ) const
176 {
177 BOX2I box = aRefShape->BBox();
178 box.Inflate( aClearance );
179
180 int min[2] = { box.GetX(), box.GetY() };
181 int max[2] = { box.GetRight(), box.GetBottom() };
182
183 int count = 0;
184
185 auto visit =
186 [&] ( ITEM_WITH_SHAPE* aItem ) -> bool
187 {
188 if( !aFilter || aFilter( aItem->parent ) )
189 {
190 int actual;
191
192 if( aRefShape->Collide( aItem->shape, aClearance, &actual ) )
193 {
194 count++;
195 return false;
196 }
197 }
198
199 return true;
200 };
201
202 this->m_tree[aTargetLayer]->Search( min, max, visit );
203 return count > 0;
204 }
205
211 int QueryColliding( BOARD_ITEM* aRefItem, PCB_LAYER_ID aRefLayer, PCB_LAYER_ID aTargetLayer,
212 std::function<bool( BOARD_ITEM* )> aFilter = nullptr,
213 std::function<bool( BOARD_ITEM* )> aVisitor = nullptr,
214 int aClearance = 0 ) const
215 {
216 // keep track of BOARD_ITEMs that have already been found to collide (some items might
217 // be built of COMPOUND/triangulated shapes and a single subshape collision means we have
218 // a hit)
219 std::unordered_set<BOARD_ITEM*> collidingCompounds;
220
221 // keep track of results of client filter so we don't ask more than once for compound
222 // shapes
223 std::unordered_map<BOARD_ITEM*, bool> filterResults;
224
225 BOX2I box = aRefItem->GetBoundingBox();
226 box.Inflate( aClearance );
227
228 int min[2] = { box.GetX(), box.GetY() };
229 int max[2] = { box.GetRight(), box.GetBottom() };
230
231 std::shared_ptr<SHAPE> refShape = aRefItem->GetEffectiveShape( aRefLayer );
232
233 int count = 0;
234
235 auto visit =
236 [&]( ITEM_WITH_SHAPE* aItem ) -> bool
237 {
238 if( aItem->parent == aRefItem )
239 return true;
240
241 if( collidingCompounds.find( aItem->parent ) != collidingCompounds.end() )
242 return true;
243
244 bool filtered;
245 auto it = filterResults.find( aItem->parent );
246
247 if( it == filterResults.end() )
248 {
249 filtered = aFilter && !aFilter( aItem->parent );
250 filterResults[ aItem->parent ] = filtered;
251 }
252 else
253 {
254 filtered = it->second;
255 }
256
257 if( filtered )
258 return true;
259
260 if( refShape->Collide( aItem->shape, aClearance ) )
261 {
262 collidingCompounds.insert( aItem->parent );
263 count++;
264
265 if( aVisitor )
266 return aVisitor( aItem->parent );
267 }
268
269 return true;
270 };
271
272 this->m_tree[aTargetLayer]->Search( min, max, visit );
273 return count;
274 }
275
282 bool QueryColliding( const BOX2I& aBox, SHAPE* aRefShape, PCB_LAYER_ID aLayer, int aClearance,
283 int* aActual, VECTOR2I* aPos ) const
284 {
285 BOX2I bbox = aBox;
286 bbox.Inflate( aClearance );
287
288 int min[2] = { bbox.GetX(), bbox.GetY() };
289 int max[2] = { bbox.GetRight(), bbox.GetBottom() };
290
291 bool collision = false;
292 int actual = INT_MAX;
293 VECTOR2I pos;
294
295 auto visit =
296 [&]( ITEM_WITH_SHAPE* aItem ) -> bool
297 {
298 int curActual;
299 VECTOR2I curPos;
300
301 if( aRefShape->Collide( aItem->shape, aClearance, &curActual, &curPos ) )
302 {
303 collision = true;
304
305 if( curActual < actual )
306 {
307 actual = curActual;
308 pos = curPos;
309 }
310
311 // Stop looking after we have a true collision
312 if( actual <= 0 )
313 return false;
314 }
315
316 return true;
317 };
318
319 this->m_tree[aLayer]->Search( min, max, visit );
320
321 if( collision )
322 {
323 if( aActual )
324 *aActual = std::max( 0, actual );
325
326 if( aPos )
327 *aPos = pos;
328
329 return true;
330 }
331
332 return false;
333 }
334
338 bool QueryColliding( const BOX2I& aBox, SHAPE* aRefShape, PCB_LAYER_ID aLayer ) const
339 {
340 SHAPE_POLY_SET* poly = dynamic_cast<SHAPE_POLY_SET*>( aRefShape );
341
342 int min[2] = { aBox.GetX(), aBox.GetY() };
343 int max[2] = { aBox.GetRight(), aBox.GetBottom() };
344 bool collision = false;
345
346 // Special case the polygon case. Otherwise we'll call its Collide() method which will
347 // triangulate it as well and then do triangle/triangle collisions. This ends up being
348 // *much* slower than 3 segment Collide()s and a PointInside().
349 auto polyVisitor =
350 [&]( ITEM_WITH_SHAPE* aItem ) -> bool
351 {
352 const SHAPE* shape = aItem->shape;
353 wxASSERT( dynamic_cast<const SHAPE_POLY_SET::TRIANGULATED_POLYGON::TRI*>( shape ) );
354 auto tri = static_cast<const SHAPE_POLY_SET::TRIANGULATED_POLYGON::TRI*>( shape );
355
356 const SHAPE_LINE_CHAIN& outline = poly->Outline( 0 );
357
358 for( int ii = 0; ii < (int) tri->GetSegmentCount(); ++ii )
359 {
360 if( outline.Collide( tri->GetSegment( ii ) ) )
361 {
362 collision = true;
363 return false;
364 }
365 }
366
367 // Also must check for poly being completely inside the triangle
368 if( tri->PointInside( outline.CPoint( 0 ) ) )
369 {
370 collision = true;
371 return false;
372 }
373
374 return true;
375 };
376
377 auto visitor =
378 [&]( ITEM_WITH_SHAPE* aItem ) -> bool
379 {
380 if( aRefShape->Collide( aItem->shape, 0 ) )
381 {
382 collision = true;
383 return false;
384 }
385
386 return true;
387 };
388
389 if( poly && poly->OutlineCount() == 1 && poly->HoleCount( 0 ) == 0 )
390 this->m_tree[aLayer]->Search( min, max, polyVisitor );
391 else
392 this->m_tree[aLayer]->Search( min, max, visitor );
393
394 return collision;
395 }
396
403 std::unordered_set<BOARD_ITEM*> GetObjectsAt( const VECTOR2I& aPt, PCB_LAYER_ID aLayer,
404 int aClearance = 0 )
405 {
406 std::unordered_set<BOARD_ITEM*> retval;
407 int min[2] = { aPt.x - aClearance, aPt.y - aClearance };
408 int max[2] = { aPt.x + aClearance, aPt.y + aClearance };
409
410 auto visitor =
411 [&]( ITEM_WITH_SHAPE* aItem ) -> bool
412 {
413 retval.insert( aItem->parent );
414 return true;
415 };
416
417 m_tree[aLayer]->Search( min, max, visitor );
418
419 return retval;
420 }
421
422 typedef std::pair<PCB_LAYER_ID, PCB_LAYER_ID> LAYER_PAIR;
423
425 {
427 layerPair( aPair ),
428 refItem( aRef ),
429 testItem( aTest )
430 { };
431
435 };
436
437 int QueryCollidingPairs( DRC_RTREE* aRefTree, std::vector<LAYER_PAIR> aLayerPairs,
438 std::function<bool( const LAYER_PAIR&, ITEM_WITH_SHAPE*,
439 ITEM_WITH_SHAPE*, bool* aCollision )> aVisitor,
440 int aMaxClearance,
441 std::function<bool(int, int )> aProgressReporter ) const
442 {
443 std::vector<PAIR_INFO> pairsToVisit;
444
445 for( LAYER_PAIR& layerPair : aLayerPairs )
446 {
447 const PCB_LAYER_ID refLayer = layerPair.first;
448 const PCB_LAYER_ID targetLayer = layerPair.second;
449
450 for( ITEM_WITH_SHAPE* refItem : aRefTree->OnLayer( refLayer ) )
451 {
452 BOX2I box = refItem->shape->BBox();
453 box.Inflate( aMaxClearance );
454
455 int min[2] = { box.GetX(), box.GetY() };
456 int max[2] = { box.GetRight(), box.GetBottom() };
457
458 auto visit =
459 [&]( ITEM_WITH_SHAPE* aItemToTest ) -> bool
460 {
461 // don't collide items against themselves
462 if( aItemToTest->parent == refItem->parent )
463 return true;
464
465 pairsToVisit.emplace_back( layerPair, refItem, aItemToTest );
466 return true;
467 };
468
469 this->m_tree[targetLayer]->Search( min, max, visit );
470 };
471 }
472
473 // keep track of BOARD_ITEMs pairs that have been already found to collide (some items
474 // might be build of COMPOUND/triangulated shapes and a single subshape collision
475 // means we have a hit)
476 std::unordered_map<PTR_PTR_CACHE_KEY, int> collidingCompounds;
477
478 int progress = 0;
479 int count = pairsToVisit.size();
480
481 for( const PAIR_INFO& pair : pairsToVisit )
482 {
483 if( !aProgressReporter( progress++, count ) )
484 break;
485
486 BOARD_ITEM* a = pair.refItem->parent;
487 BOARD_ITEM* b = pair.testItem->parent;
488
489 // store canonical order so we don't collide in both directions (a:b and b:a)
490 if( static_cast<void*>( a ) > static_cast<void*>( b ) )
491 std::swap( a, b );
492
493 // don't report multiple collisions for compound or triangulated shapes
494 if( collidingCompounds.count( { a, b } ) )
495 continue;
496
497 bool collisionDetected = false;
498
499 if( !aVisitor( pair.layerPair, pair.refItem, pair.testItem, &collisionDetected ) )
500 break;
501
502 if( collisionDetected )
503 collidingCompounds[ { a, b } ] = 1;
504 }
505
506 return 0;
507 }
508
514 size_t size() const
515 {
516 return m_count;
517 }
518
519 bool empty() const
520 {
521 return m_count == 0;
522 }
523
524 using iterator = typename drc_rtree::Iterator;
525
535 {
536 DRC_LAYER( drc_rtree* aTree ) : layer_tree( aTree )
537 {
538 m_rect = { { INT_MIN, INT_MIN }, { INT_MAX, INT_MAX } };
539 };
540
541 DRC_LAYER( drc_rtree* aTree, const BOX2I& aRect ) : layer_tree( aTree )
542 {
543 m_rect = { { aRect.GetX(), aRect.GetY() },
544 { aRect.GetRight(), aRect.GetBottom() } };
545 };
546
547 drc_rtree::Rect m_rect;
549
551 {
552 return layer_tree->begin( m_rect );
553 }
554
556 {
557 return layer_tree->end( m_rect );
558 }
559 };
560
562 {
563 return DRC_LAYER( m_tree[int( aLayer )] );
564 }
565
566 DRC_LAYER Overlapping( PCB_LAYER_ID aLayer, const VECTOR2I& aPoint, int aAccuracy = 0 ) const
567 {
568 BOX2I rect( aPoint, VECTOR2I( 0, 0 ) );
569 rect.Inflate( aAccuracy );
570 return DRC_LAYER( m_tree[int( aLayer )], rect );
571 }
572
573 DRC_LAYER Overlapping( PCB_LAYER_ID aLayer, const BOX2I& aRect ) const
574 {
575 return DRC_LAYER( m_tree[int( aLayer )], aRect );
576 }
577
578
579private:
581 size_t m_count;
582};
583
584
585#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:71
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:220
virtual std::shared_ptr< SHAPE_SEGMENT > GetEffectiveHoleShape() const
Definition: board_item.cpp:230
virtual bool HasHole() const
Definition: board_item.h:141
coord_type GetY() const
Definition: box2.h:181
BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Inflates the rectangle horizontally by dx and vertically by dy.
Definition: box2.h:506
coord_type GetX() const
Definition: box2.h:180
coord_type GetRight() const
Definition: box2.h:189
coord_type GetBottom() const
Definition: box2.h:190
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:561
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:514
typename drc_rtree::Iterator iterator
Definition: drc_rtree.h:524
bool empty() const
Definition: drc_rtree.h:519
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:211
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:174
~DRC_RTREE()
Definition: drc_rtree.h:90
DRC_LAYER Overlapping(PCB_LAYER_ID aLayer, const BOX2I &aRect) const
Definition: drc_rtree.h:573
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:403
drc_rtree * m_tree[PCB_LAYER_ID_COUNT]
Definition: drc_rtree.h:580
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:338
void clear()
Remove all items from the RTree.
Definition: drc_rtree.h:166
std::pair< PCB_LAYER_ID, PCB_LAYER_ID > LAYER_PAIR
Definition: drc_rtree.h:422
size_t m_count
Definition: drc_rtree.h:581
DRC_LAYER Overlapping(PCB_LAYER_ID aLayer, const VECTOR2I &aPoint, int aAccuracy=0) const
Definition: drc_rtree.h:566
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:437
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:282
virtual const BOX2I GetBoundingBox() const
Return the orthogonal bounding box of this object for display purposes.
Definition: eda_item.cpp:73
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:97
virtual bool IsVisible() const
Definition: eda_text.h:139
static LSET AllLayersMask()
Definition: lset.cpp:808
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:124
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:179
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:59
@ UNDEFINED_LAYER
Definition: layer_ids.h:60
@ PCB_LAYER_ID_COUNT
Definition: layer_ids.h:137
STL namespace.
The DRC_LAYER struct provides a layer-specific auto-range iterator to the RTree.
Definition: drc_rtree.h:535
iterator begin()
Definition: drc_rtree.h:550
drc_rtree::Rect m_rect
Definition: drc_rtree.h:547
drc_rtree * layer_tree
Definition: drc_rtree.h:548
DRC_LAYER(drc_rtree *aTree)
Definition: drc_rtree.h:536
DRC_LAYER(drc_rtree *aTree, const BOX2I &aRect)
Definition: drc_rtree.h:541
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:433
PAIR_INFO(LAYER_PAIR aPair, ITEM_WITH_SHAPE *aRef, ITEM_WITH_SHAPE *aTest)
Definition: drc_rtree.h:426
ITEM_WITH_SHAPE * testItem
Definition: drc_rtree.h:434
LAYER_PAIR layerPair
Definition: drc_rtree.h:432
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
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