From de471744cdb9231b1d0e1b86a503e2e7a9e9ef40 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 9 Jun 2012 11:38:58 +0200 Subject: [PATCH] Fix some minor bugs in plot functions --- common/base_screen.cpp | 9 +- common/common_plot_functions.cpp | 5 +- common/drawtxt.cpp | 46 +- .../dialogs/dialog_plot_schematic_DXF.cpp | 2 +- .../dialogs/dialog_plot_schematic_HPGL.cpp | 2 +- .../dialogs/dialog_plot_schematic_PDF.cpp | 8 +- eeschema/dialogs/dialog_plot_schematic_PS.cpp | 2 +- include/wxstruct.h | 2 +- .../dialog_edit_module_for_BoardEditor.cpp | 26 + pcbnew/dialogs/dialog_plot_base.fbp | 8520 ++++++++--------- pcbnew/pcb_plot_params.cpp | 27 +- pcbnew/pcb_plot_params.h | 8 +- pcbnew/pcbplot.cpp | 57 +- pcbnew/plotdxf.cpp | 2 +- pcbnew/plotgerb.cpp | 2 +- pcbnew/plothpgl.cpp | 49 +- pcbnew/plotps.cpp | 4 +- 17 files changed, 4400 insertions(+), 4371 deletions(-) diff --git a/common/base_screen.cpp b/common/base_screen.cpp index c9a2c8cade..5d802f322e 100644 --- a/common/base_screen.cpp +++ b/common/base_screen.cpp @@ -1,9 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2009 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 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 @@ -285,7 +286,7 @@ GRID_TYPE& BASE_SCREEN::GetGrid( size_t aIndex ) } -wxPoint BASE_SCREEN::GetNearestGridPosition( const wxPoint& aPosition, +wxPoint BASE_SCREEN::GetNearestGridPosition( const wxPoint& aPosition, wxRealPoint* aGridSize ) const { wxPoint pt; diff --git a/common/common_plot_functions.cpp b/common/common_plot_functions.cpp index aa8be550de..1bfecab7a1 100644 --- a/common/common_plot_functions.cpp +++ b/common/common_plot_functions.cpp @@ -19,7 +19,7 @@ /* Plot sheet references * margin is in mils (1/1000 inch) */ -void EDA_DRAW_FRAME::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen ) +void EDA_DRAW_FRAME::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen, int aLineWidth ) { #define WSTEXTSIZE 50 // Text size in mils @@ -46,10 +46,11 @@ void EDA_DRAW_FRAME::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen ) #endif bool italic = false; - bool thickness = 0; //@todo : use current pen + int thickness = aLineWidth; color = BLACK; plotter->SetColor( color ); + plotter->SetCurrentLineWidth( thickness ); // Plot edge. ref.x = pageInfo.GetLeftMarginMils() * iusPerMil; diff --git a/common/drawtxt.cpp b/common/drawtxt.cpp index 27865f2db7..9d2c1c892c 100644 --- a/common/drawtxt.cpp +++ b/common/drawtxt.cpp @@ -2,6 +2,33 @@ * Functions to draw and plot text on screen * @file drawtxt.cpp */ + +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Wayne Stambaugh + * Copyright (C) 1992-2012 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 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 + */ + #include #include #include @@ -526,15 +553,17 @@ void PLOTTER::Text( const wxPoint& aPos, bool aItalic, bool aBold ) { - if( aWidth == 0 && aBold ) // Use default values if aWidth == 0 - aWidth = GetPenSizeForBold( MIN( aSize.x, aSize.y ) ); + int textPensize = aWidth; - if( aWidth >= 0 ) - aWidth = Clamp_Text_PenSize( aWidth, aSize, aBold ); + if( textPensize == 0 && aBold ) // Use default values if aWidth == 0 + textPensize = GetPenSizeForBold( MIN( aSize.x, aSize.y ) ); + + if( textPensize >= 0 ) + textPensize = Clamp_Text_PenSize( aWidth, aSize, aBold ); else - aWidth = -Clamp_Text_PenSize( -aWidth, aSize, aBold ); + textPensize = -Clamp_Text_PenSize( -aWidth, aSize, aBold ); - SetCurrentLineWidth( aWidth ); + SetCurrentLineWidth( textPensize ); if( aColor >= 0 ) @@ -543,8 +572,11 @@ void PLOTTER::Text( const wxPoint& aPos, DrawGraphicText( NULL, NULL, aPos, aColor, aText, aOrient, aSize, aH_justify, aV_justify, - aWidth, aItalic, + textPensize, aItalic, aBold, NULL, this ); + + if( aWidth != textPensize ) + SetCurrentLineWidth( aWidth ); } diff --git a/eeschema/dialogs/dialog_plot_schematic_DXF.cpp b/eeschema/dialogs/dialog_plot_schematic_DXF.cpp index 5bc384974c..7427f23457 100644 --- a/eeschema/dialogs/dialog_plot_schematic_DXF.cpp +++ b/eeschema/dialogs/dialog_plot_schematic_DXF.cpp @@ -241,7 +241,7 @@ void DIALOG_PLOT_SCHEMATIC_DXF::PlotOneSheetDXF( const wxString& FileName, if( m_plot_Sheet_Ref ) { plotter->SetColor( BLACK ); - m_Parent->PlotWorkSheet( plotter, screen ); + m_Parent->PlotWorkSheet( plotter, screen, g_DrawDefaultLineThickness ); } screen->Plot( plotter ); diff --git a/eeschema/dialogs/dialog_plot_schematic_HPGL.cpp b/eeschema/dialogs/dialog_plot_schematic_HPGL.cpp index 7ce19b0212..69a22ee85e 100644 --- a/eeschema/dialogs/dialog_plot_schematic_HPGL.cpp +++ b/eeschema/dialogs/dialog_plot_schematic_HPGL.cpp @@ -395,7 +395,7 @@ void DIALOG_PLOT_SCHEMATIC_HPGL::Plot_1_Page_HPGL( const wxString& FileName, plotter->SetColor( BLACK ); if( s_plot_Sheet_Ref ) - m_Parent->PlotWorkSheet( plotter, screen ); + m_Parent->PlotWorkSheet( plotter, screen, g_DrawDefaultLineThickness ); screen->Plot( plotter ); diff --git a/eeschema/dialogs/dialog_plot_schematic_PDF.cpp b/eeschema/dialogs/dialog_plot_schematic_PDF.cpp index c33b7ed50f..1902fb323a 100644 --- a/eeschema/dialogs/dialog_plot_schematic_PDF.cpp +++ b/eeschema/dialogs/dialog_plot_schematic_PDF.cpp @@ -220,7 +220,7 @@ void DIALOG_PLOT_SCHEMATIC_PDF::createPDFFile() if( first_page ) { wxString msg; - wxString plotFileName = m_Parent->GetUniqueFilenameForCurrentSheet() + wxString plotFileName = m_Parent->GetUniqueFilenameForCurrentSheet() + wxT( ".pdf" ); msg.Printf( _( "Plot: %s " ), GetChars( plotFileName ) ); m_MsgBox->AppendText( msg ); @@ -241,8 +241,8 @@ void DIALOG_PLOT_SCHEMATIC_PDF::createPDFFile() plotSetupPage( plotter, screen ); plotter->StartPlot( output_file ); first_page = false; - } - else + } + else { /* For the following pages you need to close the (finished) page, reconfigure, and then start a new one */ @@ -301,7 +301,7 @@ void DIALOG_PLOT_SCHEMATIC_PDF::plotOneSheet( PDF_PLOTTER* plotter, if( m_plot_Sheet_Ref ) { plotter->SetColor( BLACK ); - m_Parent->PlotWorkSheet( plotter, screen ); + m_Parent->PlotWorkSheet( plotter, screen, g_DrawDefaultLineThickness ); } screen->Plot( plotter ); diff --git a/eeschema/dialogs/dialog_plot_schematic_PS.cpp b/eeschema/dialogs/dialog_plot_schematic_PS.cpp index 4fdce575e1..2b7034bf24 100644 --- a/eeschema/dialogs/dialog_plot_schematic_PS.cpp +++ b/eeschema/dialogs/dialog_plot_schematic_PS.cpp @@ -294,7 +294,7 @@ void DIALOG_PLOT_SCHEMATIC_PS::plotOneSheetPS( const wxString& FileName, if( m_plot_Sheet_Ref ) { plotter->SetColor( BLACK ); - m_Parent->PlotWorkSheet( plotter, screen ); + m_Parent->PlotWorkSheet( plotter, screen, g_DrawDefaultLineThickness ); } screen->Plot( plotter ); diff --git a/include/wxstruct.h b/include/wxstruct.h index 3cfd5427bf..b50bc105f2 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -686,7 +686,7 @@ public: int aNScr, int aScr, int aLnW, double aScalar, EDA_COLOR_T aClr1 = RED, EDA_COLOR_T aClr2 = RED ); - void PlotWorkSheet( PLOTTER* aPlotter, BASE_SCREEN* aScreen ); + void PlotWorkSheet( PLOTTER* aPlotter, BASE_SCREEN* aScreen, int aLineWidth ); /** * Function GetXYSheetReferences diff --git a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp index 192ed40598..573abddc7a 100644 --- a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp +++ b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp @@ -2,6 +2,32 @@ * Module editor: Dialog box for editing module properties in the pcb editor. * ******************************************************************************/ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2011 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 2012 Dick Hollenbeck, dick@softplc.com + * Copyright (C) 2004-2011 KiCad Developers, see change_log.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 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 + */ + + #include #include #include diff --git a/pcbnew/dialogs/dialog_plot_base.fbp b/pcbnew/dialogs/dialog_plot_base.fbp index 7d05f7dd72..c6d0626b0b 100644 --- a/pcbnew/dialogs/dialog_plot_base.fbp +++ b/pcbnew/dialogs/dialog_plot_base.fbp @@ -1,4301 +1,4219 @@ - - - - - - C++ - 1 - source_name - 0 - 0 - res - UTF-8 - connect - dialog_plot_base - 1000 - none - 1 - Dialog_Plot_base - - . - - 1 - 1 - 1 - 1 - 0 - - 1 - 1 - 1 - 1 - - 0 - - - - - - - 1 - wxBOTH - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - impl_virtual - - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - -1,-1 - 1 - DIALOG_PLOT_BASE - 1 - - - 1 - - Resizable - 1 - -1,-1 - wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - DIALOG_SHIM; dialog_shim.h - Plot - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - OnClose - - - - - - OnInitDialog - - - - - - - - - - - - - - - - - - - - - - - m_MainSizer - wxHORIZONTAL - protected - - 5 - wxALL|wxEXPAND - 1 - - - bSizer12 - wxVERTICAL - none - - 5 - wxEXPAND - 0 - - - bSizer26 - wxHORIZONTAL - none - - 5 - wxEXPAND|wxRIGHT|wxLEFT - 0 - - - bSizer27 - wxVERTICAL - none - - 5 - wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Plot format: - - 0 - - - 0 - - 1 - m_staticText121 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "HPGL" "Gerber" "Postscript" "DXF" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_plotFormatOpt - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - SetPlotFormat - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - 1 - - - bSizer28 - wxVERTICAL - none - - 5 - wxEXPAND|wxTOP|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Output directory: - - 0 - - - 0 - - 1 - m_staticTextDir - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - - bSizer29 - wxHORIZONTAL - none - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_outputDirectoryName - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Target directory for plot files. Can be absolute or relative to the board file location. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Browse... - - 0 - - - 0 - - 1 - m_browseButton - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnOutputDirectoryBrowseClicked - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - - bUpperSizer - wxHORIZONTAL - none - - 3 - wxALL|wxEXPAND - 1 - - wxID_ANY - Layers - - m_LayersSizer - wxHORIZONTAL - protected - - - 5 - wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_layerCheckListBox - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - 0 - - - m_PlotOptionsSizer - wxVERTICAL - protected - - 3 - wxALL|wxEXPAND - 0 - - wxID_ANY - Options - - sbOptionsSizer - wxVERTICAL - none - - - 5 - wxEXPAND - 0 - - - bSizer192 - wxHORIZONTAL - none - - 5 - wxEXPAND - 0 - - - bSizerPlotItems - wxVERTICAL - none - - 2 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Plot sheet reference on all layers - - 0 - - - 0 - - 1 - m_plotSheetRef - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_ALLOW_PRINT_PAD_ON_SILKSCREEN - Plot pads on silkscreen - - 0 - - - 0 - - 1 - m_plotPads_on_Silkscreen - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Enable/disable print/plot pads on silkscreen layers When disable, pads are never potted on silkscreen layers When enable, pads are potted only if they appear on silkscreen layers - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Plot module value on silkscreen - - 0 - - - 0 - - 1 - m_plotModuleValueOpt - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_PRINT_REF - Plot module reference on silkscreen - - 0 - - - 0 - - 1 - m_plotModuleRefOpt - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Plot other module texts on silkscreen - - 0 - - - 0 - - 1 - m_plotTextOther - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Enable/disable print/plot module field texts on silkscreen layers - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Plot invisible texts on silkscreen - - 0 - - - 0 - - 1 - m_plotInvisibleText - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Force print/plot module invisible texts on silkscreen layers - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Do not tent vias - - 0 - - - 0 - - 1 - m_plotNoViaOnMaskOpt - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Remove soldermask on vias. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_MIROR_OPT - Mirrored plot - - 0 - - - 0 - - 1 - m_plotMirrorOpt - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 - wxRIGHT|wxLEFT - 1 - - - bSizer14 - wxVERTICAL - none - - 5 - wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Drill marks: - - 0 - - - 0 - - 1 - m_staticText11 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "None" "Small" "Actual size" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_drillShapeOpt - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Scaling: - - 0 - - - 0 - - 1 - m_staticText12 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Auto" "1:1" "3:2" "2:1" "3:1" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_scaleOpt - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnSetScaleOpt - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Plot mode: - - 0 - - - 0 - - 1 - m_staticText13 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Line" "Filled" "Sketch" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_plotModeOpt - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Default linewidth - - 0 - - - 0 - - 1 - m_textDefaultPenSize - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Pen size used to draw items that have no pen size specified. Used mainly to draw items in sketch mode. - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_linesWidth - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Line width for, e.g., sheet references. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 - wxALL|wxEXPAND - 0 - - wxID_ANY - Gerber Options - - m_GerberOptionsSizer - wxVERTICAL - protected - - - 2 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Use proper filename extensions - - 0 - - - 0 - - 1 - m_useGerberExtensions - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Use proper Gerber extensions - .GBL, .GTL, etc... - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Exclude PCB edge layer from other layers - - 0 - - - 0 - - 1 - m_excludeEdgeLayerOpt - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Exclude contents of the pcb edge layer from all other layers - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Subtract soldermask from silkscreen - - 0 - - - 0 - - 1 - m_subtractMaskFromSilk - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Remove silkscreen from areas without soldermask - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Use auxiliary axis as origin - - 0 - - - 0 - - 1 - m_useAuxOriginCheckBox - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Use auxiliary axis as coordinates origin in Gerber files. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 - wxALL|wxEXPAND - 0 - - wxID_ANY - HPGL Options - - m_HPGLOptionsSizer - wxVERTICAL - protected - - - 5 - wxEXPAND - 1 - - - bSizer22 - wxHORIZONTAL - none - - 5 - wxEXPAND - 1 - - - bSizer20 - wxVERTICAL - none - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Pen size - - 0 - - - 0 - - 1 - m_textPenSize - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_HPGLPenSizeOpt - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Pen overlay - - 0 - - - 0 - - 1 - m_textPenOvr - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_HPGLPenOverlayOpt - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Set plot overlay for filling - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - - bSizer21 - wxVERTICAL - none - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Pen speed (cm/s): - - 0 - - - 0 - - 1 - m_textPenSpeed - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_HPGLPenSpeedOpt - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Set pen speed in cm/s - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 - wxALL|wxEXPAND - 0 - - wxID_ANY - Postscript Options - - m_PSOptionsSizer - wxVERTICAL - protected - - - 5 - wxEXPAND - 1 - - - bSizer17 - wxHORIZONTAL - none - - 5 - wxEXPAND - 1 - - - bSizer18 - wxVERTICAL - none - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - X scale: - - 0 - - - 0 - - 1 - m_staticText7 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_fineAdjustXscaleOpt - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Set global X scale adjust for exact scale postscript output. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - - bSizer19 - wxVERTICAL - none - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Y scale: - - 0 - - - 0 - - 1 - m_staticText8 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_fineAdjustYscaleOpt - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Set global Y scale adjust for exact scale postscript output. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - - bSizer191 - wxVERTICAL - none - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Width correction - - 0 - - - 0 - - 1 - m_textPSFineAdjustWidth - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_PSFineAdjustWidthOpt - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Set global width correction for exact width postscript output. These width correction is intended to compensate tracks width and also pads and vias size errors. The reasonable width correction value must be in a range of [-(MinTrackWidth-1), +(MinClearanceValue-1)] in decimils. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Negative plot - - 0 - - - 0 - - 1 - m_plotPSNegativeOpt - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Force A4 output - - 0 - - - 0 - - 1 - m_forcePSA4OutputOpt - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - wxID_ANY - Messages: - - sbSizerMsg - wxVERTICAL - none - - - 5 - wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - -1,70 - 1 - m_messagesBox - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_MULTILINE|wxTE_READONLY - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_RIGHT|wxRIGHT|wxLEFT - 0 - - - bSizerButtons - wxHORIZONTAL - none - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Plot - - 0 - - - 0 - - 1 - m_plotButton - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - Plot - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_CREATE_DRILL_FILE - Generate Drill File - - 0 - - - 0 - - 1 - m_buttonDrill - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - CreateDrillFile - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_CANCEL - Close - - 0 - - - 0 - - 1 - m_buttonQuit - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnQuit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + connect + dialog_plot_base + 1000 + none + 1 + Dialog_Plot_base + + . + + 1 + 1 + 1 + 1 + 0 + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + -1,-1 + DIALOG_PLOT_BASE + + -1,-1 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + DIALOG_SHIM; dialog_shim.h + Plot + + + + + + + + + + + + + + OnClose + + + + + + OnInitDialog + + + + + + + + + + + + + + + + + + + + + + + m_MainSizer + wxHORIZONTAL + protected + + 5 + wxALL|wxEXPAND + 1 + + + bSizer12 + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + + bSizer26 + wxHORIZONTAL + none + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + + bSizer27 + wxVERTICAL + none + + 5 + wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Plot format: + + 0 + + + 0 + + 1 + m_staticText121 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "HPGL" "Gerber" "Postscript" "DXF" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_plotFormatOpt + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + SetPlotFormat + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 1 + + + bSizer28 + wxVERTICAL + none + + 5 + wxEXPAND|wxTOP|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Output directory: + + 0 + + + 0 + + 1 + m_staticTextDir + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer29 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_outputDirectoryName + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Target directory for plot files. Can be absolute or relative to the board file location. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Browse... + + 0 + + + 0 + + 1 + m_browseButton + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnOutputDirectoryBrowseClicked + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bUpperSizer + wxHORIZONTAL + none + + 3 + wxALL|wxEXPAND + 1 + + wxID_ANY + Layers + + m_LayersSizer + wxHORIZONTAL + protected + + + 5 + wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_layerCheckListBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + + m_PlotOptionsSizer + wxVERTICAL + protected + + 3 + wxALL|wxEXPAND + 0 + + wxID_ANY + Options + + sbOptionsSizer + wxVERTICAL + none + + + 5 + wxEXPAND + 0 + + + bSizer192 + wxHORIZONTAL + none + + 5 + wxEXPAND + 0 + + + bSizerPlotItems + wxVERTICAL + none + + 2 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Plot sheet reference on all layers + + 0 + + + 0 + + 1 + m_plotSheetRef + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_ALLOW_PRINT_PAD_ON_SILKSCREEN + Plot pads on silkscreen + + 0 + + + 0 + + 1 + m_plotPads_on_Silkscreen + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Enable/disable print/plot pads on silkscreen layers When disable, pads are never potted on silkscreen layers When enable, pads are potted only if they appear on silkscreen layers + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Plot module value on silkscreen + + 0 + + + 0 + + 1 + m_plotModuleValueOpt + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_PRINT_REF + Plot module reference on silkscreen + + 0 + + + 0 + + 1 + m_plotModuleRefOpt + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Plot other module texts on silkscreen + + 0 + + + 0 + + 1 + m_plotTextOther + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Enable/disable print/plot module field texts on silkscreen layers + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Plot invisible texts on silkscreen + + 0 + + + 0 + + 1 + m_plotInvisibleText + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Force print/plot module invisible texts on silkscreen layers + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Do not tent vias + + 0 + + + 0 + + 1 + m_plotNoViaOnMaskOpt + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Remove soldermask on vias. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_MIROR_OPT + Mirrored plot + + 0 + + + 0 + + 1 + m_plotMirrorOpt + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxRIGHT|wxLEFT + 1 + + + bSizer14 + wxVERTICAL + none + + 5 + wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Drill marks: + + 0 + + + 0 + + 1 + m_staticText11 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "None" "Small" "Actual size" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_drillShapeOpt + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Scaling: + + 0 + + + 0 + + 1 + m_staticText12 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Auto" "1:1" "3:2" "2:1" "3:1" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_scaleOpt + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnSetScaleOpt + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Plot mode: + + 0 + + + 0 + + 1 + m_staticText13 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Line" "Filled" "Sketch" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_plotModeOpt + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Default linewidth + + 0 + + + 0 + + 1 + m_textDefaultPenSize + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Pen size used to draw items that have no pen size specified. Used mainly to draw items in sketch mode. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_linesWidth + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Line width for, e.g., sheet references. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALL|wxEXPAND + 0 + + wxID_ANY + Gerber Options + + m_GerberOptionsSizer + wxVERTICAL + protected + + + 2 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Use proper filename extensions + + 0 + + + 0 + + 1 + m_useGerberExtensions + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Use proper Gerber extensions - .GBL, .GTL, etc... + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Exclude PCB edge layer from other layers + + 0 + + + 0 + + 1 + m_excludeEdgeLayerOpt + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Exclude contents of the pcb edge layer from all other layers + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Subtract soldermask from silkscreen + + 0 + + + 0 + + 1 + m_subtractMaskFromSilk + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Remove silkscreen from areas without soldermask + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Use auxiliary axis as origin + + 0 + + + 0 + + 1 + m_useAuxOriginCheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Use auxiliary axis as coordinates origin in Gerber files. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALL|wxEXPAND + 0 + + wxID_ANY + HPGL Options + + m_HPGLOptionsSizer + wxVERTICAL + protected + + + 5 + wxEXPAND + 1 + + + bSizer22 + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bSizer20 + wxVERTICAL + none + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Pen size + + 0 + + + 0 + + 1 + m_textPenSize + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_HPGLPenSizeOpt + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Pen overlay + + 0 + + + 0 + + 1 + m_textPenOvr + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_HPGLPenOverlayOpt + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Set plot overlay for filling + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer21 + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Pen speed (cm/s): + + 0 + + + 0 + + 1 + m_textPenSpeed + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_HPGLPenSpeedOpt + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Set pen speed in cm/s + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALL|wxEXPAND + 0 + + wxID_ANY + Postscript Options + + m_PSOptionsSizer + wxVERTICAL + protected + + + 5 + wxEXPAND + 1 + + + bSizer17 + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bSizer18 + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + X scale: + + 0 + + + 0 + + 1 + m_staticText7 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_fineAdjustXscaleOpt + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Set global X scale adjust for exact scale postscript output. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer19 + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Y scale: + + 0 + + + 0 + + 1 + m_staticText8 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_fineAdjustYscaleOpt + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Set global Y scale adjust for exact scale postscript output. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer191 + wxVERTICAL + none + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Width correction + + 0 + + + 0 + + 1 + m_textPSFineAdjustWidth + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_PSFineAdjustWidthOpt + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Set global width correction for exact width postscript output. These width correction is intended to compensate tracks width and also pads and vias size errors. The reasonable width correction value must be in a range of [-(MinTrackWidth-1), +(MinClearanceValue-1)] in decimils. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Negative plot + + 0 + + + 0 + + 1 + m_plotPSNegativeOpt + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Force A4 output + + 0 + + + 0 + + 1 + m_forcePSA4OutputOpt + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + wxID_ANY + Messages: + + sbSizerMsg + wxVERTICAL + none + + + 5 + wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + -1,70 + 1 + m_messagesBox + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_MULTILINE|wxTE_READONLY + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT|wxRIGHT|wxLEFT + 0 + + + bSizerButtons + wxHORIZONTAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Plot + + 0 + + + 0 + + 1 + m_plotButton + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + Plot + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_CREATE_DRILL_FILE + Generate Drill File + + 0 + + + 0 + + 1 + m_buttonDrill + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + CreateDrillFile + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_CANCEL + Close + + 0 + + + 0 + + 1 + m_buttonQuit + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnQuit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pcbnew/pcb_plot_params.cpp b/pcbnew/pcb_plot_params.cpp index 8f9dc45a8c..c3b5fec2d8 100644 --- a/pcbnew/pcb_plot_params.cpp +++ b/pcbnew/pcb_plot_params.cpp @@ -28,18 +28,19 @@ #include #include #include +#include #define PLOT_LINEWIDTH_MIN 0 -#define PLOT_LINEWIDTH_MAX (200*IU_PER_DECIMILS) +#define PLOT_LINEWIDTH_MAX (200*IU_PER_MILS) #define HPGL_PEN_DIAMETER_MIN 0 -#define HPGL_PEN_DIAMETER_MAX (100*IU_PER_DECIMILS) -#define HPGL_PEN_SPEED_MIN 0 -#define HPGL_PEN_SPEED_MAX 1000 +#define HPGL_PEN_DIAMETER_MAX 100 // Unit = mil +#define HPGL_PEN_SPEED_MIN 1 // this param is always in cm/s +#define HPGL_PEN_SPEED_MAX 99 // this param is always in cm/s #define HPGL_PEN_NUMBER_MIN 1 #define HPGL_PEN_NUMBER_MAX 16 -#define HPGL_PEN_OVERLAY_MIN 0 -#define HPGL_PEN_OVERLAY_MAX 0x100 +#define HPGL_PEN_OVERLAP_MIN 0 +#define HPGL_PEN_OVERLAP_MAX 50 // Unit = mil /** @@ -47,7 +48,7 @@ * default thickness line value (Frame references) (i.e. = 0 ). * 0 = single pixel line width. */ -int g_DrawDefaultLineThickness = 60; +int g_DrawDefaultLineThickness = 6*IU_PER_MILS; using namespace PCBPLOTPARAMS_T; @@ -88,9 +89,9 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS() m_PlotMode = FILLED; useAuxOrigin = false; m_HPGLPenNum = 1; - m_HPGLPenSpeed = 20; - m_HPGLPenDiam = 15; - m_HPGLPenOvr = 2; + m_HPGLPenSpeed = 20; // this param is always in cm/s + m_HPGLPenDiam = 15; // in mils + m_HPGLPenOvr = 2; // in mils m_PlotPSColorOpt = true; m_PlotPSNegative = false; psA4Output = false; @@ -260,7 +261,7 @@ bool PCB_PLOT_PARAMS::SetHpglPenSpeed( int aValue ) bool PCB_PLOT_PARAMS::SetHpglPenOverlay( int aValue ) { - return setInt( &m_HPGLPenOvr, aValue, HPGL_PEN_OVERLAY_MIN, HPGL_PEN_OVERLAY_MAX ); + return setInt( &m_HPGLPenOvr, aValue, HPGL_PEN_OVERLAP_MIN, HPGL_PEN_OVERLAP_MAX ); } @@ -344,8 +345,8 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) throw( IO_ HPGL_PEN_DIAMETER_MAX ); break; case T_hpglpenoverlay: - aPcbPlotParams->m_HPGLPenOvr = ParseInt( HPGL_PEN_OVERLAY_MIN, - HPGL_PEN_OVERLAY_MIN ); + aPcbPlotParams->m_HPGLPenOvr = ParseInt( HPGL_PEN_OVERLAP_MIN, + HPGL_PEN_OVERLAP_MAX ); break; case T_pscolor: aPcbPlotParams->m_PlotPSColorOpt = ParseBool(); diff --git a/pcbnew/pcb_plot_params.h b/pcbnew/pcb_plot_params.h index 342547f8db..b7676ab8a0 100644 --- a/pcbnew/pcb_plot_params.h +++ b/pcbnew/pcb_plot_params.h @@ -47,10 +47,10 @@ public: ///< (ie protected by mask) EDA_DRAW_MODE_T m_PlotMode; ///< LINE, FILLED or SKETCH: select how to plot filled objects. ///< depending on plot format or layers, all options are not always allowed - int m_HPGLPenNum; - int m_HPGLPenSpeed; - int m_HPGLPenDiam; - int m_HPGLPenOvr; + int m_HPGLPenNum; ///< HPGL only: pen number selection(1 to 9) + int m_HPGLPenSpeed; ///< HPGL only: pen speed, always in cm/s (1 to 99 cm/s) + int m_HPGLPenDiam; ///< HPGL only: pen diameter in MILS, usefull to fill areas + int m_HPGLPenOvr; ///< HPGL only: pen overlay in MILS, usefull only to fill areas int m_PlotPSColorOpt; ///< True for color Postscript output bool m_PlotPSNegative; ///< True to create a negative board ps plot diff --git a/pcbnew/pcbplot.cpp b/pcbnew/pcbplot.cpp index 57603b3ce8..d5e8678f8b 100644 --- a/pcbnew/pcbplot.cpp +++ b/pcbnew/pcbplot.cpp @@ -2,6 +2,31 @@ * @file pcbnew/pcbplot.cpp */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2012 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 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 + */ + #include #include #include @@ -119,18 +144,20 @@ void DIALOG_PLOT::Init_Dialog() m_plotFormatOpt->SetSelection( m_plotOpts.GetPlotFormat() ); - // Set units and value for HPGL pen size. + // Set units and value for HPGL pen size (this param in in mils). AddUnitSymbol( *m_textPenSize, g_UserUnit ); - msg = ReturnStringFromValue( g_UserUnit, m_plotOpts.GetHpglPenDiameter() * 10 ); + msg = ReturnStringFromValue( g_UserUnit, + m_plotOpts.GetHpglPenDiameter() * IU_PER_MILS ); m_HPGLPenSizeOpt->AppendText( msg ); - // Set units to cm/s for standard HPGL pen speed. - msg = ReturnStringFromValue( UNSCALED_UNITS, m_plotOpts.GetHpglPenSpeed() * 10000 ); + // Units are *always* cm/s for HPGL pen speed, from 1 to 99. + msg = ReturnStringFromValue( UNSCALED_UNITS, m_plotOpts.GetHpglPenSpeed() ); m_HPGLPenSpeedOpt->AppendText( msg ); - // Set units and value for HPGL pen overlay. + // Set units and value for HPGL pen overlay (this param in in mils). AddUnitSymbol( *m_textPenOvr, g_UserUnit ); - msg = ReturnStringFromValue( g_UserUnit, m_plotOpts.GetHpglPenOverlay() * 10 ); + msg = ReturnStringFromValue( g_UserUnit, + m_plotOpts.GetHpglPenOverlay() * IU_PER_MILS ); m_HPGLPenOverlayOpt->AppendText( msg ); AddUnitSymbol( *m_textDefaultPenSize, g_UserUnit ); @@ -448,37 +475,39 @@ void DIALOG_PLOT::applyPlotSettings() // Update settings from text fields. Rewrite values back to the fields, // since the values may have been constrained by the setters. - // HPLG pen size + + // read HPLG pen size (this param is stored in mils) wxString msg = m_HPGLPenSizeOpt->GetValue(); - int tmp = ReturnValueFromString( g_UserUnit, msg ); + int tmp = ReturnValueFromString( g_UserUnit, msg ) / IU_PER_MILS; if( !tempOptions.SetHpglPenDiameter( tmp ) ) { - msg = ReturnStringFromValue( g_UserUnit, tempOptions.GetHpglPenDiameter() * 10 ); + msg = ReturnStringFromValue( g_UserUnit, tempOptions.GetHpglPenDiameter() * IU_PER_MILS ); m_HPGLPenSizeOpt->SetValue( msg ); msg.Printf( _( "HPGL pen size constrained!\n" ) ); m_messagesBox->AppendText( msg ); } - // HPGL pen speed + // read HPGL pen speed (this param is stored in cm/s) msg = m_HPGLPenSpeedOpt->GetValue(); tmp = ReturnValueFromString( UNSCALED_UNITS, msg ); if( !tempOptions.SetHpglPenSpeed( tmp ) ) { - msg = ReturnStringFromValue( UNSCALED_UNITS, tempOptions.GetHpglPenSpeed() * 1000 ); + msg = ReturnStringFromValue( UNSCALED_UNITS, tempOptions.GetHpglPenSpeed() ); m_HPGLPenSpeedOpt->SetValue( msg ); msg.Printf( _( "HPGL pen speed constrained!\n" ) ); m_messagesBox->AppendText( msg ); } - // HPGL pen overlay + // Read HPGL pen overlay (this param is stored in mils) msg = m_HPGLPenOverlayOpt->GetValue(); - tmp = ReturnValueFromString( g_UserUnit, msg ); + tmp = ReturnValueFromString( g_UserUnit, msg ) / IU_PER_MILS; if( !tempOptions.SetHpglPenOverlay( tmp ) ) { - msg = ReturnStringFromValue( g_UserUnit, tempOptions.GetHpglPenOverlay() * 10 ); + msg = ReturnStringFromValue( g_UserUnit, + tempOptions.GetHpglPenOverlay() * IU_PER_MILS ); m_HPGLPenOverlayOpt->SetValue( msg ); msg.Printf( _( "HPGL pen overlay constrained!\n" ) ); m_messagesBox->AppendText( msg ); diff --git a/pcbnew/plotdxf.cpp b/pcbnew/plotdxf.cpp index 68eb1109fe..b28ddbf733 100644 --- a/pcbnew/plotdxf.cpp +++ b/pcbnew/plotdxf.cpp @@ -37,7 +37,7 @@ bool PCB_BASE_FRAME::ExportToDxfFile( const wxString& aFullFileName, int aLayer, plotter->StartPlot( output_file ); if( plot_opts.m_PlotFrameRef ) - PlotWorkSheet( plotter, GetScreen() ); + PlotWorkSheet( plotter, GetScreen(), plot_opts.GetPlotLineWidth() ); Plot_Layer( plotter, aLayer, aTraceMode ); plotter->EndPlot(); diff --git a/pcbnew/plotgerb.cpp b/pcbnew/plotgerb.cpp index cd28252698..21cd95081b 100644 --- a/pcbnew/plotgerb.cpp +++ b/pcbnew/plotgerb.cpp @@ -70,7 +70,7 @@ bool PCB_BASE_FRAME::ExportToGerberFile( const wxString& aFullFileName, int aLay // Sheet refs on gerber CAN be useful... and they're always 1:1 if( plot_opts.m_PlotFrameRef ) - PlotWorkSheet( plotter, GetScreen() ); + PlotWorkSheet( plotter, GetScreen(), plot_opts.GetPlotLineWidth() ); Plot_Layer( plotter, aLayer, aTraceMode ); diff --git a/pcbnew/plothpgl.cpp b/pcbnew/plothpgl.cpp index 3c8faca4c6..93fc748147 100644 --- a/pcbnew/plothpgl.cpp +++ b/pcbnew/plothpgl.cpp @@ -2,19 +2,39 @@ * @file plothpgl.cpp */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2012 Dick Hollenbeck, dick@softplc.com + * + * 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 + */ + + #include #include #include -#include -#include #include -#include - #include - #include -#include #include +#include bool PCB_BASE_FRAME::ExportToHpglFile( const wxString& aFullFileName, int aLayer, @@ -35,20 +55,21 @@ bool PCB_BASE_FRAME::ExportToHpglFile( const wxString& aFullFileName, int aLayer PCB_PLOT_PARAMS plot_opts = GetPlotSettings(); - // Compute pen_dim (from g_m_HPGLPenDiam in mils) in pcb units, - // with plot scale (if Scale is 2, pen diameter is always g_m_HPGLPenDiam + // Compute pen_dim (from m_HPGLPenDiam in mils) in pcb units, + // with plot scale (if Scale is 2, pen diameter value is always m_HPGLPenDiam // so apparent pen diam is real pen diam / Scale - int pen_diam = KiROUND( plot_opts.m_HPGLPenDiam / + int pen_diam = KiROUND( plot_opts.m_HPGLPenDiam * IU_PER_MILS / plot_opts.m_PlotScale ); - // compute pen_overlay (from g_m_HPGLPenOvr in mils) with plot scale + // compute pen_overlay (from m_HPGLPenOvr in mils) in pcb units + // with plot scale if( plot_opts.m_HPGLPenOvr < 0 ) plot_opts.m_HPGLPenOvr = 0; if( plot_opts.m_HPGLPenOvr >= plot_opts.m_HPGLPenDiam ) plot_opts.m_HPGLPenOvr = plot_opts.m_HPGLPenDiam - 1; - int pen_overlay = KiROUND( plot_opts.m_HPGLPenOvr * 10.0 / + int pen_overlay = KiROUND( plot_opts.m_HPGLPenOvr * IU_PER_MILS / plot_opts.m_PlotScale ); @@ -72,7 +93,7 @@ bool PCB_BASE_FRAME::ExportToHpglFile( const wxString& aFullFileName, int aLayer // Fit to 80% of the page double Xscale = ( ( pageSizeIU.x * 0.8 ) / boardSize.x ); double Yscale = ( ( pageSizeIU.y * 0.8 ) / boardSize.y ); - scale = MIN( Xscale, Yscale ); + scale = std::min( Xscale, Yscale ); } else { @@ -100,7 +121,7 @@ bool PCB_BASE_FRAME::ExportToHpglFile( const wxString& aFullFileName, int aLayer // why did we have to change these settings above? SetPlotSettings( plot_opts ); - plotter->SetViewport( offset, IU_PER_DECIMILS, scale, + plotter->SetViewport( offset, IU_PER_DECIMILS, scale, plot_opts.m_PlotMirror ); plotter->SetDefaultLineWidth( plot_opts.m_PlotLineWidth ); plotter->SetCreator( wxT( "PCBNEW-HPGL" ) ); @@ -113,7 +134,7 @@ bool PCB_BASE_FRAME::ExportToHpglFile( const wxString& aFullFileName, int aLayer // The worksheet is not significant with scale!=1... It is with paperscale!=1, anyway if( plot_opts.m_PlotFrameRef && !center ) - PlotWorkSheet( plotter, GetScreen() ); + PlotWorkSheet( plotter, GetScreen(), plot_opts.GetPlotLineWidth() ); Plot_Layer( plotter, aLayer, aTraceMode ); plotter->EndPlot(); diff --git a/pcbnew/plotps.cpp b/pcbnew/plotps.cpp index 835930200f..4781c40fd8 100644 --- a/pcbnew/plotps.cpp +++ b/pcbnew/plotps.cpp @@ -111,7 +111,7 @@ bool PCB_BASE_FRAME::ExportToPostScriptFile( const wxString& aFullFileName, int plotter->SetScaleAdjust( plotOpts.m_FineScaleAdjustX, plotOpts.m_FineScaleAdjustY ); plotter->SetPlotWidthAdj( plotOpts.m_FineWidthAdjust ); - plotter->SetViewport( offset, IU_PER_DECIMILS, scale, + plotter->SetViewport( offset, IU_PER_DECIMILS, scale, plotOpts.m_PlotMirror ); plotter->SetDefaultLineWidth( plotOpts.m_PlotLineWidth ); plotter->SetCreator( wxT( "PCBNEW-PS" ) ); @@ -121,7 +121,7 @@ bool PCB_BASE_FRAME::ExportToPostScriptFile( const wxString& aFullFileName, int /* The worksheet is not significant with scale!=1... It is with paperscale!=1, anyway */ if( plotOpts.m_PlotFrameRef && !center ) - PlotWorkSheet( plotter, GetScreen() ); + PlotWorkSheet( plotter, GetScreen(), plotOpts.GetPlotLineWidth() ); // If plot a negative board: // Draw a black rectangle (background for plot board in white)