Browse Source

router: trying to fix remaining issues

pcb_db
Tomasz Wlostowski 1 year ago
parent
commit
8033b568dd
  1. 10
      pcbnew/router/pns_diff_pair_placer.cpp
  2. 6
      pcbnew/router/pns_kicad_iface.cpp
  3. 6
      pcbnew/router/pns_line_placer.cpp
  4. 1
      pcbnew/router/pns_multi_dragger.cpp
  5. 6
      pcbnew/router/pns_shove.cpp

10
pcbnew/router/pns_diff_pair_placer.cpp

@ -192,6 +192,7 @@ bool DIFF_PAIR_PLACER::attemptWalk( NODE* aNode, DIFF_PAIR* aCurrent, DIFF_PAIR&
walkaround.SetSolidsOnly( aSolidsOnly );
walkaround.SetIterationLimit( Settings().WalkaroundIterationLimit() );
walkaround.SetAllowedPolicies( { WALKAROUND::WP_SHORTEST } );
SHOVE shove( aNode, Router() );
LINE walkP, walkN;
@ -222,11 +223,12 @@ bool DIFF_PAIR_PLACER::attemptWalk( NODE* aNode, DIFF_PAIR* aCurrent, DIFF_PAIR&
continue;
}
// fioxme
//wf1 = walkaround.Route( preWalk, postWalk, false );
auto wf1 = walkaround.Route( preWalk );
//if( wf1 != WALKAROUND::DONE )
// return false;
if( wf1.status[ WALKAROUND::WP_SHORTEST ] != WALKAROUND::ST_DONE )
return false;
postWalk = wf1.lines[ WALKAROUND::WP_SHORTEST ];
LINE postShove( preShove );

6
pcbnew/router/pns_kicad_iface.cpp

@ -1057,6 +1057,12 @@ public:
}
}
virtual void Message( const wxString& msg,
const SRC_LOCATION_INFO& aSrcLoc = SRC_LOCATION_INFO() ) override
{
printf("PNS: %s\n", msg.c_str().AsChar() );
}
private:
double nextDepth()
{

6
pcbnew/router/pns_line_placer.cpp

@ -614,11 +614,15 @@ bool LINE_PLACER::rhWalkBase( const VECTOR2I& aP, LINE& aWalkLine, int aCollisio
int len_ccw = wr.status[WP_CCW] != WALKAROUND::ST_STUCK ? wr.lines[WP_CCW].CLine().Length()
: std::numeric_limits<int>::max();
if( wr.status[ WP_CW ] == WALKAROUND::ST_DONE )
{
PNS_DBG( Dbg(), AddItem, &wr.lines[WP_CW], BLUE, 20000, wxT( "wf-result-cw-preopt" ) );
LINE tmpHead, tmpTail;
OPTIMIZER::Optimize( &wr.lines[WP_CW], OPTIMIZER::MERGE_SEGMENTS, m_currentNode );
if( splitHeadTail( wr.lines[WP_CW], m_tail, tmpHead, tmpTail ) )
{
optimizer.Optimize( &tmpHead );
@ -637,6 +641,8 @@ bool LINE_PLACER::rhWalkBase( const VECTOR2I& aP, LINE& aWalkLine, int aCollisio
LINE tmpHead, tmpTail;
OPTIMIZER::Optimize( &wr.lines[WP_CCW], OPTIMIZER::MERGE_SEGMENTS, m_currentNode );
if( splitHeadTail( wr.lines[WP_CCW], m_tail, tmpHead, tmpTail ) )
{
optimizer.Optimize( &tmpHead );

1
pcbnew/router/pns_multi_dragger.cpp

@ -620,7 +620,6 @@ bool MULTI_DRAGGER::multidragMarkObstacles( std::vector<MDRAG_LINE>& aCompletedL
for( auto& l : aCompletedLines )
{
if( l.dragOK )
{
m_lastNode->Remove( l.originalLine );
m_lastNode->Add( l.draggedLine );

6
pcbnew/router/pns_shove.cpp

@ -788,9 +788,13 @@ void SHOVE::pruneRootLines( NODE *aRemovedNode )
{
PNS_DBG( Dbg(), Message, wxString::Format("prune called" ) );
NODE *parent = aRemovedNode->GetParent();
for( const auto item : aRemovedNode->GetOverrides() )
{
//if( parent && parent->GetOverrides().find( item ) != parent->GetOverrides().end() )
// continue;
if( item->OfKind( ITEM::LINKED_ITEM_MASK_T ) )
{
auto litem = static_cast<const LINKED_ITEM*>( item );

Loading…
Cancel
Save