Remove unused line width option
You had to set the line width in the SVG export dialog in order to change the displayed line width in the 3d viewer. The line width did not affect the SVG export. Removing in favor of the Board design settings for line widths
This commit is contained in:
parent
c2dbd28101
commit
624a231cc0
|
@ -956,7 +956,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
|
|||
{
|
||||
if( ( curr_layer_id == F_SilkS ) || ( curr_layer_id == B_SilkS ) )
|
||||
{
|
||||
int linewidth = g_DrawDefaultLineThickness;
|
||||
int linewidth = m_board->GetDesignSettings().m_LineThickness[ LAYER_CLASS_SILK ];
|
||||
|
||||
for( PAD* pad : footprint->Pads() )
|
||||
{
|
||||
|
@ -981,7 +981,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
|
|||
{
|
||||
if( ( curr_layer_id == F_SilkS ) || ( curr_layer_id == B_SilkS ) )
|
||||
{
|
||||
const int linewidth = g_DrawDefaultLineThickness;
|
||||
int linewidth = m_board->GetDesignSettings().m_LineThickness[ LAYER_CLASS_SILK ];
|
||||
|
||||
for( PAD* pad : footprint->Pads() )
|
||||
{
|
||||
|
|
|
@ -56,7 +56,6 @@ private:
|
|||
wxString m_outputDirectory;
|
||||
bool m_printMirror;
|
||||
bool m_oneFileOnly;
|
||||
UNIT_BINDER m_lineWidth;
|
||||
|
||||
void initDialog();
|
||||
|
||||
|
@ -80,8 +79,7 @@ DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG( PCB_EDIT_FRAME* aParent, BOARD* aBoard ) :
|
|||
m_parent( aParent ),
|
||||
m_printBW( false ),
|
||||
m_printMirror( false ),
|
||||
m_oneFileOnly( false ),
|
||||
m_lineWidth( aParent, m_penWidthLabel, m_penWidthCtrl, m_penWidthUnits, true )
|
||||
m_oneFileOnly( false )
|
||||
{
|
||||
m_browseButton->SetBitmap( KiBitmap( small_folder_xpm ) );
|
||||
|
||||
|
@ -99,7 +97,6 @@ DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG( PCB_EDIT_FRAME* aParent, BOARD* aBoard ) :
|
|||
|
||||
DIALOG_EXPORT_SVG::~DIALOG_EXPORT_SVG()
|
||||
{
|
||||
g_DrawDefaultLineThickness = m_lineWidth.GetValue();
|
||||
m_printBW = m_ModeColorOption->GetSelection();
|
||||
m_oneFileOnly = m_rbFileOpt->GetSelection() == 1;
|
||||
m_outputDirectory = m_outputDirectoryName->GetValue();
|
||||
|
@ -145,8 +142,6 @@ void DIALOG_EXPORT_SVG::initDialog()
|
|||
m_printMirrorOpt->SetValue( m_printMirror );
|
||||
m_rbFileOpt->SetSelection( m_oneFileOnly ? 1 : 0 );
|
||||
|
||||
m_lineWidth.SetValue( g_DrawDefaultLineThickness );
|
||||
|
||||
for( LSEQ seq = m_board->GetEnabledLayers().UIOrder(); seq; ++seq )
|
||||
{
|
||||
PCB_LAYER_ID layer = *seq;
|
||||
|
@ -240,7 +235,6 @@ void DIALOG_EXPORT_SVG::ExportSVGFile( bool aOnlyOneFile )
|
|||
|
||||
m_printMirror = m_printMirrorOpt->GetValue();
|
||||
m_printBW = m_ModeColorOption->GetSelection();
|
||||
g_DrawDefaultLineThickness = m_lineWidth.GetValue();
|
||||
|
||||
LSET all_selected = getCheckBoxSelectedLayers();
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020)
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Dec 30 2020)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -77,25 +77,6 @@ DIALOG_EXPORT_SVG_BASE::DIALOG_EXPORT_SVG_BASE( wxWindow* parent, wxWindowID id,
|
|||
wxStaticBoxSizer* sbOptionsSizer;
|
||||
sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bSizer8;
|
||||
bSizer8 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_penWidthLabel = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Default pen size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_penWidthLabel->Wrap( -1 );
|
||||
m_penWidthLabel->SetToolTip( _("Selection of the pen size used to draw items which have no pen size specified.") );
|
||||
|
||||
bSizer8->Add( m_penWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_penWidthCtrl = new wxTextCtrl( sbOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer8->Add( m_penWidthCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
m_penWidthUnits = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_penWidthUnits->Wrap( -1 );
|
||||
bSizer8->Add( m_penWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
|
||||
sbOptionsSizer->Add( bSizer8, 1, wxEXPAND, 5 );
|
||||
|
||||
wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and white") };
|
||||
int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString );
|
||||
m_ModeColorOption = new wxRadioBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Print Mode"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS );
|
||||
|
|
|
@ -575,203 +575,6 @@
|
|||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="parent">1</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer8</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Default pen size:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_penWidthLabel</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">Selection of the pen size used to draw items which have no pen size specified.</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength">0</property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_penWidthCtrl</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">mm</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_penWidthUnits</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020)
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Dec 30 2020)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -50,9 +50,6 @@ class DIALOG_EXPORT_SVG_BASE : public DIALOG_SHIM
|
|||
wxCheckListBox* m_CopperLayersList;
|
||||
wxStaticText* m_staticTextTechLayers;
|
||||
wxCheckListBox* m_TechnicalLayersList;
|
||||
wxStaticText* m_penWidthLabel;
|
||||
wxTextCtrl* m_penWidthCtrl;
|
||||
wxStaticText* m_penWidthUnits;
|
||||
wxRadioBox* m_ModeColorOption;
|
||||
wxRadioBox* m_rbSvgPageSizeOpt;
|
||||
wxCheckBox* m_PrintBoardEdgesCtrl;
|
||||
|
@ -63,7 +60,7 @@ class DIALOG_EXPORT_SVG_BASE : public DIALOG_SHIM
|
|||
wxButton* m_sdbSizer1OK;
|
||||
wxButton* m_sdbSizer1Cancel;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
// Virtual event handlers, override them in your derived class
|
||||
virtual void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnButtonPlot( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
|
|
@ -918,7 +918,6 @@ void PCB_EDIT_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
|
|||
if( cfg )
|
||||
{
|
||||
m_rotationAngle = cfg->m_RotationAngle;
|
||||
g_DrawDefaultLineThickness = Millimeter2iu( cfg->m_PlotLineWidth );
|
||||
m_show_layer_manager_tools = cfg->m_AuiPanels.show_layer_manager;
|
||||
m_showPageLimits = cfg->m_ShowPageLimits;
|
||||
}
|
||||
|
@ -935,7 +934,6 @@ void PCB_EDIT_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
|
|||
if( cfg )
|
||||
{
|
||||
cfg->m_RotationAngle = m_rotationAngle;
|
||||
cfg->m_PlotLineWidth = Iu2Millimeter( g_DrawDefaultLineThickness );
|
||||
cfg->m_AuiPanels.show_layer_manager = m_show_layer_manager_tools;
|
||||
cfg->m_AuiPanels.right_panel_width = m_appearancePanel->GetSize().x;
|
||||
cfg->m_AuiPanels.appearance_panel_tab = m_appearancePanel->GetTabIndex();
|
||||
|
|
|
@ -46,12 +46,6 @@
|
|||
#define SVG_PRECISION_DEFAULT 6
|
||||
|
||||
|
||||
/**
|
||||
* Default line thickness in internal units used to draw or plot items using a
|
||||
* default thickness line value (Frame references)
|
||||
*/
|
||||
int g_DrawDefaultLineThickness = PLOT_LINEWIDTH_DEFAULT;
|
||||
|
||||
// default trailing digits in Gerber coordinates, when units are mm
|
||||
// This is also the max usable precision (i.e. internal Pcbnew Units)
|
||||
static const int gbrDefaultPrecision = 6;
|
||||
|
|
|
@ -347,11 +347,4 @@ public:
|
|||
};
|
||||
|
||||
|
||||
/**
|
||||
* Default line thickness in PCnew units used to draw or plot items having a
|
||||
* default thickness line value (Frame references) (i.e. = 0 ).
|
||||
* 0 = single pixel line width.
|
||||
*/
|
||||
extern int g_DrawDefaultLineThickness;
|
||||
|
||||
#endif // PCB_PLOT_PARAMS_H_
|
||||
|
|
|
@ -70,7 +70,6 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS()
|
|||
m_AddUnlockedPads( false ),
|
||||
m_PolarCoords( false ),
|
||||
m_RotationAngle( 900 ),
|
||||
m_PlotLineWidth( 0.1 ),
|
||||
m_ShowPageLimits( true ),
|
||||
m_PnsSettings( nullptr ),
|
||||
m_FootprintViewerAutoZoom( false ),
|
||||
|
@ -188,9 +187,6 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS()
|
|||
m_params.emplace_back( new PARAM<bool>( "pcb_display.origin_invert_y_axis",
|
||||
&m_Display.m_DisplayInvertYAxis, false ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<double>( "plot.line_width",
|
||||
&m_PlotLineWidth, 0.1, 0.01, 5.0 ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "cleanup.cleanup_vias",
|
||||
&m_Cleanup.cleanup_vias, true ) );
|
||||
|
||||
|
@ -292,6 +288,9 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS()
|
|||
m_params.emplace_back( new PARAM<wxString>( "export_svg.output_dir",
|
||||
&m_ExportSvg.output_dir, "" ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<int>( "export_svg.line_width",
|
||||
&m_ExportSvg.line_width, DEFAULT_LINE_WIDTH ) );
|
||||
|
||||
m_params.emplace_back( new PARAM_LIST<int>( "export_svg.layers",
|
||||
&m_ExportSvg.layers, {} ) );
|
||||
|
||||
|
|
|
@ -116,6 +116,7 @@ public:
|
|||
bool plot_board_edges;
|
||||
int page_size;
|
||||
wxString output_dir;
|
||||
int line_width;
|
||||
std::vector<int> layers;
|
||||
};
|
||||
|
||||
|
@ -288,8 +289,6 @@ public:
|
|||
|
||||
int m_RotationAngle;
|
||||
|
||||
double m_PlotLineWidth;
|
||||
|
||||
bool m_ShowPageLimits;
|
||||
|
||||
wxString m_FootprintTextShownColumns;
|
||||
|
|
Loading…
Reference in New Issue