mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Update layer per page.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20352 (cherry picked from commit 1848401d5b9f786ca49327755c6399a6b29ef91a)
This commit is contained in:
parent
a9adc64f3e
commit
d271a47375
@ -32,6 +32,7 @@ class KICOMMON_API JOB_FP_EXPORT_SVG : public JOB
|
||||
public:
|
||||
JOB_FP_EXPORT_SVG();
|
||||
|
||||
public:
|
||||
wxString m_libraryPath;
|
||||
wxString m_footprint;
|
||||
|
||||
@ -39,13 +40,14 @@ public:
|
||||
|
||||
wxString m_colorTheme;
|
||||
|
||||
bool m_blackAndWhite;
|
||||
bool m_sketchPadsOnFabLayers;
|
||||
bool m_hideDNPFPsOnFabLayers;
|
||||
bool m_sketchDNPFPsOnFabLayers;
|
||||
bool m_crossoutDNPFPsOnFabLayers;
|
||||
bool m_blackAndWhite;
|
||||
bool m_sketchPadsOnFabLayers;
|
||||
bool m_hideDNPFPsOnFabLayers;
|
||||
bool m_sketchDNPFPsOnFabLayers;
|
||||
bool m_crossoutDNPFPsOnFabLayers;
|
||||
|
||||
LSEQ m_printMaskLayer;
|
||||
wxString m_argLayers;
|
||||
LSEQ m_plotLayerSequence;
|
||||
};
|
||||
|
||||
#endif
|
@ -231,13 +231,15 @@ bool PCB_PLOTTER::Plot( const wxString& aOutputPath,
|
||||
} while( copperLayerShouldBeSkipped( nextLayer )
|
||||
&& ( nextI < layersToPlot.size() - 1 ) );
|
||||
|
||||
wxString pageName = m_board->GetLayerName( nextLayer );
|
||||
wxString sheetName = layerName;
|
||||
layerName = m_board->GetLayerName( nextLayer );
|
||||
|
||||
wxString pageName = layerName;
|
||||
wxString sheetName = layerName;
|
||||
|
||||
static_cast<PDF_PLOTTER*>( plotter )->ClosePage();
|
||||
static_cast<PDF_PLOTTER*>( plotter )->StartPage( pageNumber, pageName );
|
||||
setupPlotterNewPDFPage( plotter, m_board, &m_plotOpts, sheetName, sheetPath,
|
||||
pageNumber, finalPageCount );
|
||||
setupPlotterNewPDFPage( plotter, m_board, &m_plotOpts, layerName, sheetName,
|
||||
sheetPath, pageNumber, finalPageCount );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1851,7 +1851,7 @@ int PCBNEW_JOBS_HANDLER::doFpExportSvg( JOB_FP_EXPORT_SVG* aSvgJob, const FOOTPR
|
||||
svgPlotOptions.m_outputFile = outputFile.GetFullPath();
|
||||
svgPlotOptions.m_mirror = false;
|
||||
svgPlotOptions.m_pageSizeMode = 2; // board bounding box
|
||||
svgPlotOptions.m_printMaskLayer = aSvgJob->m_printMaskLayer;
|
||||
svgPlotOptions.m_printMaskLayer = aSvgJob->m_plotLayerSequence;
|
||||
svgPlotOptions.m_sketchPadsOnFabLayers = aSvgJob->m_sketchPadsOnFabLayers;
|
||||
svgPlotOptions.m_hideDNPFPsOnFabLayers = aSvgJob->m_hideDNPFPsOnFabLayers;
|
||||
svgPlotOptions.m_sketchDNPFPsOnFabLayers = aSvgJob->m_sketchDNPFPsOnFabLayers;
|
||||
|
@ -163,8 +163,9 @@ PLOTTER* StartPlotBoard( BOARD* aBoard, const PCB_PLOT_PARAMS* aPlotOpts, int aL
|
||||
const int aPageCount = 1);
|
||||
|
||||
void setupPlotterNewPDFPage( PLOTTER* aPlotter, BOARD* aBoard, const PCB_PLOT_PARAMS* aPlotOpts,
|
||||
const wxString& aSheetName, const wxString& aSheetPath,
|
||||
const wxString& aPageNumber, int aPageCount );
|
||||
const wxString& aLayerName, const wxString& aSheetName,
|
||||
const wxString& aSheetPath, const wxString& aPageNumber,
|
||||
int aPageCount );
|
||||
/**
|
||||
* Plot a sequence of board layer IDs.
|
||||
*
|
||||
|
@ -1354,11 +1354,10 @@ PLOTTER* StartPlotBoard( BOARD *aBoard, const PCB_PLOT_PARAMS *aPlotOpts, int aL
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void setupPlotterNewPDFPage( PLOTTER* aPlotter,
|
||||
BOARD* aBoard,
|
||||
const PCB_PLOT_PARAMS* aPlotOpts,
|
||||
const wxString& aSheetName, const wxString& aSheetPath,
|
||||
const wxString& aPageNumber, int aPageCount )
|
||||
void setupPlotterNewPDFPage( PLOTTER* aPlotter, BOARD* aBoard, const PCB_PLOT_PARAMS* aPlotOpts,
|
||||
const wxString& aLayerName, const wxString& aSheetName,
|
||||
const wxString& aSheetPath, const wxString& aPageNumber,
|
||||
int aPageCount )
|
||||
{
|
||||
// Plot the frame reference if requested
|
||||
if( aPlotOpts->GetPlotFrameRef() )
|
||||
@ -1372,4 +1371,6 @@ void setupPlotterNewPDFPage( PLOTTER* aPlotter,
|
||||
if( aPlotOpts->GetMirror() )
|
||||
initializePlotter( aPlotter, aBoard, aPlotOpts );
|
||||
}
|
||||
|
||||
aPlotter->RenderSettings()->SetLayerName( aLayerName );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user