|
KiCad PCB EDA Suite
|
#include <wx/filedlg.h>#include <wx/filefn.h>#include <wx/hyperlink.h>#include <advanced_config.h>#include <kiplatform/ui.h>#include <functional>#include <iomanip>#include <utility>#include <sstream>#include <tool/action_manager.h>#include <board.h>#include <board_design_settings.h>#include <board_item.h>#include <netclass.h>#include <netinfo.h>#include <collectors.h>#include <footprint.h>#include <geometry/geometry_utils.h>#include <pad.h>#include <zone.h>#include <pcb_edit_frame.h>#include <pcb_track.h>#include <pcbnew_id.h>#include <dialogs/dialog_pns_settings.h>#include <dialogs/dialog_pns_diff_pair_dimensions.h>#include <dialogs/dialog_track_via_size.h>#include <dialogs/dialog_router_save_test_case.h>#include <math/vector2wx.h>#include <paths.h>#include <wildcards_and_files_ext.h>#include <confirm.h>#include <kidialog.h>#include <widgets/wx_infobar.h>#include <widgets/appearance_controls.h>#include <connectivity/connectivity_data.h>#include <connectivity/connectivity_algo.h>#include <gal/graphics_abstraction_layer.h>#include <view/view_controls.h>#include <bitmaps.h>#include <string_utils.h>#include <gal/painter.h>#include <tool/tool_action.h>#include <tool/action_menu.h>#include <tool/tool_manager.h>#include <tool/tool_menu.h>#include <tools/pcb_actions.h>#include <tools/pcb_selection_tool.h>#include <board_commit.h>#include <generators/pcb_via_stack.h>#include <tools/drawing_tool.h>#include <tools/pcb_grid_helper.h>#include <tools/drc_tool.h>#include <tools/zone_filler_tool.h>#include <drc/drc_interactive_courtyard_clearance.h>#include <project.h>#include <project/project_file.h>#include <project/project_local_settings.h>#include <io/io_utils.h>#include "router_tool.h"#include "router_status_view_item.h"#include "pns_router.h"#include "pns_itemset.h"#include "pns_line.h"#include "pns_linked_item.h"#include "pns_logger.h"#include "pns_node.h"#include "pns_optimizer.h"#include "pns_placement_algo.h"#include "pns_segment.h"#include "pns_drag_algo.h"#include "pns_kicad_iface.h"#include <ratsnest/ratsnest_data.h>#include <pcb_io/kicad_sexpr/pcb_io_kicad_sexpr.h>Go to the source code of this file.
Classes | |
| class | TRACK_WIDTH_MENU |
| class | DIFF_PAIR_MENU |
Macros | |
| #define | _(s) |
| #define | _(s) |
| #define | CHECK(x) |
| #define | FORMAT_VALUE(x) |
Enumerations | |
| enum | VIA_ACTION_FLAGS { VIA_MASK = 0x07 , VIA = 0x00 , BLIND_VIA = 0x01 , BURIED_VIA = 0x02 , MICROVIA = 0x04 , SELECT_LAYER = VIA_MASK + 1 } |
| Flags used by via tool actions. More... | |
Functions | |
| const VIA_STACK_PRESET * | MatchPendingStackExpansion (PCB_VIA *aVia, const std::set< KIID > &aPreRoute, const std::vector< PENDING_STACK_EXPANSION > &aPending) |
| Preset a route's stacked drop wants for aVia, or nullptr when the via is not one of them. | |
| PCB_LAYER_ID | ViaStackTargetLayer (PCB_LAYER_ID aStart, PCB_LAYER_ID aEnd, PCB_LAYER_ID aCurrent) |
| Layer a microvia stack drop lands on when invoked on aCurrent. | |
| static const TOOL_ACTION | ACT_PlaceViaStack (.Name("pcbnew.InteractiveRouter.PlaceViaStack") .Scope(AS_CONTEXT) .DefaultHotkey(MD_CTRL+MD_SHIFT+ 'V') .FriendlyName(_("Place Microvia Stack at Track End")) .Tooltip(_("Drops the active microvia stack preset at the end of the currently routed track " "and continues on the target layer.")) .Icon(BITMAPS::add_via_stack) .Flags(AF_NONE)) |
| static VIATYPE | getViaTypeFromFlags (int aFlags) |
Variables | |
| static const TOOL_ACTION | ACT_PlaceThroughVia (TOOL_ACTION_ARGS() .Name("pcbnew.InteractiveRouter.PlaceVia") .Scope(AS_CONTEXT) .DefaultHotkey( 'V') .LegacyHotkeyName("Add Through Via") .FriendlyName(_("Place Through Via")) .Tooltip(_("Adds a through-hole via at the end of currently routed track.")) .Icon(BITMAPS::via) .Flags(AF_NONE) .Parameter< int >(VIA_ACTION_FLAGS::VIA)) |
| static const TOOL_ACTION | ACT_PlaceBlindVia (TOOL_ACTION_ARGS() .Name("pcbnew.InteractiveRouter.PlaceBlindVia") .Scope(AS_CONTEXT) .DefaultHotkey(MD_ALT+MD_SHIFT+ 'V') .LegacyHotkeyName("Add Blind/Buried Via") .FriendlyName(_("Place Blind/Buried Via")) .Tooltip(_("Adds a blind or buried via at the end of currently routed track.")) .Icon(BITMAPS::via_buried) .Flags(AF_NONE) .Parameter< int >(VIA_ACTION_FLAGS::BLIND_VIA)) |
| static const TOOL_ACTION | ACT_PlaceMicroVia (TOOL_ACTION_ARGS() .Name("pcbnew.InteractiveRouter.PlaceMicroVia") .Scope(AS_CONTEXT) .DefaultHotkey(MD_CTRL+ 'V') .LegacyHotkeyName("Add MicroVia") .FriendlyName(_("Place Microvia")) .Tooltip(_("Adds a microvia at the end of currently routed track.")) .Icon(BITMAPS::via_microvia) .Flags(AF_NONE) .Parameter< int >(VIA_ACTION_FLAGS::MICROVIA)) |
| static const TOOL_ACTION | ACT_SelLayerAndPlaceThroughVia (TOOL_ACTION_ARGS() .Name("pcbnew.InteractiveRouter.SelLayerAndPlaceVia") .Scope(AS_CONTEXT) .DefaultHotkey('<') .LegacyHotkeyName("Select Layer and Add Through Via") .FriendlyName(_("Select Layer and Place Through Via...")) .Tooltip(_("Select a layer, then add a through-hole via at the end of currently routed track.")) .Icon(BITMAPS::select_w_layer) .Flags(AF_NONE) .Parameter< int >(VIA_ACTION_FLAGS::VIA|VIA_ACTION_FLAGS::SELECT_LAYER)) |
| static const TOOL_ACTION | ACT_SelLayerAndPlaceBlindVia (TOOL_ACTION_ARGS() .Name("pcbnew.InteractiveRouter.SelLayerAndPlaceBlindVia") .Scope(AS_CONTEXT) .DefaultHotkey(MD_ALT+'<') .LegacyHotkeyName("Select Layer and Add Blind/Buried Via") .FriendlyName(_("Select Layer and Place Blind/Buried Via...")) .Tooltip(_("Select a layer, then add a blind or buried via at the end of currently routed track.")) .Icon(BITMAPS::select_w_layer) .Flags(AF_NONE) .Parameter< int >(VIA_ACTION_FLAGS::BLIND_VIA|VIA_ACTION_FLAGS::SELECT_LAYER)) |
| static const TOOL_ACTION | ACT_SelLayerAndPlaceMicroVia (TOOL_ACTION_ARGS() .Name("pcbnew.InteractiveRouter.SelLayerAndPlaceMicroVia") .Scope(AS_CONTEXT) .FriendlyName(_("Select Layer and Place Micro Via...")) .Tooltip(_("Select a layer, then add a micro via at the end of currently routed track.")) .Icon(BITMAPS::select_w_layer) .Flags(AF_NONE) .Parameter< int >(VIA_ACTION_FLAGS::MICROVIA|VIA_ACTION_FLAGS::SELECT_LAYER)) |
| static const TOOL_ACTION | ACT_CustomTrackWidth (TOOL_ACTION_ARGS() .Name("pcbnew.InteractiveRouter.CustomTrackViaSize") .Scope(AS_CONTEXT) .DefaultHotkey( 'Q') .LegacyHotkeyName("Custom Track/Via Size") .FriendlyName(_("Custom Track/Via Size...")) .Tooltip(_("Shows a dialog for changing the track width and via size.")) .Icon(BITMAPS::width_track)) |
| static const TOOL_ACTION | ACT_SwitchPosture (TOOL_ACTION_ARGS() .Name("pcbnew.InteractiveRouter.SwitchPosture") .Scope(AS_CONTEXT) .DefaultHotkey('/') .LegacyHotkeyName("Switch Track Posture") .FriendlyName(_("Switch Track Posture")) .Tooltip(_("Switches posture of the currently routed track.")) .Icon(BITMAPS::change_entry_orient)) |
| static const TOOL_ACTION | ACT_SwitchCornerModeToNext (TOOL_ACTION_ARGS() .Name("pcbnew.InteractiveRouter.SwitchRoundingToNext") .Scope(AS_CONTEXT) .DefaultHotkey(MD_CTRL+'/') .FriendlyName(_("Track Corner Mode Switch")) .Tooltip(_("Switches between sharp/rounded and 45°/90° corners when routing tracks.")) .Icon(BITMAPS::switch_corner_rounding_shape)) |
| static const TOOL_ACTION | ACT_SwitchCornerMode45 (TOOL_ACTION_ARGS() .Name("pcbnew.InteractiveRouter.SwitchRounding45") .Scope(AS_CONTEXT) .DefaultHotkey(MD_CTRL+ 'W') .FriendlyName(_("Track Corner Mode 45")) .Tooltip(_("Switch to 45° corner when routing tracks."))) |
| static const TOOL_ACTION | ACT_SwitchCornerMode90 (TOOL_ACTION_ARGS() .Name("pcbnew.InteractiveRouter.SwitchRounding90") .Scope(AS_CONTEXT) .DefaultHotkey(MD_CTRL+MD_ALT+ 'W') .FriendlyName(_("Track Corner Mode 90")) .Tooltip(_("Switch to 90° corner when routing tracks."))) |
| static const TOOL_ACTION | ACT_SwitchCornerModeArc45 (TOOL_ACTION_ARGS() .Name("pcbnew.InteractiveRouter.SwitchRoundingArc45") .Scope(AS_CONTEXT) .DefaultHotkey(MD_CTRL+MD_SHIFT+ 'W') .FriendlyName(_("Track Corner Mode Arc 45")) .Tooltip(_("Switch to arc 45° corner when routing tracks."))) |
| static const TOOL_ACTION | ACT_SwitchCornerModeArc90 (TOOL_ACTION_ARGS() .Name("pcbnew.InteractiveRouter.SwitchRoundingArc90") .Scope(AS_CONTEXT) .DefaultHotkey(MD_ALT+ 'W') .FriendlyName(_("Track Corner Mode Arc 90")) .Tooltip(_("Switch to arc 90° corner when routing tracks."))) |
| #define _ | ( | s | ) |
Definition at line 193 of file router_tool.cpp.
Referenced by DIFF_PAIR_MENU::DIFF_PAIR_MENU(), TRACK_WIDTH_MENU::TRACK_WIDTH_MENU(), DIFF_PAIR_MENU::update(), and TRACK_WIDTH_MENU::update().
| #define _ | ( | s | ) |
Definition at line 193 of file router_tool.cpp.
| #define CHECK | ( | x | ) |
| #define FORMAT_VALUE | ( | x | ) |
Referenced by ROUTER_TOOL::UpdateMessagePanel().
| enum VIA_ACTION_FLAGS |
Flags used by via tool actions.
| Enumerator | |
|---|---|
| VIA_MASK | |
| VIA | Normal via. |
| BLIND_VIA | blind via |
| BURIED_VIA | buried via |
| MICROVIA | Microvia. |
| SELECT_LAYER | Ask user to select layer before adding via. |
Definition at line 174 of file router_tool.cpp.
|
static |
References add_via_stack, AF_NONE, AS_CONTEXT, MD_CTRL, and MD_SHIFT.
Referenced by ROUTER_TOOL::Init(), ROUTER_TOOL::performRouting(), and ROUTER_TOOL::setTransitions().
|
static |
Definition at line 1149 of file router_tool.cpp.
References BLIND, BLIND_VIA, BURIED, BURIED_VIA, MICROVIA, THROUGH, VIA, and VIA_MASK.
Referenced by ROUTER_TOOL::handleLayerSwitch().
| const VIA_STACK_PRESET * MatchPendingStackExpansion | ( | PCB_VIA * | aVia, |
| const std::set< KIID > & | aPreRoute, | ||
| const std::vector< PENDING_STACK_EXPANSION > & | aPending ) |
Preset a route's stacked drop wants for aVia, or nullptr when the via is not one of them.
Vias in aPreRoute already existed, so the route did not create them.
Definition at line 108 of file router_tool.cpp.
References PCB_VIA::BottomLayer(), BOARD_CONNECTED_ITEM::GetNetCode(), EDA_ITEM::m_Uuid, and PCB_VIA::TopLayer().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and ROUTER_TOOL::finishInteractive().
| PCB_LAYER_ID ViaStackTargetLayer | ( | PCB_LAYER_ID | aStart, |
| PCB_LAYER_ID | aEnd, | ||
| PCB_LAYER_ID | aCurrent ) |
Layer a microvia stack drop lands on when invoked on aCurrent.
A preset places only from its own terminals: the start layer runs the span, the end layer runs it back. UNDEFINED_LAYER anywhere else.
Definition at line 130 of file router_tool.cpp.
References UNDEFINED_LAYER.
Referenced by BOOST_AUTO_TEST_CASE(), and ROUTER_TOOL::onViaStackCommand().
|
static |
Referenced by TRACK_WIDTH_MENU::eventHandler(), ROUTER_TOOL::performRouting(), and ROUTER_TOOL::setTransitions().
|
static |
Referenced by ROUTER_TOOL::Init(), and ROUTER_TOOL::setTransitions().
|
static |
Referenced by ROUTER_TOOL::Init(), and ROUTER_TOOL::setTransitions().
|
static |
Referenced by ROUTER_TOOL::Init(), ROUTER_TOOL::MainLoop(), ROUTER_TOOL::performRouting(), and ROUTER_TOOL::setTransitions().
|
static |
Referenced by ROUTER_TOOL::Init(), and ROUTER_TOOL::setTransitions().
|
static |
Referenced by ROUTER_TOOL::Init(), and ROUTER_TOOL::setTransitions().
|
static |
Referenced by ROUTER_TOOL::Init(), and ROUTER_TOOL::setTransitions().
|
static |
Referenced by ROUTER_TOOL::handlePnSCornerModeChange(), ROUTER_TOOL::Init(), and ROUTER_TOOL::setTransitions().
|
static |
Referenced by ROUTER_TOOL::handlePnSCornerModeChange(), ROUTER_TOOL::Init(), and ROUTER_TOOL::setTransitions().
|
static |
Referenced by ROUTER_TOOL::handlePnSCornerModeChange(), ROUTER_TOOL::Init(), and ROUTER_TOOL::setTransitions().
|
static |
Referenced by ROUTER_TOOL::handlePnSCornerModeChange(), ROUTER_TOOL::Init(), and ROUTER_TOOL::setTransitions().
|
static |
Referenced by ROUTER_TOOL::handlePnSCornerModeChange(), ROUTER_TOOL::Init(), and ROUTER_TOOL::setTransitions().
|
static |
Referenced by ROUTER_TOOL::Init(), and ROUTER_TOOL::performRouting().