diff --git a/3d-viewer/3d_canvas/board_adapter.cpp b/3d-viewer/3d_canvas/board_adapter.cpp index 0540e7898e..b3938ebbeb 100644 --- a/3d-viewer/3d_canvas/board_adapter.cpp +++ b/3d-viewer/3d_canvas/board_adapter.cpp @@ -814,7 +814,7 @@ std::bitset BOARD_ADAPTER::GetVisibleLayers() const ret.set( LAYER_FP_REFERENCES, plotParams.GetPlotReference() ); ret.set( LAYER_FP_VALUES, plotParams.GetPlotValue() ); - ret.set( LAYER_FP_TEXT, true ); + ret.set( LAYER_FP_TEXT, plotParams.GetPlotFPText() ); } else if( LAYER_PRESET_3D* preset = m_Cfg->FindPreset( m_Cfg->m_CurrentPreset ) ) { diff --git a/common/pcb_plot_params.keywords b/common/pcb_plot_params.keywords index d67e8e1bad..87554393a7 100644 --- a/common/pcb_plot_params.keywords +++ b/common/pcb_plot_params.keywords @@ -24,6 +24,7 @@ pcbplotparams pdf_back_fp_property_popups pdf_front_fp_property_popups plotframeref +plotfptext plotinvisibletext plotreference plotvalue diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp index deca73a725..9d0c1dc7f0 100644 --- a/pcbnew/dialogs/dialog_plot.cpp +++ b/pcbnew/dialogs/dialog_plot.cpp @@ -306,8 +306,9 @@ void DIALOG_PLOT::init_Dialog() m_plotSheetRef->SetValue( m_plotOpts.GetPlotFrameRef() ); // Options to plot texts on footprints - m_plotModuleValueOpt->SetValue( m_plotOpts.GetPlotValue() ); - m_plotModuleRefOpt->SetValue( m_plotOpts.GetPlotReference() ); + m_plotFootprintValues->SetValue( m_plotOpts.GetPlotValue() ); + m_plotFootprintRefs->SetValue( m_plotOpts.GetPlotReference() ); + m_plotFootprintText->SetValue( m_plotOpts.GetPlotFPText() ); m_plotInvisibleText->SetValue( m_plotOpts.GetPlotInvisibleText() ); // Options to plot pads and vias holes @@ -777,8 +778,9 @@ void DIALOG_PLOT::applyPlotSettings() tempOptions.SetPlotFrameRef( m_plotSheetRef->GetValue() ); tempOptions.SetSketchPadsOnFabLayers( m_sketchPadsOnFabLayers->GetValue() ); tempOptions.SetUseAuxOrigin( m_useAuxOriginCheckBox->GetValue() ); - tempOptions.SetPlotValue( m_plotModuleValueOpt->GetValue() ); - tempOptions.SetPlotReference( m_plotModuleRefOpt->GetValue() ); + tempOptions.SetPlotValue( m_plotFootprintValues->GetValue() ); + tempOptions.SetPlotReference( m_plotFootprintRefs->GetValue() ); + tempOptions.SetPlotFPText( m_plotFootprintText->GetValue() ); tempOptions.SetPlotInvisibleText( m_plotInvisibleText->GetValue() ); tempOptions.SetScaleSelection( m_scaleOpt->GetSelection() ); @@ -1198,3 +1200,26 @@ void DIALOG_PLOT::onPlotAllListMoveDown( wxCommandEvent& aEvent ) m_plotAllLayersList->MoveCurrentDown(); } + +void DIALOG_PLOT::onPlotFPRefs( wxCommandEvent& aEvent ) +{ + if( aEvent.IsChecked() ) + m_plotFootprintText->SetValue( true ); +} + + +void DIALOG_PLOT::onPlotFPValues( wxCommandEvent& aEvent ) +{ + if( aEvent.IsChecked() ) + m_plotFootprintText->SetValue( true ); +} + + +void DIALOG_PLOT::onPlotFPText( wxCommandEvent& aEvent ) +{ + if( !aEvent.IsChecked() ) + { + m_plotFootprintRefs->SetValue( false ); + m_plotFootprintValues->SetValue( false ); + } +} \ No newline at end of file diff --git a/pcbnew/dialogs/dialog_plot.h b/pcbnew/dialogs/dialog_plot.h index 7cf1fa02c5..9a1b1b7cec 100644 --- a/pcbnew/dialogs/dialog_plot.h +++ b/pcbnew/dialogs/dialog_plot.h @@ -60,6 +60,10 @@ private: void onPlotAllListMoveUp( wxCommandEvent& aEvent ); void onPlotAllListMoveDown( wxCommandEvent& aEvent ); + void onPlotFPValues( wxCommandEvent& aEvent ) override; + void onPlotFPRefs( wxCommandEvent& aEvent ) override; + void onPlotFPText( wxCommandEvent& aEvent ) override; + // other functions void init_Dialog(); // main initialization void reInitDialog(); // initialization after calling drill dialog diff --git a/pcbnew/dialogs/dialog_plot_base.cpp b/pcbnew/dialogs/dialog_plot_base.cpp index 1c33304442..ac0754310d 100644 --- a/pcbnew/dialogs/dialog_plot_base.cpp +++ b/pcbnew/dialogs/dialog_plot_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-282-g1fa54006) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -77,33 +77,35 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr gbSizer1->Add( m_plotSheetRef, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); - m_plotModuleValueOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Plot footprint values"), wxDefaultPosition, wxDefaultSize, 0 ); - m_plotModuleValueOpt->SetValue(true); - gbSizer1->Add( m_plotModuleValueOpt, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); + m_plotFootprintValues = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Plot footprint values"), wxDefaultPosition, wxDefaultSize, 0 ); + m_plotFootprintValues->SetValue(true); + gbSizer1->Add( m_plotFootprintValues, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); - m_plotModuleRefOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), ID_PRINT_REF, _("Plot reference designators"), wxDefaultPosition, wxDefaultSize, 0 ); - m_plotModuleRefOpt->SetValue(true); - gbSizer1->Add( m_plotModuleRefOpt, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); + m_plotFootprintRefs = new wxCheckBox( sbOptionsSizer->GetStaticBox(), ID_PRINT_REF, _("Plot reference designators"), wxDefaultPosition, wxDefaultSize, 0 ); + m_plotFootprintRefs->SetValue(true); + gbSizer1->Add( m_plotFootprintRefs, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); + + m_plotFootprintText = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Plot footprint text"), wxDefaultPosition, wxDefaultSize, 0 ); + m_plotFootprintText->SetValue(true); + gbSizer1->Add( m_plotFootprintText, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), 0, 5 ); 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( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); + gbSizer1->Add( m_plotInvisibleText, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); 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 ); + m_zoneFillCheck = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Check zone fills before plotting"), wxDefaultPosition, wxDefaultSize, 0 ); + gbSizer1->Add( m_zoneFillCheck, wxGBPosition( 6, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_tentVias = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Tent vias"), wxDefaultPosition, wxDefaultSize, 0 ); m_tentVias->SetToolTip( _("Tented vias: not plotted on soldermask layer\nNot tented: vias are plotted on soldermask layer\n(Solder mask is a negative layer)") ); - gbSizer1->Add( m_tentVias, wxGBPosition( 5, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 ); - - m_useAuxOriginCheckBox = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Use drill/place file origin"), wxDefaultPosition, wxDefaultSize, 0 ); - m_useAuxOriginCheckBox->SetToolTip( _("Use the drill/place file origin as the coordinate origin for plotted files") ); - - gbSizer1->Add( m_useAuxOriginCheckBox, wxGBPosition( 3, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 ); + gbSizer1->Add( m_tentVias, wxGBPosition( 6, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 ); drillMarksLabel = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Drill marks:"), wxDefaultPosition, wxDefaultSize, 0 ); drillMarksLabel->Wrap( -1 ); @@ -135,14 +137,16 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr m_plotModeOpt->SetSelection( 0 ); gbSizer1->Add( m_plotModeOpt, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxEXPAND|wxLEFT, 5 ); + m_useAuxOriginCheckBox = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Use drill/place file origin"), wxDefaultPosition, wxDefaultSize, 0 ); + m_useAuxOriginCheckBox->SetToolTip( _("Use the drill/place file origin as the coordinate origin for plotted files") ); + + gbSizer1->Add( m_useAuxOriginCheckBox, wxGBPosition( 3, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 ); + m_plotMirrorOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), ID_MIROR_OPT, _("Mirrored plot"), wxDefaultPosition, wxDefaultSize, 0 ); - gbSizer1->Add( m_plotMirrorOpt, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); + gbSizer1->Add( m_plotMirrorOpt, wxGBPosition( 4, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 ); m_plotPSNegativeOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Negative plot"), wxDefaultPosition, wxDefaultSize, 0 ); - gbSizer1->Add( m_plotPSNegativeOpt, wxGBPosition( 4, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 ); - - m_zoneFillCheck = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Check zone fills before plotting"), wxDefaultPosition, wxDefaultSize, 0 ); - gbSizer1->Add( m_zoneFillCheck, wxGBPosition( 6, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + gbSizer1->Add( m_plotPSNegativeOpt, wxGBPosition( 5, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 ); sbOptionsSizer->Add( gbSizer1, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); @@ -491,6 +495,9 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr m_plotFormatOpt->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::SetPlotFormat ), NULL, this ); m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnOutputDirectoryBrowseClicked ), NULL, this ); m_layerCheckListBox->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DIALOG_PLOT_BASE::OnRightClick ), NULL, this ); + m_plotFootprintValues->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::onPlotFPValues ), NULL, this ); + m_plotFootprintRefs->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::onPlotFPRefs ), NULL, this ); + m_plotFootprintText->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::onPlotFPText ), NULL, this ); m_scaleOpt->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnSetScaleOpt ), NULL, this ); m_boardSetup->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( DIALOG_PLOT_BASE::onBoardSetup ), NULL, this ); m_useGerberX2Format->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnGerberX2Checked ), NULL, this ); @@ -513,6 +520,9 @@ DIALOG_PLOT_BASE::~DIALOG_PLOT_BASE() m_plotFormatOpt->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::SetPlotFormat ), NULL, this ); m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnOutputDirectoryBrowseClicked ), NULL, this ); m_layerCheckListBox->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DIALOG_PLOT_BASE::OnRightClick ), NULL, this ); + m_plotFootprintValues->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::onPlotFPValues ), NULL, this ); + m_plotFootprintRefs->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::onPlotFPRefs ), NULL, this ); + m_plotFootprintText->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::onPlotFPText ), NULL, this ); m_scaleOpt->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnSetScaleOpt ), NULL, this ); m_boardSetup->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( DIALOG_PLOT_BASE::onBoardSetup ), NULL, this ); m_useGerberX2Format->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnGerberX2Checked ), NULL, this ); diff --git a/pcbnew/dialogs/dialog_plot_base.fbp b/pcbnew/dialogs/dialog_plot_base.fbp index 6dd3780981..6e859cbbc0 100644 --- a/pcbnew/dialogs/dialog_plot_base.fbp +++ b/pcbnew/dialogs/dialog_plot_base.fbp @@ -36,7 +36,6 @@ wxBOTH 1 - 0 1 impl_virtual @@ -98,7 +97,6 @@ Dock 0 Left - 0 1 1 @@ -161,7 +159,6 @@ Dock 0 Left - 0 1 1 @@ -236,7 +233,6 @@ Dock 0 Left - 0 1 1 @@ -298,7 +294,6 @@ Dock 0 Left - 0 1 1 @@ -368,7 +363,6 @@ Dock 0 Left - 0 1 1 @@ -462,7 +456,6 @@ Dock 0 Left - 0 1 1 @@ -568,7 +561,6 @@ Dock 0 Left - 0 1 1 @@ -636,7 +628,6 @@ Dock 0 Left - 0 1 1 @@ -652,7 +643,7 @@ 0 1 - m_plotModuleValueOpt + m_plotFootprintValues 1 @@ -673,6 +664,7 @@ + onPlotFPValues @@ -704,7 +696,6 @@ Dock 0 Left - 0 1 1 @@ -720,7 +711,7 @@ 0 1 - m_plotModuleRefOpt + m_plotFootprintRefs 1 @@ -741,6 +732,75 @@ + onPlotFPRefs + + + + 5 + 1 + 0 + + 3 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Plot footprint text + + 0 + + + 0 + + 1 + m_plotFootprintText + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + onPlotFPText @@ -748,7 +808,7 @@ 1 0 wxALIGN_CENTER_VERTICAL - 3 + 4 1 1 @@ -772,7 +832,6 @@ Dock 0 Left - 0 1 1 @@ -840,7 +899,6 @@ Dock 0 Left - 0 1 1 @@ -880,11 +938,78 @@ + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 6 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Check zone fills before plotting + + 0 + + + 0 + + 1 + m_zoneFillCheck + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + 30 2 1 wxALIGN_CENTER_VERTICAL|wxLEFT - 5 + 6 1 1 @@ -908,7 +1033,6 @@ Dock 0 Left - 0 1 1 @@ -947,74 +1071,6 @@ - - 30 - 2 - 1 - wxALIGN_CENTER_VERTICAL|wxLEFT - 3 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Use drill/place file origin - - 0 - - - 0 - - 1 - m_useAuxOriginCheckBox - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Use the drill/place file origin as the coordinate origin for plotted files - - wxFILTER_NONE - wxDefaultValidator - - - - - - 30 1 @@ -1043,7 +1099,6 @@ Dock 0 Left - 0 1 1 @@ -1109,7 +1164,6 @@ Dock 0 Left - 0 1 1 @@ -1176,7 +1230,6 @@ Dock 0 Left - 0 1 1 @@ -1242,7 +1295,6 @@ Dock 0 Left - 0 1 1 @@ -1310,7 +1362,6 @@ Dock 0 Left - 0 1 1 @@ -1376,7 +1427,6 @@ Dock 0 Left - 0 1 1 @@ -1416,10 +1466,77 @@ - 5 - 1 - 0 - wxALIGN_CENTER_VERTICAL + 30 + 2 + 1 + wxALIGN_CENTER_VERTICAL|wxLEFT + 3 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Use drill/place file origin + + 0 + + + 0 + + 1 + m_useAuxOriginCheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Use the drill/place file origin as the coordinate origin for plotted files + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 30 + 2 + 1 + wxALIGN_CENTER_VERTICAL|wxLEFT 4 1 @@ -1444,7 +1561,6 @@ Dock 0 Left - 0 1 1 @@ -1488,7 +1604,7 @@ 2 1 wxALIGN_CENTER_VERTICAL|wxLEFT - 4 + 5 1 1 @@ -1512,7 +1628,6 @@ Dock 0 Left - 0 1 1 @@ -1551,74 +1666,6 @@ - - 5 - 2 - 0 - wxALIGN_CENTER_VERTICAL|wxRIGHT - 6 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Check zone fills before plotting - - 0 - - - 0 - - 1 - m_zoneFillCheck - 1 - - - protected - 1 - - Resizable - 1 - - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - @@ -1658,7 +1705,6 @@ Dock 0 Left - 0 1 1 @@ -1725,7 +1771,6 @@ Dock 0 Left - 0 1 1 @@ -1787,7 +1832,6 @@ Dock 0 Left - 0 1 1 @@ -1868,7 +1912,6 @@ Dock 0 Left - 0 1 1 @@ -1970,7 +2013,6 @@ Dock 0 Left - 0 1 1 @@ -2038,7 +2080,6 @@ Dock 0 Left - 0 1 1 @@ -2106,7 +2147,6 @@ Dock 0 Left - 0 1 1 @@ -2173,7 +2213,6 @@ Dock 0 Left - 0 1 1 @@ -2239,7 +2278,6 @@ Dock 0 Left - 0 1 1 @@ -2307,7 +2345,6 @@ Dock 0 Left - 0 1 1 @@ -2376,7 +2413,6 @@ Dock 0 Left - 0 1 1 @@ -2444,7 +2480,6 @@ Dock 0 Left - 0 1 1 @@ -2524,7 +2559,6 @@ Dock 0 Left - 0 1 1 @@ -2586,7 +2620,6 @@ Dock 0 Left - 0 1 1 @@ -2651,7 +2684,6 @@ Dock 0 Left - 0 1 1 @@ -2753,7 +2785,6 @@ Dock 0 Left - 0 1 1 @@ -2815,7 +2846,6 @@ Dock 0 Left - 0 1 1 @@ -2890,7 +2920,6 @@ Dock 0 Left - 0 1 1 @@ -2952,7 +2981,6 @@ Dock 0 Left - 0 1 1 @@ -3027,7 +3055,6 @@ Dock 0 Left - 0 1 1 @@ -3089,7 +3116,6 @@ Dock 0 Left - 0 1 1 @@ -3154,7 +3180,6 @@ Dock 0 Left - 0 1 1 @@ -3219,7 +3244,6 @@ Dock 0 Left - 0 1 1 @@ -3316,7 +3340,6 @@ Dock 0 Left - 0 1 1 @@ -3384,7 +3407,6 @@ Dock 0 Left - 0 1 1 @@ -3450,7 +3472,6 @@ Dock 0 Left - 0 1 1 @@ -3518,7 +3539,6 @@ Dock 0 Left - 0 1 1 @@ -3616,7 +3636,6 @@ Dock 0 Left - 0 1 1 @@ -3681,7 +3700,6 @@ Dock 0 Left - 0 1 1 @@ -3747,7 +3765,6 @@ Dock 0 Left - 0 1 1 @@ -3813,7 +3830,6 @@ Dock 0 Left - 0 1 1 @@ -3911,7 +3927,6 @@ Dock 0 Left - 0 1 1 @@ -3977,7 +3992,6 @@ Dock 0 Left - 0 1 1 @@ -4045,7 +4059,6 @@ Dock 0 Left - 0 1 1 @@ -4113,7 +4126,6 @@ Dock 0 Left - 0 1 1 @@ -4194,7 +4206,6 @@ Dock 0 Left - 0 1 1 @@ -4268,7 +4279,6 @@ Dock 0 Left - 0 1 1 @@ -4338,7 +4348,6 @@ Dock 0 Left - 0 1 1 diff --git a/pcbnew/dialogs/dialog_plot_base.h b/pcbnew/dialogs/dialog_plot_base.h index 1b43c7f1b7..1ddd2fe343 100644 --- a/pcbnew/dialogs/dialog_plot_base.h +++ b/pcbnew/dialogs/dialog_plot_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-282-g1fa54006) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -72,21 +72,22 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM wxCheckListBox* m_layerCheckListBox; wxBoxSizer* m_PlotOptionsSizer; wxCheckBox* m_plotSheetRef; - wxCheckBox* m_plotModuleValueOpt; - wxCheckBox* m_plotModuleRefOpt; + wxCheckBox* m_plotFootprintValues; + wxCheckBox* m_plotFootprintRefs; + wxCheckBox* m_plotFootprintText; wxCheckBox* m_plotInvisibleText; wxCheckBox* m_sketchPadsOnFabLayers; + wxCheckBox* m_zoneFillCheck; wxCheckBox* m_tentVias; - wxCheckBox* m_useAuxOriginCheckBox; wxStaticText* drillMarksLabel; wxChoice* m_drillShapeOpt; wxStaticText* scalingLabel; wxChoice* m_scaleOpt; wxStaticText* plotModeLabel; wxChoice* m_plotModeOpt; + wxCheckBox* m_useAuxOriginCheckBox; wxCheckBox* m_plotMirrorOpt; wxCheckBox* m_plotPSNegativeOpt; - wxCheckBox* m_zoneFillCheck; wxBoxSizer* m_SizerSolderMaskAlert; wxStaticBitmap* m_bitmapAlert; wxStaticText* m_staticTextAlert; @@ -144,6 +145,9 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM virtual void OnRightClick( wxMouseEvent& event ) { event.Skip(); } virtual void SetPlotFormat( wxCommandEvent& event ) { event.Skip(); } virtual void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) { event.Skip(); } + virtual void onPlotFPValues( wxCommandEvent& event ) { event.Skip(); } + virtual void onPlotFPRefs( wxCommandEvent& event ) { event.Skip(); } + virtual void onPlotFPText( wxCommandEvent& event ) { event.Skip(); } virtual void OnSetScaleOpt( wxCommandEvent& event ) { event.Skip(); } virtual void onBoardSetup( wxHyperlinkEvent& event ) { event.Skip(); } virtual void OnGerberX2Checked( wxCommandEvent& event ) { event.Skip(); } diff --git a/pcbnew/pcb_plot_params.cpp b/pcbnew/pcb_plot_params.cpp index 469bc8efc0..9ab7d28fd0 100644 --- a/pcbnew/pcb_plot_params.cpp +++ b/pcbnew/pcb_plot_params.cpp @@ -114,6 +114,7 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS() m_A4Output = false; m_plotReference = true; m_plotValue = true; + m_plotFPText = true; m_plotInvisibleText = false; m_sketchPadsOnFabLayers = false; m_subtractMaskFromSilk = false; @@ -240,6 +241,7 @@ void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter, printBool( m_A4Output ) ); aFormatter->Print( aNestLevel+1, "(plotreference %s)\n", printBool( m_plotReference ) ); aFormatter->Print( aNestLevel+1, "(plotvalue %s)\n", printBool( m_plotValue ) ); + aFormatter->Print( aNestLevel+1, "(plotfptext %s)\n", printBool( m_plotFPText ) ); aFormatter->Print( aNestLevel+1, "(plotinvisibletext %s)\n", printBool( m_plotInvisibleText ) ); aFormatter->Print( aNestLevel+1, "(sketchpadsonfab %s)\n", printBool( m_sketchPadsOnFabLayers ) ); @@ -342,6 +344,9 @@ bool PCB_PLOT_PARAMS::IsSameAs( const PCB_PLOT_PARAMS &aPcbPlotParams ) const if( m_plotValue != aPcbPlotParams.m_plotValue ) return false; + if( m_plotFPText != aPcbPlotParams.m_plotFPText ) + return false; + if( m_plotInvisibleText != aPcbPlotParams.m_plotInvisibleText ) return false; @@ -599,6 +604,10 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) aPcbPlotParams->m_plotReference = parseBool(); break; + case T_plotfptext: + aPcbPlotParams->m_plotFPText = parseBool(); + break; + case T_plotvalue: aPcbPlotParams->m_plotValue = parseBool(); break; diff --git a/pcbnew/pcb_plot_params.h b/pcbnew/pcb_plot_params.h index 29731509c8..c79d36a64c 100644 --- a/pcbnew/pcb_plot_params.h +++ b/pcbnew/pcb_plot_params.h @@ -107,6 +107,8 @@ public: bool GetPlotValue() const { return m_plotValue; } void SetPlotReference( bool aFlag ) { m_plotReference = aFlag; } bool GetPlotReference() const { return m_plotReference; } + void SetPlotFPText( bool aFlag ) { m_plotFPText = aFlag; } + bool GetPlotFPText() const { return m_plotFPText; } void SetNegative( bool aFlag ) { m_negative = aFlag; } bool GetNegative() const { return m_negative; } @@ -260,6 +262,7 @@ 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 diff --git a/pcbnew/plot_board_layers.cpp b/pcbnew/plot_board_layers.cpp index bc51e20ec4..c25ddb2abe 100644 --- a/pcbnew/plot_board_layers.cpp +++ b/pcbnew/plot_board_layers.cpp @@ -842,6 +842,9 @@ void PlotSolderMaskLayer( BOARD *aBoard, PLOTTER* aPlotter, LSET aLayerMask, auto plotFPTextItem = [&]( const PCB_TEXT& aText ) { + if( !itemplotter.GetPlotFPText() ) + return; + if( !aText.IsVisible() && !itemplotter.GetPlotInvisibleText() ) return; diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index 02258af583..a1a11e9971 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -275,6 +275,9 @@ void BRDITEMS_PLOTTER::PlotPad( const PAD* aPad, const COLOR4D& aColor, OUTLINE_ void BRDITEMS_PLOTTER::PlotFootprintTextItems( const FOOTPRINT* aFootprint ) { + if( !GetPlotFPText() ) + return; + const PCB_TEXT* textItem = &aFootprint->Reference(); PCB_LAYER_ID textLayer = textItem->GetLayer(); @@ -294,7 +297,6 @@ void BRDITEMS_PLOTTER::PlotFootprintTextItems( const FOOTPRINT* aFootprint ) PlotText( textItem, textLayer, textItem->IsKnockout(), textItem->GetFontMetrics() ); } - std::vector texts; // Skip the reference and value texts that are handled specially