PNS: Fixup hole clearance to use exact hulls for walkaround
(partially cherry picked from commit 30fb298ed3
)
This commit is contained in:
parent
6253b878a0
commit
895314b639
|
@ -370,8 +370,10 @@ NODE::OPT_OBSTACLE NODE::NearestObstacle( const LINE* aLine, int aKindMask,
|
|||
|
||||
int viaHoleRadius = static_cast<const SHAPE_CIRCLE*>( via.Hole() )->GetRadius();
|
||||
|
||||
int viaClearance = GetClearance( obstacle.m_item, &via ) + via.Diameter() / 2;
|
||||
int holeClearance = GetHoleClearance( obstacle.m_item, &via ) + viaHoleRadius;
|
||||
int viaClearance = GetClearance( obstacle.m_item, &via, aUseClearanceEpsilon )
|
||||
+ via.Diameter() / 2;
|
||||
int holeClearance =
|
||||
GetHoleClearance( obstacle.m_item, &via, aUseClearanceEpsilon ) + viaHoleRadius;
|
||||
|
||||
if( holeClearance > viaClearance )
|
||||
viaClearance = holeClearance;
|
||||
|
@ -390,7 +392,8 @@ NODE::OPT_OBSTACLE NODE::NearestObstacle( const LINE* aLine, int aKindMask,
|
|||
|
||||
if( obstacle.m_item->Hole() )
|
||||
{
|
||||
clearance = GetHoleClearance( obstacle.m_item, aLine ) + aLine->Width() / 2;
|
||||
clearance = GetHoleClearance( obstacle.m_item, aLine, aUseClearanceEpsilon )
|
||||
+ aLine->Width() / 2;
|
||||
obstacleHull = obstacle.m_item->HoleHull( clearance, 0, layer );
|
||||
//debugDecorator->AddLine( obstacleHull, 4 );
|
||||
|
||||
|
@ -406,9 +409,13 @@ NODE::OPT_OBSTACLE NODE::NearestObstacle( const LINE* aLine, int aKindMask,
|
|||
// Don't use via.Drill(); it doesn't include the plating thickness
|
||||
int viaHoleRadius = static_cast<const SHAPE_CIRCLE*>( via.Hole() )->GetRadius();
|
||||
|
||||
int viaClearance = GetClearance( obstacle.m_item, &via ) + via.Diameter() / 2;
|
||||
int holeClearance = GetHoleClearance( obstacle.m_item, &via ) + viaHoleRadius;
|
||||
int holeToHole = GetHoleToHoleClearance( obstacle.m_item, &via ) + viaHoleRadius;
|
||||
int viaClearance = GetClearance( obstacle.m_item, &via, aUseClearanceEpsilon )
|
||||
+ via.Diameter() / 2;
|
||||
int holeClearance = GetHoleClearance( obstacle.m_item, &via, aUseClearanceEpsilon )
|
||||
+ viaHoleRadius;
|
||||
int holeToHole =
|
||||
GetHoleToHoleClearance( obstacle.m_item, &via, aUseClearanceEpsilon )
|
||||
+ viaHoleRadius;
|
||||
|
||||
if( holeClearance > viaClearance )
|
||||
viaClearance = holeClearance;
|
||||
|
@ -416,7 +423,7 @@ NODE::OPT_OBSTACLE NODE::NearestObstacle( const LINE* aLine, int aKindMask,
|
|||
if( holeToHole > viaClearance )
|
||||
viaClearance = holeToHole;
|
||||
|
||||
obstacleHull = obstacle.m_item->Hull( viaClearance + PNS_HULL_MARGIN, 0, layer );
|
||||
obstacleHull = obstacle.m_item->Hull( viaClearance, 0, layer );
|
||||
//debugDecorator->AddLine( obstacleHull, 5 );
|
||||
|
||||
intersectingPts.clear();
|
||||
|
|
Loading…
Reference in New Issue