router: use either copper or hole clearance, whichever is larger, when checking track -> hole collisions

(cherry picked from commit 990281a897)
This commit is contained in:
Tomasz Wlostowski 2022-06-09 00:31:47 +02:00 committed by Jon Evans
parent 92ba60628e
commit 4694a2622e
1 changed files with 6 additions and 4 deletions

View File

@ -392,10 +392,12 @@ NODE::OPT_OBSTACLE NODE::NearestObstacle( const LINE* aLine, int aKindMask,
if( obstacle.m_item->Hole() )
{
clearance = GetHoleClearance( obstacle.m_item, aLine, aUseClearanceEpsilon )
+ aLine->Width() / 2;
obstacleHull = obstacle.m_item->HoleHull( clearance, 0, layer );
//debugDecorator->AddLine( obstacleHull, 4 );
clearance = GetHoleClearance( obstacle.m_item, aLine, aUseClearanceEpsilon );
int copperClearance = GetClearance( obstacle.m_item, aLine, aUseClearanceEpsilon );
clearance = std::max( clearance, copperClearance );
obstacleHull = obstacle.m_item->HoleHull( clearance, aLine->Width(), layer );
intersectingPts.clear();
HullIntersection( obstacleHull, aLine->CLine(), intersectingPts );