|
KiCad PCB EDA Suite
|
#include <pcb_plotter.h>
Public Member Functions | |
| PCB_PLOTTER (BOARD *aBoard, REPORTER *aReporter, PCB_PLOT_PARAMS &aParams) | |
| bool | Plot (const wxString &aOutputPath, const LSEQ &aLayersToPlot, const LSEQ &aCommonLayers, bool aUseGerberFileExtensions, bool aPlotAllLayersToSingleFile, bool aForceAllLayersToSinglePage, std::optional< wxString > aLayerName=std::nullopt, std::optional< wxString > aSheetName=std::nullopt, std::optional< wxString > aSheetPath=std::nullopt, std::vector< wxString > *aOutputFiles=nullptr) |
| bool | copperLayerShouldBeSkipped (PCB_LAYER_ID aLayerToPlot) |
| All copper layers that are disabled are actually selected This is due to wonkyness in automatically selecting copper layers for plotting when adding more than two layers to a board. | |
Static Public Member Functions | |
| static LSET | DialogLayerSelection (const LSET &aChecked, const LSET &aEnabledLayers, bool aForJob) |
| Return the layers a plot dialog stores when aChecked are ticked. | |
| static void | BuildPlotFileName (wxFileName *aFilename, const wxString &aOutputDir, const wxString &aSuffix, const wxString &aExtension) |
| Complete a plot filename. | |
| static void | PlotJobToPlotOpts (PCB_PLOT_PARAMS &aOpts, JOB_EXPORT_PCB_PLOT *aJob, REPORTER &aReporter) |
| Translate a JOB to PCB_PLOT_PARAMS. | |
Protected Attributes | |
| BOARD * | m_board |
| PCB_PLOT_PARAMS | m_plotOpts |
| REPORTER * | m_reporter |
Private Member Functions | |
| LSEQ | getPlotSequence (PCB_LAYER_ID aLayerToPlot, LSEQ aPlotWithAllLayersSeq) |
| Generates a final LSEQ for plotting by removing duplicates. | |
Definition at line 33 of file pcb_plotter.h.
| PCB_PLOTTER::PCB_PLOTTER | ( | BOARD * | aBoard, |
| REPORTER * | aReporter, | ||
| PCB_PLOT_PARAMS & | aParams ) |
Definition at line 60 of file pcb_plotter.cpp.
References m_board, m_plotOpts, and m_reporter.
|
static |
Complete a plot filename.
It forces the output directory, adds a suffix to the name, and sets the specified extension. The suffix is usually the layer name and replaces illegal file name character in the suffix with an underscore character.
| aFilename | is the file name to initialize that contains the base filename. |
| aOutputDir | is the path. |
| aSuffix | is the suffix to add to the base filename. |
| aExtension | is the file extension. |
Definition at line 365 of file pcb_plotter.cpp.
Referenced by PCBNEW_JOBS_HANDLER::JobExportGerbers(), and Plot().
| bool PCB_PLOTTER::copperLayerShouldBeSkipped | ( | PCB_LAYER_ID | aLayerToPlot | ) |
All copper layers that are disabled are actually selected This is due to wonkyness in automatically selecting copper layers for plotting when adding more than two layers to a board.
If plot options become accessible to the layers setup dialog please move this functionality there! This skips a copper layer if it is actually disabled on the board.
Definition at line 348 of file pcb_plotter.cpp.
References LSET::AllCuMask(), and m_board.
Referenced by Plot().
|
static |
Return the layers a plot dialog stores when aChecked are ticked.
The dialog shows only the board's aEnabledLayers. Board plot settings also keep every unused copper layer so it starts ticked once the board enables it. A job keeps only what the dialog showed, since it plots on other boards and a layer nobody can see cannot be removed.
Definition at line 354 of file pcb_plotter.cpp.
References LSET::AllCuMask().
Referenced by DIALOG_PLOT::applyPlotSettings(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
private |
Generates a final LSEQ for plotting by removing duplicates.
Definition at line 397 of file pcb_plotter.cpp.
References find.
Referenced by Plot().
| bool PCB_PLOTTER::Plot | ( | const wxString & | aOutputPath, |
| const LSEQ & | aLayersToPlot, | ||
| const LSEQ & | aCommonLayers, | ||
| bool | aUseGerberFileExtensions, | ||
| bool | aPlotAllLayersToSingleFile, | ||
| bool | aForceAllLayersToSinglePage, | ||
| std::optional< wxString > | aLayerName = std::nullopt, | ||
| std::optional< wxString > | aSheetName = std::nullopt, | ||
| std::optional< wxString > | aSheetPath = std::nullopt, | ||
| std::vector< wxString > * | aOutputFiles = nullptr ) |
Definition at line 68 of file pcb_plotter.cpp.
References _, SHAPE_POLY_SET::BBox(), BuildPlotFileName(), copperLayerShouldBeSkipped(), DXF, PLOTTER::EndPlot(), ExpandTextVars(), FOR_GUI, GERBER, FILEEXT::GerberJobFileExtension, GetDefaultPlotExtension(), GetGerberProtelExtension(), BOX2< Vec >::GetHeight(), getPlotSequence(), BOX2< Vec >::GetWidth(), m_board, m_plotOpts, m_reporter, SHAPE_POLY_SET::OutlineCount(), pcbIUScale, PDF, PlotBoardLayers(), PlotInteractiveLayer(), RefreshGeneratedTables(), PLOTTER::RenderSettings(), RPT_SEVERITY_ACTION, RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, PLOTTER::SetAuthor(), PAGE_INFO::SetHeightMils(), PLOTTER::SetLayer(), PLOTTER::SetSubject(), PLOTTER::SetTitle(), setupPlotterNewPDFPage(), PAGE_INFO::SetWidthMils(), StartPlotBoard(), and SVG.
Referenced by DIALOG_PLOT::Plot(), PlotFootprintToSVG(), and plotJob().
|
static |
Translate a JOB to PCB_PLOT_PARAMS.
Definition at line 417 of file pcb_plotter.cpp.
References _, DEFAULT, JOB_EXPORT_PCB_PLOT::DXF, DXF, FILLED, FULL_DRILL_SHAPE, JOB_EXPORT_PCB_PLOT::GERBER, GERBER, GetAppSettings(), PCB_PLOT_PARAMS::GetBlackAndWhite(), COLOR_SETTINGS::GetColor(), GetColorSettings(), JOB::GetConfiguredOutputPath(), JSON_SETTINGS::GetFilename(), JOB_EXPORT_PCB_PLOT::HPGL, INCH, JOB_EXPORT_PCB_DXF::INCH, KiROUND(), LAYER_PCB_BACKGROUND, JOB_EXPORT_PCB_PNG::m_antialias, PCB_PLOT_PARAMS::m_backgroundColor, JOB_EXPORT_PCB_PLOT::m_blackAndWhite, JOB_EXPORT_PCB_PLOT::m_colorTheme, JOB_EXPORT_PCB_GERBERS::m_createJobsFile, JOB_EXPORT_PCB_PLOT::m_crossoutDNPFPsOnFabLayers, JOB_EXPORT_PCB_GERBER::m_disableApertureMacros, JOB_EXPORT_PCB_PNG::m_dpi, JOB_EXPORT_PCB_PLOT::m_drillShapeOption, JOB_EXPORT_PCB_DXF::m_dxfUnits, JOB_EXPORT_PCB_SVG::m_fitPageToBoard, JOB_EXPORT_PCB_PS::m_forceA4, JOB_EXPORT_PCB_DXF::m_genMode, JOB_EXPORT_PCB_PLOT::m_hideDNPFPsOnFabLayers, JOB_EXPORT_PCB_GERBER::m_includeNetlistAttributes, JOB_EXPORT_PCB_PLOT::m_mirror, JOB_EXPORT_PCB_PLOT::m_negative, PCB_PLOT_PARAMS::m_PDFBackFPPropertyPopups, JOB_EXPORT_PCB_PDF::m_pdfBackFPPropertyPopups, JOB_EXPORT_PCB_PDF::m_pdfBackgroundColor, PCB_PLOT_PARAMS::m_PDFFrontFPPropertyPopups, JOB_EXPORT_PCB_PDF::m_pdfFrontFPPropertyPopups, PCB_PLOT_PARAMS::m_PDFMetadata, JOB_EXPORT_PCB_PDF::m_pdfMetadata, PCB_PLOT_PARAMS::m_PDFSingle, JOB_EXPORT_PCB_PDF::m_pdfSingle, JOB_EXPORT_PCB_PLOT::m_plotDrawingSheet, JOB_EXPORT_PCB_PLOT::m_plotFootprintValues, JOB_EXPORT_PCB_PLOT::m_plotFormat, JOB_EXPORT_PCB_DXF::m_plotGraphicItemsUsingContours, JOB_EXPORT_PCB_PLOT::m_plotLayerSequence, JOB_EXPORT_PCB_PLOT::m_plotOnAllLayersSequence, JOB_EXPORT_PCB_PLOT::m_plotPadNumbers, JOB_EXPORT_PCB_PLOT::m_plotRefDes, JOB_EXPORT_PCB_DXF::m_polygonMode, JOB_EXPORT_PCB_GERBER::m_precision, JOB_EXPORT_PCB_SVG::m_precision, JOB_EXPORT_PCB_PLOT::m_scale, JOB_EXPORT_PCB_PLOT::m_sketchDNPFPsOnFabLayers, JOB_EXPORT_PCB_PLOT::m_sketchPadsOnFabLayers, JOB_EXPORT_PCB_PLOT::m_subtractSolderMaskFromSilk, JOB_EXPORT_PCB_PS::m_trackWidthCorrection, JOB_EXPORT_PCB_PNG::m_useBackgroundColor, JOB_EXPORT_PCB_PLOT::m_useDrillOrigin, JOB_EXPORT_PCB_DXF::m_useKiCadFont, JOB_EXPORT_PCB_GERBER::m_useProtelFileExtension, JOB_EXPORT_PCB_GERBER::m_useX2Format, JOB_EXPORT_PCB_PS::m_XScaleAdjust, JOB_EXPORT_PCB_PS::m_YScaleAdjust, MM, NATIVE, NO_DRILL_SHAPE, pcbIUScale, JOB_EXPORT_PCB_PLOT::PDF, PDF, JOB_EXPORT_PCB_PLOT::PNG, PNG, JOB_EXPORT_PCB_PLOT::POST, POST, REPORTER::Report(), RPT_SEVERITY_WARNING, scaleToSelection(), PCB_PLOT_PARAMS::SetA4Output(), PCB_PLOT_PARAMS::SetAutoScale(), PCB_PLOT_PARAMS::SetBackgroundColor(), PCB_PLOT_PARAMS::SetBlackAndWhite(), PCB_PLOT_PARAMS::SetColorSettings(), PCB_PLOT_PARAMS::SetCreateGerberJobFile(), PCB_PLOT_PARAMS::SetCrossoutDNPFPsOnFabLayers(), PCB_PLOT_PARAMS::SetDisableGerberMacros(), PCB_PLOT_PARAMS::SetDrillMarksType(), PCB_PLOT_PARAMS::SetDXFMultiLayeredExportOption(), PCB_PLOT_PARAMS::SetDXFPlotMode(), PCB_PLOT_PARAMS::SetDXFPlotPolygonMode(), PCB_PLOT_PARAMS::SetDXFPlotUnits(), PCB_PLOT_PARAMS::SetFineScaleAdjustX(), PCB_PLOT_PARAMS::SetFineScaleAdjustY(), PCB_PLOT_PARAMS::SetFormat(), PCB_PLOT_PARAMS::SetGerberPrecision(), PCB_PLOT_PARAMS::SetHideDNPFPsOnFabLayers(), PCB_PLOT_PARAMS::SetIncludeGerberNetlistInfo(), PCB_PLOT_PARAMS::SetLayerSelection(), PCB_PLOT_PARAMS::SetMirror(), PCB_PLOT_PARAMS::SetNegative(), PCB_PLOT_PARAMS::SetOutputDirectory(), PCB_PLOT_PARAMS::SetPlotFrameRef(), PCB_PLOT_PARAMS::SetPlotOnAllLayersSequence(), PCB_PLOT_PARAMS::SetPlotPadNumbers(), PCB_PLOT_PARAMS::SetPlotReference(), PCB_PLOT_PARAMS::SetPlotValue(), PCB_PLOT_PARAMS::SetPngAntialias(), PCB_PLOT_PARAMS::SetPngDPI(), PCB_PLOT_PARAMS::SetScale(), PCB_PLOT_PARAMS::SetScaleSelection(), PCB_PLOT_PARAMS::SetSketchDNPFPsOnFabLayers(), PCB_PLOT_PARAMS::SetSketchPadsOnFabLayers(), PCB_PLOT_PARAMS::SetSubtractMaskFromSilk(), PCB_PLOT_PARAMS::SetSvgFitPageToBoard(), PCB_PLOT_PARAMS::SetSvgPrecision(), PCB_PLOT_PARAMS::SetTextMode(), PCB_PLOT_PARAMS::SetUseAuxOrigin(), PCB_PLOT_PARAMS::SetUseGerberProtelExtensions(), PCB_PLOT_PARAMS::SetUseGerberX2format(), PCB_PLOT_PARAMS::SetWidthAdjust(), JOB_EXPORT_PCB_DXF::SINGLE, SKETCH, SMALL_DRILL_SHAPE, JOB_EXPORT_PCB_PLOT::SVG, and SVG.
Referenced by DIALOG_PLOT::DIALOG_PLOT(), PCBNEW_JOBS_HANDLER::doFpExportSvg(), PCBNEW_JOBS_HANDLER::JobExportDxf(), PCBNEW_JOBS_HANDLER::JobExportGerber(), PCBNEW_JOBS_HANDLER::JobExportGerbers(), PCBNEW_JOBS_HANDLER::JobExportPdf(), PCBNEW_JOBS_HANDLER::JobExportPng(), PCBNEW_JOBS_HANDLER::JobExportPs(), and PCBNEW_JOBS_HANDLER::JobExportSvg().
|
protected |
Definition at line 87 of file pcb_plotter.h.
Referenced by copperLayerShouldBeSkipped(), PCB_PLOTTER(), and Plot().
|
protected |
Definition at line 88 of file pcb_plotter.h.
Referenced by PCB_PLOTTER(), and Plot().
|
protected |
Definition at line 89 of file pcb_plotter.h.
Referenced by PCB_PLOTTER(), and Plot().