2023-09-16 21:02:33 -04:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2023 Mark Roszko <mark.roszko@gmail.com>
|
2025-01-01 13:30:11 -08:00
|
|
|
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
|
2023-09-16 21:02:33 -04:00
|
|
|
*
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <jobs/job_export_pcb_gerber.h>
|
2024-07-15 18:20:13 -04:00
|
|
|
#include <jobs/job_registry.h>
|
|
|
|
#include <i18n_utility.h>
|
2023-09-16 21:02:33 -04:00
|
|
|
|
|
|
|
|
2024-11-04 20:51:15 -05:00
|
|
|
JOB_EXPORT_PCB_GERBER::JOB_EXPORT_PCB_GERBER( const std::string& aType ) :
|
|
|
|
JOB_EXPORT_PCB_PLOT( JOB_EXPORT_PCB_PLOT::PLOT_FORMAT::GERBER, aType, false ),
|
2023-09-16 21:02:33 -04:00
|
|
|
m_includeNetlistAttributes( true ),
|
|
|
|
m_useX2Format( true ),
|
|
|
|
m_disableApertureMacros( false ),
|
|
|
|
m_useProtelFileExtension( true ),
|
2024-07-15 18:20:13 -04:00
|
|
|
m_precision( 5 )
|
2023-09-16 21:02:33 -04:00
|
|
|
{
|
2024-07-15 18:20:13 -04:00
|
|
|
m_plotDrawingSheet = false;
|
|
|
|
|
|
|
|
m_params.emplace_back( new JOB_PARAM<bool>( "include_netlist_attributes",
|
|
|
|
&m_includeNetlistAttributes,
|
|
|
|
m_includeNetlistAttributes ) );
|
|
|
|
|
|
|
|
m_params.emplace_back( new JOB_PARAM<bool>( "use_x2_format", &m_useX2Format, m_useX2Format ) );
|
2025-03-02 19:26:34 +00:00
|
|
|
m_params.emplace_back( new JOB_PARAM<bool>( "disable_aperture_macros",
|
|
|
|
&m_disableApertureMacros,
|
2024-07-15 18:20:13 -04:00
|
|
|
m_disableApertureMacros ) );
|
|
|
|
m_params.emplace_back( new JOB_PARAM<bool>( "use_protel_file_extension",
|
|
|
|
&m_useProtelFileExtension,
|
|
|
|
m_useProtelFileExtension ) );
|
|
|
|
m_params.emplace_back( new JOB_PARAM<int>( "precision", &m_precision, m_precision ) );
|
2023-09-16 21:02:33 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-11-04 20:51:15 -05:00
|
|
|
JOB_EXPORT_PCB_GERBER::JOB_EXPORT_PCB_GERBER() :
|
|
|
|
JOB_EXPORT_PCB_GERBER( "gerber" )
|
2023-09-16 21:02:33 -04:00
|
|
|
{
|
2024-07-15 18:20:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-12-28 21:18:15 -05:00
|
|
|
wxString JOB_EXPORT_PCB_GERBER::GetDefaultDescription() const
|
2024-07-15 18:20:13 -04:00
|
|
|
{
|
2025-01-02 13:20:31 +00:00
|
|
|
return _( "Export single Gerber" );
|
2025-01-01 16:32:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2025-01-04 14:02:24 +00:00
|
|
|
wxString JOB_EXPORT_PCB_GERBER::GetSettingsDialogTitle() const
|
2025-01-01 16:32:36 +00:00
|
|
|
{
|
2025-01-04 14:02:24 +00:00
|
|
|
return _( "Export Single Gerber Job Settings" );
|
2023-09-16 21:02:33 -04:00
|
|
|
}
|