Bugfix: Bottom layer not correctly handled in (PNS) Interactive router.

This commit is contained in:
Maciej Suminski 2014-07-07 10:48:47 +02:00
parent a3b421b02c
commit fb0045a898
7 changed files with 19 additions and 17 deletions

View File

@ -255,6 +255,9 @@ public:
*/
inline virtual void SetLayerDepth( double aLayerDepth )
{
assert( aLayerDepth <= depthRange.y );
assert( aLayerDepth >= depthRange.x );
layerDepth = aLayerDepth;
}

View File

@ -138,7 +138,7 @@ enum LAYER_ID
#define LAST_COPPER_LAYER brain dead
#define FIRST_LAYER brain dead
#define NB_LAYERS use LAYER_ID_COUNT instead
#define NB_COPPER_LAYERS was always a max, not a number, use MAX_CU_COUNT now.
#define NB_COPPER_LAYERS was always a max, not a number, use MAX_CU_LAYERS now.
*/

View File

@ -108,7 +108,7 @@ public:
///> Shortcut for comparisons/overlap tests
static PNS_LAYERSET All()
{
return PNS_LAYERSET( 0, 256 );
return PNS_LAYERSET( 0, 64 );
}
private:

View File

@ -379,7 +379,7 @@ bool PNS_LINE_PLACER::handleViaPlacement( PNS_LINE& aHead )
if( !m_placingVia )
return true;
PNS_LAYERSET allLayers( 0, 15 );
PNS_LAYERSET allLayers( 0, MAX_CU_LAYERS - 1 );
PNS_VIA v( aHead.CPoint( -1 ), allLayers, m_viaDiameter, m_viaDrill, aHead.Net() );
VECTOR2I force;
@ -439,7 +439,7 @@ bool PNS_LINE_PLACER::rhWalkOnly( const VECTOR2I& aP, PNS_LINE& aNewHead )
}
else if( m_placingVia && viaOk )
{
PNS_LAYERSET allLayers( 0, 15 );
PNS_LAYERSET allLayers( 0, MAX_CU_LAYERS - 1 );
PNS_VIA v1( walkFull.CPoint( -1 ), allLayers, m_viaDiameter, m_viaDrill );
walkFull.AppendVia( v1 );
}
@ -464,7 +464,7 @@ bool PNS_LINE_PLACER::rhMarkObstacles( const VECTOR2I& aP, PNS_LINE& aNewHead )
if( m_placingVia )
{
PNS_LAYERSET allLayers( 0, 15 );
PNS_LAYERSET allLayers( 0, MAX_CU_LAYERS - 1 );
PNS_VIA v1( m_head.CPoint( -1 ), allLayers, m_viaDiameter, m_viaDrill );
m_head.AppendVia( v1 );
}
@ -507,7 +507,7 @@ bool PNS_LINE_PLACER::rhShoveOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead )
if( m_placingVia )
{
PNS_LAYERSET allLayers( 0, 15 );
PNS_LAYERSET allLayers( 0, MAX_CU_LAYERS - 1 );
PNS_VIA v1( l.CPoint( -1 ), allLayers, m_viaDiameter, m_viaDrill );
PNS_VIA v2( l2.CPoint( -1 ), allLayers, m_viaDiameter, m_viaDrill );

View File

@ -116,12 +116,12 @@ private:
PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad )
{
PNS_LAYERSET layers( 0, 15 );
PNS_LAYERSET layers( 0, MAX_CU_LAYERS - 1 );
switch( aPad->GetAttribute() )
{
case PAD_STANDARD:
layers = PNS_LAYERSET( 0, 15 );
layers = PNS_LAYERSET( 0, MAX_CU_LAYERS - 1 ); // TODO necessary? it is already initialized
break;
case PAD_SMD:
@ -229,7 +229,7 @@ PNS_ITEM* PNS_ROUTER::syncVia( VIA* aVia )
{
PNS_VIA* v = new PNS_VIA(
aVia->GetPosition(),
PNS_LAYERSET( 0, 15 ),
PNS_LAYERSET( 0, MAX_CU_LAYERS - 1 ),
aVia->GetWidth(),
aVia->GetDrillValue(),
aVia->GetNetCode() );

View File

@ -70,7 +70,6 @@ void ROUTER_PREVIEW_ITEM::Update( const PNS_ITEM* aItem )
case PNS_ITEM::LINE:
m_type = PR_SHAPE;
m_width = ( (PNS_LINE*) aItem )->Width();
break;
case PNS_ITEM::SEGMENT:

View File

@ -105,7 +105,7 @@ private:
// fixme: shouldn't this go to VIEW?
static const int ClearanceOverlayDepth = -2000;
static const int BaseOverlayDepth = -2020;
static const int BaseOverlayDepth = -2010;
static const int ViaOverlayDepth = -2046;
double m_depth;