router: use actual snap point position for routability checks of a segment instead of the segment endpoint(s).
Explanation:
- place a long segment A with something violating the rules close to its endpoint
- try to start routing in the 2/3 of the length of A (on the obstacle side)
- bummer - the router picks the nearest endpoint of A for the collision check (even though we don't care about this collision since we want to route far away from it)
(cherry picked from commit e558893851
)
This commit is contained in:
parent
2cf4cb937f
commit
cca7f1dbda
|
@ -484,7 +484,7 @@ NODE::OPT_OBSTACLE NODE::CheckColliding( const ITEM* aItemA, int aKindMask )
|
|||
if( line->EndsWithVia() )
|
||||
{
|
||||
n += QueryColliding( &line->Via(), obs, aKindMask, 1 );
|
||||
|
||||
|
||||
if( n )
|
||||
return OPT_OBSTACLE( obs[0] );
|
||||
}
|
||||
|
|
|
@ -273,18 +273,7 @@ bool ROUTER::isStartingPointRoutable( const VECTOR2I& aWhere, ITEM* aStartItem,
|
|||
}
|
||||
}
|
||||
|
||||
VECTOR2I startPoint = aStartItem ? aStartItem->Anchor( 0 ) : aWhere;
|
||||
|
||||
if( aStartItem && aStartItem->OfKind( ITEM::SEGMENT_T | ITEM::ARC_T ) )
|
||||
{
|
||||
VECTOR2I otherEnd = aStartItem->Anchor( 1 );
|
||||
|
||||
if( ( otherEnd - aWhere ).SquaredEuclideanNorm()
|
||||
< ( startPoint - aWhere ).SquaredEuclideanNorm() )
|
||||
{
|
||||
startPoint = otherEnd;
|
||||
}
|
||||
}
|
||||
VECTOR2I startPoint = aWhere;
|
||||
|
||||
if( m_mode == PNS_MODE_ROUTE_SINGLE )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue