2025-01-01 13:30:11 -08:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright The 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 3 of the License, or (at your
|
|
|
|
* option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2024-07-15 18:20:13 -04:00
|
|
|
|
|
|
|
#include <jobs/job_export_pcb_plot.h>
|
|
|
|
|
2025-03-31 19:59:13 +01:00
|
|
|
NLOHMANN_JSON_SERIALIZE_ENUM( DRILL_MARKS,
|
|
|
|
{
|
|
|
|
{ DRILL_MARKS::NO_DRILL_SHAPE, "none" },
|
|
|
|
{ DRILL_MARKS::SMALL_DRILL_SHAPE, "small" },
|
|
|
|
{ DRILL_MARKS::FULL_DRILL_SHAPE, "full" }
|
|
|
|
} )
|
|
|
|
|
2024-07-15 18:20:13 -04:00
|
|
|
JOB_EXPORT_PCB_PLOT::JOB_EXPORT_PCB_PLOT( PLOT_FORMAT aFormat, const std::string& aType,
|
2025-02-14 15:16:01 +00:00
|
|
|
bool aOutputIsDirectory ) :
|
|
|
|
JOB( aType, aOutputIsDirectory ),
|
|
|
|
m_plotFormat( aFormat ),
|
|
|
|
m_filename(),
|
|
|
|
m_colorTheme(),
|
|
|
|
m_drawingSheet(),
|
|
|
|
m_mirror( false ),
|
|
|
|
m_blackAndWhite( false ),
|
|
|
|
m_negative( false ),
|
2025-04-29 07:23:57 -03:00
|
|
|
m_scale( 1.0 ),
|
2025-02-14 15:16:01 +00:00
|
|
|
m_sketchPadsOnFabLayers( false ),
|
|
|
|
m_hideDNPFPsOnFabLayers( false ),
|
|
|
|
m_sketchDNPFPsOnFabLayers( true ),
|
|
|
|
m_crossoutDNPFPsOnFabLayers( true ),
|
|
|
|
m_plotFootprintValues( true ),
|
|
|
|
m_plotRefDes( true ),
|
|
|
|
m_plotDrawingSheet( true ),
|
|
|
|
m_subtractSolderMaskFromSilk( false ),
|
|
|
|
m_plotPadNumbers( false ),
|
2025-03-04 23:36:42 +00:00
|
|
|
m_plotLayerSequence(),
|
|
|
|
m_plotOnAllLayersSequence(),
|
2025-02-14 15:16:01 +00:00
|
|
|
m_drillShapeOption( DRILL_MARKS::FULL_DRILL_SHAPE ),
|
2025-07-30 20:47:54 -04:00
|
|
|
m_useDrillOrigin( false ),
|
|
|
|
m_checkZonesBeforePlot( false )
|
2024-07-15 18:20:13 -04:00
|
|
|
{
|
2025-03-04 23:36:42 +00:00
|
|
|
m_params.emplace_back( new JOB_PARAM_LSEQ( "layers",
|
|
|
|
&m_plotLayerSequence, m_plotLayerSequence ) );
|
2025-01-30 13:23:45 +00:00
|
|
|
|
2025-01-10 22:20:34 -05:00
|
|
|
m_params.emplace_back( new JOB_PARAM_LSEQ( "layers_to_include_on_all_layers",
|
2025-03-04 23:36:42 +00:00
|
|
|
&m_plotOnAllLayersSequence,
|
|
|
|
m_plotOnAllLayersSequence ) );
|
2024-07-15 18:20:13 -04:00
|
|
|
|
2025-03-02 19:26:34 +00:00
|
|
|
m_params.emplace_back( new JOB_PARAM<bool>( "mirror",
|
|
|
|
&m_mirror, m_mirror ) );
|
|
|
|
m_params.emplace_back( new JOB_PARAM<bool>( "black_and_white",
|
|
|
|
&m_blackAndWhite, m_blackAndWhite ) );
|
|
|
|
m_params.emplace_back( new JOB_PARAM<bool>( "negative",
|
|
|
|
&m_negative, m_negative ) );
|
|
|
|
|
|
|
|
m_params.emplace_back( new JOB_PARAM<bool>( "plot_footprint_values",
|
|
|
|
&m_plotFootprintValues, m_plotFootprintValues ) );
|
|
|
|
m_params.emplace_back( new JOB_PARAM<bool>( "plot_ref_des",
|
|
|
|
&m_plotRefDes, m_plotRefDes ) );
|
|
|
|
|
|
|
|
m_params.emplace_back( new JOB_PARAM<bool>( "hide_dnp_footprints_on_fab_layers",
|
|
|
|
&m_hideDNPFPsOnFabLayers,
|
|
|
|
m_hideDNPFPsOnFabLayers ) );
|
|
|
|
m_params.emplace_back( new JOB_PARAM<bool>( "sketch_dnp_footprints_on_fab_layers",
|
|
|
|
&m_sketchDNPFPsOnFabLayers,
|
|
|
|
m_sketchDNPFPsOnFabLayers ) );
|
|
|
|
m_params.emplace_back( new JOB_PARAM<bool>( "crossout_dnp_footprints_on_fab_layers",
|
|
|
|
&m_crossoutDNPFPsOnFabLayers,
|
|
|
|
m_crossoutDNPFPsOnFabLayers ) );
|
|
|
|
|
|
|
|
m_params.emplace_back( new JOB_PARAM<bool>( "sketch_pads_on_fab_layers",
|
|
|
|
&m_sketchPadsOnFabLayers,
|
|
|
|
m_sketchPadsOnFabLayers ) );
|
2025-01-30 13:23:45 +00:00
|
|
|
m_params.emplace_back( new JOB_PARAM<bool>( "plot_pad_numbers",
|
|
|
|
&m_plotPadNumbers, m_plotPadNumbers ) );
|
2024-12-29 13:31:43 -05:00
|
|
|
|
2025-01-30 13:23:45 +00:00
|
|
|
m_params.emplace_back( new JOB_PARAM<bool>( "plot_drawing_sheet",
|
|
|
|
&m_plotDrawingSheet, m_plotDrawingSheet ) );
|
2024-12-29 13:31:43 -05:00
|
|
|
|
2025-02-14 15:16:01 +00:00
|
|
|
m_params.emplace_back( new JOB_PARAM<bool>( "subtract_solder_mask_from_silk",
|
|
|
|
&m_subtractSolderMaskFromSilk,
|
|
|
|
m_subtractSolderMaskFromSilk ) );
|
|
|
|
|
2025-01-30 13:23:45 +00:00
|
|
|
m_params.emplace_back( new JOB_PARAM<bool>( "use_drill_origin",
|
|
|
|
&m_useDrillOrigin, m_useDrillOrigin ) );
|
2024-12-29 13:31:43 -05:00
|
|
|
|
2025-03-02 19:26:34 +00:00
|
|
|
m_params.emplace_back( new JOB_PARAM<DRILL_MARKS>( "drill_shape",
|
|
|
|
&m_drillShapeOption, m_drillShapeOption ) );
|
|
|
|
|
2025-01-30 13:23:45 +00:00
|
|
|
m_params.emplace_back( new JOB_PARAM<wxString>( "drawing_sheet",
|
|
|
|
&m_drawingSheet, m_drawingSheet ) );
|
2025-07-30 20:47:54 -04:00
|
|
|
|
|
|
|
m_params.emplace_back( new JOB_PARAM<bool>( "check_zones", &m_checkZonesBeforePlot, m_checkZonesBeforePlot ) );
|
2024-07-15 18:20:13 -04:00
|
|
|
}
|