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

This commit is contained in:
Tomasz Wlostowski 2022-06-09 00:31:47 +02:00
parent 4192c0a709
commit 990281a897
1 changed files with 6 additions and 4 deletions

View File

@ -399,10 +399,12 @@ NODE::OPT_OBSTACLE NODE::NearestObstacle( const LINE* aLine, int aKindMask,
layer ) )
&& 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 );