Move PNS router code into namespace PNS

update copyright messages
This commit is contained in:
decimad 2016-08-29 16:38:11 +02:00 committed by Maciej Suminski
parent 378def4734
commit de6281e977
75 changed files with 440 additions and 102 deletions

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2014-2015 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -25,7 +26,7 @@
#include "dialog_pns_diff_pair_dimensions.h"
#include <router/pns_sizes_settings.h>
DIALOG_PNS_DIFF_PAIR_DIMENSIONS::DIALOG_PNS_DIFF_PAIR_DIMENSIONS( wxWindow* aParent, PNS_SIZES_SETTINGS& aSizes ) :
DIALOG_PNS_DIFF_PAIR_DIMENSIONS::DIALOG_PNS_DIFF_PAIR_DIMENSIONS( wxWindow* aParent, PNS::PNS_SIZES_SETTINGS& aSizes ) :
DIALOG_PNS_DIFF_PAIR_DIMENSIONS_BASE( aParent ),
m_traceWidth( this, m_traceWidthText, m_traceWidthUnit ),
m_traceGap( this, m_traceGapText, m_traceGapUnit ),

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2014-2015 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -29,12 +30,16 @@
#include "dialog_pns_diff_pair_dimensions_base.h"
namespace PNS {
class PNS_SIZES_SETTINGS;
}
class DIALOG_PNS_DIFF_PAIR_DIMENSIONS : public DIALOG_PNS_DIFF_PAIR_DIMENSIONS_BASE
{
public:
DIALOG_PNS_DIFF_PAIR_DIMENSIONS( wxWindow* aParent, PNS_SIZES_SETTINGS& aSizes );
DIALOG_PNS_DIFF_PAIR_DIMENSIONS( wxWindow* aParent, PNS::PNS_SIZES_SETTINGS& aSizes );
private:
void updateCheckbox();
@ -46,7 +51,7 @@ private:
WX_UNIT_BINDER m_traceGap;
WX_UNIT_BINDER m_viaGap;
PNS_SIZES_SETTINGS& m_sizes;
PNS::PNS_SIZES_SETTINGS& m_sizes;
};
#endif // __dialog_pns_settings__

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2014-2015 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -25,7 +26,9 @@
#include "dialog_pns_length_tuning_settings.h"
#include <router/pns_meander_placer.h>
DIALOG_PNS_LENGTH_TUNING_SETTINGS::DIALOG_PNS_LENGTH_TUNING_SETTINGS( wxWindow* aParent, PNS_MEANDER_SETTINGS& aSettings, PNS_ROUTER_MODE aMode ) :
DIALOG_PNS_LENGTH_TUNING_SETTINGS::DIALOG_PNS_LENGTH_TUNING_SETTINGS( wxWindow* aParent,
PNS::PNS_MEANDER_SETTINGS& aSettings, PNS::PNS_ROUTER_MODE aMode )
:
DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE( aParent ),
m_minAmpl( this, m_minAmplText, m_minAmplUnit ),
m_maxAmpl( this, m_maxAmplText, m_maxAmplUnit ),
@ -35,7 +38,7 @@ DIALOG_PNS_LENGTH_TUNING_SETTINGS::DIALOG_PNS_LENGTH_TUNING_SETTINGS( wxWindow*
m_mode( aMode )
{
m_miterStyle->Enable( true );
m_radiusText->Enable( aMode != PNS_MODE_TUNE_DIFF_PAIR );
m_radiusText->Enable( aMode != PNS::PNS_MODE_TUNE_DIFF_PAIR );
//m_minAmpl.Enable ( aMode != PNS_MODE_TUNE_DIFF_PAIR_SKEW );
m_minAmpl.SetValue( m_settings.m_minAmplitude );
@ -44,23 +47,23 @@ DIALOG_PNS_LENGTH_TUNING_SETTINGS::DIALOG_PNS_LENGTH_TUNING_SETTINGS( wxWindow*
m_spacing.SetValue( m_settings.m_spacing );
m_radiusText->SetValue( wxString::Format( wxT( "%i" ), m_settings.m_cornerRadiusPercentage ) );
m_miterStyle->SetSelection( m_settings.m_cornerStyle == MEANDER_STYLE_ROUND ? 1 : 0 );
m_miterStyle->SetSelection( m_settings.m_cornerStyle == PNS::MEANDER_STYLE_ROUND ? 1 : 0 );
switch( aMode )
{
case PNS_MODE_TUNE_SINGLE:
case PNS::PNS_MODE_TUNE_SINGLE:
SetTitle( _( "Single Track Length Tuning" ) );
m_legend->SetBitmap( KiBitmap( tune_single_track_length_legend_xpm ) );
m_targetLength.SetValue( m_settings.m_targetLength );
break;
case PNS_MODE_TUNE_DIFF_PAIR:
case PNS::PNS_MODE_TUNE_DIFF_PAIR:
SetTitle( _( "Differential Pair Length Tuning" ) );
m_legend->SetBitmap( KiBitmap( tune_diff_pair_length_legend_xpm ) );
m_targetLength.SetValue( m_settings.m_targetLength );
break;
case PNS_MODE_TUNE_DIFF_PAIR_SKEW:
case PNS::PNS_MODE_TUNE_DIFF_PAIR_SKEW:
SetTitle( _( "Differential Pair Skew Tuning" ) );
m_legend->SetBitmap( KiBitmap( tune_diff_pair_skew_legend_xpm ) );
m_targetLengthLabel->SetLabel( _( "Target skew: " ) );
@ -89,7 +92,7 @@ void DIALOG_PNS_LENGTH_TUNING_SETTINGS::OnOkClick( wxCommandEvent& aEvent )
m_settings.m_cornerRadiusPercentage = wxAtoi( m_radiusText->GetValue() );
if( m_mode == PNS_MODE_TUNE_DIFF_PAIR_SKEW )
if( m_mode == PNS::PNS_MODE_TUNE_DIFF_PAIR_SKEW )
m_settings.m_targetSkew = m_targetLength.GetValue();
else
m_settings.m_targetLength = m_targetLength.GetValue();
@ -97,7 +100,8 @@ void DIALOG_PNS_LENGTH_TUNING_SETTINGS::OnOkClick( wxCommandEvent& aEvent )
if( m_settings.m_maxAmplitude < m_settings.m_minAmplitude )
m_settings.m_maxAmplitude = m_settings.m_minAmplitude;
m_settings.m_cornerStyle = m_miterStyle->GetSelection() ? MEANDER_STYLE_ROUND : MEANDER_STYLE_CHAMFER;
m_settings.m_cornerStyle = m_miterStyle->GetSelection() ?
PNS::MEANDER_STYLE_ROUND : PNS::MEANDER_STYLE_CHAMFER;
EndModal( wxID_OK );
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Maciej Suminski <maciej.suminski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -31,12 +32,16 @@
#include <router/pns_router.h>
namespace PNS {
class PNS_MEANDER_SETTINGS;
}
class DIALOG_PNS_LENGTH_TUNING_SETTINGS : public DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE
{
public:
DIALOG_PNS_LENGTH_TUNING_SETTINGS( wxWindow* aParent, PNS_MEANDER_SETTINGS& aSettings, PNS_ROUTER_MODE aMode );
DIALOG_PNS_LENGTH_TUNING_SETTINGS( wxWindow* aParent, PNS::PNS_MEANDER_SETTINGS& aSettings, PNS::PNS_ROUTER_MODE aMode );
virtual void OnOkClick( wxCommandEvent& aEvent );
@ -46,8 +51,8 @@ private:
WX_UNIT_BINDER m_spacing;
WX_UNIT_BINDER m_targetLength;
PNS_MEANDER_SETTINGS& m_settings;
PNS_ROUTER_MODE m_mode;
PNS::PNS_MEANDER_SETTINGS& m_settings;
PNS::PNS_ROUTER_MODE m_mode;
};
#endif // __dialog_pns_settings__

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Maciej Suminski <maciej.suminski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -25,11 +26,11 @@
#include "dialog_pns_settings.h"
#include <router/pns_routing_settings.h>
DIALOG_PNS_SETTINGS::DIALOG_PNS_SETTINGS( wxWindow* aParent, PNS_ROUTING_SETTINGS& aSettings ) :
DIALOG_PNS_SETTINGS::DIALOG_PNS_SETTINGS( wxWindow* aParent, PNS::PNS_ROUTING_SETTINGS& aSettings ) :
DIALOG_PNS_SETTINGS_BASE( aParent ), m_settings( aSettings )
{
// "Figure out what's best" is not available yet
m_mode->Enable( RM_Smart, false );
m_mode->Enable( PNS::RM_Smart, false );
// Add tool tip to the mode radio box, one by option
// (cannot be made with wxFormBuilder for each item )
@ -59,13 +60,13 @@ DIALOG_PNS_SETTINGS::DIALOG_PNS_SETTINGS( wxWindow* aParent, PNS_ROUTING_SETTING
void DIALOG_PNS_SETTINGS::OnOkClick( wxCommandEvent& aEvent )
{
// Save widgets' values to settings
m_settings.SetMode( (PNS_MODE) m_mode->GetSelection() );
m_settings.SetMode( (PNS::PNS_MODE) m_mode->GetSelection() );
m_settings.SetShoveVias( m_shoveVias->GetValue() );
m_settings.SetJumpOverObstacles( m_backPressure->GetValue() );
m_settings.SetRemoveLoops( m_removeLoops->GetValue() );
m_settings.SetSuggestFinish ( m_suggestEnding->GetValue() );
m_settings.SetSmartPads( m_autoNeckdown->GetValue() );
m_settings.SetOptimizerEffort( (PNS_OPTIMIZATION_EFFORT) m_effort->GetValue() );
m_settings.SetOptimizerEffort( (PNS::PNS_OPTIMIZATION_EFFORT) m_effort->GetValue() );
m_settings.SetSmoothDraggedSegments( m_smoothDragged->GetValue() );
m_settings.SetCanViolateDRC( m_violateDrc->GetValue() );
m_settings.SetFreeAngleMode( m_freeAngleMode->GetValue() );

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Maciej Suminski <maciej.suminski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -27,17 +28,21 @@
#include "dialog_pns_settings_base.h"
namespace PNS {
class PNS_ROUTING_SETTINGS;
}
class DIALOG_PNS_SETTINGS : public DIALOG_PNS_SETTINGS_BASE
{
public:
DIALOG_PNS_SETTINGS( wxWindow* aParent, PNS_ROUTING_SETTINGS& aSettings );
DIALOG_PNS_SETTINGS( wxWindow* aParent, PNS::PNS_ROUTING_SETTINGS& aSettings );
private:
virtual void OnOkClick( wxCommandEvent& aEvent );
PNS_ROUTING_SETTINGS& m_settings;
PNS::PNS_ROUTING_SETTINGS& m_settings;
};
#endif // __dialog_pns_settings__

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2015 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -120,14 +121,14 @@ void LENGTH_TUNER_TOOL::handleCommonEvents( const TOOL_EVENT& aEvent )
}
}
PNS_MEANDER_PLACER_BASE* placer = static_cast<PNS_MEANDER_PLACER_BASE*>( m_router->Placer() );
PNS::PNS_MEANDER_PLACER_BASE* placer = static_cast<PNS::PNS_MEANDER_PLACER_BASE*>( m_router->Placer() );
if( !placer )
return;
if( aEvent.IsAction( &ACT_Settings ) )
{
PNS_MEANDER_SETTINGS settings = placer->MeanderSettings();
PNS::PNS_MEANDER_SETTINGS settings = placer->MeanderSettings();
DIALOG_PNS_LENGTH_TUNING_SETTINGS settingsDlg( m_frame, settings, m_router->Mode() );
if( settingsDlg.ShowModal() )
@ -170,7 +171,8 @@ void LENGTH_TUNER_TOOL::performTuning()
return;
}
PNS_MEANDER_PLACER_BASE* placer = static_cast<PNS_MEANDER_PLACER_BASE*>( m_router->Placer() );
PNS::PNS_MEANDER_PLACER_BASE* placer = static_cast<PNS::PNS_MEANDER_PLACER_BASE*>(
m_router->Placer() );
placer->UpdateSettings( m_savedMeanderSettings );
@ -236,25 +238,25 @@ void LENGTH_TUNER_TOOL::performTuning()
int LENGTH_TUNER_TOOL::TuneSingleTrace( const TOOL_EVENT& aEvent )
{
m_frame->SetToolID( ID_TRACK_BUTT, wxCURSOR_PENCIL, _( "Tune Trace Length" ) );
return mainLoop( PNS_MODE_TUNE_SINGLE );
return mainLoop( PNS::PNS_MODE_TUNE_SINGLE );
}
int LENGTH_TUNER_TOOL::TuneDiffPair( const TOOL_EVENT& aEvent )
{
m_frame->SetToolID( ID_TRACK_BUTT, wxCURSOR_PENCIL, _( "Tune Diff Pair Length" ) );
return mainLoop( PNS_MODE_TUNE_DIFF_PAIR );
return mainLoop( PNS::PNS_MODE_TUNE_DIFF_PAIR );
}
int LENGTH_TUNER_TOOL::TuneDiffPairSkew( const TOOL_EVENT& aEvent )
{
m_frame->SetToolID( ID_TRACK_BUTT, wxCURSOR_PENCIL, _( "Tune Diff Pair Skew" ) );
return mainLoop( PNS_MODE_TUNE_DIFF_PAIR_SKEW );
return mainLoop( PNS::PNS_MODE_TUNE_DIFF_PAIR_SKEW );
}
int LENGTH_TUNER_TOOL::mainLoop( PNS_ROUTER_MODE aMode )
int LENGTH_TUNER_TOOL::mainLoop( PNS::PNS_ROUTER_MODE aMode )
{
// Deselect all items
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2015 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
* Author: Maciej Suminski <maciej.suminski@cern.ch>
*
@ -27,7 +28,7 @@
class PNS_TUNE_STATUS_POPUP;
class APIEXPORT LENGTH_TUNER_TOOL : public PNS_TOOL_BASE
class APIEXPORT LENGTH_TUNER_TOOL : public PNS::PNS_TOOL_BASE
{
public:
LENGTH_TUNER_TOOL();
@ -42,13 +43,13 @@ public:
private:
void performTuning( );
int mainLoop( PNS_ROUTER_MODE aMode );
int mainLoop( PNS::PNS_ROUTER_MODE aMode );
void handleCommonEvents( const TOOL_EVENT& aEvent );
void updateStatusPopup ( PNS_TUNE_STATUS_POPUP& aPopup );
PNS_MEANDER_SETTINGS m_savedMeanderSettings;
PNS::PNS_MEANDER_SETTINGS m_savedMeanderSettings;
};
#endif

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -22,6 +23,8 @@
#include "pns_debug_decorator.h"
#include "pns_router.h"
namespace PNS {
PNS_ROUTING_SETTINGS& PNS_ALGO_BASE::Settings() const
{
return m_router->Settings();
@ -32,3 +35,5 @@ PNS_LOGGER* PNS_ALGO_BASE::Logger()
{
return NULL;
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -23,6 +24,8 @@
#include "pns_routing_settings.h"
namespace PNS {
class PNS_ROUTER;
class PNS_LOGGER;
class PNS_DEBUG_DECORATOR;
@ -74,4 +77,6 @@ private:
PNS_ROUTER* m_router;
};
}
#endif

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2016 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Christian Gagneraud <chgans@gna.org>
*
* This program is free software: you can redistribute it and/or modify it
@ -26,6 +27,8 @@
#include <geometry/seg.h>
#include <geometry/shape_line_chain.h>
namespace PNS {
class PNS_DEBUG_DECORATOR
{
public:
@ -43,4 +46,6 @@ public:
virtual void Clear() {};
};
}
#endif

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2015 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -36,6 +37,8 @@
#include "pns_utils.h"
#include "pns_debug_decorator.h"
namespace PNS {
class PNS_LINE;
PNS_DP_PRIMITIVE_PAIR::PNS_DP_PRIMITIVE_PAIR( PNS_ITEM* aPrimP, PNS_ITEM* aPrimN )
@ -896,3 +899,5 @@ int PNS_DIFF_PAIR::CoupledLength ( const SEG& aP, const SEG& aN ) const
return 0;
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2015 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -32,6 +33,8 @@
#include "ranged_num.h"
namespace PNS {
class PNS_DIFF_PAIR;
/**
@ -511,4 +514,6 @@ private:
RANGED_NUM<int> m_gapConstraint;
};
}
#endif

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2015 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -32,6 +33,8 @@
#include "pns_topology.h"
#include "pns_debug_decorator.h"
namespace PNS {
PNS_DIFF_PAIR_PLACER::PNS_DIFF_PAIR_PLACER( PNS_ROUTER* aRouter ) :
PNS_PLACEMENT_ALGO( aRouter )
{
@ -844,3 +847,5 @@ const std::vector<int> PNS_DIFF_PAIR_PLACER::CurrentNets() const
rv.push_back( m_netN );
return rv;
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -35,6 +36,8 @@
#include "pns_placement_algo.h"
namespace PNS {
class PNS_ROUTER;
class PNS_SHOVE;
class PNS_OPTIMIZER;
@ -296,4 +299,6 @@ private:
bool m_idle;
};
}
#endif // __PNS_LINE_PLACER_H

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -30,6 +31,8 @@
#include "pns_router.h"
#include "pns_utils.h"
namespace PNS {
using boost::optional;
PNS_DP_MEANDER_PLACER::PNS_DP_MEANDER_PLACER( PNS_ROUTER* aRouter ) :
@ -399,3 +402,5 @@ const std::vector<int> PNS_DP_MEANDER_PLACER::CurrentNets() const
rv.push_back( m_originPair.NetN() );
return rv;
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -35,6 +36,8 @@
#include "pns_diff_pair.h"
#include "pns_debug_decorator.h"
namespace PNS {
class PNS_ROUTER;
/**
@ -141,4 +144,6 @@ private:
TUNING_STATUS m_lastStatus;
};
}
#endif // __PNS_DP_MEANDER_PLACER_H

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -22,6 +23,8 @@
#include "pns_shove.h"
#include "pns_router.h"
namespace PNS {
PNS_DRAGGER::PNS_DRAGGER( PNS_ROUTER* aRouter ) :
PNS_ALGO_BASE( aRouter )
{
@ -335,3 +338,5 @@ PNS_LOGGER* PNS_DRAGGER::Logger()
return NULL;
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -29,6 +30,8 @@
#include "pns_algo_base.h"
#include "pns_itemset.h"
namespace PNS {
class PNS_ROUTER;
class PNS_SHOVE;
class PNS_OPTIMIZER;
@ -123,4 +126,6 @@ private:
PNS_ITEMSET m_draggedItems;
};
}
#endif

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -31,6 +32,9 @@
#include "pns_item.h"
namespace PNS {
/**
* Class PNS_INDEX
*
@ -311,4 +315,6 @@ PNS_INDEX::NET_ITEMS_LIST* PNS_INDEX::GetItemsForNet( int aNet )
return &m_netMap[aNet];
}
}
#endif

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -21,6 +22,8 @@
#include "pns_item.h"
#include "pns_line.h"
namespace PNS {
bool PNS_ITEM::collideSimple( const PNS_ITEM* aOther, int aClearance, bool aNeedMTV,
VECTOR2I& aMTV, bool aDifferentNetsOnly ) const
{
@ -85,3 +88,5 @@ const std::string PNS_ITEM::KindStr() const
PNS_ITEM::~PNS_ITEM()
{
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -29,6 +30,9 @@
#include "pns_layerset.h"
class BOARD_CONNECTED_ITEM;
namespace PNS {
class PNS_NODE;
enum LineMarker {
@ -350,4 +354,6 @@ protected:
int m_rank;
};
}
#endif // __PNS_ITEM_H

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -21,6 +22,7 @@
#include "pns_itemset.h"
#include "pns_line.h"
namespace PNS {
PNS_ITEMSET::~PNS_ITEMSET()
{
@ -134,3 +136,5 @@ PNS_ITEMSET& PNS_ITEMSET::ExcludeItem( const PNS_ITEM* aItem )
return *this;
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -25,6 +26,8 @@
#include "pns_item.h"
namespace PNS {
/**
* Class PNS_ITEMSET
*
@ -223,4 +226,6 @@ private:
ENTRIES m_items;
};
}
#endif

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -30,6 +31,8 @@
#include "pns_segment.h"
#include "pns_itemset.h"
namespace PNS {
/**
* Class PNS_JOINT
*
@ -256,4 +259,6 @@ inline std::size_t hash_value( PNS_JOINT::HASH_TAG const& aP )
return seed;
}
}
#endif // __PNS_JOINT_H

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2016 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -59,6 +60,8 @@
#include "pns_debug_decorator.h"
#include "router_preview_item.h"
using namespace PNS;
class PNS_PCBNEW_RULE_RESOLVER : public PNS_RULE_RESOLVER
{
public:

View File

@ -34,43 +34,43 @@ namespace KIGFX
class VIEW;
};
class PNS_KICAD_IFACE : public PNS_ROUTER_IFACE {
class PNS_KICAD_IFACE : public PNS::PNS_ROUTER_IFACE {
public:
PNS_KICAD_IFACE();
~PNS_KICAD_IFACE();
void SetRouter( PNS_ROUTER* aRouter );
void SetRouter( PNS::PNS_ROUTER* aRouter );
void SetHostFrame( PCB_EDIT_FRAME* aFrame );
void SetBoard( BOARD* aBoard );
void SetView( KIGFX::VIEW* aView );
void SyncWorld( PNS_NODE* aWorld );
void SyncWorld( PNS::PNS_NODE* aWorld );
void EraseView();
void HideItem( PNS_ITEM* aItem );
void DisplayItem( const PNS_ITEM* aItem, int aColor = 0, int aClearance = 0 );
void AddItem( PNS_ITEM* aItem );
void RemoveItem( PNS_ITEM* aItem );
void HideItem( PNS::PNS_ITEM* aItem );
void DisplayItem( const PNS::PNS_ITEM* aItem, int aColor = 0, int aClearance = 0 );
void AddItem( PNS::PNS_ITEM* aItem );
void RemoveItem( PNS::PNS_ITEM* aItem );
void Commit();
void UpdateNet( int aNetCode );
PNS_RULE_RESOLVER* GetRuleResolver();
PNS_DEBUG_DECORATOR* GetDebugDecorator();
PNS::PNS_RULE_RESOLVER* GetRuleResolver();
PNS::PNS_DEBUG_DECORATOR* GetDebugDecorator();
private:
PNS_PCBNEW_RULE_RESOLVER* m_ruleResolver;
PNS_PCBNEW_DEBUG_DECORATOR* m_debugDecorator;
PNS_ITEM* syncPad( D_PAD* aPad );
PNS_ITEM* syncTrack( TRACK* aTrack );
PNS_ITEM* syncVia( VIA* aVia );
PNS::PNS_ITEM* syncPad( D_PAD* aPad );
PNS::PNS_ITEM* syncTrack( TRACK* aTrack );
PNS::PNS_ITEM* syncVia( VIA* aVia );
KIGFX::VIEW* m_view;
KIGFX::VIEW_GROUP* m_previewItems;
std::unordered_set<BOARD_CONNECTED_ITEM*> m_hiddenItems;
PNS_NODE* m_world;
PNS_ROUTER* m_router;
PNS::PNS_NODE* m_world;
PNS::PNS_ROUTER* m_router;
BOARD* m_board;
PICKED_ITEMS_LIST m_undoBuffer;
PCB_EDIT_FRAME* m_frame;

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -32,6 +33,8 @@
using boost::optional;
namespace PNS {
PNS_LINE::PNS_LINE( const PNS_LINE& aOther ) :
PNS_ITEM( aOther ),
m_line( aOther.m_line ),
@ -900,3 +903,5 @@ bool PNS_LINE::HasLockedSegments() const
}
return false;
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -31,6 +32,8 @@
#include "pns_item.h"
#include "pns_via.h"
namespace PNS {
class PNS_NODE;
class PNS_SEGMENT;
class PNS_VIA;
@ -297,4 +300,6 @@ private:
PNS_VIA m_via;
};
}
#endif // __PNS_LINE_H

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -33,6 +34,8 @@
using boost::optional;
namespace PNS {
PNS_LINE_PLACER::PNS_LINE_PLACER( PNS_ROUTER* aRouter ) :
PNS_PLACEMENT_ALGO( aRouter )
{
@ -1101,3 +1104,5 @@ PNS_LOGGER* PNS_LINE_PLACER::Logger()
return NULL;
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -32,6 +33,8 @@
#include "pns_line.h"
#include "pns_placement_algo.h"
namespace PNS {
class PNS_ROUTER;
class PNS_SHOVE;
class PNS_OPTIMIZER;
@ -393,4 +396,6 @@ private:
bool m_orthoMode;
};
}
#endif // __PNS_LINE_PLACER_H

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -31,6 +32,8 @@
#include <geometry/shape_circle.h>
#include <geometry/shape_convex.h>
namespace PNS {
PNS_LOGGER::PNS_LOGGER( )
{
m_groupOpened = false;
@ -201,3 +204,5 @@ void PNS_LOGGER::Save( const std::string& aFilename )
fwrite( s.c_str(), 1, s.length(), f );
fclose( f );
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -28,10 +29,13 @@
#include <math/vector2d.h>
class PNS_ITEM;
class SHAPE_LINE_CHAIN;
class SHAPE;
namespace PNS {
class PNS_ITEM;
class PNS_LOGGER
{
public:
@ -56,4 +60,6 @@ private:
std::stringstream m_theLog;
};
}
#endif

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -28,6 +29,8 @@
#include "pns_router.h"
#include "pns_debug_decorator.h"
namespace PNS {
const PNS_MEANDER_SETTINGS& PNS_MEANDER_SHAPE::Settings() const
{
return m_placer->MeanderSettings();
@ -636,3 +639,5 @@ void PNS_MEANDER_SHAPE::updateBaseSegment( )
m_clippedBaseSeg.B = m_baseSeg.LineProject( CLine( 0 ).CPoint( -1 ) );
}
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2015 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -26,6 +27,8 @@
#include <geometry/shape.h>
#include <geometry/shape_line_chain.h>
namespace PNS {
class PNS_MEANDER_PLACER_BASE;
///< Shapes of available meanders
@ -511,4 +514,6 @@ private:
int m_baselineOffset;
};
}
#endif // __PNS_MEANDER_H

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2015 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -27,6 +28,7 @@
#include "pns_router.h"
#include "pns_debug_decorator.h"
namespace PNS {
PNS_MEANDER_PLACER::PNS_MEANDER_PLACER( PNS_ROUTER* aRouter ) :
PNS_MEANDER_PLACER_BASE( aRouter )
@ -262,3 +264,5 @@ PNS_MEANDER_PLACER::TUNING_STATUS PNS_MEANDER_PLACER::TuningStatus() const
{
return m_lastStatus;
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -33,6 +34,8 @@
#include "pns_meander.h"
#include "pns_meander_placer_base.h"
namespace PNS {
class PNS_ROUTER;
class PNS_SHOVE;
class PNS_OPTIMIZER;
@ -115,4 +118,6 @@ protected:
TUNING_STATUS m_lastStatus;
};
}
#endif // __PNS_MEANDER_PLACER_H

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2015 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -22,6 +23,8 @@
#include "pns_meander.h"
#include "pns_meander_placer_base.h"
namespace PNS {
PNS_MEANDER_PLACER_BASE::PNS_MEANDER_PLACER_BASE( PNS_ROUTER* aRouter ) :
PNS_PLACEMENT_ALGO( aRouter )
{
@ -185,3 +188,5 @@ int PNS_MEANDER_PLACER_BASE::compareWithTolerance( int aValue, int aExpected, in
else
return 0;
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2015 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -32,6 +33,8 @@
#include "pns_placement_algo.h"
#include "pns_meander.h"
namespace PNS {
class PNS_ROUTER;
class PNS_SHOVE;
class PNS_OPTIMIZER;
@ -162,4 +165,6 @@ protected:
VECTOR2I m_currentEnd;
};
}
#endif // __PNS_MEANDER_PLACER_BASE_H

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2015 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -28,6 +29,7 @@
#include "pns_router.h"
#include "pns_debug_decorator.h"
namespace PNS {
PNS_MEANDER_SKEW_PLACER::PNS_MEANDER_SKEW_PLACER ( PNS_ROUTER* aRouter ) :
PNS_MEANDER_PLACER ( aRouter )
@ -167,3 +169,5 @@ const wxString PNS_MEANDER_SKEW_PLACER::TuningInfo() const
return status;
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2015 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -24,6 +25,8 @@
#include "pns_meander_placer.h"
#include "pns_diff_pair.h"
namespace PNS {
class PNS_ROUTER;
class PNS_SHOVE;
class PNS_OPTIMIZER;
@ -62,4 +65,6 @@ private:
int m_coupledLength;
};
}
#endif // __PNS_MEANDER_SKEW_PLACER_H

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -40,6 +41,8 @@
using boost::unordered_set;
using boost::unordered_map;
namespace PNS {
#ifdef DEBUG
static boost::unordered_set<PNS_NODE*> allocNodes;
#endif
@ -1302,3 +1305,5 @@ PNS_ITEM *PNS_NODE::FindItemByParent( const BOARD_CONNECTED_ITEM* aParent )
return NULL;
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -36,6 +37,8 @@
#include "pns_joint.h"
#include "pns_itemset.h"
namespace PNS {
class PNS_SEGMENT;
class PNS_LINE;
class PNS_SOLID;
@ -487,4 +490,6 @@ private:
boost::unordered_set<PNS_ITEM*> m_garbageItems;
};
}
#endif

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -32,6 +33,8 @@
#include "pns_utils.h"
#include "pns_router.h"
namespace PNS {
/**
* Cost Estimator Methods
*/
@ -1224,3 +1227,5 @@ bool PNS_OPTIMIZER::Optimize( PNS_DIFF_PAIR* aPair )
{
return mergeDpSegments( aPair );
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -29,6 +30,8 @@
#include "range.h"
namespace PNS {
class PNS_NODE;
class PNS_ROUTER;
class PNS_LINE;
@ -178,4 +181,6 @@ private:
bool m_restrictAreaActive;
};
}
#endif

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -27,6 +28,8 @@
#include "pns_sizes_settings.h"
#include "pns_itemset.h"
namespace PNS {
class PNS_ROUTER;
class PNS_ITEM;
class PNS_NODE;
@ -182,4 +185,6 @@ public:
}
};
}
#endif

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -57,6 +58,7 @@
#include <layers_id_colors_and_visibility.h>
#include <geometry/convex_hull.h>
namespace PNS {
// an ugly singleton for drawing debug items within the router context.
// To be fixed sometime in the future.
@ -502,3 +504,5 @@ void PNS_ROUTER::SetInterface( PNS_ROUTER_IFACE *aIface )
m_iface = aIface;
m_iface->SetRouter( this );
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -34,6 +35,16 @@
#include "pns_itemset.h"
#include "pns_node.h"
namespace KIGFX
{
class VIEW;
class VIEW_GROUP;
};
namespace PNS {
class PNS_DEBUG_DECORATOR;
class PNS_NODE;
class PNS_DIFF_PAIR_PLACER;
@ -49,13 +60,6 @@ class PNS_RULE_RESOLVER;
class PNS_SHOVE;
class PNS_DRAGGER;
namespace KIGFX
{
class VIEW;
class VIEW_GROUP;
};
enum PNS_ROUTER_MODE {
PNS_MODE_ROUTE_SINGLE = 1,
PNS_MODE_ROUTE_DIFF_PAIR,
@ -271,4 +275,6 @@ private:
wxString m_failureReason;
};
}
#endif

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -23,6 +24,8 @@
#include "pns_routing_settings.h"
#include "direction.h"
namespace PNS {
PNS_ROUTING_SETTINGS::PNS_ROUTING_SETTINGS()
{
m_routingMode = RM_Walkaround;
@ -103,3 +106,5 @@ int PNS_ROUTING_SETTINGS::ShoveIterationLimit() const
{
return m_shoveIterationLimit;
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -28,6 +29,8 @@
class DIRECTION_45;
class TOOL_SETTINGS;
namespace PNS {
///> Routing modes
enum PNS_MODE
{
@ -155,4 +158,6 @@ private:
TIME_LIMIT m_walkaroundTimeLimit;
};
}
#endif

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -30,6 +31,8 @@
#include "pns_item.h"
#include "pns_line.h"
namespace PNS {
class PNS_NODE;
class PNS_SEGMENT : public PNS_ITEM
@ -127,4 +130,6 @@ private:
SHAPE_SEGMENT m_seg;
};
}
#endif

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -42,6 +43,8 @@
#include <profile.h>
namespace PNS {
void PNS_SHOVE::replaceItems( PNS_ITEM* aOld, PNS_ITEM* aNew )
{
OPT_BOX2I changed_area = ChangedArea( aOld, aNew );
@ -1407,3 +1410,5 @@ void PNS_SHOVE::SetInitialLine( PNS_LINE& aInitial )
m_root = m_root->Branch();
m_root->Remove( &aInitial );
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -30,6 +31,8 @@
#include "pns_logger.h"
#include "range.h"
namespace PNS {
class PNS_LINE;
class PNS_NODE;
class PNS_ROUTER;
@ -156,4 +159,6 @@ private:
void sanityCheck( PNS_LINE* aOld, PNS_LINE* aNew );
};
}
#endif // __PNS_SHOVE_H

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -26,6 +27,8 @@
#include "pns_node.h"
#include "pns_sizes_settings.h"
namespace PNS {
int PNS_SIZES_SETTINGS::inheritTrackWidth( PNS_ITEM* aItem )
{
VECTOR2I p;
@ -165,3 +168,5 @@ int PNS_SIZES_SETTINGS::GetLayerBottom() const
else
return m_layerPairs.begin()->second;
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -28,6 +29,9 @@
class BOARD;
class BOARD_DESIGN_SETTINGS;
namespace PNS {
class PNS_ITEM;
class PNS_SIZES_SETTINGS {
@ -110,4 +114,6 @@ private:
std::map<int, int> m_layerPairs;
};
}
#endif // __PNS_SIZES_SETTINGS_H

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -29,6 +30,8 @@
#include "pns_solid.h"
#include "pns_utils.h"
namespace PNS {
const SHAPE_LINE_CHAIN PNS_SOLID::Hull( int aClearance, int aWalkaroundThickness ) const
{
int cl = aClearance + ( aWalkaroundThickness + 1 )/ 2;
@ -75,3 +78,5 @@ PNS_ITEM* PNS_SOLID::Clone() const
PNS_ITEM* solid = new PNS_SOLID( *this );
return solid;
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -29,6 +30,8 @@
#include "pns_item.h"
namespace PNS {
class PNS_SOLID : public PNS_ITEM
{
public:
@ -104,4 +107,6 @@ private:
VECTOR2I m_offset;
};
}
#endif

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -57,6 +58,8 @@ using namespace std::placeholders;
using namespace KIGFX;
namespace PNS {
TOOL_ACTION PNS_TOOL_BASE::ACT_RouterOptions( "pcbnew.InteractiveRouter.RouterOptions",
AS_CONTEXT, 'E',
_( "Routing Options..." ),
@ -395,3 +398,5 @@ const VECTOR2I PNS_TOOL_BASE::snapToItem( PNS_ITEM* aItem, VECTOR2I aP, bool& aS
return anchor;
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
* Author: Maciej Suminski <maciej.suminski@cern.ch>
*
@ -31,9 +32,12 @@
#include "pns_router.h"
class PNS_TUNE_STATUS_POPUP;
class GRID_HELPER;
class PNS_KICAD_IFACE;
class PNS_TUNE_STATUS_POPUP;
namespace PNS {
class APIEXPORT PNS_TOOL_BASE : public TOOL_INTERACTIVE
{
@ -80,4 +84,6 @@ protected:
PNS_ROUTER* m_router;
};
}
#endif

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2015 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -31,6 +32,8 @@
#include <class_board.h>
namespace PNS {
bool PNS_TOPOLOGY::SimplifyLine( PNS_LINE* aLine )
{
if( !aLine->LinkedSegments() || !aLine->SegmentCount() )
@ -382,3 +385,5 @@ const std::set<PNS_ITEM*> PNS_TOPOLOGY::AssembleCluster( PNS_ITEM* aStart, int a
return visited;
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2015 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -26,6 +27,8 @@
#include "pns_itemset.h"
namespace PNS {
class PNS_NODE;
class PNS_SEGMENT;
class PNS_JOINT;
@ -68,4 +71,6 @@ private:
PNS_NODE *m_world;
};
}
#endif

View File

@ -2,6 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014-2015 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -36,9 +37,9 @@ PNS_TUNE_STATUS_POPUP::~PNS_TUNE_STATUS_POPUP()
}
void PNS_TUNE_STATUS_POPUP::UpdateStatus( PNS_ROUTER* aRouter )
void PNS_TUNE_STATUS_POPUP::UpdateStatus( PNS::PNS_ROUTER* aRouter )
{
PNS_MEANDER_PLACER_BASE* placer = dynamic_cast<PNS_MEANDER_PLACER_BASE*>( aRouter->Placer() );
PNS::PNS_MEANDER_PLACER_BASE* placer = dynamic_cast<PNS::PNS_MEANDER_PLACER_BASE*>( aRouter->Placer() );
if( !placer )
return;
@ -49,13 +50,13 @@ void PNS_TUNE_STATUS_POPUP::UpdateStatus( PNS_ROUTER* aRouter )
switch( placer->TuningStatus() )
{
case PNS_MEANDER_PLACER::TUNED:
case PNS::PNS_MEANDER_PLACER::TUNED:
color = wxColour( 0, 255, 0 );
break;
case PNS_MEANDER_PLACER::TOO_SHORT:
case PNS::PNS_MEANDER_PLACER::TOO_SHORT:
color = wxColour( 255, 128, 128 );
break;
case PNS_MEANDER_PLACER::TOO_LONG:
case PNS::PNS_MEANDER_PLACER::TOO_LONG:
color = wxColour( 128, 128, 255 );
break;
}

View File

@ -2,6 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software; you can redistribute it and/or
@ -27,15 +28,19 @@
#include <wx_status_popup.h>
namespace PNS {
class PNS_ROUTER;
}
class PNS_TUNE_STATUS_POPUP : public WX_STATUS_POPUP
{
public:
PNS_TUNE_STATUS_POPUP( PCB_EDIT_FRAME* aParent );
~PNS_TUNE_STATUS_POPUP();
void UpdateStatus( PNS_ROUTER* aRouter );
void UpdateStatus( PNS::PNS_ROUTER* aRouter );
private:
wxStaticText* m_statusLine;

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -27,6 +28,8 @@
#include <cmath>
namespace PNS {
const SHAPE_LINE_CHAIN OctagonalHull( const VECTOR2I& aP0, const VECTOR2I& aSize,
int aClearance, int aChamfer )
{
@ -244,3 +247,5 @@ OPT_BOX2I ChangedArea( const PNS_ITEM* aItemA, const PNS_ITEM* aItemB )
return OPT_BOX2I();
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -28,7 +29,9 @@
#include <geometry/shape_rect.h>
#include <geometry/shape_convex.h>
#define HULL_MARGIN 10
namespace PNS {
constexpr int HULL_MARGIN = 10;
class PNS_ITEM;
@ -61,4 +64,6 @@ void DrawDebugDirs( VECTOR2D aP, int aMask, int aColor );
#endif
OPT_BOX2I ChangedArea( const PNS_ITEM* aItemA, const PNS_ITEM* aItemB );
}
#endif // __PNS_UTILS_H

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -25,6 +26,8 @@
#include <geometry/shape_rect.h>
namespace PNS {
bool PNS_VIA::PushoutForce( PNS_NODE* aNode, const VECTOR2I& aDirection, VECTOR2I& aForce,
bool aSolidsOnly, int aMaxIterations )
{
@ -107,3 +110,5 @@ OPT_BOX2I PNS_VIA::ChangedArea( const PNS_VIA* aOther ) const
return OPT_BOX2I();
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -28,6 +29,8 @@
#include "pns_item.h"
namespace PNS {
class PNS_NODE;
class PNS_VIA : public PNS_ITEM
@ -159,4 +162,6 @@ private:
VIATYPE_T m_viaType;
};
}
#endif

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -28,6 +29,8 @@
#include "pns_router.h"
using boost::optional;
namespace PNS {
void PNS_WALKAROUND::start( const PNS_LINE& aInitialPath )
{
m_iteration = 0;
@ -270,3 +273,5 @@ PNS_WALKAROUND::WALKAROUND_STATUS PNS_WALKAROUND::Route( const PNS_LINE& aInitia
return st;
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -29,6 +30,8 @@
#include "pns_logger.h"
#include "pns_algo_base.h"
namespace PNS {
class PNS_WALKAROUND : public PNS_ALGO_BASE
{
static const int DefaultIterationLimit = 50;
@ -146,4 +149,6 @@ private:
std::set<PNS_ITEM*> m_restrictedSet;
};
}
#endif // __PNS_WALKAROUND_H

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -36,7 +37,7 @@
using namespace KIGFX;
ROUTER_PREVIEW_ITEM::ROUTER_PREVIEW_ITEM( const PNS_ITEM* aItem, VIEW_GROUP* aParent ) :
ROUTER_PREVIEW_ITEM::ROUTER_PREVIEW_ITEM( const PNS::PNS_ITEM* aItem, VIEW_GROUP* aParent ) :
EDA_ITEM( NOT_USED )
{
m_parent = aParent;
@ -63,13 +64,13 @@ ROUTER_PREVIEW_ITEM::~ROUTER_PREVIEW_ITEM()
}
void ROUTER_PREVIEW_ITEM::Update( const PNS_ITEM* aItem )
void ROUTER_PREVIEW_ITEM::Update( const PNS::PNS_ITEM* aItem )
{
m_originLayer = aItem->Layers().Start();
if( aItem->OfKind( PNS_ITEM::LINE ) )
if( aItem->OfKind( PNS::PNS_ITEM::LINE ) )
{
const PNS_LINE* l = static_cast<const PNS_LINE*>( aItem );
const PNS::PNS_LINE* l = static_cast<const PNS::PNS_LINE*>( aItem );
if( !l->SegmentCount() )
return;
@ -85,20 +86,20 @@ void ROUTER_PREVIEW_ITEM::Update( const PNS_ITEM* aItem )
switch( aItem->Kind() )
{
case PNS_ITEM::LINE:
case PNS::PNS_ITEM::LINE:
m_type = PR_SHAPE;
m_width = ( (PNS_LINE*) aItem )->Width();
m_width = ( (PNS::PNS_LINE*) aItem )->Width();
break;
case PNS_ITEM::SEGMENT:
case PNS::PNS_ITEM::SEGMENT:
{
PNS_SEGMENT* seg = (PNS_SEGMENT*) aItem;
PNS::PNS_SEGMENT* seg = (PNS::PNS_SEGMENT*) aItem;
m_type = PR_SHAPE;
m_width = seg->Width();
break;
}
case PNS_ITEM::VIA:
case PNS::PNS_ITEM::VIA:
m_originLayer = m_layer = ITEM_GAL_LAYER( VIAS_VISIBLE );
m_type = PR_SHAPE;
m_width = 0;
@ -106,7 +107,7 @@ void ROUTER_PREVIEW_ITEM::Update( const PNS_ITEM* aItem )
m_depth = ViaOverlayDepth;
break;
case PNS_ITEM::SOLID:
case PNS::PNS_ITEM::SOLID:
m_type = PR_SHAPE;
m_width = 0;
break;
@ -115,7 +116,7 @@ void ROUTER_PREVIEW_ITEM::Update( const PNS_ITEM* aItem )
break;
}
if( aItem->Marker() & MK_VIOLATION )
if( aItem->Marker() & PNS::MK_VIOLATION )
m_color = COLOR4D( 0, 1, 0, 1 );
ViewSetVisible( true );

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -38,9 +39,13 @@
#include <layers_id_colors_and_visibility.h>
namespace PNS {
class PNS_ITEM;
class PNS_ROUTER;
}
class ROUTER_PREVIEW_ITEM : public EDA_ITEM
{
public:
@ -51,10 +56,10 @@ public:
PR_SHAPE
};
ROUTER_PREVIEW_ITEM( const PNS_ITEM* aItem = NULL, KIGFX::VIEW_GROUP* aParent = NULL );
ROUTER_PREVIEW_ITEM( const PNS::PNS_ITEM* aItem = NULL, KIGFX::VIEW_GROUP* aParent = NULL );
~ROUTER_PREVIEW_ITEM();
void Update( const PNS_ITEM* aItem );
void Update( const PNS::PNS_ITEM* aItem );
void StuckMarker( VECTOR2I& aPosition );
@ -102,7 +107,7 @@ private:
KIGFX::VIEW_GROUP* m_parent;
PNS_ROUTER* m_router;
PNS::PNS_ROUTER* m_router;
SHAPE* m_shape;
ITEM_TYPE m_type;

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -199,7 +200,7 @@ private:
class ROUTER_TOOL_MENU: public CONTEXT_MENU
{
public:
ROUTER_TOOL_MENU( BOARD* aBoard, PNS_ROUTER_MODE aMode )
ROUTER_TOOL_MENU( BOARD* aBoard, PNS::PNS_ROUTER_MODE aMode )
{
SetTitle( _( "Interactive Router" ) );
Add( ACT_NewTrack );
@ -218,11 +219,11 @@ public:
Add( ACT_CustomTrackWidth );
if( aMode == PNS_MODE_ROUTE_DIFF_PAIR )
if( aMode == PNS::PNS_MODE_ROUTE_DIFF_PAIR )
Add( ACT_SetDpDimensions );
AppendSeparator();
Add( PNS_TOOL_BASE::ACT_RouterOptions );
Add( PNS::PNS_TOOL_BASE::ACT_RouterOptions );
}
private:
@ -313,7 +314,7 @@ void ROUTER_TOOL::handleCommonEvents( const TOOL_EVENT& aEvent )
}
else if( aEvent.IsAction( &ACT_SetDpDimensions ) )
{
PNS_SIZES_SETTINGS sizes = m_router->Sizes();
PNS::PNS_SIZES_SETTINGS sizes = m_router->Sizes();
DIALOG_PNS_DIFF_PAIR_DIMENSIONS settingsDlg( m_frame, sizes );
if( settingsDlg.ShowModal() )
@ -336,14 +337,14 @@ void ROUTER_TOOL::handleCommonEvents( const TOOL_EVENT& aEvent )
else if( aEvent.IsAction( &COMMON_ACTIONS::trackViaSizeChanged ) )
{
PNS_SIZES_SETTINGS sizes( m_router->Sizes() );
PNS::PNS_SIZES_SETTINGS sizes( m_router->Sizes() );
sizes.ImportCurrent( m_board->GetDesignSettings() );
m_router->UpdateSizes( sizes );
}
}
int ROUTER_TOOL::getStartLayer( const PNS_ITEM* aItem )
int ROUTER_TOOL::getStartLayer( const PNS::PNS_ITEM* aItem )
{
int tl = getView()->GetTopLayer();
@ -390,7 +391,7 @@ bool ROUTER_TOOL::onViaCommand( TOOL_EVENT& aEvent, VIATYPE_T aType )
LAYER_ID pairTop = m_frame->GetScreen()->m_Route_Layer_TOP;
LAYER_ID pairBottom = m_frame->GetScreen()->m_Route_Layer_BOTTOM;
PNS_SIZES_SETTINGS sizes = m_router->Sizes();
PNS::PNS_SIZES_SETTINGS sizes = m_router->Sizes();
// fixme: P&S supports more than one fixed layer pair. Update the dialog?
sizes.ClearLayerPairs();
@ -506,7 +507,7 @@ bool ROUTER_TOOL::prepareInteractive()
m_ctls->ForceCursorPosition( false );
m_ctls->SetAutoPan( true );
PNS_SIZES_SETTINGS sizes( m_router->Sizes() );
PNS::PNS_SIZES_SETTINGS sizes( m_router->Sizes() );
sizes.Init( m_board, m_startItem );
sizes.AddLayerPair( m_frame->GetScreen()->m_Route_Layer_TOP,
@ -618,7 +619,7 @@ int ROUTER_TOOL::DpDimensionsDialog( const TOOL_EVENT& aEvent )
{
Activate();
PNS_SIZES_SETTINGS sizes = m_router->Sizes();
PNS::PNS_SIZES_SETTINGS sizes = m_router->Sizes();
DIALOG_PNS_DIFF_PAIR_DIMENSIONS settingsDlg( m_frame, sizes );
if( settingsDlg.ShowModal() )
@ -648,18 +649,18 @@ int ROUTER_TOOL::SettingsDialog( const TOOL_EVENT& aEvent )
int ROUTER_TOOL::RouteSingleTrace( const TOOL_EVENT& aEvent )
{
m_frame->SetToolID( ID_TRACK_BUTT, wxCURSOR_PENCIL, _( "Route Track" ) );
return mainLoop( PNS_MODE_ROUTE_SINGLE );
return mainLoop( PNS::PNS_MODE_ROUTE_SINGLE );
}
int ROUTER_TOOL::RouteDiffPair( const TOOL_EVENT& aEvent )
{
m_frame->SetToolID( ID_TRACK_BUTT, wxCURSOR_PENCIL, _( "Router Differential Pair" ) );
return mainLoop( PNS_MODE_ROUTE_DIFF_PAIR );
return mainLoop( PNS::PNS_MODE_ROUTE_DIFF_PAIR );
}
int ROUTER_TOOL::mainLoop( PNS_ROUTER_MODE aMode )
int ROUTER_TOOL::mainLoop( PNS::PNS_ROUTER_MODE aMode )
{
PCB_EDIT_FRAME* frame = getEditFrame<PCB_EDIT_FRAME>();
BOARD* board = getModel<BOARD>();

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
* Author: Maciej Suminski <maciej.suminski@cern.ch>
*
@ -24,7 +25,7 @@
#include "pns_tool_base.h"
class APIEXPORT ROUTER_TOOL : public PNS_TOOL_BASE
class APIEXPORT ROUTER_TOOL : public PNS::PNS_TOOL_BASE
{
public:
ROUTER_TOOL();
@ -42,7 +43,7 @@ public:
private:
int mainLoop( PNS_ROUTER_MODE aMode );
int mainLoop( PNS::PNS_ROUTER_MODE aMode );
int getDefaultWidth( int aNetCode );
@ -52,7 +53,7 @@ private:
void getNetclassDimensions( int aNetCode, int& aWidth, int& aViaDiameter, int& aViaDrill );
void handleCommonEvents( const TOOL_EVENT& evt );
int getStartLayer( const PNS_ITEM* aItem );
int getStartLayer( const PNS::PNS_ITEM* aItem );
void switchLayerOnViaPlacement();
bool onViaCommand( TOOL_EVENT& aEvent, VIATYPE_T aType );

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -22,6 +23,8 @@
#include "time_limit.h"
namespace PNS {
TIME_LIMIT::TIME_LIMIT( int aMilliseconds ) :
m_limitMs( aMilliseconds )
{
@ -49,3 +52,5 @@ void TIME_LIMIT::Set( int aMilliseconds )
{
m_limitMs = aMilliseconds;
}
}

View File

@ -2,6 +2,7 @@
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software: you can redistribute it and/or modify it
@ -23,6 +24,8 @@
#include <stdint.h>
namespace PNS {
class TIME_LIMIT
{
public:
@ -40,4 +43,6 @@ private:
int64_t m_startTics;
};
}
#endif