Rename pns item kind constants in preparation for renaming pns classes

This commit is contained in:
decimad 2016-08-29 18:11:42 +02:00 committed by Maciej Suminski
parent de6281e977
commit 4cf44d9725
31 changed files with 150 additions and 150 deletions

View File

@ -107,13 +107,13 @@ bool PNS_DP_PRIMITIVE_PAIR::Directional() const
if( !m_primP )
return false;
return m_primP->OfKind( PNS_ITEM::SEGMENT );
return m_primP->OfKind( PNS_ITEM::SEGMENT_T );
}
DIRECTION_45 PNS_DP_PRIMITIVE_PAIR::anchorDirection( PNS_ITEM* aItem, const VECTOR2I& aP ) const
{
if( !aItem->OfKind ( PNS_ITEM::SEGMENT ) )
if( !aItem->OfKind ( PNS_ITEM::SEGMENT_T ) )
return DIRECTION_45();
PNS_SEGMENT* s = static_cast<PNS_SEGMENT*>( aItem );
@ -130,7 +130,7 @@ void PNS_DP_PRIMITIVE_PAIR::CursorOrientation( const VECTOR2I& aCursorPos, VECTO
VECTOR2I aP, aN, dir, midpoint;
if ( m_primP->OfKind( PNS_ITEM::SEGMENT ) && m_primN->OfKind( PNS_ITEM::SEGMENT ) )
if ( m_primP->OfKind( PNS_ITEM::SEGMENT_T ) && m_primN->OfKind( PNS_ITEM::SEGMENT_T ) )
{
aP = m_primP->Anchor( 1 );
aN = m_primN->Anchor( 1 );
@ -421,7 +421,7 @@ void PNS_DP_GATEWAYS::BuildFromPrimitivePair( PNS_DP_PRIMITIVE_PAIR aPair, bool
return;
}
const int pvMask = PNS_ITEM::SOLID | PNS_ITEM::VIA;
const int pvMask = PNS_ITEM::SOLID_T | PNS_ITEM::VIA_T;
if( aPair.PrimP()->OfKind( pvMask ) && aPair.PrimN()->OfKind( pvMask ) )
{
@ -430,7 +430,7 @@ void PNS_DP_GATEWAYS::BuildFromPrimitivePair( PNS_DP_PRIMITIVE_PAIR aPair, bool
shP = aPair.PrimP()->Shape();
}
else if( aPair.PrimP()->OfKind( PNS_ITEM::SEGMENT ) && aPair.PrimN()->OfKind( PNS_ITEM::SEGMENT ) )
else if( aPair.PrimP()->OfKind( PNS_ITEM::SEGMENT_T ) && aPair.PrimN()->OfKind( PNS_ITEM::SEGMENT_T ) )
{
buildDpContinuation( aPair, aPreferDiagonal );

View File

@ -286,7 +286,7 @@ public:
typedef std::vector<COUPLED_SEGMENTS> COUPLED_SEGMENTS_VEC;
PNS_DIFF_PAIR() : PNS_ITEM( DIFF_PAIR ), m_hasVias( false )
PNS_DIFF_PAIR() : PNS_ITEM( DIFF_PAIR_T ), m_hasVias( false )
{
// Initialize some members, to avoid uninitialized variables.
m_net_p = 0;
@ -299,7 +299,7 @@ public:
}
PNS_DIFF_PAIR( int aGap ) :
PNS_ITEM( DIFF_PAIR ),
PNS_ITEM( DIFF_PAIR_T ),
m_hasVias( false )
{
m_gapConstraint = aGap;
@ -315,7 +315,7 @@ public:
}
PNS_DIFF_PAIR( const SHAPE_LINE_CHAIN &aP, const SHAPE_LINE_CHAIN& aN, int aGap = 0 ):
PNS_ITEM( DIFF_PAIR ),
PNS_ITEM( DIFF_PAIR_T ),
m_n( aN ),
m_p( aP ),
m_hasVias( false )
@ -333,7 +333,7 @@ public:
}
PNS_DIFF_PAIR( const PNS_LINE &aLineP, const PNS_LINE &aLineN, int aGap = 0 ):
PNS_ITEM( DIFF_PAIR ),
PNS_ITEM( DIFF_PAIR_T ),
m_line_p( aLineP ),
m_line_n( aLineN ),
m_hasVias( false )
@ -354,7 +354,7 @@ public:
static inline bool ClassOf( const PNS_ITEM* aItem )
{
return aItem && DIFF_PAIR == aItem->Kind();
return aItem && DIFF_PAIR_T == aItem->Kind();
}
PNS_DIFF_PAIR* Clone() const { assert( false ); return NULL; }

View File

@ -181,7 +181,7 @@ bool PNS_DIFF_PAIR_PLACER::attemptWalk( PNS_NODE* aNode, PNS_DIFF_PAIR* aCurrent
bool currentIsP = aPFirst;
int mask = aSolidsOnly ? PNS_ITEM::SOLID : PNS_ITEM::ANY;
int mask = aSolidsOnly ? PNS_ITEM::SOLID_T : PNS_ITEM::ANY_T;
do
{
@ -392,7 +392,7 @@ bool PNS_DIFF_PAIR_PLACER::SetLayer( int aLayer )
return false;
else if( !m_prevPair )
return false;
else if( m_prevPair->PrimP() || ( m_prevPair->PrimP()->OfKind( PNS_ITEM::VIA ) &&
else if( m_prevPair->PrimP() || ( m_prevPair->PrimP()->OfKind( PNS_ITEM::VIA_T ) &&
m_prevPair->PrimP()->Layers().Overlaps( aLayer ) ) )
{
m_currentLayer = aLayer;
@ -444,11 +444,11 @@ OPT_VECTOR2I PNS_DIFF_PAIR_PLACER::getDanglingAnchor( PNS_NODE* aNode, PNS_ITEM*
{
switch( aItem->Kind() )
{
case PNS_ITEM::VIA:
case PNS_ITEM::SOLID:
case PNS_ITEM::VIA_T:
case PNS_ITEM::SOLID_T:
return aItem->Anchor( 0 );
case PNS_ITEM::SEGMENT:
case PNS_ITEM::SEGMENT_T:
{
PNS_SEGMENT* s =static_cast<PNS_SEGMENT*>( aItem );
@ -513,7 +513,7 @@ bool PNS_DIFF_PAIR_PLACER::findDpPrimitivePair( const VECTOR2I& aP, PNS_ITEM* aI
bool shapeMatches = true;
if( item->OfKind( PNS_ITEM::SOLID ) && item->Layers() != aItem->Layers() )
if( item->OfKind( PNS_ITEM::SOLID_T ) && item->Layers() != aItem->Layers() )
{
shapeMatches = false;
}

View File

@ -72,7 +72,7 @@ bool PNS_DP_MEANDER_PLACER::Start( const VECTOR2I& aP, PNS_ITEM* aStartItem )
{
VECTOR2I p;
if( !aStartItem || !aStartItem->OfKind( PNS_ITEM::SEGMENT ) )
if( !aStartItem || !aStartItem->OfKind( PNS_ITEM::SEGMENT_T ) )
{
Router()->SetFailureReason( _( "Please select a track whose length you want to tune." ) );
return false;

View File

@ -89,7 +89,7 @@ bool PNS_DRAGGER::startDragVia( const VECTOR2D& aP, PNS_VIA* aVia )
for( PNS_ITEM* item : jt->LinkList() )
{
if( item->OfKind( PNS_ITEM::SEGMENT ) )
if( item->OfKind( PNS_ITEM::SEGMENT_T ) )
{
int segIndex;
PNS_SEGMENT* seg = ( PNS_SEGMENT*) item;
@ -119,10 +119,10 @@ bool PNS_DRAGGER::Start( const VECTOR2I& aP, PNS_ITEM* aStartItem )
switch( aStartItem->Kind() )
{
case PNS_ITEM::SEGMENT:
case PNS_ITEM::SEGMENT_T:
return startDragSegment( aP, static_cast<PNS_SEGMENT*>( aStartItem ) );
case PNS_ITEM::VIA:
case PNS_ITEM::VIA_T:
return startDragVia( aP, static_cast<PNS_VIA*>( aStartItem ) );
default:

View File

@ -171,11 +171,11 @@ PNS_INDEX::ITEM_SHAPE_INDEX* PNS_INDEX::getSubindex( const PNS_ITEM* aItem )
switch( aItem->Kind() )
{
case PNS_ITEM::VIA:
case PNS_ITEM::VIA_T:
idx_n = SI_Multilayer;
break;
case PNS_ITEM::SOLID:
case PNS_ITEM::SOLID_T:
{
if( l.IsMultilayer() )
idx_n = SI_Multilayer;
@ -186,8 +186,8 @@ PNS_INDEX::ITEM_SHAPE_INDEX* PNS_INDEX::getSubindex( const PNS_ITEM* aItem )
}
break;
case PNS_ITEM::SEGMENT:
case PNS_ITEM::LINE:
case PNS_ITEM::SEGMENT_T:
case PNS_ITEM::LINE_T:
idx_n = SI_Traces + 2 * l.Start() + SI_SegStraight;
break;

View File

@ -48,7 +48,7 @@ bool PNS_ITEM::Collide( const PNS_ITEM* aOther, int aClearance, bool aNeedMTV,
return true;
// special case for "head" line with a via attached at the end.
if( aOther->m_kind == LINE )
if( aOther->m_kind == LINE_T )
{
const PNS_LINE* line = static_cast<const PNS_LINE*>( aOther );
@ -64,19 +64,19 @@ const std::string PNS_ITEM::KindStr() const
{
switch( m_kind )
{
case LINE:
case LINE_T:
return "line";
case SEGMENT:
case SEGMENT_T:
return "segment";
case VIA:
case VIA_T:
return "via";
case JOINT:
case JOINT_T:
return "joint";
case SOLID:
case SOLID_T:
return "solid";
default:

View File

@ -57,13 +57,13 @@ public:
///> Supported item types
enum PnsKind
{
SOLID = 1,
LINE = 2,
JOINT = 4,
SEGMENT = 8,
VIA = 16,
DIFF_PAIR = 32,
ANY = 0xff
SOLID_T = 1,
LINE_T = 2,
JOINT_T = 4,
SEGMENT_T = 8,
VIA_T = 16,
DIFF_PAIR_T = 32,
ANY_T = 0xff
};
PNS_ITEM( PnsKind aKind )

View File

@ -55,10 +55,10 @@ public:
};
PNS_JOINT() :
PNS_ITEM( JOINT ), m_locked( false ) {}
PNS_ITEM( JOINT_T ), m_locked( false ) {}
PNS_JOINT( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aNet = -1 ) :
PNS_ITEM( JOINT )
PNS_ITEM( JOINT_T )
{
m_tag.pos = aPos;
m_tag.net = aNet;
@ -67,7 +67,7 @@ public:
}
PNS_JOINT( const PNS_JOINT& aB ) :
PNS_ITEM( JOINT )
PNS_ITEM( JOINT_T )
{
m_layers = aB.m_layers;
m_tag.pos = aB.m_tag.pos;
@ -87,7 +87,7 @@ public:
/// segments of the same net, on the same layer.
bool IsLineCorner() const
{
if( m_linkedItems.Size() != 2 || m_linkedItems.Count( SEGMENT ) != 2 )
if( m_linkedItems.Size() != 2 || m_linkedItems.Count( SEGMENT_T ) != 2 )
return false;
PNS_SEGMENT* seg1 = static_cast<PNS_SEGMENT*>( m_linkedItems[0] );
@ -99,8 +99,8 @@ public:
bool IsNonFanoutVia() const
{
int vias = m_linkedItems.Count( VIA );
int segs = m_linkedItems.Count( SEGMENT );
int vias = m_linkedItems.Count( VIA_T );
int segs = m_linkedItems.Count( SEGMENT_T );
return ( m_linkedItems.Size() == 3 && vias == 1 && segs == 2 );
}
@ -110,7 +110,7 @@ public:
if( m_linkedItems.Size() != 2 )
return false;
if( m_linkedItems.Count( SEGMENT ) != 2)
if( m_linkedItems.Count( SEGMENT_T ) != 2)
return false;
PNS_SEGMENT* seg1 = static_cast<PNS_SEGMENT*>( m_linkedItems[0] );
@ -150,7 +150,7 @@ public:
{
for( PNS_ITEM* item : m_linkedItems.Items() )
{
if( item->OfKind( VIA ) )
if( item->OfKind( VIA_T ) )
return static_cast<PNS_VIA*>( item );
}

View File

@ -156,7 +156,7 @@ int PNS_PCBNEW_RULE_RESOLVER::Clearance( const PNS_ITEM* aA, const PNS_ITEM* aB
int net_b = aB->Net();
int cl_b = ( net_b >= 0 ? m_clearanceCache[net_b].clearance : m_defaultClearance );
bool linesOnly = aA->OfKind( PNS_ITEM::SEGMENT | PNS_ITEM::LINE ) && aB->OfKind( PNS_ITEM::SEGMENT | PNS_ITEM::LINE );
bool linesOnly = aA->OfKind( PNS_ITEM::SEGMENT_T | PNS_ITEM::LINE_T ) && aB->OfKind( PNS_ITEM::SEGMENT_T | PNS_ITEM::LINE_T );
if( linesOnly && net_a >= 0 && net_b >= 0 && m_clearanceCache[net_a].coupledNet == net_b )
{
@ -826,7 +826,7 @@ void PNS_KICAD_IFACE::AddItem( PNS_ITEM* aItem )
switch( aItem->Kind() )
{
case PNS_ITEM::SEGMENT:
case PNS_ITEM::SEGMENT_T:
{
PNS_SEGMENT* seg = static_cast<PNS_SEGMENT*>( aItem );
TRACK* track = new TRACK( m_board );
@ -840,7 +840,7 @@ void PNS_KICAD_IFACE::AddItem( PNS_ITEM* aItem )
break;
}
case PNS_ITEM::VIA:
case PNS_ITEM::VIA_T:
{
VIA* via_board = new VIA( m_board );
PNS_VIA* via = static_cast<PNS_VIA*>( aItem );

View File

@ -66,7 +66,7 @@ public:
* Constructor
* Makes an empty line.
*/
PNS_LINE() : PNS_ITEM( LINE )
PNS_LINE() : PNS_ITEM( LINE_T )
{
m_segmentRefs = NULL;
m_hasVia = false;
@ -95,7 +95,7 @@ public:
static inline bool ClassOf( const PNS_ITEM* aItem )
{
return aItem && LINE == aItem->Kind();
return aItem && LINE_T == aItem->Kind();
}
/// @copydoc PNS_ITEM::Clone()

View File

@ -249,7 +249,7 @@ bool PNS_LINE_PLACER::reduceTail( const VECTOR2I& aEnd )
PNS_LINE tmp( m_tail, replacement );
if( m_currentNode->CheckColliding( &tmp, PNS_ITEM::ANY ) )
if( m_currentNode->CheckColliding( &tmp, PNS_ITEM::ANY_T ) )
break;
if( DIRECTION_45( replacement.CSegment( 0 ) ) == dir )
@ -437,7 +437,7 @@ bool PNS_LINE_PLACER::rhShoveOnly( const VECTOR2I& aP, PNS_LINE& aNewHead )
PNS_WALKAROUND::WALKAROUND_STATUS stat_solids = walkaround.Route( initTrack, walkSolids );
optimizer.SetEffortLevel( PNS_OPTIMIZER::MERGE_SEGMENTS );
optimizer.SetCollisionMask( PNS_ITEM::SOLID );
optimizer.SetCollisionMask( PNS_ITEM::SOLID_T );
optimizer.Optimize( &walkSolids );
if( stat_solids == PNS_WALKAROUND::DONE )
@ -487,7 +487,7 @@ bool PNS_LINE_PLACER::rhShoveOnly( const VECTOR2I& aP, PNS_LINE& aNewHead )
optimizer.SetWorld( m_currentNode );
optimizer.SetEffortLevel( PNS_OPTIMIZER::MERGE_OBTUSE | PNS_OPTIMIZER::SMART_PADS );
optimizer.SetCollisionMask( PNS_ITEM::ANY );
optimizer.SetCollisionMask( PNS_ITEM::ANY_T );
optimizer.Optimize( &l2 );
aNewHead = l2;
@ -690,7 +690,7 @@ void PNS_LINE_PLACER::splitAdjacentSegments( PNS_NODE* aNode, PNS_ITEM* aSeg, co
if( !aSeg )
return;
if( !aSeg->OfKind( PNS_ITEM::SEGMENT ) )
if( !aSeg->OfKind( PNS_ITEM::SEGMENT_T ) )
return;
PNS_JOINT* jt = aNode->FindJoint( aP, aSeg );
@ -724,7 +724,7 @@ bool PNS_LINE_PLACER::SetLayer( int aLayer )
{
return false;
}
else if( !m_startItem || ( m_startItem->OfKind( PNS_ITEM::VIA ) && m_startItem->Layers().Overlaps( aLayer ) ) )
else if( !m_startItem || ( m_startItem->OfKind( PNS_ITEM::VIA_T ) && m_startItem->Layers().Overlaps( aLayer ) ) )
{
m_currentLayer = aLayer;
initPlacement();

View File

@ -80,7 +80,7 @@ void PNS_LOGGER::Log ( const PNS_ITEM* aItem, int aKind, const std::string aName
switch( aItem->Kind() )
{
case PNS_ITEM::LINE:
case PNS_ITEM::LINE_T:
{
PNS_LINE* l = (PNS_LINE*) aItem;
m_theLog << " line ";
@ -90,7 +90,7 @@ void PNS_LOGGER::Log ( const PNS_ITEM* aItem, int aKind, const std::string aName
break;
}
case PNS_ITEM::VIA:
case PNS_ITEM::VIA_T:
{
m_theLog << " via 0 0 ";
dumpShape ( aItem->Shape() );
@ -98,7 +98,7 @@ void PNS_LOGGER::Log ( const PNS_ITEM* aItem, int aKind, const std::string aName
break;
}
case PNS_ITEM::SEGMENT:
case PNS_ITEM::SEGMENT_T:
{
PNS_SEGMENT* s =(PNS_SEGMENT*) aItem;
m_theLog << " line ";
@ -107,7 +107,7 @@ void PNS_LOGGER::Log ( const PNS_ITEM* aItem, int aKind, const std::string aName
break;
}
case PNS_ITEM::SOLID:
case PNS_ITEM::SOLID_T:
{
PNS_SOLID* s = (PNS_SOLID*) aItem;
m_theLog << " solid 0 0 ";

View File

@ -61,7 +61,7 @@ bool PNS_MEANDER_PLACER::Start( const VECTOR2I& aP, PNS_ITEM* aStartItem )
{
VECTOR2I p;
if( !aStartItem || !aStartItem->OfKind( PNS_ITEM::SEGMENT ) )
if( !aStartItem || !aStartItem->OfKind( PNS_ITEM::SEGMENT_T ) )
{
Router()->SetFailureReason( _( "Please select a track whose length you want to tune." ) );
return false;

View File

@ -48,7 +48,7 @@ bool PNS_MEANDER_SKEW_PLACER::Start( const VECTOR2I& aP, PNS_ITEM* aStartItem )
{
VECTOR2I p;
if( !aStartItem || !aStartItem->OfKind( PNS_ITEM::SEGMENT ) )
if( !aStartItem || !aStartItem->OfKind( PNS_ITEM::SEGMENT_T ) )
{
Router()->SetFailureReason( _( "Please select a differential pair trace you want to tune." ) );
return false;

View File

@ -155,7 +155,7 @@ PNS_OBSTACLE_VISITOR::PNS_OBSTACLE_VISITOR( const PNS_ITEM* aItem ) :
m_override( NULL ),
m_extraClearance( 0 )
{
if( aItem && aItem->Kind() == PNS_ITEM::LINE )
if( aItem && aItem->Kind() == PNS_ITEM::LINE_T )
m_extraClearance += static_cast<const PNS_LINE*>( aItem )->Width() / 2;
}
@ -228,7 +228,7 @@ struct PNS_NODE::DEFAULT_OBSTACLE_VISITOR : public PNS_OBSTACLE_VISITOR
int clearance = m_extraClearance + m_node->GetClearance( aCandidate, m_item );
if( aCandidate->Kind() == PNS_ITEM::LINE ) // this should never happen.
if( aCandidate->Kind() == PNS_ITEM::LINE_T ) // this should never happen.
{
assert( false );
clearance += static_cast<PNS_LINE*>( aCandidate )->Width() / 2;
@ -427,7 +427,7 @@ PNS_NODE::OPT_OBSTACLE PNS_NODE::CheckColliding( const PNS_ITEM* aItemA, int aKi
obs.reserve( 100 );
if( aItemA->Kind() == PNS_ITEM::LINE )
if( aItemA->Kind() == PNS_ITEM::LINE_T )
{
int n = 0;
const PNS_LINE* line = static_cast<const PNS_LINE*>( aItemA );
@ -467,9 +467,9 @@ bool PNS_NODE::CheckColliding( const PNS_ITEM* aItemA, const PNS_ITEM* aItemB, i
clearance = GetClearance( aItemA, aItemB );
// fixme: refactor
if( aItemA->Kind() == PNS_ITEM::LINE )
if( aItemA->Kind() == PNS_ITEM::LINE_T )
clearance += static_cast<const PNS_LINE*>( aItemA )->Width() / 2;
if( aItemB->Kind() == PNS_ITEM::LINE )
if( aItemB->Kind() == PNS_ITEM::LINE_T )
clearance += static_cast<const PNS_LINE*>( aItemB )->Width() / 2;
return aItemA->Collide( aItemB, clearance );
@ -607,19 +607,19 @@ void PNS_NODE::Add( PNS_ITEM* aItem, bool aAllowRedundant )
switch( aItem->Kind() )
{
case PNS_ITEM::SOLID:
case PNS_ITEM::SOLID_T:
addSolid( static_cast<PNS_SOLID*>( aItem ) );
break;
case PNS_ITEM::SEGMENT:
case PNS_ITEM::SEGMENT_T:
addSegment( static_cast<PNS_SEGMENT*>( aItem ), aAllowRedundant );
break;
case PNS_ITEM::LINE:
case PNS_ITEM::LINE_T:
addLine( static_cast<PNS_LINE*>( aItem ), aAllowRedundant );
break;
case PNS_ITEM::VIA:
case PNS_ITEM::VIA_T:
addVia( static_cast<PNS_VIA*>( aItem ) );
break;
@ -732,20 +732,20 @@ void PNS_NODE::Remove( PNS_ITEM* aItem )
{
switch( aItem->Kind() )
{
case PNS_ITEM::SOLID:
case PNS_ITEM::SOLID_T:
// fixme: this fucks up the joints, but it's only used for marking colliding obstacles for the moment, so we don't care.
doRemove( aItem );
break;
case PNS_ITEM::SEGMENT:
case PNS_ITEM::SEGMENT_T:
removeSegment( static_cast<PNS_SEGMENT*>( aItem ) );
break;
case PNS_ITEM::LINE:
case PNS_ITEM::LINE_T:
removeLine( static_cast<PNS_LINE*>( aItem ) );
break;
case PNS_ITEM::VIA:
case PNS_ITEM::VIA_T:
removeVia( static_cast<PNS_VIA*>( aItem ) );
break;
@ -879,7 +879,7 @@ void PNS_NODE::MapConnectivity( PNS_JOINT* aStart, std::vector<PNS_JOINT*>& aFou
for( PNS_ITEM* item : current->LinkList() )
{
if( item->OfKind( PNS_ITEM::SEGMENT ) )
if( item->OfKind( PNS_ITEM::SEGMENT_T ) )
{
PNS_SEGMENT* seg = static_cast<PNS_SEGMENT *>( item );
PNS_JOINT* a = FindJoint( seg->Seg().A, seg );
@ -905,7 +905,7 @@ int PNS_NODE::FindLinesBetweenJoints( PNS_JOINT& aA, PNS_JOINT& aB, std::vector<
{
for( PNS_ITEM* item : aA.LinkList() )
{
if( item->Kind() == PNS_ITEM::SEGMENT )
if( item->Kind() == PNS_ITEM::SEGMENT_T )
{
PNS_SEGMENT* seg = static_cast<PNS_SEGMENT*>( item );
PNS_LINE line = AssembleLine( seg );
@ -1057,7 +1057,7 @@ void PNS_NODE::Dump( bool aLong )
for( i = m_items.begin(); i != m_items.end(); i++ )
{
if( (*i)->GetKind() == PNS_ITEM::SEGMENT )
if( (*i)->GetKind() == PNS_ITEM::SEGMENT_T )
all_segs.insert( static_cast<PNS_SEGMENT*>( *i ) );
}
@ -1065,7 +1065,7 @@ void PNS_NODE::Dump( bool aLong )
{
for( i = m_root->m_items.begin(); i != m_root->m_items.end(); i++ )
{
if( (*i)->GetKind() == PNS_ITEM::SEGMENT && !overrides( *i ) )
if( (*i)->GetKind() == PNS_ITEM::SEGMENT_T && !overrides( *i ) )
all_segs.insert( static_cast<PNS_SEGMENT*>(*i) );
}
}
@ -1085,7 +1085,7 @@ void PNS_NODE::Dump( bool aLong )
switch( m_item->GetKind() )
{
case PNS_ITEM::SEGMENT:
case PNS_ITEM::SEGMENT_T:
{
const PNS_SEGMENT* seg = static_cast<const PNS_SEGMENT*>( m_item );
wxLogTrace( "PNS", " -> seg %s %s\n", seg->GetSeg().A.Format().c_str(),
@ -1275,7 +1275,7 @@ PNS_SEGMENT* PNS_NODE::findRedundantSegment( PNS_SEGMENT* aSeg )
for( PNS_ITEM* item : jtStart->LinkList() )
{
if( item->OfKind( PNS_ITEM::SEGMENT ) )
if( item->OfKind( PNS_ITEM::SEGMENT_T ) )
{
PNS_SEGMENT* seg2 = (PNS_SEGMENT*) item;

View File

@ -193,7 +193,7 @@ public:
*/
int QueryColliding( const PNS_ITEM* aItem,
OBSTACLES& aObstacles,
int aKindMask = PNS_ITEM::ANY,
int aKindMask = PNS_ITEM::ANY_T,
int aLimitCount = -1,
bool aDifferentNetsOnly = true,
int aForceClearance = -1 );
@ -212,7 +212,7 @@ public:
* @return the obstacle, if found, otherwise empty.
*/
OPT_OBSTACLE NearestObstacle( const PNS_LINE* aItem,
int aKindMask = PNS_ITEM::ANY,
int aKindMask = PNS_ITEM::ANY_T,
const std::set<PNS_ITEM*>* aRestrictedSet = NULL );
/**
@ -225,7 +225,7 @@ public:
* @return the obstacle, if found, otherwise empty.
*/
OPT_OBSTACLE CheckColliding( const PNS_ITEM* aItem,
int aKindMask = PNS_ITEM::ANY );
int aKindMask = PNS_ITEM::ANY_T );
/**
@ -238,7 +238,7 @@ public:
* @return the obstacle, if found, otherwise empty.
*/
OPT_OBSTACLE CheckColliding( const PNS_ITEMSET& aSet,
int aKindMask = PNS_ITEM::ANY );
int aKindMask = PNS_ITEM::ANY_T );
/**
@ -253,7 +253,7 @@ public:
*/
bool CheckColliding( const PNS_ITEM* aItemA,
const PNS_ITEM* aItemB,
int aKindMask = PNS_ITEM::ANY,
int aKindMask = PNS_ITEM::ANY_T,
int aForceClearance = -1 );
/**
@ -369,7 +369,7 @@ public:
void MapConnectivity( PNS_JOINT* aStart, std::vector<PNS_JOINT*> & aFoundJoints );
PNS_ITEM* NearestUnconnectedItem( PNS_JOINT* aStart, int* aAnchor = NULL,
int aKindMask = PNS_ITEM::ANY);
int aKindMask = PNS_ITEM::ANY_T);
#endif

View File

@ -125,7 +125,7 @@ bool PNS_COST_ESTIMATOR::IsBetter( PNS_COST_ESTIMATOR& aOther,
**/
PNS_OPTIMIZER::PNS_OPTIMIZER( PNS_NODE* aWorld ) :
m_world( aWorld ),
m_collisionKindMask( PNS_ITEM::ANY ),
m_collisionKindMask( PNS_ITEM::ANY_T ),
m_effortLevel( MERGE_SEGMENTS ),
m_keepPostures( false ),
m_restrictAreaActive( false )
@ -200,7 +200,7 @@ void PNS_OPTIMIZER::removeCachedSegments( PNS_LINE* aLine, int aStartVertex, int
void PNS_OPTIMIZER::CacheRemove( PNS_ITEM* aItem )
{
if( aItem->Kind() == PNS_ITEM::LINE )
if( aItem->Kind() == PNS_ITEM::LINE_T )
removeCachedSegments( static_cast<PNS_LINE*>( aItem ) );
}
@ -274,7 +274,7 @@ int LINE_RESTRICTIONS::allowedAngles( PNS_NODE* aWorld, const PNS_LINE* aLine, c
for( const PNS_ITEM* item : jt->Links().CItems() )
{
if( item->OfKind( PNS_ITEM::VIA ) || item->OfKind( PNS_ITEM::SOLID ) )
if( item->OfKind( PNS_ITEM::VIA_T ) || item->OfKind( PNS_ITEM::SOLID_T ) )
return 0xff;
else if( const PNS_SEGMENT* seg = dyn_cast<const PNS_SEGMENT*>( item ) )
{
@ -767,13 +767,13 @@ PNS_OPTIMIZER::BREAKOUT_LIST PNS_OPTIMIZER::computeBreakouts( int aWidth,
{
switch( aItem->Kind() )
{
case PNS_ITEM::VIA:
case PNS_ITEM::VIA_T:
{
const PNS_VIA* via = static_cast<const PNS_VIA*>( aItem );
return circleBreakouts( aWidth, via->Shape(), aPermitDiagonal );
}
case PNS_ITEM::SOLID:
case PNS_ITEM::SOLID_T:
{
const SHAPE* shape = aItem->Shape();
@ -817,7 +817,7 @@ PNS_ITEM* PNS_OPTIMIZER::findPadOrVia( int aLayer, int aNet, const VECTOR2I& aP
for( PNS_ITEM* item : jt->LinkList() )
{
if( item->OfKind( PNS_ITEM::VIA | PNS_ITEM::SOLID ) )
if( item->OfKind( PNS_ITEM::VIA_T | PNS_ITEM::SOLID_T ) )
return item;
}
@ -985,12 +985,12 @@ bool PNS_OPTIMIZER::fanoutCleanup( PNS_LINE* aLine )
if( !startPad )
return false;
bool startMatch = startPad->OfKind( PNS_ITEM::VIA | PNS_ITEM::SOLID );
bool startMatch = startPad->OfKind( PNS_ITEM::VIA_T | PNS_ITEM::SOLID_T );
bool endMatch = false;
if(endPad)
{
endMatch = endPad->OfKind( PNS_ITEM::VIA | PNS_ITEM::SOLID );
endMatch = endPad->OfKind( PNS_ITEM::VIA_T | PNS_ITEM::SOLID_T );
}
else
{
@ -1046,7 +1046,7 @@ bool verifyDpBypass( PNS_NODE* aNode, PNS_DIFF_PAIR* aPair, bool aRefIsP, const
PNS_LINE refLine ( aRefIsP ? aPair->PLine() : aPair->NLine(), aNewRef );
PNS_LINE coupledLine ( aRefIsP ? aPair->NLine() : aPair->PLine(), aNewCoupled );
if( aNode->CheckColliding( &refLine, &coupledLine, PNS_ITEM::ANY, aPair->Gap() - 10 ) )
if( aNode->CheckColliding( &refLine, &coupledLine, PNS_ITEM::ANY_T, aPair->Gap() - 10 ) )
return false;
if( aNode->CheckColliding ( &refLine ) )

View File

@ -143,7 +143,7 @@ const PNS_ITEMSET PNS_ROUTER::QueryHoverItems( const VECTOR2I& aP )
bool PNS_ROUTER::StartDragging( const VECTOR2I& aP, PNS_ITEM* aStartItem )
{
if( !aStartItem || aStartItem->OfKind( PNS_ITEM::SOLID ) )
if( !aStartItem || aStartItem->OfKind( PNS_ITEM::SOLID_T ) )
return false;
m_dragger = new PNS_DRAGGER( this );
@ -245,16 +245,16 @@ void PNS_ROUTER::markViolations( PNS_NODE* aNode, PNS_ITEMSET& aCurrent,
{
PNS_NODE::OBSTACLES obstacles;
aNode->QueryColliding( item, obstacles, PNS_ITEM::ANY );
aNode->QueryColliding( item, obstacles, PNS_ITEM::ANY_T );
if( item->OfKind( PNS_ITEM::LINE ) )
if( item->OfKind( PNS_ITEM::LINE_T ) )
{
PNS_LINE* l = static_cast<PNS_LINE*>( item );
if( l->EndsWithVia() )
{
PNS_VIA v( l->Via() );
aNode->QueryColliding( &v, obstacles, PNS_ITEM::ANY );
aNode->QueryColliding( &v, obstacles, PNS_ITEM::ANY_T );
}
}
@ -312,7 +312,7 @@ void PNS_ROUTER::movePlacing( const VECTOR2I& aP, PNS_ITEM* aEndItem )
for( const PNS_ITEM* item : current.CItems() )
{
if( !item->OfKind( PNS_ITEM::LINE ) )
if( !item->OfKind( PNS_ITEM::LINE_T ) )
continue;
const PNS_LINE* l = static_cast<const PNS_LINE*>( item );

View File

@ -39,17 +39,17 @@ class PNS_SEGMENT : public PNS_ITEM
{
public:
PNS_SEGMENT() :
PNS_ITEM( SEGMENT )
PNS_ITEM( SEGMENT_T )
{}
PNS_SEGMENT( const SEG& aSeg, int aNet ) :
PNS_ITEM( SEGMENT ), m_seg( aSeg, 0 )
PNS_ITEM( SEGMENT_T ), m_seg( aSeg, 0 )
{
m_net = aNet;
}
PNS_SEGMENT( const PNS_LINE& aParentLine, const SEG& aSeg ) :
PNS_ITEM( SEGMENT ),
PNS_ITEM( SEGMENT_T ),
m_seg( aSeg, aParentLine.Width() )
{
m_net = aParentLine.Net();
@ -60,7 +60,7 @@ public:
static inline bool ClassOf( const PNS_ITEM* aItem )
{
return aItem && SEGMENT == aItem->Kind();
return aItem && SEGMENT_T == aItem->Kind();
}
PNS_SEGMENT* Clone() const;

View File

@ -217,7 +217,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::processHullSet( PNS_LINE& aCurrent, PNS_LINE&
continue;
}
bool colliding = m_currentNode->CheckColliding( &l, &aCurrent, PNS_ITEM::ANY, m_forceClearance );
bool colliding = m_currentNode->CheckColliding( &l, &aCurrent, PNS_ITEM::ANY_T, m_forceClearance );
if( ( aCurrent.Marker() & MK_HEAD ) && !colliding )
{
@ -416,7 +416,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onCollidingSolid( PNS_LINE& aCurrent, PNS_ITE
for( PNS_ITEM* item : jtStart->LinkList() )
{
if( item->OfKind( PNS_ITEM::VIA ) )
if( item->OfKind( PNS_ITEM::VIA_T ) )
{
via = (PNS_VIA*) item;
break;
@ -710,7 +710,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onCollidingVia( PNS_ITEM* aCurrent, PNS_VIA*
VECTOR2I mtvLine, mtvVia, mtv, mtvSolid;
int rank = -1;
if( aCurrent->OfKind( PNS_ITEM::LINE ) )
if( aCurrent->OfKind( PNS_ITEM::LINE_T ) )
{
#ifdef DEBUG
m_logger.NewGroup( "push-via-by-line", m_iter );
@ -738,7 +738,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onCollidingVia( PNS_ITEM* aCurrent, PNS_VIA*
rank = currentLine->Rank();
}
else if( aCurrent->OfKind( PNS_ITEM::SOLID ) )
else if( aCurrent->OfKind( PNS_ITEM::SOLID_T ) )
{
CollideShapes( aObstacleVia->Shape(), aCurrent->Shape(),
clearance + PNS_HULL_MARGIN, true, mtvSolid );
@ -765,7 +765,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onReverseCollidingVia( PNS_LINE& aCurrent, PN
for( PNS_ITEM* item : jt->LinkList() )
{
if( item->OfKind( PNS_ITEM::SEGMENT ) && item->LayersOverlap( &aCurrent ) )
if( item->OfKind( PNS_ITEM::SEGMENT_T ) && item->LayersOverlap( &aCurrent ) )
{
PNS_SEGMENT* seg = (PNS_SEGMENT*) item;
PNS_LINE head = assembleLine( seg );
@ -855,9 +855,9 @@ void PNS_SHOVE::unwindStack( PNS_SEGMENT* aSeg )
void PNS_SHOVE::unwindStack( PNS_ITEM* aItem )
{
if( aItem->OfKind( PNS_ITEM::SEGMENT ) )
if( aItem->OfKind( PNS_ITEM::SEGMENT_T ) )
unwindStack( static_cast<PNS_SEGMENT*>( aItem ) );
else if( aItem->OfKind( PNS_ITEM::LINE ) )
else if( aItem->OfKind( PNS_ITEM::LINE_T ) )
{
PNS_LINE* l = static_cast<PNS_LINE*>( aItem );
@ -924,7 +924,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::shoveIteration( int aIter )
PNS_NODE::OPT_OBSTACLE nearest;
SHOVE_STATUS st = SH_NULL;
PNS_ITEM::PnsKind search_order[] = { PNS_ITEM::SOLID, PNS_ITEM::VIA, PNS_ITEM::SEGMENT };
PNS_ITEM::PnsKind search_order[] = { PNS_ITEM::SOLID_T, PNS_ITEM::VIA_T, PNS_ITEM::SEGMENT_T };
for( int i = 0; i < 3; i++ )
{
@ -944,11 +944,11 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::shoveIteration( int aIter )
unwindStack( ni );
if( !ni->OfKind( PNS_ITEM::SOLID ) && ni->Rank() >= 0 && ni->Rank() > currentLine.Rank() )
if( !ni->OfKind( PNS_ITEM::SOLID_T ) && ni->Rank() >= 0 && ni->Rank() > currentLine.Rank() )
{
switch( ni->Kind() )
{
case PNS_ITEM::VIA:
case PNS_ITEM::VIA_T:
{
PNS_VIA* revVia = (PNS_VIA*) ni;
wxLogTrace( "PNS", "iter %d: reverse-collide-via", aIter );
@ -965,7 +965,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::shoveIteration( int aIter )
break;
}
case PNS_ITEM::SEGMENT:
case PNS_ITEM::SEGMENT_T:
{
PNS_SEGMENT* seg = (PNS_SEGMENT*) ni;
wxLogTrace( "PNS", "iter %d: reverse-collide-segment ", aIter );
@ -987,7 +987,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::shoveIteration( int aIter )
{ // "forward" collisions
switch( ni->Kind() )
{
case PNS_ITEM::SEGMENT:
case PNS_ITEM::SEGMENT_T:
wxLogTrace( "PNS", "iter %d: collide-segment ", aIter );
st = onCollidingSegment( currentLine, (PNS_SEGMENT*) ni );
@ -998,7 +998,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::shoveIteration( int aIter )
}
break;
case PNS_ITEM::VIA:
case PNS_ITEM::VIA_T:
wxLogTrace( "PNS", "iter %d: shove-via ", aIter );
st = onCollidingVia( &currentLine, (PNS_VIA*) ni );
@ -1008,7 +1008,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::shoveIteration( int aIter )
}
break;
case PNS_ITEM::SOLID:
case PNS_ITEM::SOLID_T:
wxLogTrace( "PNS", "iter %d: walk-solid ", aIter );
st = onCollidingSolid( currentLine, (PNS_SOLID*) ni );
break;
@ -1364,7 +1364,7 @@ void PNS_SHOVE::runOptimizer( PNS_NODE* aNode )
optFlags |= PNS_OPTIMIZER::SMART_PADS;
optimizer.SetEffortLevel( optFlags );
optimizer.SetCollisionMask( PNS_ITEM::ANY );
optimizer.SetCollisionMask( PNS_ITEM::ANY_T );
for( int pass = 0; pass < n_passes; pass++ )
{

View File

@ -37,15 +37,15 @@ int PNS_SIZES_SETTINGS::inheritTrackWidth( PNS_ITEM* aItem )
switch( aItem->Kind() )
{
case PNS_ITEM::VIA:
case PNS_ITEM::VIA_T:
p = static_cast<PNS_VIA*>( aItem )->Pos();
break;
case PNS_ITEM::SOLID:
case PNS_ITEM::SOLID_T:
p = static_cast<PNS_SOLID*>( aItem )->Pos();
break;
case PNS_ITEM::SEGMENT:
case PNS_ITEM::SEGMENT_T:
return static_cast<PNS_SEGMENT*>( aItem )->Width();
default:
@ -60,7 +60,7 @@ int PNS_SIZES_SETTINGS::inheritTrackWidth( PNS_ITEM* aItem )
PNS_ITEMSET linkedSegs = jt->Links();
linkedSegs.ExcludeItem( aItem ).FilterKinds( PNS_ITEM::SEGMENT );
linkedSegs.ExcludeItem( aItem ).FilterKinds( PNS_ITEM::SEGMENT_T );
for( PNS_ITEM* item : linkedSegs.Items() )
{

View File

@ -35,7 +35,7 @@ namespace PNS {
class PNS_SOLID : public PNS_ITEM
{
public:
PNS_SOLID() : PNS_ITEM( SOLID ), m_shape( NULL )
PNS_SOLID() : PNS_ITEM( SOLID_T ), m_shape( NULL )
{
m_movable = false;
}
@ -54,7 +54,7 @@ public:
static inline bool ClassOf( const PNS_ITEM* aItem )
{
return aItem && SOLID == aItem->Kind();
return aItem && SOLID_T == aItem->Kind();
}
PNS_ITEM* Clone() const;

View File

@ -146,7 +146,7 @@ PNS_ITEM* PNS_TOOL_BASE::pickSingleItem( const VECTOR2I& aWhere, int aNet, int a
if( aNet < 0 || item->Net() == aNet )
{
if( item->OfKind( PNS_ITEM::VIA | PNS_ITEM::SOLID ) )
if( item->OfKind( PNS_ITEM::VIA_T | PNS_ITEM::SOLID_T ) )
{
if( !prioritized[2] )
prioritized[2] = item;
@ -358,17 +358,17 @@ const VECTOR2I PNS_TOOL_BASE::snapToItem( PNS_ITEM* aItem, VECTOR2I aP, bool& aS
switch( aItem->Kind() )
{
case PNS_ITEM::SOLID:
case PNS_ITEM::SOLID_T:
anchor = static_cast<PNS_SOLID*>( aItem )->Pos();
aSplitsSegment = false;
break;
case PNS_ITEM::VIA:
case PNS_ITEM::VIA_T:
anchor = static_cast<PNS_VIA*>( aItem )->Pos();
aSplitsSegment = false;
break;
case PNS_ITEM::SEGMENT:
case PNS_ITEM::SEGMENT_T:
{
PNS_SEGMENT* seg = static_cast<PNS_SEGMENT*>( aItem );
const SEG& s = seg->Seg();

View File

@ -73,7 +73,7 @@ const PNS_TOPOLOGY::JOINT_SET PNS_TOPOLOGY::ConnectedJoints( PNS_JOINT* aStart )
for( PNS_ITEM* item : current->LinkList() )
{
if( item->OfKind( PNS_ITEM::SEGMENT ) )
if( item->OfKind( PNS_ITEM::SEGMENT_T ) )
{
PNS_SEGMENT* seg = static_cast<PNS_SEGMENT*>( item );
PNS_JOINT* a = m_world->FindJoint( seg->Seg().A, seg );
@ -193,7 +193,7 @@ bool PNS_TOPOLOGY::followTrivialPath( PNS_LINE* aLine, bool aLeft, PNS_ITEMSET&
for( PNS_ITEM* link : jt->Links().Items() )
{
if( link->OfKind( PNS_ITEM::VIA ) )
if( link->OfKind( PNS_ITEM::VIA_T ) )
via = link;
else if( aVisited.find( link ) == aVisited.end() )
next_seg = static_cast<PNS_SEGMENT*>( link );
@ -371,7 +371,7 @@ const std::set<PNS_ITEM*> PNS_TOPOLOGY::AssembleCluster( PNS_ITEM* aStart, int a
visited.insert( top );
m_world->QueryColliding( top, obstacles, PNS_ITEM::ANY, -1, false );
m_world->QueryColliding( top, obstacles, PNS_ITEM::ANY_T, -1, false );
for( PNS_OBSTACLE& obs : obstacles )
{

View File

@ -47,12 +47,12 @@ public:
~PNS_TOPOLOGY() {};
bool SimplifyLine( PNS_LINE *aLine );
PNS_ITEM* NearestUnconnectedItem( PNS_JOINT* aStart, int* aAnchor = NULL, int aKindMask = PNS_ITEM::ANY );
PNS_ITEM* NearestUnconnectedItem( PNS_JOINT* aStart, int* aAnchor = NULL, int aKindMask = PNS_ITEM::ANY_T );
bool LeadingRatLine( const PNS_LINE* aTrack, SHAPE_LINE_CHAIN& aRatLine );
const JOINT_SET ConnectedJoints( PNS_JOINT* aStart );
const PNS_ITEMSET ConnectedItems( PNS_JOINT* aStart, int aKindMask = PNS_ITEM::ANY );
const PNS_ITEMSET ConnectedItems( PNS_ITEM* aStart, int aKindMask = PNS_ITEM::ANY );
const PNS_ITEMSET ConnectedItems( PNS_JOINT* aStart, int aKindMask = PNS_ITEM::ANY_T );
const PNS_ITEMSET ConnectedItems( PNS_ITEM* aStart, int aKindMask = PNS_ITEM::ANY_T );
int64_t ShortestConnectionLength( PNS_ITEM* aFrom, PNS_ITEM* aTo );
const PNS_ITEMSET AssembleTrivialPath( PNS_ITEM* aStart );

View File

@ -230,14 +230,14 @@ void DrawDebugDirs( VECTOR2D aP, int aMask, int aColor )
OPT_BOX2I ChangedArea( const PNS_ITEM* aItemA, const PNS_ITEM* aItemB )
{
if( aItemA->OfKind( PNS_ITEM::VIA ) && aItemB->OfKind( PNS_ITEM::VIA ) )
if( aItemA->OfKind( PNS_ITEM::VIA_T ) && aItemB->OfKind( PNS_ITEM::VIA_T ) )
{
const PNS_VIA* va = static_cast<const PNS_VIA*>( aItemA );
const PNS_VIA* vb = static_cast<const PNS_VIA*>( aItemB );
return va->ChangedArea( vb );
}
else if( aItemA->OfKind( PNS_ITEM::LINE ) && aItemB->OfKind( PNS_ITEM::LINE ) )
else if( aItemA->OfKind( PNS_ITEM::LINE_T ) && aItemB->OfKind( PNS_ITEM::LINE_T ) )
{
const PNS_LINE* la = static_cast<const PNS_LINE*> ( aItemA );
const PNS_LINE* lb = static_cast<const PNS_LINE*> ( aItemB );

View File

@ -38,7 +38,7 @@ bool PNS_VIA::PushoutForce( PNS_NODE* aNode, const VECTOR2I& aDirection, VECTOR2
while( iter < aMaxIterations )
{
PNS_NODE::OPT_OBSTACLE obs = aNode->CheckColliding( &mv,
aSolidsOnly ? PNS_ITEM::SOLID : PNS_ITEM::ANY );
aSolidsOnly ? PNS_ITEM::SOLID_T : PNS_ITEM::ANY_T );
if( !obs )
break;

View File

@ -37,7 +37,7 @@ class PNS_VIA : public PNS_ITEM
{
public:
PNS_VIA() :
PNS_ITEM( VIA )
PNS_ITEM( VIA_T )
{
m_diameter = 2; // Dummy value
m_drill = 0;
@ -46,7 +46,7 @@ public:
PNS_VIA( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers,
int aDiameter, int aDrill, int aNet = -1, VIATYPE_T aViaType = VIA_THROUGH ) :
PNS_ITEM( VIA )
PNS_ITEM( VIA_T )
{
SetNet( aNet );
SetLayers( aLayers );
@ -66,7 +66,7 @@ public:
PNS_VIA( const PNS_VIA& aB ) :
PNS_ITEM( VIA )
PNS_ITEM( VIA_T )
{
SetNet( aB.Net() );
SetLayers( aB.Layers() );
@ -81,7 +81,7 @@ public:
static inline bool ClassOf( const PNS_ITEM* aItem )
{
return aItem && VIA == aItem->Kind();
return aItem && VIA_T == aItem->Kind();
}

View File

@ -46,7 +46,7 @@ public:
m_forceLongerPath = false;
m_forceWinding = false;
m_cursorApproachMode = false;
m_itemMask = PNS_ITEM::ANY;
m_itemMask = PNS_ITEM::ANY_T;
// Initialize other members, to avoid uninitialized variables.
m_recursiveBlockageCount = 0;
@ -77,9 +77,9 @@ public:
void SetSolidsOnly( bool aSolidsOnly )
{
if( aSolidsOnly )
m_itemMask = PNS_ITEM::SOLID;
m_itemMask = PNS_ITEM::SOLID_T;
else
m_itemMask = PNS_ITEM::ANY;
m_itemMask = PNS_ITEM::ANY_T;
}
void SetItemMask( int aMask )

View File

@ -68,7 +68,7 @@ void ROUTER_PREVIEW_ITEM::Update( const PNS::PNS_ITEM* aItem )
{
m_originLayer = aItem->Layers().Start();
if( aItem->OfKind( PNS::PNS_ITEM::LINE ) )
if( aItem->OfKind( PNS::PNS_ITEM::LINE_T ) )
{
const PNS::PNS_LINE* l = static_cast<const PNS::PNS_LINE*>( aItem );
@ -86,12 +86,12 @@ void ROUTER_PREVIEW_ITEM::Update( const PNS::PNS_ITEM* aItem )
switch( aItem->Kind() )
{
case PNS::PNS_ITEM::LINE:
case PNS::PNS_ITEM::LINE_T:
m_type = PR_SHAPE;
m_width = ( (PNS::PNS_LINE*) aItem )->Width();
break;
case PNS::PNS_ITEM::SEGMENT:
case PNS::PNS_ITEM::SEGMENT_T:
{
PNS::PNS_SEGMENT* seg = (PNS::PNS_SEGMENT*) aItem;
m_type = PR_SHAPE;
@ -99,7 +99,7 @@ void ROUTER_PREVIEW_ITEM::Update( const PNS::PNS_ITEM* aItem )
break;
}
case PNS::PNS_ITEM::VIA:
case PNS::PNS_ITEM::VIA_T:
m_originLayer = m_layer = ITEM_GAL_LAYER( VIAS_VISIBLE );
m_type = PR_SHAPE;
m_width = 0;
@ -107,7 +107,7 @@ void ROUTER_PREVIEW_ITEM::Update( const PNS::PNS_ITEM* aItem )
m_depth = ViaOverlayDepth;
break;
case PNS::PNS_ITEM::SOLID:
case PNS::PNS_ITEM::SOLID_T:
m_type = PR_SHAPE;
m_width = 0;
break;