Use "tuning pattern" in the GUI.

This commit is contained in:
Jeff Young 2023-10-15 17:02:15 +01:00
parent 6baac175c5
commit 2450250ae7
27 changed files with 148 additions and 2520 deletions

View File

@ -109,8 +109,6 @@ 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
@ -125,8 +123,6 @@ set( PCBNEW_DIALOGS
dialogs/dialog_plot_base.cpp
dialogs/dialog_pns_diff_pair_dimensions.cpp
dialogs/dialog_pns_diff_pair_dimensions_base.cpp
dialogs/dialog_pns_length_tuning_settings.cpp
dialogs/dialog_pns_length_tuning_settings_base.cpp
dialogs/dialog_pns_settings.cpp
dialogs/dialog_pns_settings_base.cpp
dialogs/dialog_position_relative.cpp
@ -144,6 +140,8 @@ set( PCBNEW_DIALOGS
dialogs/dialog_track_via_properties_base.cpp
dialogs/dialog_track_via_size.cpp
dialogs/dialog_track_via_size_base.cpp
dialogs/dialog_tuning_pattern_properties.cpp
dialogs/dialog_tuning_pattern_properties_base.cpp
dialogs/dialog_unused_pad_layers.cpp
dialogs/dialog_unused_pad_layers_base.cpp
dialogs/dialog_update_pcb.cpp
@ -170,8 +168,6 @@ 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
@ -182,6 +178,8 @@ set( PCBNEW_DIALOGS
dialogs/panel_setup_text_and_graphics_base.cpp
dialogs/panel_setup_tracks_and_vias.cpp
dialogs/panel_setup_tracks_and_vias_base.cpp
dialogs/panel_setup_tuning_patterns.cpp
dialogs/panel_setup_tuning_patterns_base.cpp
footprint_wizard.cpp
footprint_wizard_frame.cpp
footprint_wizard_frame_functions.cpp

View File

@ -596,7 +596,7 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std:
},
{} ) );
m_params.emplace_back( new PARAM_LAMBDA<nlohmann::json>( "meander_settings",
m_params.emplace_back( new PARAM_LAMBDA<nlohmann::json>( "tuning_pattern_settings",
[&]() -> nlohmann::json
{
nlohmann::json js = {};
@ -616,9 +616,9 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std:
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 );
js["single_track_defaults"] = make_settings( m_singleTrackMeanderSettings );
js["diff_pair_defaults"] = make_settings( m_diffPairMeanderSettings );
js["diff_pair_skew_defaults"] = make_settings( m_skewMeanderSettings );
return js;
},
@ -653,14 +653,14 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std:
return settings;
};
if( aObj.contains( "single_track_meander_defaults" ) )
m_singleTrackMeanderSettings = read_settings( aObj["single_track_meander_defaults"] );
if( aObj.contains( "single_track_defaults" ) )
m_singleTrackMeanderSettings = read_settings( aObj["single_track_defaults"] );
if( aObj.contains( "diff_pair_meander_defaults" ) )
m_diffPairMeanderSettings = read_settings( aObj["diff_pair_meander_defaults"] );
if( aObj.contains( "diff_pair_defaults" ) )
m_diffPairMeanderSettings = read_settings( aObj["diff_pair_defaults"] );
if( aObj.contains( "skew_meander_defaults" ) )
m_skewMeanderSettings = read_settings( aObj["skew_meander_defaults"] );
if( aObj.contains( "diff_pair_skew_defaults" ) )
m_skewMeanderSettings = read_settings( aObj["diff_pair_skew_defaults"] );
},
{} ) );

View File

@ -33,7 +33,7 @@
#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_tuning_patterns.h>
#include <dialogs/panel_setup_netclasses.h>
#include <panel_text_variables.h>
#include <project.h>
@ -67,7 +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_tuningPatternsPage( 0 ),
m_netclassesPage( 0 ),
m_severitiesPage( 0 )
@ -160,17 +160,17 @@ 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_tuningPatternsPage = 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,
return new PANEL_SETUP_TUNING_PATTERNS( aParent, m_frame,
bds.m_singleTrackMeanderSettings,
bds.m_diffPairMeanderSettings,
bds.m_skewMeanderSettings );
}, _( "Length Tuning Patterns" ) );
}, _( "Length-tuning Patterns" ) );
m_netclassesPage = m_treebook->GetPageCount();
m_treebook->AddLazySubPage(

View File

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

View File

@ -1,149 +0,0 @@
/*
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2014-2018 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
* 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/>.
*/
/**
* Length tuner settings dialog.
*/
#include "dialog_pns_length_tuning_settings.h"
#include <router/pns_meander_placer.h>
#include <widgets/text_ctrl_eval.h>
#include <bitmaps.h>
#include <eda_draw_frame.h>
DIALOG_PNS_LENGTH_TUNING_SETTINGS::DIALOG_PNS_LENGTH_TUNING_SETTINGS( EDA_DRAW_FRAME* aParent,
PNS::MEANDER_SETTINGS& aSettings,
PNS::ROUTER_MODE aMode ) :
DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE( aParent ),
m_minAmpl( aParent, m_minAmplLabel, m_minAmplText, m_minAmplUnit ),
m_maxAmpl( aParent, m_maxAmplLabel, m_maxAmplText, m_maxAmplUnit ),
m_spacing( aParent, m_spacingLabel, m_spacingText, m_spacingUnit ),
m_targetLength( aParent, m_targetLengthLabel, m_targetLengthText, m_targetLengthUnit ),
m_radius( aParent, m_radiusLabel, m_radiusText, m_radiusUnit ),
m_settings( aSettings ),
m_mode( aMode )
{
m_targetLengthText->SetSelection( -1, -1 );
m_targetLengthText->SetFocus();
m_radius.SetUnits( EDA_UNITS::PERCENT );
SetupStandardButtons();
GetSizer()->SetSizeHints(this);
Centre();
}
bool DIALOG_PNS_LENGTH_TUNING_SETTINGS::TransferDataToWindow()
{
if( !wxDialog::TransferDataToWindow() )
return false;
if( m_mode == PNS::PNS_MODE_TUNE_DIFF_PAIR )
{
// TODO: fix diff-pair meandering so we can use non-100% radii
m_radiusText->SetValue( wxT( "100" ) );
m_radiusText->Enable( false );
}
else
{
m_radiusText->SetValue( wxString::Format( wxT( "%i" ), m_settings.m_cornerRadiusPercentage ) );
}
m_minAmpl.SetValue( m_settings.m_minAmplitude );
m_maxAmpl.SetValue( m_settings.m_maxAmplitude );
m_spacing.SetValue( m_settings.m_spacing );
m_singleSidedCheck->SetValue( m_settings.m_singleSided );
m_miterStyle->SetSelection( m_settings.m_cornerStyle == PNS::MEANDER_STYLE_ROUND ? 1 : 0 );
switch( m_mode )
{
case PNS::PNS_MODE_TUNE_SINGLE:
SetTitle( _( "Single Track Length Tuning" ) );
m_legend->SetBitmap( KiBitmap( BITMAPS::tune_single_track_length_legend ) );
m_targetLength.SetValue( m_settings.m_targetLength );
break;
case PNS::PNS_MODE_TUNE_DIFF_PAIR:
SetTitle( _( "Differential Pair Length Tuning" ) );
m_legend->SetBitmap( KiBitmap( BITMAPS::tune_diff_pair_length_legend ) );
m_targetLength.SetValue( m_settings.m_targetLength );
break;
case PNS::PNS_MODE_TUNE_DIFF_PAIR_SKEW:
SetTitle( _( "Differential Pair Skew Tuning" ) );
m_legend->SetBitmap( KiBitmap( BITMAPS::tune_diff_pair_skew_legend ) );
m_targetLengthLabel->SetLabel( _( "Target skew:" ) + wxS( " " ) );
m_targetLength.SetValue( m_settings.m_targetSkew );
break;
default:
break;
}
// Bitmap has a new size, so recalculate sizes
GetSizer()->SetSizeHints(this);
return true;
}
bool DIALOG_PNS_LENGTH_TUNING_SETTINGS::AcceptOptions( )
{
if( !m_minAmpl.Validate( 0, std::numeric_limits<int>::max() ) )
return false;
if( !m_maxAmpl.Validate( m_minAmpl.GetValue(), std::numeric_limits<int>::max() ) )
return false;
if( !m_spacing.Validate( 0, std::numeric_limits<int>::max() ) )
return false;
if( !m_targetLength.Validate( 0, static_cast<double>( std::numeric_limits<long long int>::max() ) ) )
return false;
if( !m_radius.Validate( 0, 100 ) )
return false;
return true;
}
bool DIALOG_PNS_LENGTH_TUNING_SETTINGS::TransferDataFromWindow()
{
if( !AcceptOptions() || !wxDialog::TransferDataToWindow() )
return false;
m_settings.m_minAmplitude = m_minAmpl.GetValue();
m_settings.m_maxAmplitude = m_maxAmpl.GetValue();
m_settings.m_spacing = m_spacing.GetValue();
m_settings.m_cornerRadiusPercentage = m_radius.GetValue();
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();
if( m_settings.m_maxAmplitude < m_settings.m_minAmplitude )
m_settings.m_maxAmplitude = m_settings.m_minAmplitude;
m_settings.m_singleSided = m_singleSidedCheck->GetValue();
m_settings.m_cornerStyle = m_miterStyle->GetSelection() ?
PNS::MEANDER_STYLE_ROUND : PNS::MEANDER_STYLE_CHAMFER;
return true;
}

View File

@ -1,62 +0,0 @@
/*
* KiRouter - a push-and-(sometimes-)shove PCB router
*
* Copyright (C) 2014-2018 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
* 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/>.
*/
/**
* Push and Shove router settings dialog.
*/
#ifndef __dialog_pns_length_tuning_settings__
#define __dialog_pns_length_tuning_settings__
#include "dialog_pns_length_tuning_settings_base.h"
#include <widgets/unit_binder.h>
#include <router/pns_router.h>
namespace PNS {
class MEANDER_SETTINGS;
}
class DIALOG_PNS_LENGTH_TUNING_SETTINGS : public DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE
{
public:
DIALOG_PNS_LENGTH_TUNING_SETTINGS( EDA_DRAW_FRAME* aParent, PNS::MEANDER_SETTINGS& aSettings, PNS::ROUTER_MODE aMode );
private:
bool TransferDataToWindow() override;
bool TransferDataFromWindow() override;
bool AcceptOptions();
UNIT_BINDER m_minAmpl;
UNIT_BINDER m_maxAmpl;
UNIT_BINDER m_spacing;
UNIT_BINDER m_targetLength;
UNIT_BINDER m_radius;
PNS::MEANDER_SETTINGS& m_settings;
PNS::ROUTER_MODE m_mode;
};
#endif // __dialog_pns_settings__

View File

@ -1,200 +0,0 @@
///////////////////////////////////////////////////////////////////////////
// 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_pns_length_tuning_settings_base.h"
///////////////////////////////////////////////////////////////////////////
DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE::DIALOG_PNS_LENGTH_TUNING_SETTINGS_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 );
wxStaticBoxSizer* sbSizerUpper;
sbSizerUpper = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Length / Skew") ), wxVERTICAL );
wxFlexGridSizer* fgSizerLenSkew;
fgSizerLenSkew = new wxFlexGridSizer( 0, 3, 0, 0 );
fgSizerLenSkew->AddGrowableCol( 1 );
fgSizerLenSkew->SetFlexibleDirection( wxBOTH );
fgSizerLenSkew->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticText4 = new wxStaticText( sbSizerUpper->GetStaticBox(), wxID_ANY, _("Tune from:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText4->Wrap( -1 );
m_staticText4->Hide();
fgSizerLenSkew->Add( m_staticText4, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
wxArrayString m_choicePathFromChoices;
m_choicePathFrom = new wxChoice( sbSizerUpper->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePathFromChoices, 0 );
m_choicePathFrom->SetSelection( 0 );
m_choicePathFrom->Hide();
fgSizerLenSkew->Add( m_choicePathFrom, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
fgSizerLenSkew->Add( 0, 0, 0, 0, 5 );
m_staticText15 = new wxStaticText( sbSizerUpper->GetStaticBox(), wxID_ANY, _("Tune to:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText15->Wrap( -1 );
m_staticText15->Hide();
fgSizerLenSkew->Add( m_staticText15, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
wxArrayString m_choice4Choices;
m_choice4 = new wxChoice( sbSizerUpper->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choice4Choices, 0 );
m_choice4->SetSelection( 0 );
m_choice4->Hide();
fgSizerLenSkew->Add( m_choice4, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
fgSizerLenSkew->Add( 0, 0, 0, 0, 5 );
m_staticText3 = new wxStaticText( sbSizerUpper->GetStaticBox(), wxID_ANY, _("Constraint:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText3->Wrap( -1 );
m_staticText3->Hide();
fgSizerLenSkew->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
wxString m_constraintSourceChoices[] = { _("From Design Rules"), _("Manual") };
int m_constraintSourceNChoices = sizeof( m_constraintSourceChoices ) / sizeof( wxString );
m_constraintSource = new wxChoice( sbSizerUpper->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_constraintSourceNChoices, m_constraintSourceChoices, 0 );
m_constraintSource->SetSelection( 1 );
m_constraintSource->Enable( false );
m_constraintSource->Hide();
fgSizerLenSkew->Add( m_constraintSource, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
fgSizerLenSkew->Add( 0, 0, 0, 0, 5 );
m_targetLengthLabel = new wxStaticText( sbSizerUpper->GetStaticBox(), wxID_ANY, _("Target length:"), wxDefaultPosition, wxDefaultSize, 0 );
m_targetLengthLabel->Wrap( -1 );
fgSizerLenSkew->Add( m_targetLengthLabel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_targetLengthText = new wxTextCtrl( sbSizerUpper->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerLenSkew->Add( m_targetLengthText, 0, wxALL|wxEXPAND, 5 );
m_targetLengthUnit = new wxStaticText( sbSizerUpper->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_targetLengthUnit->Wrap( -1 );
fgSizerLenSkew->Add( m_targetLengthUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
sbSizerUpper->Add( fgSizerLenSkew, 1, wxEXPAND, 5 );
bMainSizer->Add( sbSizerUpper, 0, wxEXPAND|wxALL, 10 );
wxStaticBoxSizer* sbSizerLower;
sbSizerLower = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Meandering") ), wxHORIZONTAL );
m_legend = new wxStaticBitmap( sbSizerLower->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
sbSizerLower->Add( m_legend, 0, wxALL|wxEXPAND, 5 );
wxFlexGridSizer* fgSizer3;
fgSizer3 = new wxFlexGridSizer( 0, 3, 0, 0 );
fgSizer3->AddGrowableCol( 1 );
fgSizer3->SetFlexibleDirection( wxBOTH );
fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_minAmplLabel = new wxStaticText( sbSizerLower->GetStaticBox(), wxID_ANY, _("Min amplitude (A):"), wxDefaultPosition, wxDefaultSize, 0 );
m_minAmplLabel->Wrap( -1 );
fgSizer3->Add( m_minAmplLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_minAmplText = new wxTextCtrl( sbSizerLower->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer3->Add( m_minAmplText, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_minAmplUnit = new wxStaticText( sbSizerLower->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_minAmplUnit->Wrap( -1 );
fgSizer3->Add( m_minAmplUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
m_maxAmplLabel = new wxStaticText( sbSizerLower->GetStaticBox(), wxID_ANY, _("Max amplitude (A):"), wxDefaultPosition, wxDefaultSize, 0 );
m_maxAmplLabel->Wrap( -1 );
fgSizer3->Add( m_maxAmplLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
m_maxAmplText = new wxTextCtrl( sbSizerLower->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer3->Add( m_maxAmplText, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_maxAmplUnit = new wxStaticText( sbSizerLower->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_maxAmplUnit->Wrap( -1 );
fgSizer3->Add( m_maxAmplUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
m_spacingLabel = new wxStaticText( sbSizerLower->GetStaticBox(), wxID_ANY, _("Min spacing (s):"), wxDefaultPosition, wxDefaultSize, 0 );
m_spacingLabel->Wrap( -1 );
fgSizer3->Add( m_spacingLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
m_spacingText = new wxTextCtrl( sbSizerLower->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_spacingText->SetToolTip( _("Minimum spacing between adjacent meander segments. The resulting spacing may be greater based on design rules.") );
fgSizer3->Add( m_spacingText, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_spacingUnit = new wxStaticText( sbSizerLower->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_spacingUnit->Wrap( -1 );
fgSizer3->Add( m_spacingUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
m_staticText14 = new wxStaticText( sbSizerLower->GetStaticBox(), wxID_ANY, _("Miter style:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText14->Wrap( -1 );
fgSizer3->Add( m_staticText14, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
wxString m_miterStyleChoices[] = { _("45 degree"), _("arc") };
int m_miterStyleNChoices = sizeof( m_miterStyleChoices ) / sizeof( wxString );
m_miterStyle = new wxChoice( sbSizerLower->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_miterStyleNChoices, m_miterStyleChoices, 0 );
m_miterStyle->SetSelection( 0 );
fgSizer3->Add( m_miterStyle, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
m_singleSidedCheck = new wxCheckBox( sbSizerLower->GetStaticBox(), wxID_ANY, _("Single-sided"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer3->Add( m_singleSidedCheck, 0, wxALL|wxEXPAND, 5 );
fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
m_radiusLabel = new wxStaticText( sbSizerLower->GetStaticBox(), wxID_ANY, _("Miter radius (r):"), wxDefaultPosition, wxDefaultSize, 0 );
m_radiusLabel->Wrap( -1 );
fgSizer3->Add( m_radiusLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
m_radiusText = new TEXT_CTRL_EVAL( sbSizerLower->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer3->Add( m_radiusText, 0, wxALL|wxEXPAND, 5 );
m_radiusUnit = new wxStaticText( sbSizerLower->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
m_radiusUnit->Wrap( -1 );
fgSizer3->Add( m_radiusUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
sbSizerLower->Add( fgSizer3, 1, wxEXPAND|wxLEFT, 5 );
bMainSizer->Add( sbSizerLower, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
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_PNS_LENGTH_TUNING_SETTINGS_BASE::~DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE()
{
}

File diff suppressed because it is too large Load Diff

View File

@ -1,81 +0,0 @@
///////////////////////////////////////////////////////////////////////////
// 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/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/choice.h>
#include <wx/textctrl.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/statbmp.h>
#include <wx/checkbox.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE : public DIALOG_SHIM
{
private:
protected:
wxStaticText* m_staticText4;
wxChoice* m_choicePathFrom;
wxStaticText* m_staticText15;
wxChoice* m_choice4;
wxStaticText* m_staticText3;
wxChoice* m_constraintSource;
wxStaticText* m_targetLengthLabel;
wxTextCtrl* m_targetLengthText;
wxStaticText* m_targetLengthUnit;
wxStaticBitmap* m_legend;
wxStaticText* m_minAmplLabel;
wxTextCtrl* m_minAmplText;
wxStaticText* m_minAmplUnit;
wxStaticText* m_maxAmplLabel;
wxTextCtrl* m_maxAmplText;
wxStaticText* m_maxAmplUnit;
wxStaticText* m_spacingLabel;
wxTextCtrl* m_spacingText;
wxStaticText* m_spacingUnit;
wxStaticText* m_staticText14;
wxChoice* m_miterStyle;
wxCheckBox* m_singleSidedCheck;
wxStaticText* m_radiusLabel;
TEXT_CTRL_EVAL* m_radiusText;
wxStaticText* m_radiusUnit;
wxStdDialogButtonSizer* m_stdButtons;
wxButton* m_stdButtonsOK;
wxButton* m_stdButtonsCancel;
public:
DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Trace Length Tuning"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE();
};

View File

@ -17,18 +17,18 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "dialog_meander_properties.h"
#include "dialog_tuning_pattern_properties.h"
#include <bitmaps.h>
#include <pcb_base_edit_frame.h>
#include <board_design_settings.h>
#include <drc/drc_engine.h>
DIALOG_MEANDER_PROPERTIES::DIALOG_MEANDER_PROPERTIES( PCB_BASE_EDIT_FRAME* aFrame,
DIALOG_TUNING_PATTERN_PROPERTIES::DIALOG_TUNING_PATTERN_PROPERTIES( PCB_BASE_EDIT_FRAME* aFrame,
PNS::MEANDER_SETTINGS& aSettings,
PNS::ROUTER_MODE aMeanderType,
const DRC_CONSTRAINT& aConstraint ) :
DIALOG_MEANDER_PROPERTIES_BASE( aFrame ),
DIALOG_TUNING_PATTERN_PROPERTIES_BASE( aFrame ),
m_frame( aFrame ),
m_constraint( aConstraint ),
m_targetLength( aFrame, m_targetLengthLabel, m_targetLengthCtrl, m_targetLengthUnits ),
@ -70,7 +70,7 @@ DIALOG_MEANDER_PROPERTIES::DIALOG_MEANDER_PROPERTIES( PCB_BASE_EDIT_FRAME* aFram
}
bool DIALOG_MEANDER_PROPERTIES::TransferDataToWindow()
bool DIALOG_TUNING_PATTERN_PROPERTIES::TransferDataToWindow()
{
if( m_mode == PNS::PNS_MODE_TUNE_DIFF_PAIR_SKEW )
m_targetLength.SetValue( m_settings.m_targetSkew );
@ -97,7 +97,7 @@ bool DIALOG_MEANDER_PROPERTIES::TransferDataToWindow()
}
bool DIALOG_MEANDER_PROPERTIES::TransferDataFromWindow()
bool DIALOG_TUNING_PATTERN_PROPERTIES::TransferDataFromWindow()
{
if( m_mode == PNS::PNS_MODE_TUNE_DIFF_PAIR_SKEW )
m_settings.m_targetSkew = m_targetLength.GetIntValue();
@ -118,7 +118,7 @@ bool DIALOG_MEANDER_PROPERTIES::TransferDataFromWindow()
}
void DIALOG_MEANDER_PROPERTIES::onOverrideCustomRules( wxCommandEvent& event )
void DIALOG_TUNING_PATTERN_PROPERTIES::onOverrideCustomRules( wxCommandEvent& event )
{
m_targetLength.Enable( event.IsChecked() || m_constraint.IsNull() );

View File

@ -17,10 +17,10 @@
* with this program. If not, see <http://www.gnu.or/licenses/>.
*/
#ifndef DIALOG_MEANDER_PROPERTIES_H
#define DIALOG_MEANDER_PROPERTIES_H
#ifndef DIALOG_TUNING_PATTERN_PROPERTIES_H
#define DIALOG_TUNING_PATTERN_PROPERTIES_H
#include "dialog_meander_properties_base.h"
#include "dialog_tuning_pattern_properties_base.h"
#include <widgets/unit_binder.h>
@ -36,11 +36,13 @@ class PCB_BASE_EDIT_FRAME;
class DRC_CONSTRAINT;
class DIALOG_MEANDER_PROPERTIES : public DIALOG_MEANDER_PROPERTIES_BASE
class DIALOG_TUNING_PATTERN_PROPERTIES : public DIALOG_TUNING_PATTERN_PROPERTIES_BASE
{
public:
DIALOG_MEANDER_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent, PNS::MEANDER_SETTINGS& aSettings,
PNS::ROUTER_MODE aMeanderType, const DRC_CONSTRAINT& aConstraint );
DIALOG_TUNING_PATTERN_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent,
PNS::MEANDER_SETTINGS& aSettings,
PNS::ROUTER_MODE aMeanderType,
const DRC_CONSTRAINT& aConstraint );
private:
bool TransferDataToWindow() override;
@ -62,4 +64,4 @@ private:
PNS::ROUTER_MODE m_mode;
};
#endif // DIALOG_MEANDER_PROPERTIES_H
#endif // DIALOG_TUNING_PATTERN_PROPERTIES_H

View File

@ -5,11 +5,11 @@
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialog_meander_properties_base.h"
#include "dialog_tuning_pattern_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 )
DIALOG_TUNING_PATTERN_PROPERTIES_BASE::DIALOG_TUNING_PATTERN_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 );
@ -73,7 +73,7 @@ DIALOG_MEANDER_PROPERTIES_BASE::DIALOG_MEANDER_PROPERTIES_BASE( wxWindow* parent
gbSizer1->Add( m_spacingLabel, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
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.") );
m_spacingCtrl->SetToolTip( _("Minimum spacing between adjacent tuning segments. The resulting spacing may be greater based on design rules.") );
gbSizer1->Add( m_spacingCtrl, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
@ -129,12 +129,12 @@ DIALOG_MEANDER_PROPERTIES_BASE::DIALOG_MEANDER_PROPERTIES_BASE( wxWindow* parent
bMainSizer->Fit( this );
// Connect Events
m_overrideCustomRules->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_MEANDER_PROPERTIES_BASE::onOverrideCustomRules ), NULL, this );
m_overrideCustomRules->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_TUNING_PATTERN_PROPERTIES_BASE::onOverrideCustomRules ), NULL, this );
}
DIALOG_MEANDER_PROPERTIES_BASE::~DIALOG_MEANDER_PROPERTIES_BASE()
DIALOG_TUNING_PATTERN_PROPERTIES_BASE::~DIALOG_TUNING_PATTERN_PROPERTIES_BASE()
{
// Disconnect Events
m_overrideCustomRules->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_MEANDER_PROPERTIES_BASE::onOverrideCustomRules ), NULL, this );
m_overrideCustomRules->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_TUNING_PATTERN_PROPERTIES_BASE::onOverrideCustomRules ), NULL, this );
}

View File

@ -11,13 +11,13 @@
<property name="embedded_files_path"></property>
<property name="encoding">UTF-8</property>
<property name="event_generation">connect</property>
<property name="file">dialog_meander_properties_base</property>
<property name="file">dialog_tuning_pattern_properties_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">DIALOG_MEANDER_PROPERTIES_BASE</property>
<property name="name">DIALOG_TUNING_PATTERN_PROPERTIES_BASE</property>
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header"></property>
@ -45,7 +45,7 @@
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size">-1,-1</property>
<property name="name">DIALOG_MEANDER_PROPERTIES_BASE</property>
<property name="name">DIALOG_TUNING_PATTERN_PROPERTIES_BASE</property>
<property name="pos"></property>
<property name="size">-1,-1</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
@ -980,7 +980,7 @@
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Minimum spacing between adjacent meander segments. The resulting spacing may be greater based on design rules.</property>
<property name="tooltip">Minimum spacing between adjacent tuning segments. The resulting spacing may be greater based on design rules.</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>

View File

@ -33,9 +33,9 @@
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_MEANDER_PROPERTIES_BASE
/// Class DIALOG_TUNING_PATTERN_PROPERTIES_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_MEANDER_PROPERTIES_BASE : public DIALOG_SHIM
class DIALOG_TUNING_PATTERN_PROPERTIES_BASE : public DIALOG_SHIM
{
private:
@ -71,9 +71,9 @@ class DIALOG_MEANDER_PROPERTIES_BASE : public DIALOG_SHIM
public:
DIALOG_MEANDER_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Tuning Pattern Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_TUNING_PATTERN_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Tuning Pattern Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_MEANDER_PROPERTIES_BASE();
~DIALOG_TUNING_PATTERN_PROPERTIES_BASE();
};

View File

@ -17,17 +17,17 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <panel_setup_meanders.h>
#include <panel_setup_tuning_patterns.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,
PANEL_SETUP_TUNING_PATTERNS::PANEL_SETUP_TUNING_PATTERNS( wxWindow* aParent, EDA_DRAW_FRAME* aFrame,
PNS::MEANDER_SETTINGS& aTrackSettings,
PNS::MEANDER_SETTINGS& aDiffPairSettings,
PNS::MEANDER_SETTINGS& aSkewSettings ) :
PANEL_SETUP_MEANDERS_BASE( aParent ),
PANEL_SETUP_TUNING_PATTERNS_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 ),
@ -54,7 +54,7 @@ PANEL_SETUP_MEANDERS::PANEL_SETUP_MEANDERS( wxWindow* aParent, EDA_DRAW_FRAME* a
}
bool PANEL_SETUP_MEANDERS::TransferDataToWindow()
bool PANEL_SETUP_TUNING_PATTERNS::TransferDataToWindow()
{
m_track_minA.SetValue( m_trackSettings.m_minAmplitude );
m_track_maxA.SetValue( m_trackSettings.m_maxAmplitude );
@ -80,7 +80,7 @@ bool PANEL_SETUP_MEANDERS::TransferDataToWindow()
}
bool PANEL_SETUP_MEANDERS::TransferDataFromWindow()
bool PANEL_SETUP_TUNING_PATTERNS::TransferDataFromWindow()
{
m_trackSettings.m_minAmplitude = m_track_minA.GetIntValue();
m_trackSettings.m_maxAmplitude = m_track_maxA.GetIntValue();

View File

@ -17,10 +17,10 @@
* with this program. If not, see <http://www.gnu.or/licenses/>.
*/
#ifndef PANEL_SETUP_MEANDERS_H
#define PANEL_SETUP_MEANDERS_H
#ifndef PANEL_SETUP_TUNING_PATTERNS_H
#define PANEL_SETUP_TUNING_PATTERNS_H
#include <panel_setup_meanders_base.h>
#include <panel_setup_tuning_patterns_base.h>
#include <widgets/unit_binder.h>
@ -30,10 +30,10 @@ class MEANDER_SETTINGS;
}
class PANEL_SETUP_MEANDERS : public PANEL_SETUP_MEANDERS_BASE
class PANEL_SETUP_TUNING_PATTERNS : public PANEL_SETUP_TUNING_PATTERNS_BASE
{
public:
PANEL_SETUP_MEANDERS( wxWindow* aParent, EDA_DRAW_FRAME* aFrame,
PANEL_SETUP_TUNING_PATTERNS( wxWindow* aParent, EDA_DRAW_FRAME* aFrame,
PNS::MEANDER_SETTINGS& aTrackSettings,
PNS::MEANDER_SETTINGS& aDiffPairSettings,
PNS::MEANDER_SETTINGS& aSkewSettings );
@ -63,4 +63,4 @@ private:
PNS::MEANDER_SETTINGS& m_skewSettings;
};
#endif // PANEL_SETUP_MEANDERS_H
#endif // PANEL_SETUP_TUNING_PATTERNS_H

View File

@ -7,16 +7,16 @@
#include "widgets/text_ctrl_eval.h"
#include "panel_setup_meanders_base.h"
#include "panel_setup_tuning_patterns_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 )
PANEL_SETUP_TUNING_PATTERNS_BASE::PANEL_SETUP_TUNING_PATTERNS_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 = new wxStaticText( this, wxID_ANY, _("Default properties for single-track tuning:"), wxDefaultPosition, wxDefaultSize, 0 );
m_singleTrackLabel->Wrap( -1 );
bMainSizer->Add( m_singleTrackLabel, 0, wxTOP|wxRIGHT|wxLEFT, 8 );
@ -71,7 +71,7 @@ PANEL_SETUP_MEANDERS_BASE::PANEL_SETUP_MEANDERS_BASE( wxWindow* parent, wxWindow
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.") );
m_track_spacingCtrl->SetToolTip( _("Minimum spacing between adjacent tuning segments. The resulting spacing may be greater based on design rules.") );
bSizer9->Add( m_track_spacingCtrl, 1, wxALIGN_CENTER_VERTICAL, 5 );
@ -137,7 +137,7 @@ PANEL_SETUP_MEANDERS_BASE::PANEL_SETUP_MEANDERS_BASE( wxWindow* parent, wxWindow
fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
singleTrackSizer->Add( fgSizer3, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
singleTrackSizer->Add( fgSizer3, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
bMainSizer->Add( singleTrackSizer, 0, wxEXPAND|wxRIGHT, 5 );
@ -145,7 +145,7 @@ PANEL_SETUP_MEANDERS_BASE::PANEL_SETUP_MEANDERS_BASE( wxWindow* parent, wxWindow
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 = new wxStaticText( this, wxID_ANY, _("Default properties for differential-pairs:"), wxDefaultPosition, wxDefaultSize, 0 );
m_diffPairsLabel->Wrap( -1 );
bMainSizer->Add( m_diffPairsLabel, 0, wxTOP|wxRIGHT|wxLEFT, 8 );
@ -200,7 +200,7 @@ PANEL_SETUP_MEANDERS_BASE::PANEL_SETUP_MEANDERS_BASE( wxWindow* parent, wxWindow
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.") );
m_dp_spacingCtrl->SetToolTip( _("Minimum spacing between adjacent tuning segments. The resulting spacing may be greater based on design rules.") );
bSizer91->Add( m_dp_spacingCtrl, 1, wxALIGN_CENTER_VERTICAL, 5 );
@ -272,7 +272,7 @@ PANEL_SETUP_MEANDERS_BASE::PANEL_SETUP_MEANDERS_BASE( wxWindow* parent, wxWindow
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 );
diffPairSizer->Add( fgSizer32, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
diffPairSizer->Add( fgSizer32, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
bMainSizer->Add( diffPairSizer, 0, wxEXPAND|wxRIGHT, 5 );
@ -335,7 +335,7 @@ PANEL_SETUP_MEANDERS_BASE::PANEL_SETUP_MEANDERS_BASE( wxWindow* parent, wxWindow
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.") );
m_skew_spacingCtrl->SetToolTip( _("Minimum spacing between adjacent tuning segments. The resulting spacing may be greater based on design rules.") );
bSizer92->Add( m_skew_spacingCtrl, 1, wxALIGN_CENTER_VERTICAL, 5 );
@ -392,10 +392,10 @@ PANEL_SETUP_MEANDERS_BASE::PANEL_SETUP_MEANDERS_BASE( wxWindow* parent, wxWindow
fgSizer31->Add( m_skew_rUnits, 0, wxALIGN_CENTER_VERTICAL, 5 );
skewSizer->Add( fgSizer31, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
skewSizer->Add( fgSizer31, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
bMainSizer->Add( skewSizer, 0, wxEXPAND|wxRIGHT, 5 );
bMainSizer->Add( skewSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
this->SetSizer( bMainSizer );
@ -403,6 +403,6 @@ PANEL_SETUP_MEANDERS_BASE::PANEL_SETUP_MEANDERS_BASE( wxWindow* parent, wxWindow
bMainSizer->Fit( this );
}
PANEL_SETUP_MEANDERS_BASE::~PANEL_SETUP_MEANDERS_BASE()
PANEL_SETUP_TUNING_PATTERNS_BASE::~PANEL_SETUP_TUNING_PATTERNS_BASE()
{
}

View File

@ -11,13 +11,13 @@
<property name="embedded_files_path"></property>
<property name="encoding">UTF-8</property>
<property name="event_generation">connect</property>
<property name="file">panel_setup_meanders_base</property>
<property name="file">panel_setup_tuning_patterns_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">PANEL_SETUP_MEANDERS_BASE</property>
<property name="name">PANEL_SETUP_TUNING_PATTERNS_BASE</property>
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header"></property>
@ -43,7 +43,7 @@
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">PANEL_SETUP_MEANDERS_BASE</property>
<property name="name">PANEL_SETUP_TUNING_PATTERNS_BASE</property>
<property name="pos"></property>
<property name="size">-1,-1</property>
<property name="subclass">; ; forward_declare</property>
@ -89,7 +89,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Default properties for single-track meanders:</property>
<property name="label">Default properties for single-track tuning:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
@ -245,7 +245,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="1">
<property name="cols">5</property>
@ -765,7 +765,7 @@
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Minimum spacing between adjacent meander segments. The resulting spacing may be greater based on design rules.</property>
<property name="tooltip">Minimum spacing between adjacent tuning segments. The resulting spacing may be greater based on design rules.</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
@ -1360,7 +1360,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Default properties for differential-pair meanders:</property>
<property name="label">Default properties for differential-pairs:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
@ -1516,7 +1516,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="1">
<property name="cols">5</property>
@ -2036,7 +2036,7 @@
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Minimum spacing between adjacent meander segments. The resulting spacing may be greater based on design rules.</property>
<property name="tooltip">Minimum spacing between adjacent tuning segments. The resulting spacing may be greater based on design rules.</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
@ -2720,7 +2720,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT</property>
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
@ -2787,7 +2787,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="1">
<property name="cols">5</property>
@ -3307,7 +3307,7 @@
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Minimum spacing between adjacent meander segments. The resulting spacing may be greater based on design rules.</property>
<property name="tooltip">Minimum spacing between adjacent tuning segments. The resulting spacing may be greater based on design rules.</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>

View File

@ -33,9 +33,9 @@ class TEXT_CTRL_EVAL;
///////////////////////////////////////////////////////////////////////////////
/// Class PANEL_SETUP_MEANDERS_BASE
/// Class PANEL_SETUP_TUNING_PATTERNS_BASE
///////////////////////////////////////////////////////////////////////////////
class PANEL_SETUP_MEANDERS_BASE : public wxPanel
class PANEL_SETUP_TUNING_PATTERNS_BASE : public wxPanel
{
private:
@ -96,9 +96,9 @@ class PANEL_SETUP_MEANDERS_BASE : public wxPanel
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_TUNING_PATTERNS_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();
~PANEL_SETUP_TUNING_PATTERNS_BASE();
};

View File

@ -32,6 +32,7 @@
#include <geometry/shape_circle.h>
#include <kiplatform/ui.h>
#include <dialogs/dialog_unit_entry.h>
#include <status_popup.h>
#include <collectors.h>
#include <scoped_set_reset.h>
@ -57,9 +58,8 @@
#include <router/pns_segment.h>
#include <router/pns_arc.h>
#include <router/pns_topology.h>
#include <router/pns_tune_status_popup.h>
#include <dialogs/dialog_meander_properties.h>
#include <dialogs/dialog_tuning_pattern_properties.h>
enum LENGTH_TUNING_MODE
@ -317,7 +317,7 @@ static PNS::MEANDER_SIDE sideFromString( const std::string& aStr )
return PNS::MEANDER_SIDE_RIGHT;
else
{
wxFAIL_MSG( wxS( "Unknown meander side token" ) );
wxFAIL_MSG( wxS( "Unknown length-tuning side token" ) );
return PNS::MEANDER_SIDE_DEFAULT;
}
}
@ -849,7 +849,7 @@ void PCB_GENERATOR_MEANDERS::Remove( GENERATOR_TOOL* aTool, BOARD* aBoard,
aCommit->Add( item );
}
aCommit->Push( "Remove Meander", undoFlags );
aCommit->Push( "Remove Tuning Pattern", undoFlags );
}
@ -1088,7 +1088,7 @@ void PCB_GENERATOR_MEANDERS::EditPush( GENERATOR_TOOL* aTool, BOARD* aBoard,
bool isNew = IsNew();
if( aCommitMsg.IsEmpty() )
aCommit->Push( _( "Edit Meander" ), aCommitFlags );
aCommit->Push( _( "Edit Tuning Pattern" ), aCommitFlags );
else
aCommit->Push( aCommitMsg, aCommitFlags );
@ -1417,7 +1417,7 @@ void PCB_GENERATOR_MEANDERS::ShowPropertiesDialog( PCB_BASE_EDIT_FRAME* aEditFra
settings.m_targetLength = constraint.GetValue().Opt();
}
DIALOG_MEANDER_PROPERTIES dlg( aEditFrame, settings, toPNSMode(), constraint );
DIALOG_TUNING_PATTERN_PROPERTIES dlg( aEditFrame, settings, toPNSMode(), constraint );
if( dlg.ShowModal() == wxID_OK )
{
@ -1426,7 +1426,7 @@ void PCB_GENERATOR_MEANDERS::ShowPropertiesDialog( PCB_BASE_EDIT_FRAME* aEditFra
fromMeanderSettings( settings );
commit.Push( _( "Edit Meander Properties" ) );
commit.Push( _( "Edit Tuning Pattern" ) );
}
aEditFrame->GetToolManager()->PostAction<PCB_GENERATOR*>( PCB_ACTIONS::regenerateItem, this );
@ -1677,10 +1677,10 @@ int DRAWING_TOOL::PlaceMeander( const TOOL_EVENT& aEvent )
GENERAL_COLLECTORS_GUIDE guide = m_frame->GetCollectorsGuide();
GENERATOR_TOOL* generatorTool = m_toolMgr->GetTool<GENERATOR_TOOL>();
PNS::ROUTER* router = generatorTool->Router();
SCOPED_DRAW_MODE scopedDrawMode( m_mode, MODE::MEANDER );
SCOPED_DRAW_MODE scopedDrawMode( m_mode, MODE::TUNING );
m_pickerItem = nullptr;
m_meander = nullptr;
m_tuningPattern = nullptr;
// Add a VIEW_GROUP that serves as a preview for the new item
m_preview.Clear();
@ -1696,17 +1696,17 @@ int DRAWING_TOOL::PlaceMeander( const TOOL_EVENT& aEvent )
auto updateMeander =
[&]()
{
if( m_meander && m_meander->GetPosition() != m_meander->GetEnd() )
if( m_tuningPattern && m_tuningPattern->GetPosition() != m_tuningPattern->GetEnd() )
{
m_meander->EditStart( generatorTool, m_board, m_frame, nullptr );
m_meander->Update( generatorTool, m_board, m_frame, nullptr );
m_tuningPattern->EditStart( generatorTool, m_board, m_frame, nullptr );
m_tuningPattern->Update( generatorTool, m_board, m_frame, nullptr );
m_statusPopup->Popup();
canvas()->SetStatusPopup( m_statusPopup.get() );
m_view->Update( &m_preview );
m_meander->UpdateStatus( generatorTool, m_frame, m_statusPopup.get() );
m_tuningPattern->UpdateStatus( generatorTool, m_frame, m_statusPopup.get() );
m_statusPopup->Move( KIPLATFORM::UI::GetMousePosition() + wxPoint( 20, 20 ) );
}
};
@ -1721,22 +1721,22 @@ int DRAWING_TOOL::PlaceMeander( const TOOL_EVENT& aEvent )
if( evt->IsCancelInteractive() || evt->IsActivate() )
{
if( m_meander )
if( m_tuningPattern )
{
// First click already made; clean up meander preview
m_meander->EditRevert( generatorTool, m_board, m_frame, nullptr );
m_tuningPattern->EditRevert( generatorTool, m_board, m_frame, nullptr );
m_preview.Clear();
delete m_meander;
m_meander = nullptr;
delete m_tuningPattern;
m_tuningPattern = nullptr;
}
break;
}
else if( evt->IsMotion() )
{
if( !m_meander )
if( !m_tuningPattern )
{
// First click not yet made; we're in highlight-net-under-cursor mode
@ -1764,20 +1764,20 @@ int DRAWING_TOOL::PlaceMeander( const TOOL_EVENT& aEvent )
{
// First click already made; we're in preview-meander mode
m_meander->SetEnd( cursorPos );
m_tuningPattern->SetEnd( cursorPos );
updateMeander();
}
}
else if( evt->IsClick( BUT_LEFT ) )
{
if( m_pickerItem && !m_meander )
if( m_pickerItem && !m_tuningPattern )
{
// First click; create a meander
generatorTool->HighlightNets( nullptr );
m_frame->SetActiveLayer( m_pickerItem->GetLayer() );
m_meander = PCB_GENERATOR_MEANDERS::CreateNew( generatorTool, m_frame,
m_tuningPattern = PCB_GENERATOR_MEANDERS::CreateNew( generatorTool, m_frame,
m_pickerItem, mode );
int dummyDist;
@ -1786,19 +1786,19 @@ int DRAWING_TOOL::PlaceMeander( const TOOL_EVENT& aEvent )
m_pickerItem->GetEffectiveShape()->Collide( cursorPos, dummyClearance,
&dummyDist, &closestPt );
m_meander->SetPosition( closestPt );
m_meander->SetEnd( closestPt );
m_tuningPattern->SetPosition( closestPt );
m_tuningPattern->SetEnd( closestPt );
m_preview.Add( m_meander );
m_preview.Add( m_tuningPattern );
}
else if( m_pickerItem && m_meander )
else if( m_pickerItem && m_tuningPattern )
{
// Second click; we're done
BOARD_COMMIT commit( m_frame );
m_meander->EditStart( generatorTool, m_board, m_frame, &commit );
m_meander->Update( generatorTool, m_board, m_frame, &commit );
m_meander->EditPush( generatorTool, m_board, m_frame, &commit, _( "Tune" ) );
m_tuningPattern->EditStart( generatorTool, m_board, m_frame, &commit );
m_tuningPattern->Update( generatorTool, m_board, m_frame, &commit );
m_tuningPattern->EditPush( generatorTool, m_board, m_frame, &commit, _( "Tune" ) );
break;
}
@ -1811,24 +1811,24 @@ int DRAWING_TOOL::PlaceMeander( const TOOL_EVENT& aEvent )
else if( evt->IsAction( &PCB_ACTIONS::spacingIncrease )
|| evt->IsAction( &PCB_ACTIONS::spacingDecrease ) )
{
if( m_meander )
if( m_tuningPattern )
{
auto* placer = static_cast<PNS::MEANDER_PLACER_BASE*>( router->Placer() );
placer->SpacingStep( evt->IsAction( &PCB_ACTIONS::spacingIncrease ) ? 1 : -1 );
m_meander->SetSpacing( placer->MeanderSettings().m_spacing );
m_tuningPattern->SetSpacing( placer->MeanderSettings().m_spacing );
updateMeander();
}
}
else if( evt->IsAction( &PCB_ACTIONS::amplIncrease )
|| evt->IsAction( &PCB_ACTIONS::amplDecrease ) )
{
if( m_meander )
if( m_tuningPattern )
{
auto* placer = static_cast<PNS::MEANDER_PLACER_BASE*>( router->Placer() );
placer->AmplitudeStep( evt->IsAction( &PCB_ACTIONS::amplIncrease ) ? 1 : -1 );
m_meander->SetMaxAmplitude( placer->MeanderSettings().m_maxAmplitude );
m_tuningPattern->SetMaxAmplitude( placer->MeanderSettings().m_maxAmplitude );
updateMeander();
}
}
@ -1843,8 +1843,8 @@ int DRAWING_TOOL::PlaceMeander( const TOOL_EVENT& aEvent )
evt->SetPassEvent();
}
controls->CaptureCursor( m_meander != nullptr );
controls->SetAutoPan( m_meander != nullptr );
controls->CaptureCursor( m_tuningPattern != nullptr );
controls->SetAutoPan( m_tuningPattern != nullptr );
}
controls->CaptureCursor( false );
@ -1863,8 +1863,8 @@ int DRAWING_TOOL::PlaceMeander( const TOOL_EVENT& aEvent )
m_frame->GetCanvas()->Refresh();
if( m_meander )
selectionTool->AddItemToSel( m_meander );
if( m_tuningPattern )
selectionTool->AddItemToSel( m_tuningPattern );
m_frame->PopTool( aEvent );
return 0;

View File

@ -40,7 +40,6 @@ set( PCBNEW_PNS_SRCS
pns_solid.cpp
pns_tool_base.cpp
pns_topology.cpp
pns_tune_status_popup.cpp
pns_utils.cpp
pns_via.cpp
pns_walkaround.cpp

View File

@ -1,71 +0,0 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014-2015 CERN
* Copyright (C) 2016-2022 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
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 2 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 "eda_draw_frame.h"
#include "pns_tune_status_popup.h"
#include "pns_router.h"
#include "pns_meander_placer.h"
#include <wx/settings.h>
void PNS_TUNE_STATUS_POPUP::UpdateStatus( PNS::ROUTER* aRouter )
{
PNS::MEANDER_PLACER_BASE* placer = dynamic_cast<PNS::MEANDER_PLACER_BASE*>( aRouter->Placer() );
if( !placer )
return;
EDA_DRAW_FRAME* frame = static_cast<EDA_DRAW_FRAME*>( GetParent() );
SetText( placer->TuningInfo( frame->GetUserUnits() ) );
// Determine the background color first and choose a contrasting value
COLOR4D bg( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
double h, s, l;
bg.ToHSL( h, s, l );
switch( placer->TuningStatus() )
{
case PNS::MEANDER_PLACER::TUNED:
if( l < 0.5 )
SetTextColor( wxColor( 127, 200, 127 ) );
else
SetTextColor( wxColor( 0, 92, 0 ) );
break;
case PNS::MEANDER_PLACER::TOO_SHORT:
if( l < 0.5 )
SetTextColor( wxColor( 242, 100, 126 ) );
else
SetTextColor( wxColor( 122, 0, 0 ) );
break;
case PNS::MEANDER_PLACER::TOO_LONG:
if( l < 0.5 )
SetTextColor( wxColor( 66, 184, 235 ) );
else
SetTextColor( wxColor( 19, 19, 195 ) );
break;
}
}

View File

@ -1,47 +0,0 @@
/*
* 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
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* 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, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __PNS_TUNE_STATUS_POPUP_H_
#define __PNS_TUNE_STATUS_POPUP_H_
#include <status_popup.h>
namespace PNS {
class ROUTER;
}
class PNS_TUNE_STATUS_POPUP : public STATUS_TEXT_POPUP
{
public:
PNS_TUNE_STATUS_POPUP( wxWindow* aParent ) :
STATUS_TEXT_POPUP( aParent )
{ }
void UpdateStatus( PNS::ROUTER* aRouter );
};
#endif /* __PNS_TUNE_STATUS_POPUP_H_*/

View File

@ -174,7 +174,7 @@ DRAWING_TOOL::DRAWING_TOOL() :
m_layer( UNDEFINED_LAYER ),
m_stroke( 1, PLOT_DASH_TYPE::DEFAULT, COLOR4D::UNSPECIFIED ),
m_pickerItem( nullptr ),
m_meander( nullptr )
m_tuningPattern( nullptr )
{
}
@ -231,10 +231,10 @@ bool DRAWING_TOOL::Init()
return m_mode == MODE::VIA;
};
auto meanderToolActive =
auto tuningToolActive =
[this]( const SELECTION& aSel )
{
return m_mode == MODE::MEANDER;
return m_mode == MODE::TUNING;
};
CONDITIONAL_MENU& ctxMenu = m_menu.GetMenu();
@ -250,12 +250,12 @@ bool DRAWING_TOOL::Init()
ctxMenu.AddItem( PCB_ACTIONS::closeOutline, canCloseOutline, 200 );
ctxMenu.AddItem( PCB_ACTIONS::deleteLastPoint, canUndoPoint, 200 );
ctxMenu.AddItem( PCB_ACTIONS::arcPosture, arcToolActive, 200 );
ctxMenu.AddItem( PCB_ACTIONS::spacingIncrease, meanderToolActive, 200 );
ctxMenu.AddItem( PCB_ACTIONS::spacingDecrease, meanderToolActive, 200 );
ctxMenu.AddItem( PCB_ACTIONS::amplIncrease, meanderToolActive, 200 );
ctxMenu.AddItem( PCB_ACTIONS::amplDecrease, meanderToolActive, 200 );
ctxMenu.AddItem( PCB_ACTIONS::spacingIncrease, tuningToolActive, 200 );
ctxMenu.AddItem( PCB_ACTIONS::spacingDecrease, tuningToolActive, 200 );
ctxMenu.AddItem( PCB_ACTIONS::amplIncrease, tuningToolActive, 200 );
ctxMenu.AddItem( PCB_ACTIONS::amplDecrease, tuningToolActive, 200 );
ctxMenu.AddCheckItem( PCB_ACTIONS::toggleHV45Mode, !meanderToolActive, 250 );
ctxMenu.AddCheckItem( PCB_ACTIONS::toggleHV45Mode, !tuningToolActive, 250 );
ctxMenu.AddSeparator( 500 );
std::shared_ptr<VIA_SIZE_MENU> viaSizeMenu = std::make_shared<VIA_SIZE_MENU>();

View File

@ -80,7 +80,7 @@ public:
ZONE,
GRAPHIC_POLYGON,
VIA,
MEANDER
TUNING
};
/**
@ -356,7 +356,7 @@ private:
PCB_SELECTION m_preview;
BOARD_CONNECTED_ITEM* m_pickerItem;
PCB_GENERATOR_MEANDERS* m_meander;
PCB_GENERATOR_MEANDERS* m_tuningPattern;
std::unique_ptr<STATUS_TEXT_POPUP> m_statusPopup;

View File

@ -192,7 +192,7 @@ TOOL_ACTION PCB_ACTIONS::spacingIncrease( TOOL_ACTION_ARGS()
.DefaultHotkey( '1' )
.LegacyHotkeyName( "Increase meander spacing by one step." )
.MenuText( _( "Increase Spacing" ) )
.Tooltip( _( "Increase meander spacing by one step." ) )
.Tooltip( _( "Increase tuning pattern spacing by one step." ) )
.Icon( BITMAPS::router_len_tuner_dist_incr ) );
TOOL_ACTION PCB_ACTIONS::spacingDecrease( TOOL_ACTION_ARGS()
@ -201,7 +201,7 @@ TOOL_ACTION PCB_ACTIONS::spacingDecrease( TOOL_ACTION_ARGS()
.DefaultHotkey( '2' )
.LegacyHotkeyName( "Decrease meander spacing by one step." )
.MenuText( _( "Decrease Spacing" ) )
.Tooltip( _( "Decrease meander spacing by one step." ) )
.Tooltip( _( "Decrease tuning pattern spacing by one step." ) )
.Icon( BITMAPS::router_len_tuner_dist_decr ) );
TOOL_ACTION PCB_ACTIONS::amplIncrease( TOOL_ACTION_ARGS()
@ -210,7 +210,7 @@ TOOL_ACTION PCB_ACTIONS::amplIncrease( TOOL_ACTION_ARGS()
.DefaultHotkey( '3' )
.LegacyHotkeyName( "Increase meander amplitude by one step." )
.MenuText( _( "Increase Amplitude" ) )
.Tooltip( _( "Increase meander amplitude by one step." ) )
.Tooltip( _( "Increase tuning pattern amplitude by one step." ) )
.Icon( BITMAPS::router_len_tuner_amplitude_incr ) );
TOOL_ACTION PCB_ACTIONS::amplDecrease( TOOL_ACTION_ARGS()
@ -219,7 +219,7 @@ TOOL_ACTION PCB_ACTIONS::amplDecrease( TOOL_ACTION_ARGS()
.DefaultHotkey( '4' )
.LegacyHotkeyName( "Decrease meander amplitude by one step." )
.MenuText( _( "Decrease Amplitude" ) )
.Tooltip( _( "Decrease meander amplitude by one step." ) )
.Tooltip( _( "Decrease tuning pattern amplitude by one step." ) )
.Icon( BITMAPS::router_len_tuner_amplitude_decr ) );

View File

@ -794,7 +794,7 @@ static const std::vector<ARC_ARC_COLLIDE_CASE> arc_arc_collide_cases = {
{ 86.063537, 88.295989, 84.968628, 87.581351, -255.5, 0.2 },
0,
true },
{ "case 12: Simulated differential pair meander",
{ "case 12: Simulated differential pair length-tuning",
{ 94.6551, 88.296, 95.6551, 88.296, 90.0, 0.1 },
{ 94.6551, 88.296, 95.8551, 88.296, 90.0, 0.1 },
0.1,