23 #include <wx/hyperlink.h> 27 using namespace std::placeholders;
58 using namespace KIGFX;
86 _(
"Undo last segment" ),
_(
"Stops laying the current track." ),
92 _(
"Finish Track" ),
_(
"Stops laying the current track." ),
98 _(
"Auto-finish Track" ),
_(
"Automagically finishes laying the current track." ) );
103 _(
"Place Through Via" ),
104 _(
"Adds a through-hole via at the end of currently routed track." ),
110 _(
"Place Blind/Buried Via" ),
111 _(
"Adds a blind or buried via at the end of currently routed track."),
117 _(
"Place Microvia" ),
_(
"Adds a microvia at the end of currently routed track." ),
121 "pcbnew.InteractiveRouter.SelLayerAndPlaceVia",
124 _(
"Select Layer and Place Through Via..." ),
125 _(
"Select a layer, then add a through-hole via at the end of currently routed track." ),
130 "pcbnew.InteractiveRouter.SelLayerAndPlaceBlindVia",
133 _(
"Select Layer and Place Blind/Buried Via..." ),
134 _(
"Select a layer, then add a blind or buried via at the end of currently routed track."),
141 _(
"Custom Track/Via Size..." ),
142 _(
"Shows a dialog for changing the track width and via size." ),
148 _(
"Switch Track Posture" ),
149 _(
"Switches posture of the currently routed track." ),
155 _(
"Switch Corner Rounding" ),
156 _(
"Switches the corner type of the currently routed track." ),
160 #define _(s) wxGetTranslation((s)) 177 SetTitle(
_(
"Select Track/Via Width" ) );
197 _(
"Route using the width of the starting track." ), wxITEM_CHECK );
202 _(
"Use track and via sizes from the net class" ), wxITEM_CHECK );
207 _(
"Specify custom track and via sizes" ), wxITEM_CHECK );
218 msg =
_(
"Track netclass width" );
223 Append( menuIdx, msg, wxEmptyString, wxITEM_CHECK );
234 msg =
_(
"Via netclass values" );
238 msg.Printf(
_(
"Via %s, drill %s" ),
246 Append( menuIdx, msg, wxEmptyString, wxITEM_CHECK );
254 int id = aEvent.GetId();
306 SetTitle(
_(
"Select Differential Pair Dimensions" ) );
323 _(
"Use differential pair dimensions from the net class" ), wxITEM_CHECK );
328 _(
"Specify custom differential pair dimensions" ), wxITEM_CHECK );
341 if( diffPair.
m_Gap <= 0 )
345 msg.Printf(
_(
"Width %s" ),
350 msg.Printf(
_(
"Width %s, via gap %s" ),
359 msg.Printf(
_(
"Width %s, gap %s" ),
365 msg.Printf(
_(
"Width %s, gap %s, via gap %s" ),
373 Append( menuIdx, msg, wxEmptyString, wxITEM_CHECK );
381 int id = aEvent.GetId();
424 menu.
SetTitle(
_(
"Interactive Router" ) );
493 wxString cwd = wxGetCwd();
495 wxFileName fname_log( cwd );
496 fname_log.SetName(
"pns.log" );
498 wxFileName fname_dump( cwd );
499 fname_dump.SetName(
"pns.dump" );
501 wxString msg =
wxString::Format(
_(
"Event file: %s\nBoard dump: %s" ), fname_log.GetFullPath(), fname_log.GetFullPath() );
503 int rv =
OKOrCancelDialog(
nullptr,
_(
"Save router log"),
_(
"Would you like to save the router\nevent log for debugging purposes?"), msg,
_(
"OK"),
_(
"Cancel") );
508 FILE *f = fopen( fname_log.GetFullPath().c_str(),
"wb" );
511 fprintf(f,
"config %d %d %d\n",
517 const auto& events = logger->GetEvents();
519 for(
auto evt : events)
521 wxString
id =
"null";
522 if( evt.item && evt.item->Parent() )
523 id = evt.item->Parent()->m_Uuid.AsString();
525 fprintf( f,
"event %d %d %d %s\n", evt.p.x, evt.p.y, evt.type,
526 (
const char*)
id.c_str() );
615 wxASSERT_MSG(
false,
"Unhandled via type" );
720 for(
size_t i = 0; i < layers.size(); i++ )
722 if( layers[i] == currentLayer )
729 idx = ( idx + 1 ) % layers.size();
730 targetLayer = layers[idx];
736 for(
size_t i = 0; i < layers.size(); i++ )
738 if( layers[i] == currentLayer )
745 idx = ( idx > 0 ) ? ( idx - 1 ) : ( layers.size() - 1 );
746 targetLayer = layers[idx];
754 if( targetLayer == currentLayer )
775 bool selectLayer =
false;
780 const int actViaFlags = aEvent.
Parameter<intptr_t>();
811 wxHyperlinkCtrl* button =
new wxHyperlinkCtrl( infobar, wxID_ANY,
812 _(
"Show board setup" ),
815 button->Bind( wxEVT_COMMAND_HYPERLINK, std::function<
void( wxHyperlinkEvent& aEvent )>(
816 [&]( wxHyperlinkEvent& aEvent )
818 getEditFrame<PCB_EDIT_FRAME>()->ShowBoardSetupDialog(
_(
"Constraints" ) );
824 infobar->
ShowMessageFor(
_(
"Blind/buried vias must first be enabled in " 825 "Board Setup > Design Rules > Constraints." ),
826 10000, wxICON_ERROR );
833 wxHyperlinkCtrl* button =
new wxHyperlinkCtrl( infobar, wxID_ANY,
834 _(
"Show board setup" ), wxEmptyString );
836 button->Bind( wxEVT_COMMAND_HYPERLINK, std::function<
void( wxHyperlinkEvent& aEvent )>(
837 [&]( wxHyperlinkEvent& aEvent )
839 getEditFrame<PCB_EDIT_FRAME>()->ShowBoardSetupDialog(
_(
"Constraints" ) );
846 "Board Setup > Design Rules > Constraints." ),
847 10000, wxICON_ERROR );
860 && ( currentLayer < layerCount - 2 ) )
863 "(F.Cu/B.Cu) and the ones directly adjacent to them." ) );
870 && ( ( targetLayer ==
B_Cu && currentLayer ==
F_Cu )
871 || ( targetLayer ==
F_Cu && currentLayer ==
B_Cu ) ) )
882 currentLayer = pairTop;
883 targetLayer = pairBottom;
888 wxASSERT_MSG( !selectLayer,
"Unexpected select layer for microvia (microvia layers are " 891 if( currentLayer ==
F_Cu || currentLayer ==
In1_Cu )
897 else if( currentLayer ==
B_Cu || currentLayer == layerCount - 2 )
905 wxASSERT_MSG(
false,
"Invalid layer pair for microvia (must be on or adjacent to an " 913 if( currentLayer == pairTop || currentLayer == pairBottom )
917 currentLayer = pairTop;
918 targetLayer = pairBottom;
924 targetLayer = pairTop;
951 if( !constraint.
IsNull() )
957 if( !constraint.
IsNull() )
1006 sizes.AddLayerPair(
frame()->GetScreen()->m_Route_Layer_TOP,
1007 frame()->GetScreen()->m_Route_Layer_BOTTOM );
1075 if( evt->IsCancelInteractive() )
1083 if( evt->IsMotion() )
1099 bool forceFinish = evt->Modifier(
MD_SHIFT );
1106 if( needLayerSwitch )
1143 else if( evt->IsCancelInteractive() || evt->IsActivate()
1144 || evt->IsUndoRedo()
1150 if( evt->IsActivate() && !evt->IsMoveTool() )
1161 evt->SetPassEvent();
1177 if( settingsDlg.ShowModal() == wxID_OK )
1196 settingsDlg.ShowModal();
1271 if( evt->IsCancelInteractive() )
1276 else if( evt->IsActivate() )
1278 if( evt->IsMoveTool() )
1297 else if( evt->IsMotion() )
1322 if( evt->HasPosition() )
1324 if( evt->Modifier(
MD_CTRL ) )
1339 else if( evt->IsKeyPressed() )
1344 evt->SetPassEvent();
1352 evt->SetPassEvent();
1378 KIDIALOG dlg(
frame(),
_(
"The selected item is locked." ),
_(
"Confirmation" ),
1379 wxOK | wxCANCEL | wxICON_WARNING );
1380 dlg.SetOKLabel(
_(
"Drag Anyway" ) );
1403 if( evt->IsMotion() )
1408 else if( evt->IsClick(
BUT_LEFT ) )
1417 else if( evt->IsCancelInteractive() || evt->IsActivate() || evt->IsUndoRedo() )
1422 if( evt->IsActivate() && !evt->IsMoveTool() )
1429 evt->SetPassEvent();
1462 if( arcs > 0 || vias > 1 || traces > 2 || vias + traces < 1 )
1466 TRACK* reference =
nullptr;
1468 for(
int i = 0; !reference && i < aCollector.
GetCount(); i++ )
1469 reference = dynamic_cast<TRACK*>( aCollector[i] );
1473 wxPoint refPoint( aPt.
x, aPt.
y );
1479 refPoint = reference->
GetEnd();
1483 for(
int i = 0; i < aCollector.
GetCount(); i++ )
1485 TRACK* neighbor = dynamic_cast<TRACK*>( aCollector[i] );
1487 if( neighbor && neighbor != reference )
1492 if( neighbor->
GetStart() != refPoint && neighbor->
GetEnd() != refPoint )
1499 aCollector.
Append( reference );
1519 if( item->
IsType( footprints ) )
1561 footprint = static_cast<const FOOTPRINT*>(item);
1568 itemsToDrag.
Add( solid );
1576 itemsToDrag.
Add( startItem );
1614 int dragMode = aEvent.
Parameter<int64_t> ();
1643 if( evt->IsCancelInteractive() )
1647 else if( evt->IsMotion() || evt->IsDrag(
BUT_LEFT ) )
1661 previewItem = static_cast<BOARD_ITEM*>( drawing->Clone() );
1665 FP_SHAPE* shape = static_cast<FP_SHAPE*>( previewItem );
1667 shape->FP_SHAPE::Move( fp_offset );
1671 previewItem->
Move( offset );
1679 previewItem->
Move( offset );
1684 previewItem->
Move( offset );
1690 previewItem = static_cast<BOARD_ITEM*>( zone->Clone() );
1691 previewItem->
Move( offset );
1715 evt->SetPassEvent();
1720 evt->SetPassEvent();
1794 KIDIALOG dlg(
frame(),
_(
"The selected item is locked." ),
_(
"Confirmation" ),
1795 wxOK | wxCANCEL | wxICON_WARNING );
1796 dlg.SetOKLabel(
_(
"Break Track" ) );
1820 if( sizeDlg.ShowModal() == wxID_OK )
void Empty()
Clear the list.
static TOOL_ACTION selectionClear
Clear the current selection.
const wxString & FailureReason() const
PCB_LAYER_ID SelectOneLayer(PCB_LAYER_ID aDefaultLayer, LSET aNotAllowedLayersMask=LSET(), wxPoint aDlgPosition=wxDefaultPosition)
Show the dialog box for a layer selection.
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
virtual void ShowCursor(bool aEnabled)
Enable or disables display of cursor.
static TOOL_ACTION layerBottom
static bool ShowAlways(const SELECTION &aSelection)
The default condition function (always returns true).
void ShowMessageFor(const wxString &aMessage, int aTime, int aFlags=wxICON_INFORMATION)
Show the infobar with the provided message and icon for a specific period of time.
void Hide(VIEW_ITEM *aItem, bool aHide=true)
Temporarily hide the item in the view (e.g.
Base class for PNS router board items.
static TOOL_ACTION layerInner26
Contain all persistent settings of the router, such as the mode, optimization effort,...
void AddStandardSubMenus(TOOL_MENU &aMenu)
Construct a "basic" menu for a tool, containing only items that apply to all tools (e....
Container to handle a stock of specific vias each with unique diameter and drill sizes in the BOARD c...
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
wxString MessageTextFromValue(EDA_UNITS aUnits, int aValue, bool aAddUnitLabel, EDA_DATA_TYPE aType)
Convert a value to a string using double notation.
void SetMode(PNS_MODE aMode)
Return the optimizer effort. Bigger means cleaner traces, but slower routing.
void DoNotShowCheckbox(wxString file, int line)
Checks the 'do not show again' setting for the dialog.
void SetTrackWidthIndex(unsigned aIndex)
Set the current track width list index to aIndex.
void AddButton(wxButton *aButton)
Add an already created button to the infobar.
static TOOL_ACTION layerNext
static TOOL_ACTION layerInner2
static TOOL_ACTION selectLayerPair
A PLUGIN derivation for saving and loading Pcbnew s-expression formatted files.
int GetCurrentViaDrill() const
#define LEGACY_HK_NAME(x)
The Cairo implementation of the graphics abstraction layer.
const BOX2D & GetBoundary() const
static TOOL_ACTION layerInner5
Helper class to create more flexible dialogs, including 'do not show again' checkbox handling.
void SetCustomDiffPairViaGap(int aGap)
Sets custom via gap for differential pairs (i.e.
This file is part of the common library.
static TOOL_ACTION layerInner6
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
static TOOL_ACTION routerDiffPairDialog
std::vector< int > m_TrackWidthList
static TOOL_ACTION layerInner7
static TOOL_ACTION layerInner8
void AddToPreview(EDA_ITEM *aItem, bool aTakeOwnership=true)
const wxPoint & GetStart() const
static TOOL_ACTION layerInner21
std::vector< DIFF_PAIR_DIMENSION > m_DiffPairDimensionsList
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
void ClearViewDecorations()
static TOOL_ACTION dragFreeAngle
void UseCustomDiffPairDimensions(bool aEnabled)
Enables/disables custom differential pair dimensions.
static LSET AllNonCuMask()
Return a mask holding all layer minus CU layers.
static TOOL_ACTION cancelInteractive
static TOOL_ACTION properties
Activation of the edit tool.
int DiffPairWidth() const
bool IsPlacingVia() const
bool SetNetCode(int aNetCode, bool aNoAssert)
Set net using a net code.
class ARC, an arc track segment on a copper layer
bool Overlaps(const LAYER_RANGE &aOther) const
static TOOL_ACTION routerHighlightMode
Actions to enable switching modes via hotkey assignments.
const std::vector< int > GetCurrentNets() const
static LIB_PART * dummy()
Used to draw a dummy shape when a LIB_PART is not found in library.
GAL * GetGAL() const
Return the #GAL this view is using to draw graphical primitives.
static TOOL_ACTION trackViaSizeChanged
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
static TOOL_ACTION drag45Degree
virtual void SetCursorPosition(const VECTOR2D &aPosition, bool aWarpView=true, bool aTriggeredByArrows=false, long aArrowCommand=0)=0
Move cursor to the requested position expressed in world coordinates.
class FP_SHAPE, a footprint edge
void UndoRedoBlock(bool aBlock=true)
Enable/disable undo and redo operations.
void SetViaDrill(int aDrill)
bool m_ShowRouterDebugGraphics
Show PNS router debug graphics.
int CountType(KICAD_T aType)
Count the number of items matching aType.
LSEQ Seq(const PCB_LAYER_ID *aWishListSequence, unsigned aCount) const
Return an LSEQ from the union of this LSET and a desired sequence.
static TOOL_ACTION layerInner3
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
void Add(const LINE &aLine)
static TOOL_ACTION layerInner24
bool m_UseConnectedTrackWidth
void SetOrthoMode(bool aEnable)
Container to handle a stock of specific differential pairs each with unique track width,...
static TOOL_ACTION layerInner11
bool RemoveLoops() const
Enable/disable loop (redundant track) removal.
void SetCurrentCursor(KICURSOR cursor)
Set the current cursor shape for this panel.
search types array terminator (End Of Types)
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
void ToggleViaPlacement()
class TRACK, a track segment (segment on a copper layer)
const BITMAP_OPAQUE via_microvia_xpm[1]
static TOOL_ACTION layerTop
void ShowPreview(bool aShow=true)
void Append(EDA_ITEM *item)
Add an item to the end of the list.
virtual PCB_LAYER_ID GetActiveLayer() const
static TOOL_ACTION layerInner23
void SetViaSizeIndex(unsigned aIndex)
Set the current via size list index to aIndex.
int GetCount() const
Return the number of objects in the list.
bool GetGridSnapping() const
void SetAuxAxes(bool aEnable, const VECTOR2I &aOrigin=VECTOR2I(0, 0))
PCB_LAYER_ID
A quick note on layer IDs:
static TOOL_ACTION routerSettingsDialog
Activation of the Push and Shove settings dialogs.
LSET is a set of PCB_LAYER_IDs.
static TOOL_ACTION layerInner13
void BreakSegment(ITEM *aItem, const VECTOR2I &aP)
static TOOL_ACTION layerPrev
const BITMAP_OPAQUE select_w_layer_xpm[1]
ITEM * FindItemByParent(const BOARD_ITEM *aParent)
virtual void Move(const wxPoint &aMoveVector)
Move this object.
unsigned GetViaSizeIndex() const
static TOOL_ACTION layerInner25
static TOOL_ACTION layerInner18
virtual int GetTopLayer() const
bool UseNetClassVia() const
Return true if netclass values should be used to obtain appropriate via size.
void SetCustomDiffPairWidth(int aWidth)
Sets custom track width for differential pairs (i.e.
bool FixRoute(const VECTOR2I &aP, ITEM *aItem, bool aForceFinish=false)
unsigned GetTrackWidthIndex() const
void SetVisibleViewArea(const BOX2I &aExtents)
static TOOL_ACTION layerInner30
static TOOL_ACTION layerInner29
PNS_MODE Mode() const
Set the routing mode.
An interface for classes handling user events controlling the view behavior such as zooming,...
PCB_LAYER_ID m_Route_Layer_BOTTOM
static TOOL_ACTION layerInner10
virtual void ForceCursorPosition(bool aEnabled, const VECTOR2D &aPosition=VECTOR2D(0, 0))
Place the cursor immediately at a given point.
virtual bool IsType(const KICAD_T aScanTypes[]) const
Check whether the item is one of the listed types.
void SetLayerPair(PCB_LAYER_ID aTopLayer, PCB_LAYER_ID aBottomLayer)
Function SetLayerPair For a via m_layer contains the top layer, the other layer is in m_bottomLayer.
bool m_BlindBuriedViaAllowed
true to allow blind/buried vias
ZONE handles a list of polygons defining a copper zone.
void SetDiffPairIndex(unsigned aIndex)
bool GetFixAllSegments() const
virtual void SetActiveLayer(PCB_LAYER_ID aLayer)
void SetCustomDiffPairGap(int aGap)
Sets custom gap for differential pairs (i.e.
const BITMAP_OPAQUE via_buried_xpm[1]
const BITMAP_OPAQUE switch_corner_rounding_shape_xpm[1]
static TOOL_ACTION routerWalkaroundMode
void Move(const VECTOR2I &aP, ITEM *aItem)
static TOOL_ACTION layerInner15
const BITMAP_OPAQUE width_track_via_xpm[1]
static TOOL_ACTION routerInlineDrag
Activation of the Push and Shove router (inline dragging mode)
bool StartRouting(const VECTOR2I &aP, ITEM *aItem, int aLayer)
VECTOR2D ToScreen(const VECTOR2D &aCoord, bool aAbsolute=true) const
Convert a world space point/vector to a point/vector in screen space coordinates.
static TOOL_ACTION layerInner28
void RemoveAllButtons()
Remove all the buttons that have been added by the user.
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
virtual void SetAutoPan(bool aEnabled)
Turn on/off auto panning (this feature is used when there is a tool active (eg.
static TOOL_ACTION layerInner27
void SetViaType(VIATYPE aViaType)
bool Empty() const
Checks if there is anything selected.
static TOOL_ACTION inlineBreakTrack
Breaks track when router is not activated.
static TOOL_ACTION layerInner17
class FOOTPRINT, a footprint
static TOOL_ACTION breakTrack
Break a single track into two segments at the cursor.
static TOOL_ACTION layerInner20
static TOOL_ACTION pasteSpecial
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
#define STARTPOINT
When a line is selected, these flags indicate which.
int OKOrCancelDialog(wxWindow *aParent, const wxString &aWarning, const wxString &aMessage, wxString aDetailedMessage, wxString aOKLabel, wxString aCancelLabel, bool *aApplyToAll)
Display a warning dialog with aMessage and returns the user response.
A modified version of the wxInfoBar class that allows us to:
static const KICAD_T DraggableItems[]
A scan list for items that can be dragged.
static TOOL_ACTION layerInner22
int GetCurrentViaSize() const
static TOOL_ACTION layerChanged
VECTOR2< T > Rotate(double aAngle) const
Rotate the vector by a given angle.
void UpdateSizes(const SIZES_SETTINGS &aSizes)
Applies stored settings.
void SetUseGrid(bool aSnapToGrid)
void SetMode(ROUTER_MODE aMode)
STATUS_FLAGS IsPointOnEnds(const wxPoint &point, int min_dist=0) const
Function IsPointOnEnds returns STARTPOINT if point if near (dist = min_dist) start point,...
Common, abstract interface for edit frames.
static TOOL_ACTION routeSingleTrack
Activation of the Push and Shove router.
Used when the right click button is pressed, or when the select tool is in effect.
static TOOL_ACTION layerInner14
static TOOL_ACTION layerInner9
bool StartDragging(const VECTOR2I &aP, ITEM *aItem, int aDragMode=DM_ANY)
bool OfKind(int aKindMask) const
Return true if the item's type matches the mask aKindMask.
bool SwitchLayer(int layer)
The main frame for Pcbnew.
int Size() const
Returns the number of selected parts.
int DiffPairViaGap() const
PCB_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
void ShowInfoBarError(const wxString &aErrorMsg, bool aShowCloseButton=false)
Show the WX_INFOBAR displayed on the top of the canvas with a message and an error icon on the left o...
static TOOL_ACTION layerInner16
const wxPoint & GetEnd() const
std::vector< VIA_DIMENSION > m_ViasDimensionsList
bool IsCopperLayer(LAYER_NUM aLayerId)
Tests whether a layer is a copper layer.
WX_INFOBAR * GetInfoBar()
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
#define ENDPOINT
ends. (Used to support dragging.)
Implementing DIALOG_TRACK_VIA_SIZE_BASE.
static TOOL_ACTION layerInner4
class VIA, a via (like a track segment on a copper layer)
unsigned GetDiffPairIndex() const
virtual void Save(const wxString &aFileName, BOARD *aBoard, const PROPERTIES *aProperties=nullptr) override
Write aBoard to a storage file in a format that this PLUGIN implementation knows about or it can be u...
void AddLayerPair(int aL1, int aL2)
bool m_MicroViasAllowed
true to allow micro vias
const BITMAP_OPAQUE change_entry_orient_xpm[1]
bool RoutingInProgress() const
static TOOL_ACTION layerInner19
void SetViaDiameter(int aDiameter)
static TOOL_ACTION layerInner1
bool ImportSizes(PNS::SIZES_SETTINGS &aSizes, PNS::ITEM *aStartItem, int aNet) override
void SetViaType(VIATYPE aViaType)
static TOOL_ACTION routerShoveMode
int GetCopperLayerCount() const
OPT< int > PairedLayer(int aLayerId)
const BITMAP_OPAQUE width_track_xpm[1]
const BITMAP_OPAQUE via_xpm[1]
void SetActiveLayer(PCB_LAYER_ID aLayer) override
Change the currently active layer to aLayer and also update the APPEARANCE_CONTROLS.
ROUTING_SETTINGS & Settings()
const BITMAP_OPAQUE checked_ok_xpm[1]
PCB_LAYER_ID ToLAYER_ID(int aLayer)
std::shared_ptr< DRC_ENGINE > m_DRCEngine
static TOOL_ACTION selectionCursor
Select a single item under the cursor position.
EDA_UNITS GetUserUnits() const
Return the user units currently in use.
Represent a contiguous set of PCB layers.
const LAYER_RANGE & Layers() const
PCB_LAYER_ID m_Route_Layer_TOP
void UseCustomTrackViaSize(bool aEnabled)
Enables/disables custom track/via size settings.
VECTOR2D GetCursorPosition() const
Return the current cursor position in world coordinates.
static TOOL_ACTION layerInner12
KICAD_T Type() const
Returns the type of object.
Abstract interface for drawing on a 2D-surface.
Container for design settings for a BOARD object.
static TOOL_ACTION layerToggle
int GetCurrentLayer() const
static TOOL_ACTION routeDiffPair
Activation of the Push and Shove router (differential pair mode)