Use cached bbox for connectivity
On large boards, connectivity checks are hotspots. We use the cached bbox to avoid re-computing polygons for pads.
This commit is contained in:
parent
809a4e3c0e
commit
18b6bdf5dd
|
@ -61,15 +61,14 @@ const VECTOR2I CN_ITEM::GetAnchor( int n ) const
|
|||
if( n == 0 )
|
||||
return pt0;
|
||||
|
||||
EDA_RECT bbox = pad->GetBoundingBox();
|
||||
VECTOR2I pt1 = pt0;
|
||||
|
||||
switch( n )
|
||||
{
|
||||
case 1: pt1.y = bbox.GetTop(); break; // North
|
||||
case 2: pt1.y = bbox.GetBottom(); break; // South
|
||||
case 3: pt1.x = bbox.GetLeft(); break; // East
|
||||
case 4: pt1.x = bbox.GetRight(); break; // West
|
||||
case 1: pt1.y = m_bbox.GetTop(); break; // North
|
||||
case 2: pt1.y = m_bbox.GetBottom(); break; // South
|
||||
case 3: pt1.x = m_bbox.GetLeft(); break; // East
|
||||
case 4: pt1.x = m_bbox.GetRight(); break; // West
|
||||
default: break; // Wicked witch
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue