mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 10:13:19 +02:00
Always use PCB_PLOTTER::PlotJobToPlotOpts for plotter exports
Removes PCBNEW_JOBS_HANDLER::populateGerberPlotOptionsFromJob
This commit is contained in:
parent
bfc47bf387
commit
c2c987f9c0
@ -381,6 +381,8 @@ void PCB_PLOTTER::PlotJobToPlotOpts( PCB_PLOT_PARAMS& aOpts, JOB_EXPORT_PCB_PLOT
|
|||||||
aOpts.SetIncludeGerberNetlistInfo( gJob->m_includeNetlistAttributes );
|
aOpts.SetIncludeGerberNetlistInfo( gJob->m_includeNetlistAttributes );
|
||||||
aOpts.SetCreateGerberJobFile( gJob->m_createJobsFile );
|
aOpts.SetCreateGerberJobFile( gJob->m_createJobsFile );
|
||||||
aOpts.SetGerberPrecision( gJob->m_precision );
|
aOpts.SetGerberPrecision( gJob->m_precision );
|
||||||
|
// Always disable plot pad holes
|
||||||
|
aOpts.SetDrillMarksType( DRILL_MARKS::NO_DRILL_SHAPE );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -388,6 +390,14 @@ void PCB_PLOTTER::PlotJobToPlotOpts( PCB_PLOT_PARAMS& aOpts, JOB_EXPORT_PCB_PLOT
|
|||||||
aOpts.SetScale( aJob->m_scale );
|
aOpts.SetScale( aJob->m_scale );
|
||||||
aOpts.SetAutoScale( !aJob->m_scale );
|
aOpts.SetAutoScale( !aJob->m_scale );
|
||||||
aOpts.SetScaleSelection( scaleToSelection( aJob->m_scale ) );
|
aOpts.SetScaleSelection( scaleToSelection( aJob->m_scale ) );
|
||||||
|
// Drill marks doesn't apply to GERBER
|
||||||
|
switch( aJob->m_drillShapeOption )
|
||||||
|
{
|
||||||
|
case DRILL_MARKS::NO_DRILL_SHAPE: aOpts.SetDrillMarksType( DRILL_MARKS::NO_DRILL_SHAPE ); break;
|
||||||
|
case DRILL_MARKS::SMALL_DRILL_SHAPE: aOpts.SetDrillMarksType( DRILL_MARKS::SMALL_DRILL_SHAPE ); break;
|
||||||
|
default:
|
||||||
|
case DRILL_MARKS::FULL_DRILL_SHAPE: aOpts.SetDrillMarksType( DRILL_MARKS::FULL_DRILL_SHAPE ); break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( aJob->m_plotFormat == JOB_EXPORT_PCB_PLOT::PLOT_FORMAT::SVG )
|
if( aJob->m_plotFormat == JOB_EXPORT_PCB_PLOT::PLOT_FORMAT::SVG )
|
||||||
@ -454,14 +464,6 @@ void PCB_PLOTTER::PlotJobToPlotOpts( PCB_PLOT_PARAMS& aOpts, JOB_EXPORT_PCB_PLOT
|
|||||||
case JOB_EXPORT_PCB_PLOT::PLOT_FORMAT::PDF: aOpts.SetFormat( PLOT_FORMAT::PDF ); break;
|
case JOB_EXPORT_PCB_PLOT::PLOT_FORMAT::PDF: aOpts.SetFormat( PLOT_FORMAT::PDF ); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch( aJob->m_drillShapeOption )
|
|
||||||
{
|
|
||||||
case DRILL_MARKS::NO_DRILL_SHAPE: aOpts.SetDrillMarksType( DRILL_MARKS::NO_DRILL_SHAPE ); break;
|
|
||||||
case DRILL_MARKS::SMALL_DRILL_SHAPE: aOpts.SetDrillMarksType( DRILL_MARKS::SMALL_DRILL_SHAPE ); break;
|
|
||||||
default:
|
|
||||||
case DRILL_MARKS::FULL_DRILL_SHAPE: aOpts.SetDrillMarksType( DRILL_MARKS::FULL_DRILL_SHAPE ); break;
|
|
||||||
}
|
|
||||||
|
|
||||||
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
|
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
|
||||||
wxString theme = aJob->m_colorTheme;
|
wxString theme = aJob->m_colorTheme;
|
||||||
|
|
||||||
|
@ -1245,7 +1245,7 @@ int PCBNEW_JOBS_HANDLER::JobExportGerbers( JOB* aJob )
|
|||||||
if( aGerberJob->m_useBoardPlotParams )
|
if( aGerberJob->m_useBoardPlotParams )
|
||||||
plotOpts = boardPlotOptions;
|
plotOpts = boardPlotOptions;
|
||||||
else
|
else
|
||||||
populateGerberPlotOptionsFromJob( plotOpts, aGerberJob );
|
PCB_PLOTTER::PlotJobToPlotOpts( plotOpts, aGerberJob, *m_reporter );
|
||||||
|
|
||||||
if( plotOpts.GetUseGerberProtelExtensions() )
|
if( plotOpts.GetUseGerberProtelExtensions() )
|
||||||
fileExt = GetGerberProtelExtension( layer );
|
fileExt = GetGerberProtelExtension( layer );
|
||||||
@ -1362,38 +1362,6 @@ int PCBNEW_JOBS_HANDLER::JobExportGencad( JOB* aJob )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PCBNEW_JOBS_HANDLER::populateGerberPlotOptionsFromJob( PCB_PLOT_PARAMS& aPlotOpts,
|
|
||||||
JOB_EXPORT_PCB_GERBER* aJob )
|
|
||||||
{
|
|
||||||
aPlotOpts.SetFormat( PLOT_FORMAT::GERBER );
|
|
||||||
|
|
||||||
aPlotOpts.SetPlotFrameRef( aJob->m_plotDrawingSheet );
|
|
||||||
aPlotOpts.SetPlotValue( aJob->m_plotFootprintValues );
|
|
||||||
aPlotOpts.SetPlotReference( aJob->m_plotRefDes );
|
|
||||||
|
|
||||||
aPlotOpts.SetSubtractMaskFromSilk( aJob->m_subtractSolderMaskFromSilk );
|
|
||||||
|
|
||||||
// Always disable plot pad holes
|
|
||||||
aPlotOpts.SetDrillMarksType( DRILL_MARKS::NO_DRILL_SHAPE );
|
|
||||||
|
|
||||||
aPlotOpts.SetDisableGerberMacros( aJob->m_disableApertureMacros );
|
|
||||||
aPlotOpts.SetUseGerberX2format( aJob->m_useX2Format );
|
|
||||||
aPlotOpts.SetIncludeGerberNetlistInfo( aJob->m_includeNetlistAttributes );
|
|
||||||
aPlotOpts.SetUseAuxOrigin( aJob->m_useDrillOrigin );
|
|
||||||
aPlotOpts.SetUseGerberProtelExtensions( aJob->m_useProtelFileExtension );
|
|
||||||
aPlotOpts.SetGerberPrecision( aJob->m_precision );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void PCBNEW_JOBS_HANDLER::populateGerberPlotOptionsFromJob( PCB_PLOT_PARAMS& aPlotOpts,
|
|
||||||
JOB_EXPORT_PCB_GERBERS* aJob )
|
|
||||||
{
|
|
||||||
populateGerberPlotOptionsFromJob( aPlotOpts, static_cast<JOB_EXPORT_PCB_GERBER*>( aJob ) );
|
|
||||||
|
|
||||||
aPlotOpts.SetCreateGerberJobFile( aJob->m_createJobsFile );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int PCBNEW_JOBS_HANDLER::JobExportGerber( JOB* aJob )
|
int PCBNEW_JOBS_HANDLER::JobExportGerber( JOB* aJob )
|
||||||
{
|
{
|
||||||
int exitCode = CLI::EXIT_CODES::OK;
|
int exitCode = CLI::EXIT_CODES::OK;
|
||||||
@ -1433,7 +1401,7 @@ int PCBNEW_JOBS_HANDLER::JobExportGerber( JOB* aJob )
|
|||||||
}
|
}
|
||||||
|
|
||||||
PCB_PLOT_PARAMS plotOpts;
|
PCB_PLOT_PARAMS plotOpts;
|
||||||
populateGerberPlotOptionsFromJob( plotOpts, aGerberJob );
|
PCB_PLOTTER::PlotJobToPlotOpts( plotOpts, aGerberJob, *m_reporter );
|
||||||
plotOpts.SetLayerSelection( aGerberJob->m_plotLayerSequence );
|
plotOpts.SetLayerSelection( aGerberJob->m_plotLayerSequence );
|
||||||
plotOpts.SetPlotOnAllLayersSequence( aGerberJob->m_plotOnAllLayersSequence );
|
plotOpts.SetPlotOnAllLayersSequence( aGerberJob->m_plotOnAllLayersSequence );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user