From 4fa02690f820a4ca3517dfe5344b4da48a078f0e Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 30 Jan 2025 13:23:45 +0000 Subject: [PATCH] REMOVED force-plot-invisible-items. It's dangerous as the router and DRC will have been run without regard to invisible items. (See #19420.) --- common/jobs/job_export_pcb_pdf.cpp | 47 +++++++------- common/jobs/job_export_pcb_plot.cpp | 21 +++---- common/jobs/job_export_pcb_plot.h | 1 - kicad/cli/command_pcb_export_base.h | 3 - kicad/cli/command_pcb_export_dxf.cpp | 5 -- kicad/cli/command_pcb_export_gerber.cpp | 6 -- kicad/cli/command_pcb_export_pdf.cpp | 5 -- kicad/cli/command_pcb_export_svg.cpp | 6 -- pcbnew/dialogs/dialog_plot.cpp | 5 -- pcbnew/dialogs/dialog_plot_base.cpp | 17 ++--- pcbnew/dialogs/dialog_plot_base.fbp | 84 +++---------------------- pcbnew/dialogs/dialog_plot_base.h | 5 +- pcbnew/pcb_plot_params.cpp | 9 +-- pcbnew/pcb_plot_params.h | 3 - pcbnew/pcb_plotter.cpp | 1 - pcbnew/plot_brditems_plotter.cpp | 38 +++++------ 16 files changed, 72 insertions(+), 184 deletions(-) diff --git a/common/jobs/job_export_pcb_pdf.cpp b/common/jobs/job_export_pcb_pdf.cpp index d1e2ef5c3f..dceb36bead 100644 --- a/common/jobs/job_export_pcb_pdf.cpp +++ b/common/jobs/job_export_pcb_pdf.cpp @@ -44,28 +44,33 @@ JOB_EXPORT_PCB_PDF::JOB_EXPORT_PCB_PDF() : { m_plotDrawingSheet = false; - m_params.emplace_back( new JOB_PARAM( "color_theme", &m_colorTheme, m_colorTheme ) ); - m_params.emplace_back( new JOB_PARAM( "mirror", &m_mirror, m_mirror ) ); - m_params.emplace_back( - new JOB_PARAM( "black_and_white", &m_blackAndWhite, m_blackAndWhite ) ); - m_params.emplace_back( new JOB_PARAM( "negative", &m_negative, m_negative ) ); - m_params.emplace_back( new JOB_PARAM( "plot_footprint_values", &m_plotFootprintValues, - m_plotFootprintValues ) ); - m_params.emplace_back( new JOB_PARAM( "plot_pad_numbers", &m_plotPadNumbers, m_plotPadNumbers ) ); - m_params.emplace_back( new JOB_PARAM( "plot_invisible_text", &m_plotInvisibleText, - m_plotInvisibleText ) ); - m_params.emplace_back( new JOB_PARAM( - "sketch_pads_on_fab_layers", &m_sketchPadsOnFabLayers, m_sketchPadsOnFabLayers ) ); - m_params.emplace_back( - new JOB_PARAM( "drill_shape", &m_drillShapeOption, m_drillShapeOption ) ); + m_params.emplace_back( new JOB_PARAM( "color_theme", + &m_colorTheme, m_colorTheme ) ); + m_params.emplace_back( new JOB_PARAM( "mirror", + &m_mirror, m_mirror ) ); + m_params.emplace_back( new JOB_PARAM( "black_and_white", + &m_blackAndWhite, m_blackAndWhite ) ); + m_params.emplace_back( new JOB_PARAM( "negative", + &m_negative, m_negative ) ); + m_params.emplace_back( new JOB_PARAM( "plot_footprint_values", + &m_plotFootprintValues, m_plotFootprintValues ) ); + m_params.emplace_back( new JOB_PARAM( "plot_pad_numbers", + &m_plotPadNumbers, m_plotPadNumbers ) ); + m_params.emplace_back( new JOB_PARAM( "sketch_pads_on_fab_layers", + &m_sketchPadsOnFabLayers, m_sketchPadsOnFabLayers ) ); + m_params.emplace_back( new JOB_PARAM( "drill_shape", + &m_drillShapeOption, m_drillShapeOption ) ); - m_params.emplace_back( new JOB_PARAM( "pdf_metadata", &m_pdfMetadata, m_pdfMetadata ) ); - m_params.emplace_back( new JOB_PARAM( "single_document", &m_pdfSingle, m_pdfSingle ) ); - m_params.emplace_back( new JOB_PARAM( - "front_fp_property_popups", &m_pdfFrontFPPropertyPopups, m_pdfFrontFPPropertyPopups ) ); - m_params.emplace_back( new JOB_PARAM( - "back_fp_property_popups", &m_pdfBackFPPropertyPopups, m_pdfBackFPPropertyPopups ) ); - m_params.emplace_back( new JOB_PARAM( "pdf_gen_mode", &m_pdfGenMode, m_pdfGenMode ) ); + m_params.emplace_back( new JOB_PARAM( "pdf_metadata", + &m_pdfMetadata, m_pdfMetadata ) ); + m_params.emplace_back( new JOB_PARAM( "single_document", + &m_pdfSingle, m_pdfSingle ) ); + m_params.emplace_back( new JOB_PARAM( "front_fp_property_popups", + &m_pdfFrontFPPropertyPopups, m_pdfFrontFPPropertyPopups ) ); + m_params.emplace_back( new JOB_PARAM( "back_fp_property_popups", + &m_pdfBackFPPropertyPopups, m_pdfBackFPPropertyPopups ) ); + m_params.emplace_back( new JOB_PARAM( "pdf_gen_mode", + &m_pdfGenMode, m_pdfGenMode ) ); } diff --git a/common/jobs/job_export_pcb_plot.cpp b/common/jobs/job_export_pcb_plot.cpp index e3e284f69f..6457bf9fab 100644 --- a/common/jobs/job_export_pcb_plot.cpp +++ b/common/jobs/job_export_pcb_plot.cpp @@ -37,31 +37,28 @@ JOB_EXPORT_PCB_PLOT::JOB_EXPORT_PCB_PLOT( PLOT_FORMAT aFormat, const std::string m_plotRefDes( true ), m_plotDrawingSheet( true ), m_plotPadNumbers( false ), - m_plotInvisibleText( false ), m_printMaskLayer(), m_printMaskLayersToIncludeOnAllLayers(), m_drillShapeOption( DRILL_MARKS::FULL_DRILL_SHAPE ), m_useDrillOrigin( false ) { m_params.emplace_back( new JOB_PARAM_LSEQ( "layers", &m_printMaskLayer, m_printMaskLayer ) ); + m_params.emplace_back( new JOB_PARAM_LSEQ( "layers_to_include_on_all_layers", &m_printMaskLayersToIncludeOnAllLayers, m_printMaskLayersToIncludeOnAllLayers ) ); + m_params.emplace_back( new JOB_PARAM( "plot_pad_numbers", + &m_plotPadNumbers, m_plotPadNumbers ) ); - m_params.emplace_back( - new JOB_PARAM( "plot_pad_numbers", &m_plotPadNumbers, m_plotPadNumbers ) ); - m_params.emplace_back( new JOB_PARAM( "plot_invisible_text", &m_plotInvisibleText, - m_plotInvisibleText ) ); - - m_params.emplace_back( - new JOB_PARAM( "plot_drawing_sheet", &m_plotDrawingSheet, m_plotDrawingSheet ) ); + m_params.emplace_back( new JOB_PARAM( "plot_drawing_sheet", + &m_plotDrawingSheet, m_plotDrawingSheet ) ); m_params.emplace_back( new JOB_PARAM( "plot_ref_des", &m_plotRefDes, m_plotRefDes ) ); - m_params.emplace_back( - new JOB_PARAM( "use_drill_origin", &m_useDrillOrigin, m_useDrillOrigin ) ); + m_params.emplace_back( new JOB_PARAM( "use_drill_origin", + &m_useDrillOrigin, m_useDrillOrigin ) ); - m_params.emplace_back( - new JOB_PARAM( "drawing_sheet", &m_drawingSheet, m_drawingSheet ) ); + m_params.emplace_back( new JOB_PARAM( "drawing_sheet", + &m_drawingSheet, m_drawingSheet ) ); } \ No newline at end of file diff --git a/common/jobs/job_export_pcb_plot.h b/common/jobs/job_export_pcb_plot.h index df70bf8773..19f46aaf5c 100644 --- a/common/jobs/job_export_pcb_plot.h +++ b/common/jobs/job_export_pcb_plot.h @@ -64,7 +64,6 @@ public: bool m_plotRefDes; bool m_plotDrawingSheet; bool m_plotPadNumbers; - bool m_plotInvisibleText; LSEQ m_printMaskLayer; ///< Layers to include on all individual layer prints diff --git a/kicad/cli/command_pcb_export_base.h b/kicad/cli/command_pcb_export_base.h index 8668b2ac1d..696c24a666 100644 --- a/kicad/cli/command_pcb_export_base.h +++ b/kicad/cli/command_pcb_export_base.h @@ -55,9 +55,6 @@ namespace CLI #define ARG_INCLUDE_BORDER_TITLE "--include-border-title" #define ARG_MIRROR "--mirror" -#define ARG_PLOT_INVISIBLE_TEXT "--plot-invisible-text" -#define ARG_PLOT_INVISIBLE_TEXT_DESC "Force plotting of invisible values / refs" - #define ARG_FLIP_BOTTOM_PADS "--flip-bottom-pads" #define ARG_UNIQUE_PINS "--unique-pins" #define ARG_UNIQUE_FOOTPRINTS "--unique-footprints" diff --git a/kicad/cli/command_pcb_export_dxf.cpp b/kicad/cli/command_pcb_export_dxf.cpp index 0c6402d3b6..a401c33db1 100644 --- a/kicad/cli/command_pcb_export_dxf.cpp +++ b/kicad/cli/command_pcb_export_dxf.cpp @@ -95,10 +95,6 @@ CLI::PCB_EXPORT_DXF_COMMAND::PCB_EXPORT_DXF_COMMAND() : PCB_EXPORT_BASE_COMMAND( "GUI plotting. The given output path specifies a directory in " "which files may be output." ) ) ) .flag(); - - m_argParser.add_argument( ARG_PLOT_INVISIBLE_TEXT ) - .help( UTF8STDSTR( _( ARG_PLOT_INVISIBLE_TEXT_DESC ) ) ) - .flag(); } @@ -127,7 +123,6 @@ int CLI::PCB_EXPORT_DXF_COMMAND::doPerform( KIWAY& aKiway ) dxfJob->m_polygonMode = m_argParser.get( ARG_USE_CONTOURS ); dxfJob->m_useDrillOrigin = m_argParser.get( ARG_USE_DRILL_ORIGIN ); dxfJob->m_plotDrawingSheet = m_argParser.get( ARG_INCLUDE_BORDER_TITLE ); - dxfJob->m_plotInvisibleText = m_argParser.get( ARG_PLOT_INVISIBLE_TEXT ); int drillShape = m_argParser.get( ARG_DRILL_SHAPE_OPTION ); dxfJob->m_drillShapeOption = static_cast( drillShape ); diff --git a/kicad/cli/command_pcb_export_gerber.cpp b/kicad/cli/command_pcb_export_gerber.cpp index 1df26fc167..fe4ea6dc80 100644 --- a/kicad/cli/command_pcb_export_gerber.cpp +++ b/kicad/cli/command_pcb_export_gerber.cpp @@ -83,11 +83,6 @@ CLI::PCB_EXPORT_GERBER_COMMAND::PCB_EXPORT_GERBER_COMMAND( const std::string& aN m_argParser.add_argument( ARG_NO_PROTEL_EXTENSION ) .help( UTF8STDSTR( _( "Use KiCad Gerber file extension" ) ) ) .flag(); - - - m_argParser.add_argument( ARG_PLOT_INVISIBLE_TEXT ) - .help( UTF8STDSTR( _( ARG_PLOT_INVISIBLE_TEXT_DESC ) ) ) - .flag(); } @@ -114,7 +109,6 @@ int CLI::PCB_EXPORT_GERBER_COMMAND::populateJob( JOB_EXPORT_PCB_GERBER* aJob ) aJob->m_useProtelFileExtension = !m_argParser.get( ARG_NO_PROTEL_EXTENSION ); aJob->m_precision = m_argParser.get( ARG_PRECISION ); aJob->m_printMaskLayer = m_selectedLayers; - aJob->m_plotInvisibleText = m_argParser.get( ARG_PLOT_INVISIBLE_TEXT ); if( !wxFile::Exists( aJob->m_filename ) ) { diff --git a/kicad/cli/command_pcb_export_pdf.cpp b/kicad/cli/command_pcb_export_pdf.cpp index 475ed327d7..5b7cab9f5b 100644 --- a/kicad/cli/command_pcb_export_pdf.cpp +++ b/kicad/cli/command_pcb_export_pdf.cpp @@ -98,10 +98,6 @@ CLI::PCB_EXPORT_PDF_COMMAND::PCB_EXPORT_PDF_COMMAND() : PCB_EXPORT_BASE_COMMAND( "F.Cu,B.Cu" ) ) ) .metavar( "COMMON_LAYER_LIST" ); - m_argParser.add_argument( ARG_PLOT_INVISIBLE_TEXT ) - .help( UTF8STDSTR( _( ARG_PLOT_INVISIBLE_TEXT_DESC ) ) ) - .flag(); - m_argParser.add_argument( ARG_MODE_SINGLE ) .help( UTF8STDSTR( _( "Generates a single file with the output arg path acting as the complete " @@ -141,7 +137,6 @@ int CLI::PCB_EXPORT_PDF_COMMAND::doPerform( KIWAY& aKiway ) pdfJob->m_plotFootprintValues = !m_argParser.get( ARG_EXCLUDE_VALUE ); pdfJob->m_plotRefDes = !m_argParser.get( ARG_EXCLUDE_REFDES ); - pdfJob->m_plotInvisibleText = m_argParser.get( ARG_PLOT_INVISIBLE_TEXT ); pdfJob->m_plotDrawingSheet = m_argParser.get( ARG_INCLUDE_BORDER_TITLE ); diff --git a/kicad/cli/command_pcb_export_svg.cpp b/kicad/cli/command_pcb_export_svg.cpp index 01b4ef1061..bda159be17 100644 --- a/kicad/cli/command_pcb_export_svg.cpp +++ b/kicad/cli/command_pcb_export_svg.cpp @@ -114,11 +114,6 @@ CLI::PCB_EXPORT_SVG_COMMAND::PCB_EXPORT_SVG_COMMAND() : PCB_EXPORT_BASE_COMMAND( "GUI plotting. The given output path specifies a directory in " "which files may be output." ) ) ) .flag(); - - - m_argParser.add_argument( ARG_PLOT_INVISIBLE_TEXT ) - .help( UTF8STDSTR( _( ARG_PLOT_INVISIBLE_TEXT_DESC ) ) ) - .flag(); } @@ -141,7 +136,6 @@ int CLI::PCB_EXPORT_SVG_COMMAND::doPerform( KIWAY& aKiway ) int drillShape = m_argParser.get( ARG_DRILL_SHAPE_OPTION ); svgJob->m_drillShapeOption = static_cast( drillShape ); svgJob->m_drawingSheet = m_argDrawingSheet; - svgJob->m_plotInvisibleText = m_argParser.get( ARG_PLOT_INVISIBLE_TEXT ); svgJob->m_filename = m_argInput; svgJob->SetConfiguredOutputPath( m_argOutput ); diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp index ed7c223fa1..e51cdc622d 100644 --- a/pcbnew/dialogs/dialog_plot.cpp +++ b/pcbnew/dialogs/dialog_plot.cpp @@ -390,9 +390,6 @@ void DIALOG_PLOT::init_Dialog() // Option to plot page references: m_plotSheetRef->SetValue( m_plotOpts.GetPlotFrameRef() ); - // Option to force ploting of hidden text in footprints - m_plotInvisibleText->SetValue( m_plotOpts.GetPlotInvisibleText() ); - // Options to plot pads and vias holes m_drillShapeOpt->SetSelection( (int) m_plotOpts.GetDrillMarksType() ); @@ -494,7 +491,6 @@ void DIALOG_PLOT::transferPlotParamsToJob() m_job->m_plotDrawingSheet = m_plotOpts.GetPlotFrameRef(); m_job->m_plotPadNumbers = m_plotOpts.GetPlotPadNumbers(); - m_job->m_plotInvisibleText = m_plotOpts.GetPlotInvisibleText(); m_job->m_blackAndWhite = m_plotOpts.GetBlackAndWhite(); m_job->m_mirror = m_plotOpts.GetMirror(); @@ -1051,7 +1047,6 @@ void DIALOG_PLOT::applyPlotSettings() tempOptions.SetCrossoutDNPFPsOnFabLayers( m_plotDNP->GetValue() && m_crossoutDNP->GetValue() ); tempOptions.SetUseAuxOrigin( m_useAuxOriginCheckBox->GetValue() ); - tempOptions.SetPlotInvisibleText( m_plotInvisibleText->GetValue() ); tempOptions.SetScaleSelection( m_scaleOpt->GetSelection() ); int sel = m_drillShapeOpt->GetSelection(); diff --git a/pcbnew/dialogs/dialog_plot_base.cpp b/pcbnew/dialogs/dialog_plot_base.cpp index a089d51176..6436f15054 100644 --- a/pcbnew/dialogs/dialog_plot_base.cpp +++ b/pcbnew/dialogs/dialog_plot_base.cpp @@ -85,31 +85,26 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr m_plotDNP = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Indicate DNP on fabrication layers"), wxDefaultPosition, wxDefaultSize, 0 ); m_plotDNP->SetToolTip( _("Hide or cross-out DNP footprints on fabrication layers") ); - gbSizer1->Add( m_plotDNP, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); + gbSizer1->Add( m_plotDNP, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); m_hideDNP = new wxRadioButton( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Hide"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); m_hideDNP->SetToolTip( _("Hide the footprint text and graphics") ); - gbSizer1->Add( m_hideDNP, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxLEFT, 25 ); + gbSizer1->Add( m_hideDNP, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxLEFT, 25 ); m_crossoutDNP = new wxRadioButton( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Cross-out"), wxDefaultPosition, wxDefaultSize, 0 ); - gbSizer1->Add( m_crossoutDNP, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxLEFT, 25 ); - - m_plotInvisibleText = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Force plotting of invisible values / refs"), wxDefaultPosition, wxDefaultSize, 0 ); - m_plotInvisibleText->SetToolTip( _("Force plot invisible footprint values and reference designators") ); - - gbSizer1->Add( m_plotInvisibleText, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); + gbSizer1->Add( m_crossoutDNP, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxLEFT, 25 ); m_sketchPadsOnFabLayers = new wxCheckBox( sbOptionsSizer->GetStaticBox(), ID_ALLOW_PRINT_PAD_ON_SILKSCREEN, _("Sketch pads on fabrication layers"), wxDefaultPosition, wxDefaultSize, 0 ); m_sketchPadsOnFabLayers->SetToolTip( _("Include pad outlines on F.Fab and B.Fab layers when plotting") ); - gbSizer1->Add( m_sketchPadsOnFabLayers, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); + gbSizer1->Add( m_sketchPadsOnFabLayers, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); m_plotPadNumbers = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Include pad numbers"), wxDefaultPosition, wxDefaultSize, 0 ); - gbSizer1->Add( m_plotPadNumbers, wxGBPosition( 6, 0 ), wxGBSpan( 1, 1 ), wxLEFT, 25 ); + gbSizer1->Add( m_plotPadNumbers, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxLEFT, 25 ); m_zoneFillCheck = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Check zone fills before plotting"), wxDefaultPosition, wxDefaultSize, 0 ); - gbSizer1->Add( m_zoneFillCheck, wxGBPosition( 6, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 ); + gbSizer1->Add( m_zoneFillCheck, wxGBPosition( 6, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL, 30 ); drillMarksLabel = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Drill marks:"), wxDefaultPosition, wxDefaultSize, 0 ); drillMarksLabel->Wrap( -1 ); diff --git a/pcbnew/dialogs/dialog_plot_base.fbp b/pcbnew/dialogs/dialog_plot_base.fbp index d1c35f7db1..92010e9e81 100644 --- a/pcbnew/dialogs/dialog_plot_base.fbp +++ b/pcbnew/dialogs/dialog_plot_base.fbp @@ -14,7 +14,7 @@ res UTF-8 dialog_plot_base - 1000 + 6000 1 1 UI @@ -687,7 +687,7 @@ 1 0 wxALIGN_CENTER_VERTICAL - 2 + 1 1 1 @@ -756,7 +756,7 @@ 1 0 wxLEFT - 3 + 2 1 1 @@ -824,7 +824,7 @@ 1 0 wxLEFT - 4 + 3 1 1 @@ -892,75 +892,7 @@ 1 0 wxALIGN_CENTER_VERTICAL - 1 - 1 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Force plotting of invisible values / refs - - 0 - - - 0 - - 1 - m_plotInvisibleText - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Force plot invisible footprint values and reference designators - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - 1 - 0 - wxALIGN_CENTER_VERTICAL - 5 + 4 1 1 @@ -1029,7 +961,7 @@ 1 0 wxLEFT - 6 + 5 1 1 @@ -1095,8 +1027,8 @@ 30 2 - 1 - wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + wxALIGN_CENTER_VERTICAL 6 1 diff --git a/pcbnew/dialogs/dialog_plot_base.h b/pcbnew/dialogs/dialog_plot_base.h index 628823b346..4b4a6231fb 100644 --- a/pcbnew/dialogs/dialog_plot_base.h +++ b/pcbnew/dialogs/dialog_plot_base.h @@ -41,8 +41,8 @@ class WX_HTML_REPORT_PANEL; /////////////////////////////////////////////////////////////////////////// -#define ID_ALLOW_PRINT_PAD_ON_SILKSCREEN 1000 -#define ID_MIROR_OPT 1001 +#define ID_ALLOW_PRINT_PAD_ON_SILKSCREEN 6000 +#define ID_MIROR_OPT 6001 /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_PLOT_BASE @@ -67,7 +67,6 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM wxCheckBox* m_plotDNP; wxRadioButton* m_hideDNP; wxRadioButton* m_crossoutDNP; - wxCheckBox* m_plotInvisibleText; wxCheckBox* m_sketchPadsOnFabLayers; wxCheckBox* m_plotPadNumbers; wxCheckBox* m_zoneFillCheck; diff --git a/pcbnew/pcb_plot_params.cpp b/pcbnew/pcb_plot_params.cpp index abd650fae3..a0d8418e30 100644 --- a/pcbnew/pcb_plot_params.cpp +++ b/pcbnew/pcb_plot_params.cpp @@ -115,7 +115,6 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS() m_plotReference = true; m_plotValue = true; m_plotFPText = true; - m_plotInvisibleText = false; m_sketchPadsOnFabLayers = false; m_hideDNPFPsOnFabLayers = false; m_sketchDNPFPsOnFabLayers = true; @@ -229,7 +228,6 @@ void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter ) const KICAD_FORMAT::FormatBool( aFormatter, getTokenName( T_plot_black_and_white ), m_blackAndWhite ); - KICAD_FORMAT::FormatBool( aFormatter, "plotinvisibletext", m_plotInvisibleText ); KICAD_FORMAT::FormatBool( aFormatter, "sketchpadsonfab", m_sketchPadsOnFabLayers ); KICAD_FORMAT::FormatBool( aFormatter, "plotpadnumbers", m_plotPadNumbers ); KICAD_FORMAT::FormatBool( aFormatter, "hidednponfab", m_hideDNPFPsOnFabLayers ); @@ -334,9 +332,6 @@ bool PCB_PLOT_PARAMS::IsSameAs( const PCB_PLOT_PARAMS &aPcbPlotParams ) const if( m_plotFPText != aPcbPlotParams.m_plotFPText ) return false; - if( m_plotInvisibleText != aPcbPlotParams.m_plotInvisibleText ) - return false; - if( m_sketchPadsOnFabLayers != aPcbPlotParams.m_sketchPadsOnFabLayers ) return false; @@ -802,8 +797,8 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) aPcbPlotParams->m_blackAndWhite = parseBool(); break; - case T_plotinvisibletext: - aPcbPlotParams->m_plotInvisibleText = parseBool(); + case T_plotinvisibletext: // legacy token; no longer supported + parseBool(); break; case T_sketchpadsonfab: diff --git a/pcbnew/pcb_plot_params.h b/pcbnew/pcb_plot_params.h index 26c982dd12..c878984f9b 100644 --- a/pcbnew/pcb_plot_params.h +++ b/pcbnew/pcb_plot_params.h @@ -111,8 +111,6 @@ public: void SetCrossoutDNPFPsOnFabLayers( bool aFlag ) { m_crossoutDNPFPsOnFabLayers = aFlag; } bool GetCrossoutDNPFPsOnFabLayers() const { return m_crossoutDNPFPsOnFabLayers; } - void SetPlotInvisibleText( bool aFlag ) { m_plotInvisibleText = aFlag; } - bool GetPlotInvisibleText() const { return m_plotInvisibleText; } void SetPlotValue( bool aFlag ) { m_plotValue = aFlag; } bool GetPlotValue() const { return m_plotValue; } void SetPlotReference( bool aFlag ) { m_plotReference = aFlag; } @@ -274,7 +272,6 @@ private: bool m_plotReference; ///< Enable plotting of part references bool m_plotValue; ///< Enable plotting of part values bool m_plotFPText; - bool m_plotInvisibleText; ///< Force plotting of fields marked invisible bool m_sketchPadsOnFabLayers; ///< Plots pads outlines on fab layers int m_sketchPadLineWidth; diff --git a/pcbnew/pcb_plotter.cpp b/pcbnew/pcb_plotter.cpp index b1c4dae0ac..34e140fd39 100644 --- a/pcbnew/pcb_plotter.cpp +++ b/pcbnew/pcb_plotter.cpp @@ -370,7 +370,6 @@ void PCB_PLOTTER::PlotJobToPlotOpts( PCB_PLOT_PARAMS& aOpts, JOB_EXPORT_PCB_PLOT aOpts.SetUseAuxOrigin( aJob->m_useDrillOrigin ); aOpts.SetPlotFrameRef( aJob->m_plotDrawingSheet ); - aOpts.SetPlotInvisibleText( aJob->m_plotInvisibleText ); aOpts.SetPlotReference( aJob->m_plotRefDes ); aOpts.SetPlotValue( aJob->m_plotFootprintValues ); aOpts.SetSketchPadsOnFabLayers( aJob->m_sketchPadsOnFabLayers ); diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index f0900d73c2..ded3e4f918 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -358,26 +358,28 @@ void BRDITEMS_PLOTTER::PlotFootprintTextItems( const FOOTPRINT* aFootprint ) if( !GetPlotFPText() ) return; - const PCB_TEXT* textItem = &aFootprint->Reference(); - PCB_LAYER_ID textLayer = textItem->GetLayer(); + const PCB_TEXT* reference = &aFootprint->Reference(); + PCB_LAYER_ID refLayer = reference->GetLayer(); // Reference and value have special controls for forcing their plotting - if( GetPlotReference() && m_layerMask[textLayer] - && ( textItem->IsVisible() || GetPlotInvisibleText() ) - && !( aFootprint->IsDNP() && hideDNPItems( textLayer ) ) ) + if( GetPlotReference() + && m_layerMask[refLayer] + && reference->IsVisible() + && !( aFootprint->IsDNP() && hideDNPItems( refLayer ) ) ) { - PlotText( textItem, textLayer, textItem->IsKnockout(), textItem->GetFontMetrics(), - aFootprint->IsDNP() && crossoutDNPItems( textLayer ) ); + PlotText( reference, refLayer, reference->IsKnockout(), reference->GetFontMetrics(), + aFootprint->IsDNP() && crossoutDNPItems( refLayer ) ); } - textItem = &aFootprint->Value(); - textLayer = textItem->GetLayer(); + const PCB_TEXT* value = &aFootprint->Value(); + PCB_LAYER_ID valueLayer = reference->GetLayer(); - if( GetPlotValue() && m_layerMask[textLayer] - && ( textItem->IsVisible() || GetPlotInvisibleText() ) - && !( aFootprint->IsDNP() && hideDNPItems( textLayer ) ) ) + if( GetPlotValue() + && m_layerMask[valueLayer] + && value->IsVisible() + && !( aFootprint->IsDNP() && hideDNPItems( valueLayer ) ) ) { - PlotText( textItem, textLayer, textItem->IsKnockout(), textItem->GetFontMetrics(), + PlotText( value, valueLayer, value->IsKnockout(), value->GetFontMetrics(), false ); } @@ -394,10 +396,8 @@ void BRDITEMS_PLOTTER::PlotFootprintTextItems( const FOOTPRINT* aFootprint ) for( BOARD_ITEM* item : aFootprint->GraphicalItems() ) { - textItem = dynamic_cast( item ); - - if( textItem ) - texts.push_back( static_cast( item ) ); + if( PCB_TEXT* textItem = dynamic_cast( item ) ) + texts.push_back( textItem ); } for( const PCB_TEXT* text : texts ) @@ -405,8 +405,8 @@ void BRDITEMS_PLOTTER::PlotFootprintTextItems( const FOOTPRINT* aFootprint ) if( !text->IsVisible() ) continue; - textLayer = text->GetLayer(); - bool strikeout = false; + PCB_LAYER_ID textLayer = text->GetLayer(); + bool strikeout = false; if( textLayer == Edge_Cuts || textLayer >= PCB_LAYER_ID_COUNT ) continue;