Separate meander settings from target length/skew.

Settings move to Board Setup, while target length is sourced from
the custom rules (or a text-entry dialog if no rules are active for
the track).

Target skew is sourced from the coupled-trace-length minus the
trace-to-be-tuned length.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12075

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15826
This commit is contained in:
Jeff Young 2023-10-06 19:40:49 +01:00
parent b9e1908ffe
commit 420cadab34
24 changed files with 6239 additions and 83 deletions

View File

@ -34,6 +34,7 @@ WX_UNIT_ENTRY_DIALOG::WX_UNIT_ENTRY_DIALOG( EDA_DRAW_FRAME* aParent, const wxStr
m_label->SetLabel( aLabel );
m_unit_binder.SetValue( aDefaultValue );
SetInitialFocus( m_textCtrl );
SetupStandardButtons();
}
@ -56,10 +57,10 @@ WX_PT_ENTRY_DIALOG::WX_PT_ENTRY_DIALOG( EDA_DRAW_FRAME* aParent, const wxString&
m_unit_binder_x.SetValue( aDefaultValue.x );
m_unit_binder_y.SetValue( aDefaultValue.y );
SetInitialFocus( m_textCtrlX );
SetupStandardButtons();
}
VECTOR2I WX_PT_ENTRY_DIALOG::GetValue()
{
return VECTOR2I( m_unit_binder_x.GetIntValue(), m_unit_binder_y.GetIntValue() );

View File

@ -35,6 +35,7 @@
#include <widgets/ui_common.h>
#include <zone_settings.h>
#include <teardrop/teardrop_parameters.h>
#include <router/pns_meander.h>
#define DEFAULT_SILK_LINE_WIDTH 0.1
@ -644,6 +645,10 @@ public:
*/
TEARDROP_PARAMETERS_LIST m_TeardropParamsList;
PNS::MEANDER_SETTINGS m_singleTrackMeanderSettings;
PNS::MEANDER_SETTINGS m_diffPairMeanderSettings;
PNS::MEANDER_SETTINGS m_skewMeanderSettings;
VIATYPE m_CurrentViaType; ///< (VIA_BLIND_BURIED, VIA_THROUGH, VIA_MICROVIA)
bool m_UseConnectedTrackWidth; // use width of existing track when creating a new,

View File

@ -35,7 +35,7 @@
#include <widgets/unit_binder.h>
#include "dialog_unit_entry_base.h"
#include "../../common/dialogs/dialog_unit_entry_base.h"
class WX_UNIT_ENTRY_DIALOG : public WX_UNIT_ENTRY_DIALOG_BASE
{

View File

@ -106,6 +106,8 @@ set( PCBNEW_DIALOGS
dialogs/dialog_rule_area_properties.cpp
dialogs/dialog_rule_area_properties_base.cpp
dialogs/dialog_layer_selection_base.cpp
dialogs/dialog_meander_properties.cpp
dialogs/dialog_meander_properties_base.cpp
dialogs/dialog_move_exact.cpp
dialogs/dialog_move_exact_base.cpp
dialogs/dialog_net_inspector.cpp
@ -143,8 +145,8 @@ set( PCBNEW_DIALOGS
dialogs/dialog_unused_pad_layers_base.cpp
dialogs/dialog_update_pcb.cpp
dialogs/dialog_update_pcb_base.cpp
dialogs/panel_pcb_display_options.cpp
dialogs/panel_pcb_display_options_base.cpp
dialogs/panel_pcb_display_options.cpp
dialogs/panel_pcb_display_options_base.cpp
dialogs/panel_edit_options.cpp
dialogs/panel_edit_options_base.cpp
dialogs/panel_fp_lib_table.cpp
@ -165,6 +167,8 @@ set( PCBNEW_DIALOGS
dialogs/panel_setup_formatting_base.cpp
dialogs/panel_setup_mask_and_paste.cpp
dialogs/panel_setup_mask_and_paste_base.cpp
dialogs/panel_setup_meanders.cpp
dialogs/panel_setup_meanders_base.cpp
dialogs/panel_setup_layers.cpp
dialogs/panel_setup_layers_base.cpp
dialogs/panel_setup_rules.cpp

View File

@ -596,6 +596,74 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std:
},
{} ) );
m_params.emplace_back( new PARAM_LAMBDA<nlohmann::json>( "meander_settings",
[&]() -> nlohmann::json
{
nlohmann::json js = {};
auto make_settings =
[]( const PNS::MEANDER_SETTINGS& aSettings )
{
nlohmann::json entry = {};
entry["min_amplitude"] = pcbIUScale.IUTomm( aSettings.m_minAmplitude );
entry["max_amplitude"] = pcbIUScale.IUTomm( aSettings.m_maxAmplitude );
entry["spacing"] = pcbIUScale.IUTomm( aSettings.m_spacing );
entry["corner_style"] = aSettings.m_cornerStyle == PNS::MEANDER_STYLE_CHAMFER ? 0 : 1;
entry["corner_radius_percentage"] = aSettings.m_cornerRadiusPercentage;
entry["single_sided"] = aSettings.m_singleSided;
return entry;
};
js["single_track_meander_defaults"] = make_settings( m_singleTrackMeanderSettings );
js["diff_pair_meander_defaults"] = make_settings( m_diffPairMeanderSettings );
js["skew_meander_defaults"] = make_settings( m_skewMeanderSettings );
return js;
},
[&]( const nlohmann::json& aObj )
{
auto read_settings =
[]( const nlohmann::json& entry ) -> PNS::MEANDER_SETTINGS
{
PNS::MEANDER_SETTINGS settings;
if( entry.contains( "min_amplitude" ) )
settings.m_minAmplitude = pcbIUScale.mmToIU( entry["min_amplitude"].get<double>() );
if( entry.contains( "max_amplitude" ) )
settings.m_maxAmplitude = pcbIUScale.mmToIU( entry["max_amplitude"].get<double>() );
if( entry.contains( "spacing" ) )
settings.m_spacing = pcbIUScale.mmToIU( entry["spacing"].get<double>() );
if( entry.contains( "corner_style" ) )
{
settings.m_cornerStyle = entry["corner_style"] == 0 ? PNS::MEANDER_STYLE_CHAMFER
: PNS::MEANDER_STYLE_ROUND;
}
if( entry.contains( "corner_radius_percentage" ) )
settings.m_cornerRadiusPercentage = entry["corner_radius_percentage"].get<int>();
if( entry.contains( "single_sided" ) )
settings.m_singleSided = entry["single_sided"].get<bool>();
return settings;
};
if( aObj.contains( "single_track_meander_defaults" ) )
m_singleTrackMeanderSettings = read_settings( aObj["single_track_meander_defaults"] );
if( aObj.contains( "diff_pair_meander_defaults" ) )
m_diffPairMeanderSettings = read_settings( aObj["diff_pair_meander_defaults"] );
if( aObj.contains( "skew_meander_defaults" ) )
m_skewMeanderSettings = read_settings( aObj["skew_meander_defaults"] );
},
{} ) );
int minTextSize = pcbIUScale.MilsToIU( TEXT_MIN_SIZE_MILS );
int maxTextSize = pcbIUScale.MilsToIU( TEXT_MAX_SIZE_MILS );
int minStroke = 1;

View File

@ -20,7 +20,6 @@
#include <panel_setup_layers.h>
#include <panel_setup_text_and_graphics.h>
#include <panel_setup_constraints.h>
#include <dialogs/panel_setup_netclasses.h>
#include <panel_setup_tracks_and_vias.h>
#include <panel_setup_mask_and_paste.h>
#include <../board_stackup_manager/panel_board_stackup.h>
@ -32,6 +31,10 @@
#include <dialog_import_settings.h>
#include <io_mgr.h>
#include <dialogs/panel_setup_severities.h>
#include <dialogs/panel_setup_rules.h>
#include <dialogs/panel_setup_teardrops.h>
#include <dialogs/panel_setup_meanders.h>
#include <dialogs/panel_setup_netclasses.h>
#include <panel_text_variables.h>
#include <project.h>
#include <project/project_file.h>
@ -41,8 +44,6 @@
#include <wildcards_and_files_ext.h>
#include "dialog_board_setup.h"
#include "panel_setup_rules.h"
#include "panel_setup_teardrops.h"
std::mutex DIALOG_BOARD_SETUP::g_Mutex;
@ -66,6 +67,7 @@ DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP( PCB_EDIT_FRAME* aFrame ) :
m_constraintsPage( 0 ),
m_tracksAndViasPage( 0 ),
m_teardropsPage( 0 ),
m_meandersPage( 0 ),
m_netclassesPage( 0 ),
m_severitiesPage( 0 )
@ -158,6 +160,18 @@ DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP( PCB_EDIT_FRAME* aFrame ) :
return new PANEL_SETUP_TEARDROPS( aParent, m_frame );
}, _( "Teardrops" ) );
m_meandersPage = m_treebook->GetPageCount();
m_treebook->AddLazySubPage(
[this]( wxWindow* aParent ) -> wxWindow*
{
BOARD_DESIGN_SETTINGS& bds = m_frame->GetBoard()->GetDesignSettings();
return new PANEL_SETUP_MEANDERS( aParent, m_frame,
bds.m_singleTrackMeanderSettings,
bds.m_diffPairMeanderSettings,
bds.m_skewMeanderSettings );
}, _( "Meanders" ) );
m_netclassesPage = m_treebook->GetPageCount();
m_treebook->AddLazySubPage(
[this]( wxWindow* aParent ) -> wxWindow*

View File

@ -68,6 +68,7 @@ private:
size_t m_constraintsPage;
size_t m_tracksAndViasPage;
size_t m_teardropsPage;
size_t m_meandersPage;
size_t m_netclassesPage;
size_t m_severitiesPage;
};

View File

@ -0,0 +1,90 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "dialog_meander_properties.h"
#include <router/pns_meander_placer.h>
#include <widgets/text_ctrl_eval.h>
#include <bitmaps.h>
#include <eda_draw_frame.h>
DIALOG_MEANDER_PROPERTIES::DIALOG_MEANDER_PROPERTIES( EDA_DRAW_FRAME* aFrame,
PNS::MEANDER_SETTINGS& aSettings,
PNS::ROUTER_MODE aMeanderType ) :
DIALOG_MEANDER_PROPERTIES_BASE( aFrame ),
m_minA( aFrame, m_track_minALabel, m_minACtrl, m_minAUnits ),
m_maxA( aFrame, m_maxALabel, m_maxACtrl, m_maxAUnits ),
m_spacing( aFrame, m_spacingLabel, m_spacingCtrl, m_spacingUnits ),
m_r( aFrame, m_rLabel, m_rCtrl, m_rUnits ),
m_settings( aSettings )
{
m_r.SetUnits( EDA_UNITS::PERCENT );
switch( aMeanderType )
{
case PNS::PNS_MODE_TUNE_SINGLE:
m_legend->SetBitmap( KiBitmap( BITMAPS::tune_single_track_length_legend ) );
break;
case PNS::PNS_MODE_TUNE_DIFF_PAIR:
m_legend->SetBitmap( KiBitmap( BITMAPS::tune_diff_pair_length_legend ) );
m_r.Enable( false );
break;
case PNS::PNS_MODE_TUNE_DIFF_PAIR_SKEW:
m_legend->SetBitmap( KiBitmap( BITMAPS::tune_diff_pair_skew_legend ) );
break;
default:
break;
}
// Bitmap has a new size, so recalculate sizes
GetSizer()->SetSizeHints(this);
SetupStandardButtons();
GetSizer()->SetSizeHints(this);
Centre();
}
bool DIALOG_MEANDER_PROPERTIES::TransferDataToWindow()
{
m_minA.SetValue( m_settings.m_minAmplitude );
m_maxA.SetValue( m_settings.m_maxAmplitude );
m_spacing.SetValue( m_settings.m_spacing );
m_cornerCtrl->SetSelection( m_settings.m_cornerStyle == PNS::MEANDER_STYLE_ROUND ? 1 : 0 );
m_r.SetValue( m_settings.m_cornerRadiusPercentage );
m_singleSided->SetValue( m_settings.m_singleSided );
return true;
}
bool DIALOG_MEANDER_PROPERTIES::TransferDataFromWindow()
{
m_settings.m_minAmplitude = m_minA.GetIntValue();
m_settings.m_maxAmplitude = m_maxA.GetIntValue();
m_settings.m_spacing = m_spacing.GetIntValue();
m_settings.m_cornerStyle = m_cornerCtrl->GetSelection() ? PNS::MEANDER_STYLE_ROUND
: PNS::MEANDER_STYLE_CHAMFER;
m_settings.m_cornerRadiusPercentage = m_r.GetValue();
m_settings.m_singleSided = m_singleSided->GetValue();
return true;
}

View File

@ -0,0 +1,54 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.or/licenses/>.
*/
#ifndef DIALOG_MEANDER_PROPERTIES_H
#define DIALOG_MEANDER_PROPERTIES_H
#include "dialog_meander_properties_base.h"
#include <widgets/unit_binder.h>
#include <router/pns_router.h>
namespace PNS {
class MEANDER_SETTINGS;
}
class DIALOG_MEANDER_PROPERTIES : public DIALOG_MEANDER_PROPERTIES_BASE
{
public:
DIALOG_MEANDER_PROPERTIES( EDA_DRAW_FRAME* aParent, PNS::MEANDER_SETTINGS& aSettings,
PNS::ROUTER_MODE aMeanderType );
private:
bool TransferDataToWindow() override;
bool TransferDataFromWindow() override;
private:
UNIT_BINDER m_minA;
UNIT_BINDER m_maxA;
UNIT_BINDER m_spacing;
UNIT_BINDER m_r;
PNS::MEANDER_SETTINGS& m_settings;
};
#endif // DIALOG_MEANDER_PROPERTIES_H

View File

@ -0,0 +1,157 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "widgets/text_ctrl_eval.h"
#include "dialog_meander_properties_base.h"
///////////////////////////////////////////////////////////////////////////
DIALOG_MEANDER_PROPERTIES_BASE::DIALOG_MEANDER_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* singleTrackSizer;
singleTrackSizer = new wxBoxSizer( wxHORIZONTAL );
m_legend = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
singleTrackSizer->Add( m_legend, 0, wxEXPAND|wxRIGHT|wxLEFT, 15 );
wxFlexGridSizer* fgSizer31;
fgSizer31 = new wxFlexGridSizer( 0, 5, 5, 5 );
fgSizer31->AddGrowableCol( 1 );
fgSizer31->SetFlexibleDirection( wxBOTH );
fgSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_track_minALabel = new wxStaticText( this, wxID_ANY, _("Amplitude (A) min:"), wxDefaultPosition, wxDefaultSize, 0 );
m_track_minALabel->Wrap( -1 );
fgSizer31->Add( m_track_minALabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
wxBoxSizer* bSizer8;
bSizer8 = new wxBoxSizer( wxHORIZONTAL );
m_minACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer8->Add( m_minACtrl, 1, 0, 5 );
m_minAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_minAUnits->Wrap( -1 );
bSizer8->Add( m_minAUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
fgSizer31->Add( bSizer8, 1, wxEXPAND, 5 );
m_maxALabel = new wxStaticText( this, wxID_ANY, _("Max:"), wxDefaultPosition, wxDefaultSize, 0 );
m_maxALabel->Wrap( -1 );
fgSizer31->Add( m_maxALabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 );
m_maxACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer31->Add( m_maxACtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_maxAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_maxAUnits->Wrap( -1 );
fgSizer31->Add( m_maxAUnits, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_spacingLabel = new wxStaticText( this, wxID_ANY, _("Spacing (s):"), wxDefaultPosition, wxDefaultSize, 0 );
m_spacingLabel->Wrap( -1 );
fgSizer31->Add( m_spacingLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
wxBoxSizer* bSizer9;
bSizer9 = new wxBoxSizer( wxHORIZONTAL );
m_spacingCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_spacingCtrl->SetToolTip( _("Minimum spacing between adjacent meander segments. The resulting spacing may be greater based on design rules.") );
bSizer9->Add( m_spacingCtrl, 1, wxALIGN_CENTER_VERTICAL, 5 );
m_spacingUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_spacingUnits->Wrap( -1 );
bSizer9->Add( m_spacingUnits, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
fgSizer31->Add( bSizer9, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer31->Add( 0, 5, 1, wxEXPAND, 5 );
m_cornerLabel = new wxStaticText( this, wxID_ANY, _("Corner style:"), wxDefaultPosition, wxDefaultSize, 0 );
m_cornerLabel->Wrap( -1 );
fgSizer31->Add( m_cornerLabel, 1, wxALIGN_CENTER_VERTICAL, 5 );
wxString m_cornerCtrlChoices[] = { _("Chamfer"), _("Fillet") };
int m_cornerCtrlNChoices = sizeof( m_cornerCtrlChoices ) / sizeof( wxString );
m_cornerCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_cornerCtrlNChoices, m_cornerCtrlChoices, 0 );
m_cornerCtrl->SetSelection( 0 );
fgSizer31->Add( m_cornerCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_rLabel = new wxStaticText( this, wxID_ANY, _("Radius (r):"), wxDefaultPosition, wxDefaultSize, 0 );
m_rLabel->Wrap( -1 );
fgSizer31->Add( m_rLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 );
m_rCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer31->Add( m_rCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_rUnits = new wxStaticText( this, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
m_rUnits->Wrap( -1 );
fgSizer31->Add( m_rUnits, 0, wxALIGN_CENTER_VERTICAL, 5 );
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
m_singleSided = new wxCheckBox( this, wxID_ANY, _("Single-sided"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer31->Add( m_singleSided, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
singleTrackSizer->Add( fgSizer31, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bMainSizer->Add( singleTrackSizer, 1, wxEXPAND|wxTOP, 5 );
m_stdButtons = new wxStdDialogButtonSizer();
m_stdButtonsOK = new wxButton( this, wxID_OK );
m_stdButtons->AddButton( m_stdButtonsOK );
m_stdButtonsCancel = new wxButton( this, wxID_CANCEL );
m_stdButtons->AddButton( m_stdButtonsCancel );
m_stdButtons->Realize();
bMainSizer->Add( m_stdButtons, 0, wxEXPAND|wxALL, 5 );
this->SetSizer( bMainSizer );
this->Layout();
bMainSizer->Fit( this );
}
DIALOG_MEANDER_PROPERTIES_BASE::~DIALOG_MEANDER_PROPERTIES_BASE()
{
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,71 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#pragma once
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class TEXT_CTRL_EVAL;
#include "dialog_shim.h"
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/statbmp.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/sizer.h>
#include <wx/choice.h>
#include <wx/checkbox.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_MEANDER_PROPERTIES_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_MEANDER_PROPERTIES_BASE : public DIALOG_SHIM
{
private:
protected:
wxStaticBitmap* m_legend;
wxStaticText* m_track_minALabel;
wxTextCtrl* m_minACtrl;
wxStaticText* m_minAUnits;
wxStaticText* m_maxALabel;
wxTextCtrl* m_maxACtrl;
wxStaticText* m_maxAUnits;
wxStaticText* m_spacingLabel;
wxTextCtrl* m_spacingCtrl;
wxStaticText* m_spacingUnits;
wxStaticText* m_cornerLabel;
wxChoice* m_cornerCtrl;
wxStaticText* m_rLabel;
TEXT_CTRL_EVAL* m_rCtrl;
wxStaticText* m_rUnits;
wxCheckBox* m_singleSided;
wxStdDialogButtonSizer* m_stdButtons;
wxButton* m_stdButtonsOK;
wxButton* m_stdButtonsCancel;
public:
DIALOG_MEANDER_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Meander Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_MEANDER_PROPERTIES_BASE();
};

View File

@ -0,0 +1,110 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <panel_setup_meanders.h>
#include <router/pns_meander_placer.h>
#include <widgets/text_ctrl_eval.h>
#include <bitmaps.h>
#include <eda_draw_frame.h>
PANEL_SETUP_MEANDERS::PANEL_SETUP_MEANDERS( wxWindow* aParent, EDA_DRAW_FRAME* aFrame,
PNS::MEANDER_SETTINGS& aTrackSettings,
PNS::MEANDER_SETTINGS& aDiffPairSettings,
PNS::MEANDER_SETTINGS& aSkewSettings ) :
PANEL_SETUP_MEANDERS_BASE( aParent ),
m_track_minA( aFrame, m_track_minALabel, m_track_minACtrl, m_track_minAUnits ),
m_track_maxA( aFrame, m_track_maxALabel, m_track_maxACtrl, m_track_maxAUnits ),
m_track_spacing( aFrame, m_track_spacingLabel, m_track_spacingCtrl, m_track_spacingUnits ),
m_track_r( aFrame, m_track_rLabel, m_track_rCtrl, m_track_rUnits ),
m_dp_minA( aFrame, m_dp_minALabel, m_dp_minACtrl, m_dp_minAUnits ),
m_dp_maxA( aFrame, m_dp_maxALabel, m_dp_maxACtrl, m_dp_maxAUnits ),
m_dp_spacing( aFrame, m_dp_spacingLabel, m_dp_spacingCtrl, m_dp_spacingUnits ),
m_dp_r( aFrame, m_dp_rLabel, m_dp_rCtrl, m_dp_rUnits ),
m_skew_minA( aFrame, m_skew_minALabel, m_skew_minACtrl, m_skew_minAUnits ),
m_skew_maxA( aFrame, m_skew_maxALabel, m_skew_maxACtrl, m_skew_maxAUnits ),
m_skew_spacing( aFrame, m_skew_spacingLabel, m_skew_spacingCtrl, m_skew_spacingUnits ),
m_skew_r( aFrame, m_skew_rLabel, m_skew_rCtrl, m_skew_rUnits ),
m_trackSettings( aTrackSettings ),
m_dpSettings( aDiffPairSettings ),
m_skewSettings( aSkewSettings )
{
m_singleTrackLegend->SetBitmap( KiBitmap( BITMAPS::tune_single_track_length_legend ) );
m_diffPairLegend->SetBitmap( KiBitmap( BITMAPS::tune_diff_pair_length_legend ) );
m_skewLegend->SetBitmap( KiBitmap( BITMAPS::tune_diff_pair_skew_legend ) );
m_track_r.SetUnits( EDA_UNITS::PERCENT );
m_dp_r.SetUnits( EDA_UNITS::PERCENT );
m_skew_r.SetUnits( EDA_UNITS::PERCENT );
}
bool PANEL_SETUP_MEANDERS::TransferDataToWindow()
{
m_track_minA.SetValue( m_trackSettings.m_minAmplitude );
m_track_maxA.SetValue( m_trackSettings.m_maxAmplitude );
m_track_spacing.SetValue( m_trackSettings.m_spacing );
m_track_cornerCtrl->SetSelection( m_trackSettings.m_cornerStyle == PNS::MEANDER_STYLE_ROUND ? 1 : 0 );
m_track_r.SetValue( m_trackSettings.m_cornerRadiusPercentage );
m_track_singleSided->SetValue( m_trackSettings.m_singleSided );
m_dp_minA.SetValue( m_dpSettings.m_minAmplitude );
m_dp_maxA.SetValue( m_dpSettings.m_maxAmplitude );
m_dp_spacing.SetValue( m_dpSettings.m_spacing );
m_dp_cornerCtrl->SetSelection( m_dpSettings.m_cornerStyle == PNS::MEANDER_STYLE_ROUND ? 1 : 0 );
m_dp_r.SetValue( 100 );
m_dp_singleSided->SetValue( m_dpSettings.m_singleSided );
m_skew_minA.SetValue( m_skewSettings.m_minAmplitude );
m_skew_maxA.SetValue( m_skewSettings.m_maxAmplitude );
m_skew_spacing.SetValue( m_skewSettings.m_spacing );
m_skew_cornerCtrl->SetSelection( m_skewSettings.m_cornerStyle == PNS::MEANDER_STYLE_ROUND ? 1 : 0 );
m_skew_r.SetValue( m_skewSettings.m_cornerRadiusPercentage );
return true;
}
bool PANEL_SETUP_MEANDERS::TransferDataFromWindow()
{
m_trackSettings.m_minAmplitude = m_track_minA.GetIntValue();
m_trackSettings.m_maxAmplitude = m_track_maxA.GetIntValue();
m_trackSettings.m_spacing = m_track_spacing.GetIntValue();
m_trackSettings.m_cornerStyle = m_track_cornerCtrl->GetSelection() ? PNS::MEANDER_STYLE_ROUND
: PNS::MEANDER_STYLE_CHAMFER;
m_trackSettings.m_cornerRadiusPercentage = m_track_r.GetValue();
m_trackSettings.m_singleSided = m_track_singleSided->GetValue();
m_dpSettings.m_minAmplitude = m_dp_minA.GetIntValue();
m_dpSettings.m_maxAmplitude = m_dp_maxA.GetIntValue();
m_dpSettings.m_spacing = m_dp_spacing.GetIntValue();
m_dpSettings.m_cornerStyle = m_dp_cornerCtrl->GetSelection() ? PNS::MEANDER_STYLE_ROUND
: PNS::MEANDER_STYLE_CHAMFER;
// TODO: fix diff-pair meandering so we can use non-100% radii
m_dpSettings.m_cornerRadiusPercentage = 100;
m_dpSettings.m_singleSided = m_dp_singleSided->GetValue();
m_skewSettings.m_minAmplitude = m_skew_minA.GetIntValue();
m_skewSettings.m_maxAmplitude = m_skew_maxA.GetIntValue();
m_skewSettings.m_spacing = m_skew_spacing.GetIntValue();
m_skewSettings.m_cornerStyle = m_skew_cornerCtrl->GetSelection() ? PNS::MEANDER_STYLE_ROUND
: PNS::MEANDER_STYLE_CHAMFER;
m_skewSettings.m_cornerRadiusPercentage = m_skew_r.GetValue();
return true;
}

View File

@ -0,0 +1,66 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.or/licenses/>.
*/
#ifndef PANEL_SETUP_MEANDERS_H
#define PANEL_SETUP_MEANDERS_H
#include <panel_setup_meanders_base.h>
#include <widgets/unit_binder.h>
namespace PNS {
class MEANDER_SETTINGS;
}
class PANEL_SETUP_MEANDERS : public PANEL_SETUP_MEANDERS_BASE
{
public:
PANEL_SETUP_MEANDERS( wxWindow* aParent, EDA_DRAW_FRAME* aFrame,
PNS::MEANDER_SETTINGS& aTrackSettings,
PNS::MEANDER_SETTINGS& aDiffPairSettings,
PNS::MEANDER_SETTINGS& aSkewSettings );
private:
bool TransferDataToWindow() override;
bool TransferDataFromWindow() override;
private:
UNIT_BINDER m_track_minA;
UNIT_BINDER m_track_maxA;
UNIT_BINDER m_track_spacing;
UNIT_BINDER m_track_r;
UNIT_BINDER m_dp_minA;
UNIT_BINDER m_dp_maxA;
UNIT_BINDER m_dp_spacing;
UNIT_BINDER m_dp_r;
UNIT_BINDER m_skew_minA;
UNIT_BINDER m_skew_maxA;
UNIT_BINDER m_skew_spacing;
UNIT_BINDER m_skew_r;
PNS::MEANDER_SETTINGS& m_trackSettings;
PNS::MEANDER_SETTINGS& m_dpSettings;
PNS::MEANDER_SETTINGS& m_skewSettings;
};
#endif // PANEL_SETUP_MEANDERS_H

View File

@ -0,0 +1,408 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "widgets/text_ctrl_eval.h"
#include "panel_setup_meanders_base.h"
///////////////////////////////////////////////////////////////////////////
PANEL_SETUP_MEANDERS_BASE::PANEL_SETUP_MEANDERS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
{
wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxVERTICAL );
m_singleTrackLabel = new wxStaticText( this, wxID_ANY, _("Default properties for single-track meanders:"), wxDefaultPosition, wxDefaultSize, 0 );
m_singleTrackLabel->Wrap( -1 );
bMainSizer->Add( m_singleTrackLabel, 0, wxTOP|wxRIGHT|wxLEFT, 8 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bMainSizer->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM, 10 );
wxBoxSizer* singleTrackSizer;
singleTrackSizer = new wxBoxSizer( wxHORIZONTAL );
m_singleTrackLegend = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
singleTrackSizer->Add( m_singleTrackLegend, 0, wxEXPAND|wxRIGHT|wxLEFT, 15 );
wxFlexGridSizer* fgSizer3;
fgSizer3 = new wxFlexGridSizer( 0, 5, 5, 5 );
fgSizer3->AddGrowableCol( 1 );
fgSizer3->SetFlexibleDirection( wxBOTH );
fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_track_minALabel = new wxStaticText( this, wxID_ANY, _("Amplitude (A) min:"), wxDefaultPosition, wxDefaultSize, 0 );
m_track_minALabel->Wrap( -1 );
fgSizer3->Add( m_track_minALabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
wxBoxSizer* bSizer8;
bSizer8 = new wxBoxSizer( wxHORIZONTAL );
m_track_minACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer8->Add( m_track_minACtrl, 1, 0, 5 );
m_track_minAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_track_minAUnits->Wrap( -1 );
bSizer8->Add( m_track_minAUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
fgSizer3->Add( bSizer8, 1, wxEXPAND, 5 );
m_track_maxALabel = new wxStaticText( this, wxID_ANY, _("Max:"), wxDefaultPosition, wxDefaultSize, 0 );
m_track_maxALabel->Wrap( -1 );
fgSizer3->Add( m_track_maxALabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 );
m_track_maxACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer3->Add( m_track_maxACtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_track_maxAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_track_maxAUnits->Wrap( -1 );
fgSizer3->Add( m_track_maxAUnits, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_track_spacingLabel = new wxStaticText( this, wxID_ANY, _("Spacing (s):"), wxDefaultPosition, wxDefaultSize, 0 );
m_track_spacingLabel->Wrap( -1 );
fgSizer3->Add( m_track_spacingLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
wxBoxSizer* bSizer9;
bSizer9 = new wxBoxSizer( wxHORIZONTAL );
m_track_spacingCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_track_spacingCtrl->SetToolTip( _("Minimum spacing between adjacent meander segments. The resulting spacing may be greater based on design rules.") );
bSizer9->Add( m_track_spacingCtrl, 1, wxALIGN_CENTER_VERTICAL, 5 );
m_track_spacingUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_track_spacingUnits->Wrap( -1 );
bSizer9->Add( m_track_spacingUnits, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
fgSizer3->Add( bSizer9, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer3->Add( 0, 5, 1, wxEXPAND, 5 );
m_track_cornerLabel = new wxStaticText( this, wxID_ANY, _("Corner style:"), wxDefaultPosition, wxDefaultSize, 0 );
m_track_cornerLabel->Wrap( -1 );
fgSizer3->Add( m_track_cornerLabel, 1, wxALIGN_CENTER_VERTICAL, 5 );
wxString m_track_cornerCtrlChoices[] = { _("Chamfer"), _("Fillet") };
int m_track_cornerCtrlNChoices = sizeof( m_track_cornerCtrlChoices ) / sizeof( wxString );
m_track_cornerCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_track_cornerCtrlNChoices, m_track_cornerCtrlChoices, 0 );
m_track_cornerCtrl->SetSelection( 0 );
fgSizer3->Add( m_track_cornerCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_track_rLabel = new wxStaticText( this, wxID_ANY, _("Radius (r):"), wxDefaultPosition, wxDefaultSize, 0 );
m_track_rLabel->Wrap( -1 );
fgSizer3->Add( m_track_rLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 );
m_track_rCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer3->Add( m_track_rCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_track_rUnits = new wxStaticText( this, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
m_track_rUnits->Wrap( -1 );
fgSizer3->Add( m_track_rUnits, 0, wxALIGN_CENTER_VERTICAL, 5 );
fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
m_track_singleSided = new wxCheckBox( this, wxID_ANY, _("Single-sided"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer3->Add( m_track_singleSided, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
singleTrackSizer->Add( fgSizer3, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bMainSizer->Add( singleTrackSizer, 0, wxEXPAND|wxRIGHT, 5 );
bMainSizer->Add( 0, 10, 0, wxEXPAND, 5 );
m_diffPairsLabel = new wxStaticText( this, wxID_ANY, _("Default properties for differential-pair meanders:"), wxDefaultPosition, wxDefaultSize, 0 );
m_diffPairsLabel->Wrap( -1 );
bMainSizer->Add( m_diffPairsLabel, 0, wxTOP|wxRIGHT|wxLEFT, 8 );
m_staticline11 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bMainSizer->Add( m_staticline11, 0, wxEXPAND|wxBOTTOM, 10 );
wxBoxSizer* diffPairSizer;
diffPairSizer = new wxBoxSizer( wxHORIZONTAL );
m_diffPairLegend = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
diffPairSizer->Add( m_diffPairLegend, 0, wxEXPAND|wxRIGHT|wxLEFT, 15 );
wxFlexGridSizer* fgSizer32;
fgSizer32 = new wxFlexGridSizer( 0, 5, 5, 5 );
fgSizer32->AddGrowableCol( 1 );
fgSizer32->SetFlexibleDirection( wxBOTH );
fgSizer32->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_dp_minALabel = new wxStaticText( this, wxID_ANY, _("Amplitude (A) min:"), wxDefaultPosition, wxDefaultSize, 0 );
m_dp_minALabel->Wrap( -1 );
fgSizer32->Add( m_dp_minALabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
wxBoxSizer* bSizer81;
bSizer81 = new wxBoxSizer( wxHORIZONTAL );
m_dp_minACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer81->Add( m_dp_minACtrl, 1, 0, 5 );
m_dp_minAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_dp_minAUnits->Wrap( -1 );
bSizer81->Add( m_dp_minAUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
fgSizer32->Add( bSizer81, 1, wxEXPAND, 5 );
m_dp_maxALabel = new wxStaticText( this, wxID_ANY, _("Max:"), wxDefaultPosition, wxDefaultSize, 0 );
m_dp_maxALabel->Wrap( -1 );
fgSizer32->Add( m_dp_maxALabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 );
m_dp_maxACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer32->Add( m_dp_maxACtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_dp_maxAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_dp_maxAUnits->Wrap( -1 );
fgSizer32->Add( m_dp_maxAUnits, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_dp_spacingLabel = new wxStaticText( this, wxID_ANY, _("Spacing (s):"), wxDefaultPosition, wxDefaultSize, 0 );
m_dp_spacingLabel->Wrap( -1 );
fgSizer32->Add( m_dp_spacingLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
wxBoxSizer* bSizer91;
bSizer91 = new wxBoxSizer( wxHORIZONTAL );
m_dp_spacingCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_dp_spacingCtrl->SetToolTip( _("Minimum spacing between adjacent meander segments. The resulting spacing may be greater based on design rules.") );
bSizer91->Add( m_dp_spacingCtrl, 1, wxALIGN_CENTER_VERTICAL, 5 );
m_dp_spacingUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_dp_spacingUnits->Wrap( -1 );
bSizer91->Add( m_dp_spacingUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
fgSizer32->Add( bSizer91, 1, wxEXPAND, 5 );
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer32->Add( 0, 5, 1, wxEXPAND, 5 );
m_dp_cornerLabel = new wxStaticText( this, wxID_ANY, _("Corner style:"), wxDefaultPosition, wxDefaultSize, 0 );
m_dp_cornerLabel->Wrap( -1 );
fgSizer32->Add( m_dp_cornerLabel, 1, wxALIGN_CENTER_VERTICAL, 5 );
wxString m_dp_cornerCtrlChoices[] = { _("Chamfer"), _("Fillet") };
int m_dp_cornerCtrlNChoices = sizeof( m_dp_cornerCtrlChoices ) / sizeof( wxString );
m_dp_cornerCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_dp_cornerCtrlNChoices, m_dp_cornerCtrlChoices, 0 );
m_dp_cornerCtrl->SetSelection( 0 );
fgSizer32->Add( m_dp_cornerCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_dp_rLabel = new wxStaticText( this, wxID_ANY, _("Radius (r):"), wxDefaultPosition, wxDefaultSize, 0 );
m_dp_rLabel->Wrap( -1 );
m_dp_rLabel->Enable( false );
fgSizer32->Add( m_dp_rLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 );
m_dp_rCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_dp_rCtrl->Enable( false );
fgSizer32->Add( m_dp_rCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_dp_rUnits = new wxStaticText( this, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
m_dp_rUnits->Wrap( -1 );
m_dp_rUnits->Enable( false );
fgSizer32->Add( m_dp_rUnits, 0, wxALIGN_CENTER_VERTICAL, 5 );
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 );
m_dp_singleSided = new wxCheckBox( this, wxID_ANY, _("Single-sided"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer32->Add( m_dp_singleSided, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 );
diffPairSizer->Add( fgSizer32, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bMainSizer->Add( diffPairSizer, 0, wxEXPAND|wxRIGHT, 5 );
bMainSizer->Add( 0, 10, 0, wxEXPAND, 5 );
m_diffPairsLabel1 = new wxStaticText( this, wxID_ANY, _("Default properties for differential-pair skews:"), wxDefaultPosition, wxDefaultSize, 0 );
m_diffPairsLabel1->Wrap( -1 );
bMainSizer->Add( m_diffPairsLabel1, 0, wxTOP|wxRIGHT|wxLEFT, 8 );
m_staticline111 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bMainSizer->Add( m_staticline111, 0, wxEXPAND|wxBOTTOM, 10 );
wxBoxSizer* skewSizer;
skewSizer = new wxBoxSizer( wxHORIZONTAL );
m_skewLegend = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
skewSizer->Add( m_skewLegend, 0, wxEXPAND|wxRIGHT|wxLEFT, 15 );
wxFlexGridSizer* fgSizer31;
fgSizer31 = new wxFlexGridSizer( 0, 5, 5, 5 );
fgSizer31->AddGrowableCol( 1 );
fgSizer31->SetFlexibleDirection( wxBOTH );
fgSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_skew_minALabel = new wxStaticText( this, wxID_ANY, _("Amplitude (A) min:"), wxDefaultPosition, wxDefaultSize, 0 );
m_skew_minALabel->Wrap( -1 );
fgSizer31->Add( m_skew_minALabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
wxBoxSizer* bSizer82;
bSizer82 = new wxBoxSizer( wxHORIZONTAL );
m_skew_minACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer82->Add( m_skew_minACtrl, 1, 0, 5 );
m_skew_minAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_skew_minAUnits->Wrap( -1 );
bSizer82->Add( m_skew_minAUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
fgSizer31->Add( bSizer82, 1, wxEXPAND, 5 );
m_skew_maxALabel = new wxStaticText( this, wxID_ANY, _("Max:"), wxDefaultPosition, wxDefaultSize, 0 );
m_skew_maxALabel->Wrap( -1 );
fgSizer31->Add( m_skew_maxALabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 );
m_skew_maxACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer31->Add( m_skew_maxACtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_skew_maxAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_skew_maxAUnits->Wrap( -1 );
fgSizer31->Add( m_skew_maxAUnits, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_skew_spacingLabel = new wxStaticText( this, wxID_ANY, _("Spacing (s):"), wxDefaultPosition, wxDefaultSize, 0 );
m_skew_spacingLabel->Wrap( -1 );
fgSizer31->Add( m_skew_spacingLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
wxBoxSizer* bSizer92;
bSizer92 = new wxBoxSizer( wxHORIZONTAL );
m_skew_spacingCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_skew_spacingCtrl->SetToolTip( _("Minimum spacing between adjacent meander segments. The resulting spacing may be greater based on design rules.") );
bSizer92->Add( m_skew_spacingCtrl, 1, wxALIGN_CENTER_VERTICAL, 5 );
m_skew_spacingUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_skew_spacingUnits->Wrap( -1 );
bSizer92->Add( m_skew_spacingUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
fgSizer31->Add( bSizer92, 1, wxEXPAND, 5 );
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer31->Add( 0, 5, 1, wxEXPAND, 5 );
m_skew_cornerLabel = new wxStaticText( this, wxID_ANY, _("Corner style:"), wxDefaultPosition, wxDefaultSize, 0 );
m_skew_cornerLabel->Wrap( -1 );
fgSizer31->Add( m_skew_cornerLabel, 1, wxALIGN_CENTER_VERTICAL, 5 );
wxString m_skew_cornerCtrlChoices[] = { _("Chamfer"), _("Fillet") };
int m_skew_cornerCtrlNChoices = sizeof( m_skew_cornerCtrlChoices ) / sizeof( wxString );
m_skew_cornerCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_skew_cornerCtrlNChoices, m_skew_cornerCtrlChoices, 0 );
m_skew_cornerCtrl->SetSelection( 0 );
fgSizer31->Add( m_skew_cornerCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_skew_rLabel = new wxStaticText( this, wxID_ANY, _("Radius (r):"), wxDefaultPosition, wxDefaultSize, 0 );
m_skew_rLabel->Wrap( -1 );
fgSizer31->Add( m_skew_rLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 );
m_skew_rCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer31->Add( m_skew_rCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_skew_rUnits = new wxStaticText( this, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
m_skew_rUnits->Wrap( -1 );
fgSizer31->Add( m_skew_rUnits, 0, wxALIGN_CENTER_VERTICAL, 5 );
skewSizer->Add( fgSizer31, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bMainSizer->Add( skewSizer, 0, wxEXPAND|wxRIGHT, 5 );
this->SetSizer( bMainSizer );
this->Layout();
bMainSizer->Fit( this );
}
PANEL_SETUP_MEANDERS_BASE::~PANEL_SETUP_MEANDERS_BASE()
{
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,104 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#pragma once
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class TEXT_CTRL_EVAL;
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/statline.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/statbmp.h>
#include <wx/textctrl.h>
#include <wx/sizer.h>
#include <wx/choice.h>
#include <wx/checkbox.h>
#include <wx/panel.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class PANEL_SETUP_MEANDERS_BASE
///////////////////////////////////////////////////////////////////////////////
class PANEL_SETUP_MEANDERS_BASE : public wxPanel
{
private:
protected:
wxStaticText* m_singleTrackLabel;
wxStaticLine* m_staticline1;
wxStaticBitmap* m_singleTrackLegend;
wxStaticText* m_track_minALabel;
wxTextCtrl* m_track_minACtrl;
wxStaticText* m_track_minAUnits;
wxStaticText* m_track_maxALabel;
wxTextCtrl* m_track_maxACtrl;
wxStaticText* m_track_maxAUnits;
wxStaticText* m_track_spacingLabel;
wxTextCtrl* m_track_spacingCtrl;
wxStaticText* m_track_spacingUnits;
wxStaticText* m_track_cornerLabel;
wxChoice* m_track_cornerCtrl;
wxStaticText* m_track_rLabel;
TEXT_CTRL_EVAL* m_track_rCtrl;
wxStaticText* m_track_rUnits;
wxCheckBox* m_track_singleSided;
wxStaticText* m_diffPairsLabel;
wxStaticLine* m_staticline11;
wxStaticBitmap* m_diffPairLegend;
wxStaticText* m_dp_minALabel;
wxTextCtrl* m_dp_minACtrl;
wxStaticText* m_dp_minAUnits;
wxStaticText* m_dp_maxALabel;
wxTextCtrl* m_dp_maxACtrl;
wxStaticText* m_dp_maxAUnits;
wxStaticText* m_dp_spacingLabel;
wxTextCtrl* m_dp_spacingCtrl;
wxStaticText* m_dp_spacingUnits;
wxStaticText* m_dp_cornerLabel;
wxChoice* m_dp_cornerCtrl;
wxStaticText* m_dp_rLabel;
TEXT_CTRL_EVAL* m_dp_rCtrl;
wxStaticText* m_dp_rUnits;
wxCheckBox* m_dp_singleSided;
wxStaticText* m_diffPairsLabel1;
wxStaticLine* m_staticline111;
wxStaticBitmap* m_skewLegend;
wxStaticText* m_skew_minALabel;
wxTextCtrl* m_skew_minACtrl;
wxStaticText* m_skew_minAUnits;
wxStaticText* m_skew_maxALabel;
wxTextCtrl* m_skew_maxACtrl;
wxStaticText* m_skew_maxAUnits;
wxStaticText* m_skew_spacingLabel;
wxTextCtrl* m_skew_spacingCtrl;
wxStaticText* m_skew_spacingUnits;
wxStaticText* m_skew_cornerLabel;
wxChoice* m_skew_cornerCtrl;
wxStaticText* m_skew_rLabel;
TEXT_CTRL_EVAL* m_skew_rCtrl;
wxStaticText* m_skew_rUnits;
public:
PANEL_SETUP_MEANDERS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
~PANEL_SETUP_MEANDERS_BASE();
};

View File

@ -20,18 +20,19 @@
*/
#include <class_draw_panel_gal.h>
#include <dialogs/dialog_pns_length_tuning_settings.h>
#include <dialogs/dialog_unit_entry.h>
#include <kiplatform/ui.h>
#include <tool/tool_manager.h>
#include <tools/pcb_actions.h>
#include <tools/zone_filler_tool.h>
#include <tools/tool_event_utils.h>
#include <board_design_settings.h>
#include "pns_router.h"
#include "pns_meander_placer.h" // fixme: move settings to separate header
#include "pns_tune_status_popup.h"
#include "length_tuner_tool.h"
#include <bitmaps.h>
#include <tools/tool_event_utils.h>
using namespace KIGFX;
@ -100,6 +101,12 @@ bool LENGTH_TUNER_TOOL::Init()
{
m_inLengthTuner = false;
auto tuning =
[&]( const SELECTION& )
{
return m_router->RoutingInProgress();
};
auto& menu = m_menu.GetMenu();
menu.SetTitle( _( "Length Tuner" ) );
@ -110,11 +117,10 @@ bool LENGTH_TUNER_TOOL::Init()
menu.AddSeparator();
menu.AddItem( ACT_SpacingIncrease, SELECTION_CONDITIONS::ShowAlways );
menu.AddItem( ACT_SpacingDecrease, SELECTION_CONDITIONS::ShowAlways );
menu.AddItem( ACT_AmplIncrease, SELECTION_CONDITIONS::ShowAlways );
menu.AddItem( ACT_AmplDecrease, SELECTION_CONDITIONS::ShowAlways );
menu.AddItem( PCB_ACTIONS::lengthTunerSettingsDialog, SELECTION_CONDITIONS::ShowAlways );
menu.AddItem( ACT_SpacingIncrease, tuning );
menu.AddItem( ACT_SpacingDecrease, tuning );
menu.AddItem( ACT_AmplIncrease, tuning );
menu.AddItem( ACT_AmplDecrease, tuning );
return true;
}
@ -162,9 +168,53 @@ void LENGTH_TUNER_TOOL::performTuning()
return;
}
auto placer = static_cast<PNS::MEANDER_PLACER_BASE*>( m_router->Placer() );
BOARD_DESIGN_SETTINGS& bds = board()->GetDesignSettings();
PNS::MEANDER_PLACER_BASE* placer = static_cast<PNS::MEANDER_PLACER_BASE*>( m_router->Placer() );
PNS::MEANDER_SETTINGS* settings = nullptr;
switch( m_lastTuneMode )
{
case PNS::PNS_MODE_TUNE_SINGLE: settings = &bds.m_singleTrackMeanderSettings; break;
case PNS::PNS_MODE_TUNE_DIFF_PAIR: settings = &bds.m_diffPairMeanderSettings; break;
case PNS::PNS_MODE_TUNE_DIFF_PAIR_SKEW: settings = &bds.m_skewMeanderSettings; break;
default:
wxFAIL_MSG( wxT( "Unsupported tuning mode." ) );
m_router->StopRouting();
highlightNets( false );
return;
}
if( m_lastTuneMode == PNS::PNS_MODE_TUNE_SINGLE
|| m_lastTuneMode == PNS::PNS_MODE_TUNE_DIFF_PAIR )
{
std::shared_ptr<DRC_ENGINE>& drcEngine = bds.m_DRCEngine;
DRC_CONSTRAINT constraint;
constraint = drcEngine->EvalRules( LENGTH_CONSTRAINT, m_startItem->Parent(), nullptr,
ToLAYER_ID( layer ) );
if( constraint.IsNull() )
{
WX_UNIT_ENTRY_DIALOG dlg( frame(), _( "Length Tuning" ), _( "Target length:" ),
100 * PCB_IU_PER_MM );
if( dlg.ShowModal() != wxID_OK )
{
m_router->StopRouting();
highlightNets( false );
return;
}
settings->m_targetLength = dlg.GetValue();
}
else
{
settings->m_targetLength = constraint.GetValue().Opt();
}
}
placer->UpdateSettings( *settings );
placer->UpdateSettings( m_savedMeanderSettings );
frame()->UndoRedoBlock( true );
VECTOR2I end = getViewControls()->GetMousePosition();
@ -238,13 +288,6 @@ void LENGTH_TUNER_TOOL::performTuning()
m_router->Move( end, nullptr );
updateStatusPopup( statusPopup );
}
else if( evt->IsAction( &PCB_ACTIONS::lengthTunerSettingsDialog ) )
{
statusPopup.Hide();
TOOL_EVENT dummy;
meanderSettingsDialog( dummy );
statusPopup.Show();
}
// TODO: It'd be nice to be able to say "don't allow any non-trivial editing actions",
// but we don't at present have that, so we just knock out some of the egregious ones.
else if( ZONE_FILLER_TOOL::IsZoneFillAction( evt ) )
@ -270,14 +313,9 @@ void LENGTH_TUNER_TOOL::performTuning()
void LENGTH_TUNER_TOOL::setTransitions()
{
Go( &LENGTH_TUNER_TOOL::MainLoop, PCB_ACTIONS::routerTuneSingleTrace.MakeEvent() );
Go( &LENGTH_TUNER_TOOL::MainLoop, PCB_ACTIONS::routerTuneDiffPair.MakeEvent() );
Go( &LENGTH_TUNER_TOOL::MainLoop,
PCB_ACTIONS::routerTuneDiffPairSkew.MakeEvent() );
// in case tool is inactive, otherwise the event is handled in the tool loop
Go( &LENGTH_TUNER_TOOL::meanderSettingsDialog,
PCB_ACTIONS::lengthTunerSettingsDialog.MakeEvent() );
Go( &LENGTH_TUNER_TOOL::MainLoop, PCB_ACTIONS::routerTuneSingleTrace.MakeEvent() );
Go( &LENGTH_TUNER_TOOL::MainLoop, PCB_ACTIONS::routerTuneDiffPair.MakeEvent() );
Go( &LENGTH_TUNER_TOOL::MainLoop, PCB_ACTIONS::routerTuneDiffPairSkew.MakeEvent() );
}
@ -335,11 +373,6 @@ int LENGTH_TUNER_TOOL::MainLoop( const TOOL_EVENT& aEvent )
updateStartItem( *evt );
performTuning();
}
else if( evt->IsAction( &PCB_ACTIONS::lengthTunerSettingsDialog ) )
{
TOOL_EVENT dummy;
meanderSettingsDialog( dummy );
}
else if( evt->IsClick( BUT_RIGHT ) )
{
m_menu.ShowContextMenu( selection() );
@ -357,22 +390,3 @@ int LENGTH_TUNER_TOOL::MainLoop( const TOOL_EVENT& aEvent )
frame()->PopTool( aEvent );
return 0;
}
int LENGTH_TUNER_TOOL::meanderSettingsDialog( const TOOL_EVENT& aEvent )
{
PNS::MEANDER_PLACER_BASE* placer = static_cast<PNS::MEANDER_PLACER_BASE*>( m_router->Placer() );
PNS::MEANDER_SETTINGS settings = placer ? placer->MeanderSettings() : m_savedMeanderSettings;
DIALOG_PNS_LENGTH_TUNING_SETTINGS settingsDlg( frame(), settings, m_lastTuneMode );
if( settingsDlg.ShowModal() == wxID_OK )
{
if( placer )
placer->UpdateSettings( settings );
m_savedMeanderSettings = settings;
}
return 0;
}

View File

@ -47,9 +47,7 @@ private:
void performTuning();
void updateStatusPopup( PNS_TUNE_STATUS_POPUP& aPopup );
int meanderSettingsDialog( const TOOL_EVENT& aEvent );
PNS::MEANDER_SETTINGS m_savedMeanderSettings;
private:
PNS::ROUTER_MODE m_lastTuneMode;
bool m_inLengthTuner;
};

View File

@ -108,14 +108,18 @@ bool MEANDER_SKEW_PLACER::Start( const VECTOR2I& aP, ITEM* aStartItem )
if ( m_originPair.NetP() == m_originLine.Net() )
{
m_coupledLength = m_padToDieN + lineLength( m_tunedPathN, m_startPad_n, m_endPad_n );
m_lastLength = m_padToDieP + lineLength( m_tunedPathP, m_startPad_p, m_endPad_p );
m_tunedPath = m_tunedPathP;
}
else
{
m_coupledLength = m_padToDieP + lineLength( m_tunedPathP, m_startPad_p, m_endPad_p );
m_lastLength = m_padToDieN + lineLength( m_tunedPathN, m_startPad_n, m_endPad_n );
m_tunedPath = m_tunedPathN;
}
m_targetSkew = (int) currentSkew();
return true;
}
@ -160,7 +164,7 @@ bool MEANDER_SKEW_PLACER::Move( const VECTOR2I& aP, ITEM* aEndItem )
}
}
return doMove( aP, aEndItem, m_coupledLength + m_settings.m_targetSkew );
return doMove( aP, aEndItem, m_coupledLength + m_targetSkew );
}
@ -185,7 +189,7 @@ const wxString MEANDER_SKEW_PLACER::TuningInfo( EDA_UNITS aUnits ) const
status += EDA_UNIT_UTILS::UI::MessageTextFromValue( pcbIUScale, aUnits, m_lastLength - m_coupledLength );
status += wxT( "/" );
status += EDA_UNIT_UTILS::UI::MessageTextFromValue( pcbIUScale, aUnits, m_settings.m_targetSkew );
status += EDA_UNIT_UTILS::UI::MessageTextFromValue( pcbIUScale, aUnits, m_targetSkew );
return status;
}

View File

@ -62,6 +62,7 @@ private:
long long int m_coupledLength;
int m_padToDieP;
int m_padToDieN;
int m_targetSkew;
};
}

View File

@ -479,18 +479,6 @@ void PCB_EDIT_FRAME::ReCreateVToolbar()
m_drawToolBar->AddToolContextMenu( PCB_ACTIONS::routeSingleTrack, makeRouteMenu() );
m_drawToolBar->AddToolContextMenu( PCB_ACTIONS::routeDiffPair, makeRouteMenu() );
auto makeTuneMenu =
[&]()
{
std::unique_ptr<ACTION_MENU> tuneMenu = std::make_unique<ACTION_MENU>( false, selTool );
tuneMenu->Add( PCB_ACTIONS::lengthTunerSettingsDialog );
return tuneMenu;
};
m_drawToolBar->AddToolContextMenu( PCB_ACTIONS::routerTuneSingleTrace, makeTuneMenu() );
m_drawToolBar->AddToolContextMenu( PCB_ACTIONS::routerTuneDiffPair, makeTuneMenu() );
m_drawToolBar->AddToolContextMenu( PCB_ACTIONS::routerTuneDiffPairSkew, makeTuneMenu() );
std::unique_ptr<ACTION_MENU> zoneMenu = std::make_unique<ACTION_MENU>( false, selTool );
zoneMenu->Add( PCB_ACTIONS::zoneFillAll );
zoneMenu->Add( PCB_ACTIONS::zoneUnfillAll );

View File

@ -2352,16 +2352,6 @@ TOOL_ACTION PCB_ACTIONS::dragFreeAngle( TOOL_ACTION_ARGS()
// LENGTH_TUNER_TOOL
//
TOOL_ACTION PCB_ACTIONS::lengthTunerSettingsDialog( TOOL_ACTION_ARGS()
.Name( "pcbnew.LengthTuner.Settings" )
.Scope( AS_CONTEXT )
.DefaultHotkey( MD_CTRL + 'L' )
// Don't be tempted to remove "Modern Toolset only". It's in the legacy property name.
.LegacyHotkeyName( "Length Tuning Settings (Modern Toolset only)" )
.MenuText( _( "Length Tuning Settings..." ) )
.Tooltip( _( "Sets the length tuning parameters for currently routed item." ) )
.Icon( BITMAPS::router_len_tuner_setup ) );
TOOL_ACTION PCB_ACTIONS::ddAppendBoard( TOOL_ACTION_ARGS()
.Name( "pcbnew.Control.DdAppendBoard" )
.Scope( AS_GLOBAL ) );

View File

@ -257,7 +257,6 @@ public:
/// Activation of the Push and Shove settings dialogs
static TOOL_ACTION routerSettingsDialog;
static TOOL_ACTION routerDiffPairDialog;
static TOOL_ACTION lengthTunerSettingsDialog;
/// Actions to enable switching modes via hotkey assignments
static TOOL_ACTION routerHighlightMode;