KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PCB_PLOTTER Class Reference

#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 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 void BuildPlotFileName (wxFileName *aFilename, const wxString &aOutputDir, const wxString &aSuffix, const wxString &aExtension)
 Complete a plot filename.
 
static void PlotJobToPlotOpts (PCB_PLOT_PARAMS &aPlotOpts, JOB_EXPORT_PCB_PLOT *aJob)
 Translate a JOB to PCB_PLOT_PARAMS.
 

Protected Attributes

BOARDm_board
 
PCB_PLOT_PARAMS m_plotOpts
 
REPORTERm_reporter
 

Private Member Functions

LSEQ getPlotSequence (PCB_LAYER_ID aLayerToPlot, LSEQ aPlotWithAllLayersSeq)
 Generates a final LSEQ for plotting by removing duplicates.
 

Detailed Description

Definition at line 33 of file pcb_plotter.h.

Constructor & Destructor Documentation

◆ PCB_PLOTTER()

PCB_PLOTTER::PCB_PLOTTER ( BOARD aBoard,
REPORTER aReporter,
PCB_PLOT_PARAMS aParams 
)

Definition at line 39 of file pcb_plotter.cpp.

Member Function Documentation

◆ BuildPlotFileName()

void PCB_PLOTTER::BuildPlotFileName ( wxFileName *  aFilename,
const wxString &  aOutputDir,
const wxString &  aSuffix,
const wxString &  aExtension 
)
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.

Parameters
aFilenameis the file name to initialize that contains the base filename.
aOutputDiris the path.
aSuffixis the suffix to add to the base filename.
aExtensionis the file extension.

Definition at line 223 of file pcb_plotter.cpp.

Referenced by BuildPlotFileName(), and Plot().

◆ copperLayerShouldBeSkipped()

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 217 of file pcb_plotter.cpp.

References LSET::AllCuMask(), BOARD::GetEnabledLayers(), and m_board.

Referenced by Plot().

◆ getPlotSequence()

LSEQ PCB_PLOTTER::getPlotSequence ( PCB_LAYER_ID  aLayerToPlot,
LSEQ  aPlotWithAllLayersSeq 
)
private

Generates a final LSEQ for plotting by removing duplicates.

Definition at line 255 of file pcb_plotter.cpp.

References find.

Referenced by Plot().

◆ Plot()

◆ PlotJobToPlotOpts()

void PCB_PLOTTER::PlotJobToPlotOpts ( PCB_PLOT_PARAMS aPlotOpts,
JOB_EXPORT_PCB_PLOT aJob 
)
static

Translate a JOB to PCB_PLOT_PARAMS.

Definition at line 277 of file pcb_plotter.cpp.

References JOB_EXPORT_PCB_PLOT::DXF, JOB_EXPORT_PCB_PLOT::FULL_DRILL_SHAPE, JOB_EXPORT_PCB_PLOT::GERBER, JOB_EXPORT_PCB_PLOT::HPGL, JOB_EXPORT_PCB_DXF::INCHES, JOB_EXPORT_PCB_PLOT::m_blackAndWhite, JOB_EXPORT_PCB_GERBERS::m_createJobsFile, JOB_EXPORT_PCB_PLOT::m_crossoutDNPFPsOnFabLayers, JOB_EXPORT_PCB_GERBER::m_disableApertureMacros, JOB_EXPORT_PCB_PLOT::m_drillShapeOption, JOB_EXPORT_PCB_DXF::m_dxfUnits, JOB_EXPORT_PCB_PLOT::m_hideDNPFPsOnFabLayers, JOB_EXPORT_PCB_GERBER::m_includeNetlistAttributes, JOB_EXPORT_PCB_PLOT::m_mirror, JOB_EXPORT_PCB_PLOT::m_negative, JOB_EXPORT_PCB_PDF::m_pdfBackFPPropertyPopups, PCB_PLOT_PARAMS::m_PDFBackFPPropertyPopups, JOB_EXPORT_PCB_PDF::m_pdfFrontFPPropertyPopups, PCB_PLOT_PARAMS::m_PDFFrontFPPropertyPopups, JOB_EXPORT_PCB_PDF::m_pdfMetadata, PCB_PLOT_PARAMS::m_PDFMetadata, JOB_EXPORT_PCB_PDF::m_pdfSingle, PCB_PLOT_PARAMS::m_PDFSingle, JOB_EXPORT_PCB_PLOT::m_plotDrawingSheet, JOB_EXPORT_PCB_PLOT::m_plotFormat, JOB_EXPORT_PCB_DXF::m_plotGraphicItemsUsingContours, JOB_EXPORT_PCB_PLOT::m_plotInvisibleText, JOB_EXPORT_PCB_PLOT::m_plotPadNumbers, JOB_EXPORT_PCB_DXF::m_polygonMode, JOB_EXPORT_PCB_GERBER::m_precision, JOB_EXPORT_PCB_SVG::m_precision, JOB_EXPORT_PCB_PLOT::m_printMaskLayer, JOB_EXPORT_PCB_PLOT::m_printMaskLayersToIncludeOnAllLayers, JOB_EXPORT_PCB_PLOT::m_sketchDNPFPsOnFabLayers, JOB_EXPORT_PCB_PLOT::m_sketchPadsOnFabLayers, JOB_EXPORT_PCB_GERBER::m_subtractSolderMaskFromSilk, JOB_EXPORT_PCB_PLOT::m_useDrillOrigin, JOB_EXPORT_PCB_GERBER::m_useProtelFileExtension, JOB_EXPORT_PCB_GERBER::m_useX2Format, JOB_EXPORT_PCB_PLOT::NO_DRILL_SHAPE, JOB_EXPORT_PCB_PLOT::PDF, JOB_EXPORT_PCB_PLOT::POST, PCB_PLOT_PARAMS::SetBlackAndWhite(), PCB_PLOT_PARAMS::SetCreateGerberJobFile(), PCB_PLOT_PARAMS::SetCrossoutDNPFPsOnFabLayers(), PCB_PLOT_PARAMS::SetDisableGerberMacros(), PCB_PLOT_PARAMS::SetDrillMarksType(), PCB_PLOT_PARAMS::SetDXFPlotPolygonMode(), PCB_PLOT_PARAMS::SetDXFPlotUnits(), 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::SetPlotFrameRef(), PCB_PLOT_PARAMS::SetPlotInvisibleText(), PCB_PLOT_PARAMS::SetPlotMode(), PCB_PLOT_PARAMS::SetPlotOnAllLayersSelection(), PCB_PLOT_PARAMS::SetPlotPadNumbers(), PCB_PLOT_PARAMS::SetSketchDNPFPsOnFabLayers(), PCB_PLOT_PARAMS::SetSketchPadsOnFabLayers(), PCB_PLOT_PARAMS::SetSubtractMaskFromSilk(), PCB_PLOT_PARAMS::SetSvgPrecision(), PCB_PLOT_PARAMS::SetUseAuxOrigin(), PCB_PLOT_PARAMS::SetUseGerberProtelExtensions(), PCB_PLOT_PARAMS::SetUseGerberX2format(), JOB_EXPORT_PCB_PLOT::SMALL_DRILL_SHAPE, and JOB_EXPORT_PCB_PLOT::SVG.

Referenced by DIALOG_PLOT::DIALOG_PLOT(), PCBNEW_JOBS_HANDLER::JobExportDxf(), PCBNEW_JOBS_HANDLER::JobExportPdf(), and PCBNEW_JOBS_HANDLER::JobExportSvg().

Member Data Documentation

◆ m_board

BOARD* PCB_PLOTTER::m_board
protected

Definition at line 72 of file pcb_plotter.h.

Referenced by copperLayerShouldBeSkipped(), and Plot().

◆ m_plotOpts

PCB_PLOT_PARAMS PCB_PLOTTER::m_plotOpts
protected

Definition at line 73 of file pcb_plotter.h.

Referenced by Plot().

◆ m_reporter

REPORTER* PCB_PLOTTER::m_reporter
protected

Definition at line 74 of file pcb_plotter.h.

Referenced by Plot().


The documentation for this class was generated from the following files: