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 ) ) layer ) )
&& obstacle.m_item->Hole() ) && obstacle.m_item->Hole() )
{ {
clearance = GetHoleClearance( obstacle.m_item, aLine, aUseClearanceEpsilon ) clearance = GetHoleClearance( obstacle.m_item, aLine, aUseClearanceEpsilon );
+ aLine->Width() / 2; int copperClearance = GetClearance( obstacle.m_item, aLine, aUseClearanceEpsilon );
obstacleHull = obstacle.m_item->HoleHull( clearance, 0, layer );
//debugDecorator->AddLine( obstacleHull, 4 ); clearance = std::max( clearance, copperClearance );
obstacleHull = obstacle.m_item->HoleHull( clearance, aLine->Width(), layer );
intersectingPts.clear(); intersectingPts.clear();
HullIntersection( obstacleHull, aLine->CLine(), intersectingPts ); HullIntersection( obstacleHull, aLine->CLine(), intersectingPts );