Fixed bug in FlipLayerMask
- Offset for internal copper layers was incorrect - Incorrect mask was used
This commit is contained in:
parent
7e0fa329d0
commit
363fc598c0
|
@ -554,23 +554,28 @@ LSET FlipLayerMask( LSET aMask, int aCopperLayersCount )
|
||||||
|
|
||||||
if( aCopperLayersCount >= 4 ) // Internal layers exist
|
if( aCopperLayersCount >= 4 ) // Internal layers exist
|
||||||
{
|
{
|
||||||
LSET internalMask = aMask & ~LSET::InternalCuMask();
|
LSET internalMask = aMask & LSET::InternalCuMask();
|
||||||
|
|
||||||
if( internalMask != LSET::InternalCuMask() )
|
if( internalMask != LSET::InternalCuMask() )
|
||||||
{ // the mask does not include all internal layers. Therefore
|
{
|
||||||
|
// the mask does not include all internal layers. Therefore
|
||||||
// the flipped mask for internal copper layers must be built
|
// the flipped mask for internal copper layers must be built
|
||||||
|
|
||||||
int innerLayerCnt = aCopperLayersCount -2;
|
int innerLayerCnt = aCopperLayersCount -2;
|
||||||
|
|
||||||
for( int ii = 0; ii < innerLayerCnt; ii++ )
|
for( int ii = 0; ii < innerLayerCnt; ii++ )
|
||||||
{
|
{
|
||||||
//TODO there is a problem with this code
|
if( internalMask[innerLayerCnt - ii] )
|
||||||
if( internalMask[innerLayerCnt - ii + In1_Cu] )
|
{
|
||||||
newMask.set( ii + In1_Cu );
|
newMask.set( ii + In1_Cu );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
newMask.reset( ii + In1_Cu );
|
newMask.reset( ii + In1_Cu );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return newMask;
|
return newMask;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue