pcbnew: start integrating P&S router

parent b73474bd
...@@ -269,6 +269,10 @@ void TOOL_DISPATCHER::DispatchWxCommand( wxCommandEvent &aEvent ) ...@@ -269,6 +269,10 @@ void TOOL_DISPATCHER::DispatchWxCommand( wxCommandEvent &aEvent )
switch( aEvent.GetId() ) switch( aEvent.GetId() )
{ {
case ID_PNS_ROUTER_TOOL:
toolName = "pcbnew.InteractiveRouter";
activateTool = true;
break;
case ID_SELECTION_TOOL: case ID_SELECTION_TOOL:
toolName = "pcbnew.InteractiveSelection"; toolName = "pcbnew.InteractiveSelection";
activateTool = true; activateTool = true;
......
add_definitions(-DPCBNEW) add_definitions(-DPCBNEW)
add_subdirectory(router)
if (KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) if (KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripting) file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripting)
...@@ -117,6 +118,7 @@ set(PCBNEW_AUTOROUTER_SRCS ...@@ -117,6 +118,7 @@ set(PCBNEW_AUTOROUTER_SRCS
autorouter/work.cpp autorouter/work.cpp
) )
set(PCBNEW_CLASS_SRCS set(PCBNEW_CLASS_SRCS
tool_modview.cpp tool_modview.cpp
modview.cpp modview.cpp
...@@ -324,6 +326,7 @@ if (KICAD_SCRIPTING_MODULES) ...@@ -324,6 +326,7 @@ if (KICAD_SCRIPTING_MODULES)
swig_link_libraries(pcbnew swig_link_libraries(pcbnew
3d-viewer 3d-viewer
pcbcommon pcbcommon
pnsrouter
common common
pcad2kicadpcb pcad2kicadpcb
polygon polygon
...@@ -420,6 +423,7 @@ endif(APPLE) ...@@ -420,6 +423,7 @@ endif(APPLE)
target_link_libraries(pcbnew target_link_libraries(pcbnew
3d-viewer 3d-viewer
pcbcommon pcbcommon
pnsrouter
common common
pcad2kicadpcb pcad2kicadpcb
polygon polygon
......
...@@ -815,7 +815,7 @@ void PCB_BASE_FRAME::LoadSettings() ...@@ -815,7 +815,7 @@ void PCB_BASE_FRAME::LoadSettings()
{ {
// Copper layers are required for netname layers // Copper layers are required for netname layers
view->SetRequired( GetNetnameLayer( layer ), layer ); view->SetRequired( GetNetnameLayer( layer ), layer );
view->SetLayerTarget( layer, KiGfx::TARGET_CACHED ); view->SetLayerTarget( layer, KiGfx::TARGET_NONCACHED );
} }
else if( IsNetnameLayer( layer ) ) else if( IsNetnameLayer( layer ) )
{ {
......
...@@ -305,6 +305,11 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() ...@@ -305,6 +305,11 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
_( "Interactive selection and drag&drop tool." ), _( "Interactive selection and drag&drop tool." ),
KiBitmap( tools_xpm ) ); KiBitmap( tools_xpm ) );
AddMenuItem( editMenu, ID_PNS_ROUTER_TOOL,
_( "Interactive router" ),
_( "Interactive router drag&drop tool." ),
KiBitmap( tools_xpm ) );
/** Create View menu **/ /** Create View menu **/
wxMenu* viewMenu = new wxMenu; wxMenu* viewMenu = new wxMenu;
......
...@@ -120,8 +120,10 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) ...@@ -120,8 +120,10 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
// menu Config // menu Config
/* Tom's hacks start */ /* Tom's hacks start */
EVT_MENU ( ID_SELECTION_TOOL, PCB_EDIT_FRAME::onGenericCommand ) EVT_MENU ( ID_SELECTION_TOOL, PCB_EDIT_FRAME::onGenericCommand )
EVT_TOOL ( ID_SELECTION_TOOL, PCB_EDIT_FRAME::onGenericCommand ) EVT_TOOL ( ID_SELECTION_TOOL, PCB_EDIT_FRAME::onGenericCommand )
EVT_MENU ( ID_PNS_ROUTER_TOOL, PCB_EDIT_FRAME::onGenericCommand )
EVT_TOOL ( ID_PNS_ROUTER_TOOL, PCB_EDIT_FRAME::onGenericCommand )
/* Tom's hacks end */ /* Tom's hacks end */
EVT_MENU( ID_PCB_DRAWINGS_WIDTHS_SETUP, PCB_EDIT_FRAME::OnConfigurePcbOptions ) EVT_MENU( ID_PCB_DRAWINGS_WIDTHS_SETUP, PCB_EDIT_FRAME::OnConfigurePcbOptions )
......
...@@ -366,7 +366,8 @@ enum pcbnew_ids ...@@ -366,7 +366,8 @@ enum pcbnew_ids
ID_FOOTPRINT_WIZARD_SELECT_WIZARD, ID_FOOTPRINT_WIZARD_SELECT_WIZARD,
ID_FOOTPRINT_WIZARD_EXPORT_TO_BOARD, ID_FOOTPRINT_WIZARD_EXPORT_TO_BOARD,
ID_SELECTION_TOOL ID_SELECTION_TOOL,
ID_PNS_ROUTER_TOOL
}; };
#endif // PCBNEW_ID_H_ #endif // PCBNEW_ID_H_
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <pcbnew_id.h> #include <pcbnew_id.h>
#include "selection_tool.h" #include "selection_tool.h"
#include <router/router_tool.h>
void PCB_EDIT_FRAME::setupTools() void PCB_EDIT_FRAME::setupTools()
{ {
...@@ -45,6 +46,7 @@ void PCB_EDIT_FRAME::setupTools() ...@@ -45,6 +46,7 @@ void PCB_EDIT_FRAME::setupTools()
// register our selection tool. // register our selection tool.
m_toolManager->RegisterTool( new SELECTION_TOOL ); m_toolManager->RegisterTool( new SELECTION_TOOL );
m_toolManager->RegisterTool( new ROUTER_TOOL );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment