PNS code formatting.
This commit is contained in:
parent
1b4daade82
commit
66778e1b00
|
@ -47,7 +47,7 @@ PNS_LINE::PNS_LINE( const PNS_LINE& aOther ) :
|
|||
m_marker = aOther.m_marker;
|
||||
m_rank = aOther.m_rank;
|
||||
|
||||
copyLinks ( &aOther );
|
||||
copyLinks( &aOther );
|
||||
}
|
||||
|
||||
|
||||
|
@ -71,7 +71,7 @@ const PNS_LINE& PNS_LINE::operator=( const PNS_LINE& aOther )
|
|||
m_marker = aOther.m_marker;
|
||||
m_rank = aOther.m_rank;
|
||||
|
||||
copyLinks ( &aOther );
|
||||
copyLinks( &aOther );
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ void PNS_LINE::Mark( int aMarker )
|
|||
}
|
||||
|
||||
|
||||
void PNS_LINE::Unmark ()
|
||||
void PNS_LINE::Unmark()
|
||||
{
|
||||
if( m_segmentRefs )
|
||||
{
|
||||
|
@ -109,7 +109,7 @@ void PNS_LINE::Unmark ()
|
|||
}
|
||||
|
||||
|
||||
int PNS_LINE::Marker()const
|
||||
int PNS_LINE::Marker() const
|
||||
{
|
||||
int marker = m_marker;
|
||||
|
||||
|
|
|
@ -66,22 +66,24 @@ PNS_LINE_PLACER::~PNS_LINE_PLACER()
|
|||
}
|
||||
|
||||
|
||||
void PNS_LINE_PLACER::setWorld ( PNS_NODE* aWorld )
|
||||
void PNS_LINE_PLACER::setWorld( PNS_NODE* aWorld )
|
||||
{
|
||||
m_world = aWorld;
|
||||
}
|
||||
|
||||
const PNS_VIA PNS_LINE_PLACER::makeVia ( const VECTOR2I& aP )
|
||||
|
||||
const PNS_VIA PNS_LINE_PLACER::makeVia( const VECTOR2I& aP )
|
||||
{
|
||||
const PNS_LAYERSET layers( m_sizes.GetLayerTop(), m_sizes.GetLayerBottom() );
|
||||
|
||||
return PNS_VIA ( aP, layers, m_sizes.ViaDiameter(), m_sizes.ViaDrill(), -1, m_sizes.ViaType() );
|
||||
return PNS_VIA( aP, layers, m_sizes.ViaDiameter(), m_sizes.ViaDrill(), -1, m_sizes.ViaType() );
|
||||
}
|
||||
|
||||
|
||||
bool PNS_LINE_PLACER::ToggleVia( bool aEnabled )
|
||||
{
|
||||
m_placingVia = aEnabled;
|
||||
|
||||
if( !m_idle )
|
||||
Move( m_currentEnd, NULL );
|
||||
|
||||
|
@ -89,7 +91,6 @@ bool PNS_LINE_PLACER::ToggleVia( bool aEnabled )
|
|||
}
|
||||
|
||||
|
||||
|
||||
void PNS_LINE_PLACER::setInitialDirection( const DIRECTION_45& aDirection )
|
||||
{
|
||||
m_initial_direction = aDirection;
|
||||
|
@ -357,8 +358,6 @@ bool PNS_LINE_PLACER::mergeHead()
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool PNS_LINE_PLACER::rhWalkOnly( const VECTOR2I& aP, PNS_LINE& aNewHead )
|
||||
{
|
||||
PNS_LINE initTrack( m_head );
|
||||
|
@ -397,7 +396,7 @@ bool PNS_LINE_PLACER::rhWalkOnly( const VECTOR2I& aP, PNS_LINE& aNewHead )
|
|||
}
|
||||
else if( m_placingVia && viaOk )
|
||||
{
|
||||
walkFull.AppendVia( makeVia ( walkFull.CPoint( -1 ) ) );
|
||||
walkFull.AppendVia( makeVia( walkFull.CPoint( -1 ) ) );
|
||||
}
|
||||
|
||||
PNS_OPTIMIZER::Optimize( &walkFull, effort, m_currentNode );
|
||||
|
@ -451,8 +450,8 @@ bool PNS_LINE_PLACER::rhShoveOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead )
|
|||
|
||||
if( m_placingVia && viaOk )
|
||||
{
|
||||
PNS_VIA v1( makeVia ( l.CPoint( -1 ) ) );
|
||||
PNS_VIA v2( makeVia ( l2.CPoint( -1 ) ) );
|
||||
PNS_VIA v1( makeVia( l.CPoint( -1 ) ) );
|
||||
PNS_VIA v2( makeVia( l2.CPoint( -1 ) ) );
|
||||
|
||||
l.AppendVia( v1 );
|
||||
l2.AppendVia( v2 );
|
||||
|
@ -863,6 +862,7 @@ bool PNS_LINE_PLACER::FixRoute( const VECTOR2I& aP, PNS_ITEM* aEndItem )
|
|||
Router()->CommitRouting( m_lastNode );
|
||||
m_idle = true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -911,7 +911,7 @@ bool PNS_LINE_PLACER::FixRoute( const VECTOR2I& aP, PNS_ITEM* aEndItem )
|
|||
m_placingVia = false;
|
||||
m_chainedPlacement = !pl.EndsWithVia();
|
||||
m_splitSeg = false;
|
||||
initPlacement( );
|
||||
initPlacement();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -292,7 +292,7 @@ int LINE_RESTRICTIONS::allowedAngles( PNS_NODE* aWorld, const PNS_LINE* aLine, c
|
|||
|
||||
for( int i = 0; i < n_dirs; i++ )
|
||||
{
|
||||
if( !(refDir.Angle( dirs[i] ) & angleMask ) )
|
||||
if( !( refDir.Angle( dirs[i] ) & angleMask ) )
|
||||
outputMask &= ~refDir.Mask();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -664,7 +664,7 @@ void PNS_ROUTER::DisplayItem( const PNS_ITEM* aItem, int aColor, int aClearance
|
|||
ROUTER_PREVIEW_ITEM* pitem = new ROUTER_PREVIEW_ITEM( aItem, m_previewItems );
|
||||
|
||||
if( aColor >= 0 )
|
||||
pitem->SetColor( KIGFX::COLOR4D ( aColor ) );
|
||||
pitem->SetColor( KIGFX::COLOR4D( aColor ) );
|
||||
|
||||
if( aClearance >= 0 )
|
||||
pitem->SetClearance( aClearance );
|
||||
|
@ -828,7 +828,7 @@ void PNS_ROUTER::movePlacing( const VECTOR2I& aP, PNS_ITEM* aEndItem )
|
|||
if( !item->OfKind( PNS_ITEM::LINE ) )
|
||||
continue;
|
||||
|
||||
const PNS_LINE* l = static_cast <const PNS_LINE*> (item);
|
||||
const PNS_LINE* l = static_cast<const PNS_LINE*>( item );
|
||||
DisplayItem( l );
|
||||
|
||||
if( l->EndsWithVia() )
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
SHOVE_STATUS ShoveLines( const PNS_LINE& aCurrentHead );
|
||||
SHOVE_STATUS ShoveMultiLines( const PNS_ITEMSET& aHeadSet );
|
||||
|
||||
SHOVE_STATUS ShoveDraggingVia( PNS_VIA*aVia, const VECTOR2I& aWhere, PNS_VIA** aNewVia );
|
||||
SHOVE_STATUS ShoveDraggingVia( PNS_VIA* aVia, const VECTOR2I& aWhere, PNS_VIA** aNewVia );
|
||||
SHOVE_STATUS ProcessSingleLine( PNS_LINE* aCurrent, PNS_LINE* aObstacle,
|
||||
PNS_LINE* aShoved );
|
||||
|
||||
|
@ -79,7 +79,7 @@ public:
|
|||
|
||||
const PNS_LINE NewHead() const;
|
||||
|
||||
void SetInitialLine ( PNS_LINE* aInitial );
|
||||
void SetInitialLine( PNS_LINE* aInitial );
|
||||
|
||||
private:
|
||||
typedef std::vector<SHAPE_LINE_CHAIN> HULL_SET;
|
||||
|
@ -127,7 +127,7 @@ private:
|
|||
|
||||
PNS_LINE* assembleLine( const PNS_SEGMENT* aSeg, int* aIndex = NULL );
|
||||
|
||||
void replaceItems( PNS_ITEM *aOld, PNS_ITEM *aNew );
|
||||
void replaceItems( PNS_ITEM* aOld, PNS_ITEM* aNew );
|
||||
|
||||
template<class T> T* clone ( const T* aItem )
|
||||
{
|
||||
|
@ -142,7 +142,7 @@ private:
|
|||
SHOVE_STATUS shoveIteration( int aIter );
|
||||
SHOVE_STATUS shoveMainLoop();
|
||||
|
||||
int getClearance( PNS_ITEM *aA, PNS_ITEM *aB ) const;
|
||||
int getClearance( PNS_ITEM* aA, PNS_ITEM* aB ) const;
|
||||
|
||||
std::vector<SPRINGBACK_TAG> m_nodeStack;
|
||||
std::vector<PNS_LINE*> m_lineStack;
|
||||
|
|
|
@ -97,12 +97,12 @@ PNS_VIA* PNS_VIA::Clone ( ) const
|
|||
}
|
||||
|
||||
|
||||
OPT_BOX2I PNS_VIA::ChangedArea ( const PNS_VIA* aOther ) const
|
||||
OPT_BOX2I PNS_VIA::ChangedArea( const PNS_VIA* aOther ) const
|
||||
{
|
||||
if ( aOther->Pos() != Pos() )
|
||||
{
|
||||
BOX2I tmp = Shape()->BBox();
|
||||
tmp.Merge ( aOther->Shape()->BBox() );
|
||||
tmp.Merge( aOther->Shape()->BBox() );
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
|
|
@ -657,6 +657,7 @@ bool ROUTER_TOOL::onViaCommand( VIATYPE_T aType )
|
|||
// Cannot place microvias or blind vias if not allowed (obvious)
|
||||
if( ( aType == VIA_BLIND_BURIED ) && ( !bds.m_BlindBuriedViaAllowed ) )
|
||||
return false;
|
||||
|
||||
if( ( aType == VIA_MICROVIA ) && ( !bds.m_MicroViasAllowed ) )
|
||||
return false;
|
||||
|
||||
|
@ -673,8 +674,8 @@ bool ROUTER_TOOL::onViaCommand( VIATYPE_T aType )
|
|||
return false;
|
||||
}
|
||||
|
||||
sizes.SetViaType ( aType );
|
||||
m_router->ToggleViaPlacement( );
|
||||
sizes.SetViaType( aType );
|
||||
m_router->ToggleViaPlacement();
|
||||
m_router->UpdateSizes( sizes );
|
||||
|
||||
m_router->Move( m_endSnapPoint, m_endItem ); // refresh
|
||||
|
|
Loading…
Reference in New Issue