Formatting.
This commit is contained in:
parent
9c968b0ef7
commit
d06d35a74d
|
@ -41,7 +41,8 @@ enum LineMarker {
|
|||
MK_VIOLATION = ( 1 << 3 ),
|
||||
MK_LOCKED = ( 1 << 4 ),
|
||||
MK_DP_COUPLED = ( 1 << 5 ),
|
||||
MK_ALT_SHAPE = ( 1 << 6 )
|
||||
MK_ALT_SHAPE = ( 1 << 6 ) // For instance, a simple annular ring when the pad has
|
||||
// been dropped from a layer.
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -609,8 +609,10 @@ bool PNS_PCBNEW_RULE_RESOLVER::DpNetPair( const PNS::ITEM* aItem, int& aNetP, in
|
|||
class PNS_PCBNEW_DEBUG_DECORATOR: public PNS::DEBUG_DECORATOR
|
||||
{
|
||||
public:
|
||||
PNS_PCBNEW_DEBUG_DECORATOR( KIGFX::VIEW* aView = NULL ): PNS::DEBUG_DECORATOR(),
|
||||
m_view( NULL ), m_items( NULL )
|
||||
PNS_PCBNEW_DEBUG_DECORATOR( KIGFX::VIEW* aView = NULL ) :
|
||||
PNS::DEBUG_DECORATOR(),
|
||||
m_view( NULL ),
|
||||
m_items( NULL )
|
||||
{
|
||||
SetView( aView );
|
||||
}
|
||||
|
@ -636,7 +638,7 @@ public:
|
|||
m_view->Add( m_items );
|
||||
}
|
||||
|
||||
void AddPoint( VECTOR2I aP, int aColor, const std::string aName = "") override
|
||||
void AddPoint( VECTOR2I aP, int aColor, const std::string aName = "" ) override
|
||||
{
|
||||
SHAPE_LINE_CHAIN l;
|
||||
|
||||
|
@ -652,7 +654,7 @@ public:
|
|||
AddLine( l, aColor, 10000 );
|
||||
}
|
||||
|
||||
void AddBox( BOX2I aB, int aColor, const std::string aName = "" ) override
|
||||
void AddBox( BOX2I aB, int aColor, const std::string aName = "" ) override
|
||||
{
|
||||
SHAPE_LINE_CHAIN l;
|
||||
|
||||
|
@ -668,7 +670,7 @@ public:
|
|||
AddLine( l, aColor, 10000 );
|
||||
}
|
||||
|
||||
void AddSegment( SEG aS, int aColor, const std::string aName = "") override
|
||||
void AddSegment( SEG aS, int aColor, const std::string aName = "" ) override
|
||||
{
|
||||
SHAPE_LINE_CHAIN l;
|
||||
|
||||
|
@ -678,7 +680,8 @@ public:
|
|||
AddLine( l, aColor, 10000 );
|
||||
}
|
||||
|
||||
void AddDirections( VECTOR2D aP, int aMask, int aColor, const std::string aName = "") override
|
||||
void AddDirections( VECTOR2D aP, int aMask, int aColor,
|
||||
const std::string aName = "" ) override
|
||||
{
|
||||
BOX2I b( aP - VECTOR2I( 10000, 10000 ), VECTOR2I( 20000, 20000 ) );
|
||||
|
||||
|
@ -693,7 +696,8 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void AddLine( const SHAPE_LINE_CHAIN& aLine, int aType, int aWidth, const std::string aName = "" ) override
|
||||
void AddLine( const SHAPE_LINE_CHAIN& aLine, int aType, int aWidth,
|
||||
const std::string aName = "" ) override
|
||||
{
|
||||
if( !m_view )
|
||||
return;
|
||||
|
|
|
@ -1091,8 +1091,8 @@ bool LINE_PLACER::FixRoute( const VECTOR2I& aP, ITEM* aEndItem, bool aForceFinis
|
|||
|
||||
if( aEndItem )
|
||||
{
|
||||
// The user has indicated a connection should be made. If either the
|
||||
// trace or endItem is netless, then allow the connection by adopting the net of the other.
|
||||
// The user has indicated a connection should be made. If either the trace or
|
||||
// endItem is net-less, then allow the connection by adopting the net of the other.
|
||||
if( m_currentNet <= 0 )
|
||||
{
|
||||
m_currentNet = aEndItem->Net();
|
||||
|
@ -1238,8 +1238,8 @@ bool LINE_PLACER::UnfixRoute()
|
|||
m_currentLayer = st.pts[0].layer;
|
||||
m_head.SetLayer( m_currentLayer );
|
||||
m_tail.SetLayer( m_currentLayer );
|
||||
m_head.RemoveVia( );
|
||||
m_tail.RemoveVia( );
|
||||
m_head.RemoveVia();
|
||||
m_tail.RemoveVia();
|
||||
|
||||
if (m_shove)
|
||||
{
|
||||
|
@ -1306,7 +1306,7 @@ void LINE_PLACER::removeLoops( NODE* aNode, LINE& aLatest )
|
|||
|
||||
if( !( line.ContainsLink( seg ) ) && line.SegmentCount() )
|
||||
{
|
||||
for( auto ss : line.Links() )
|
||||
for( LINKED_ITEM* ss : line.Links() )
|
||||
toErase.insert( ss );
|
||||
|
||||
removedCount++;
|
||||
|
|
|
@ -337,7 +337,7 @@ void ROUTER::updateView( NODE* aNode, ITEM_SET& aCurrent, bool aDragging )
|
|||
m_iface->DisplayItem( item, -1, clearance, aDragging );
|
||||
}
|
||||
|
||||
for( auto item : removed )
|
||||
for( ITEM* item : removed )
|
||||
m_iface->HideItem( item );
|
||||
}
|
||||
|
||||
|
@ -348,9 +348,7 @@ void ROUTER::UpdateSizes( const SIZES_SETTINGS& aSizes )
|
|||
|
||||
// Change track/via size settings
|
||||
if( m_state == ROUTE_TRACK)
|
||||
{
|
||||
m_placer->UpdateSizes( m_sizes );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -390,10 +388,10 @@ void ROUTER::CommitRouting( NODE* aNode )
|
|||
|
||||
aNode->GetUpdatedItems( removed, added );
|
||||
|
||||
for( auto item : removed )
|
||||
for( ITEM* item : removed )
|
||||
m_iface->RemoveItem( item );
|
||||
|
||||
for( auto item : added )
|
||||
for( ITEM* item : added )
|
||||
m_iface->AddItem( item );
|
||||
|
||||
m_iface->Commit();
|
||||
|
@ -406,9 +404,7 @@ bool ROUTER::FixRoute( const VECTOR2I& aP, ITEM* aEndItem, bool aForceFinish )
|
|||
bool rv = false;
|
||||
|
||||
if( m_logger )
|
||||
{
|
||||
m_logger->Log( LOGGER::EVT_FIX, aP, aEndItem );
|
||||
}
|
||||
|
||||
switch( m_state )
|
||||
{
|
||||
|
|
|
@ -277,7 +277,7 @@ SHOVE::SHOVE_STATUS SHOVE::ProcessSingleLine( LINE& aCurrent, LINE& aObstacle, L
|
|||
|
||||
bool obstacleIsHead = false;
|
||||
|
||||
for( auto s : aObstacle.Links() )
|
||||
for( LINKED_ITEM* s : aObstacle.Links() )
|
||||
{
|
||||
if( s->Marker() & MK_HEAD )
|
||||
{
|
||||
|
@ -302,7 +302,10 @@ SHOVE::SHOVE_STATUS SHOVE::ProcessSingleLine( LINE& aCurrent, LINE& aObstacle, L
|
|||
int clearance = getClearance( &aCurrent, &aObstacle ) + 1;
|
||||
|
||||
#ifdef DEBUG
|
||||
Dbg()->Message( wxString::Format( "shove process-single: cur net %d obs %d cl %d", aCurrent.Net(), aObstacle.Net(), clearance ) );
|
||||
Dbg()->Message( wxString::Format( "shove process-single: cur net %d obs %d cl %d",
|
||||
aCurrent.Net(),
|
||||
aObstacle.Net(),
|
||||
clearance ) );
|
||||
#endif
|
||||
|
||||
HULL_SET hulls;
|
||||
|
@ -643,7 +646,7 @@ NODE* SHOVE::reduceSpringback( const ITEM_SET& aHeadSet, VIA_HANDLE& aDraggedVia
|
|||
{
|
||||
SPRINGBACK_TAG& spTag = m_nodeStack.back();
|
||||
|
||||
auto obs = spTag.m_node->CheckColliding( aHeadSet );
|
||||
OPT<OBSTACLE> obs = spTag.m_node->CheckColliding( aHeadSet );
|
||||
|
||||
if( !obs && !spTag.m_locked )
|
||||
{
|
||||
|
@ -870,7 +873,8 @@ SHOVE::SHOVE_STATUS SHOVE::onCollidingVia( ITEM* aCurrent, VIA* aObstacleVia )
|
|||
// hole-to-hole is a mechanical constraint (broken drill bits), not an electrical
|
||||
// one, so it has to be checked irrespective of matching nets.
|
||||
|
||||
// temporarily removed hole-to-hole collision check due to conflicts with the springback algorithm...
|
||||
// temporarily removed hole-to-hole collision check due to conflicts with the
|
||||
// springback algorithm...
|
||||
// we need to figure out a better solution here - TW
|
||||
holeCollision = false; //rr->CollideHoles( ¤tLine->Via(), aObstacleVia, true, &mtvHoles );
|
||||
}
|
||||
|
@ -1015,7 +1019,7 @@ void SHOVE::unwindLineStack( ITEM* aItem )
|
|||
{
|
||||
LINE* l = static_cast<LINE*>( aItem );
|
||||
|
||||
for( auto seg : l->Links() )
|
||||
for( LINKED_ITEM* seg : l->Links() )
|
||||
unwindLineStack( seg );
|
||||
}
|
||||
}
|
||||
|
@ -1048,7 +1052,7 @@ void SHOVE::popLineStack( )
|
|||
{
|
||||
bool found = false;
|
||||
|
||||
for( auto s : l.Links() )
|
||||
for( LINKED_ITEM* s : l.Links() )
|
||||
{
|
||||
if( i->ContainsLink( s ) )
|
||||
{
|
||||
|
@ -1479,12 +1483,10 @@ SHOVE::SHOVE_STATUS SHOVE::ShoveDraggingVia( const VIA_HANDLE aOldVia, const VEC
|
|||
m_newHead = OPT_LINE();
|
||||
m_draggedVia = NULL;
|
||||
|
||||
auto viaToDrag = findViaByHandle( m_currentNode, aOldVia );
|
||||
VIA* viaToDrag = findViaByHandle( m_currentNode, aOldVia );
|
||||
|
||||
if( !viaToDrag )
|
||||
{
|
||||
return SH_INCOMPLETE;
|
||||
}
|
||||
|
||||
// Pop NODEs containing previous shoves which are no longer necessary
|
||||
ITEM_SET headSet;
|
||||
|
|
|
@ -406,12 +406,13 @@ const VECTOR2I TOOL_BASE::snapToItem( bool aEnabled, ITEM* aItem, VECTOR2I aP)
|
|||
{
|
||||
if( aItem->Kind() == ITEM::SEGMENT_T )
|
||||
{
|
||||
anchor = m_gridHelper->AlignToSegment( aP, static_cast<SEGMENT*>( li )->Seg() );
|
||||
SEGMENT* seg = static_cast<SEGMENT*>( li );
|
||||
anchor = m_gridHelper->AlignToSegment( aP, seg->Seg() );
|
||||
}
|
||||
else if( aItem->Kind() == ITEM::ARC_T )
|
||||
{
|
||||
anchor = m_gridHelper->AlignToArc( aP,
|
||||
*static_cast<const SHAPE_ARC*>( static_cast<ARC*>( li )->Shape() ) );
|
||||
ARC* arc = static_cast<ARC*>( li );
|
||||
anchor = m_gridHelper->AlignToArc( aP, *static_cast<const SHAPE_ARC*>( arc->Shape() ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -109,7 +109,8 @@ bool TOPOLOGY::LeadingRatLine( const LINE* aTrack, SHAPE_LINE_CHAIN& aRatLine )
|
|||
if( !jt )
|
||||
return false;
|
||||
|
||||
if( ( !track.EndsWithVia() && jt->LinkCount() >= 2 ) || ( track.EndsWithVia() && jt->LinkCount() >= 3 ) ) // we got something connected
|
||||
if( ( !track.EndsWithVia() && jt->LinkCount() >= 2 )
|
||||
|| ( track.EndsWithVia() && jt->LinkCount() >= 3 ) ) // we got something connected
|
||||
{
|
||||
end = jt->Pos();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue