KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_plotter.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, you may find one here:
18 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19 * or you may search the http://www.gnu.org website for the version 2 license,
20 * or you may write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
24#include <pcb_plotter.h>
25#include <plotters/plotter.h>
27#include <board.h>
28#include <reporter.h>
29#include <pcbplot.h>
30#include <wx/filename.h>
37#include <pgm_base.h>
38#include <pcbnew_settings.h>
39
40
41PCB_PLOTTER::PCB_PLOTTER( BOARD* aBoard, REPORTER* aReporter, PCB_PLOT_PARAMS& aParams ) :
42 m_board( aBoard ),
43 m_plotOpts( aParams ),
44 m_reporter( aReporter )
45{
46}
47
48
49bool PCB_PLOTTER::Plot( const wxString& aOutputPath,
50 const LSEQ& aLayersToPlot,
51 const LSEQ& aCommonLayers,
52 bool aUseGerberFileExtensions,
53 bool aOutputPathIsSingle,
54 std::optional<wxString> aLayerName,
55 std::optional<wxString> aSheetName,
56 std::optional<wxString> aSheetPath )
57{
58 std::function<bool( wxString* )> textResolver = [&]( wxString* token ) -> bool
59 {
60 // Handles board->GetTitleBlock() *and* board->GetProject()
61 return m_board->ResolveTextVar( token, 0 );
62 };
63
64 // sanity, ensure one layer to print
65 if( aLayersToPlot.size() < 1 )
66 {
67 m_reporter->Report( _( "No layers selected for plotting." ), RPT_SEVERITY_ERROR );
68 return false;
69 }
70
71 PAGE_INFO existingPageInfo = m_board->GetPageSettings();
72 VECTOR2I existingAuxOrigin = m_board->GetDesignSettings().GetAuxOrigin();
73
74 if( m_plotOpts.GetFormat() == PLOT_FORMAT::SVG && m_plotOpts.GetSvgFitPagetoBoard() ) // Page is board boundary size
75 {
76 BOX2I bbox = m_board->ComputeBoundingBox( false );
77 PAGE_INFO currPageInfo = m_board->GetPageSettings();
78
79 currPageInfo.SetWidthMils( bbox.GetWidth() / pcbIUScale.IU_PER_MILS );
80 currPageInfo.SetHeightMils( bbox.GetHeight() / pcbIUScale.IU_PER_MILS );
81
82 m_board->SetPageSettings( currPageInfo );
84
85 VECTOR2I origin = bbox.GetOrigin();
87 }
88
89 // To reuse logic, in single plot mode, we want to kick any extra layers from the main list to commonLayers
90 LSEQ layersToPlot;
91 LSEQ commonLayers;
92
93 if( aOutputPathIsSingle )
94 {
95 layersToPlot.push_back( aLayersToPlot[0] );
96
97 if( aLayersToPlot.size() > 1 )
98 {
99 commonLayers.insert( commonLayers.end(), aLayersToPlot.begin() + 1,
100 aLayersToPlot.end() );
101 }
102 }
103 else
104 {
105 layersToPlot = aLayersToPlot;
106 commonLayers = aCommonLayers;
107 }
108
109 size_t finalPageCount = 0;
110
111 for( PCB_LAYER_ID layer : layersToPlot )
112 {
113 if( copperLayerShouldBeSkipped( layer ) )
114 continue;
115
116 finalPageCount++;
117 }
118
119 std::unique_ptr<GERBER_JOBFILE_WRITER> jobfile_writer;
120
121 if( m_plotOpts.GetFormat() == PLOT_FORMAT::GERBER && !aOutputPathIsSingle )
122 jobfile_writer = std::make_unique<GERBER_JOBFILE_WRITER>( m_board, m_reporter );
123
124 wxString fileExt( GetDefaultPlotExtension( m_plotOpts.GetFormat() ) );
125 wxString sheetPath;
126 wxString msg;
127 bool success = true;
128 PLOTTER* plotter = nullptr;
129
130 for( size_t i = 0, pageNum = 1; i < layersToPlot.size(); i++ )
131 {
132 PCB_LAYER_ID layer = layersToPlot[i];
133
134 if( copperLayerShouldBeSkipped( layer ) )
135 continue;
136
137 LSEQ plotSequence = getPlotSequence( layer, commonLayers );
138
139 wxString layerName = m_board->GetLayerName( layer );
140
141 wxFileName fn;
142
143 if( aOutputPathIsSingle )
144 {
145 fn = wxFileName( aOutputPath );
146 }
147 else
148 {
149 wxFileName brdFn = m_board->GetFileName();
150 fn.Assign( aOutputPath, brdFn.GetName() );
151
152 // Use Gerber Extensions based on layer number
153 // (See http://en.wikipedia.org/wiki/Gerber_File)
154 if( m_plotOpts.GetFormat() == PLOT_FORMAT::GERBER && aUseGerberFileExtensions )
155 fileExt = GetGerberProtelExtension( layer );
156
157 if( m_plotOpts.GetFormat() == PLOT_FORMAT::PDF && m_plotOpts.m_PDFSingle )
158 {
159 fn.SetExt( GetDefaultPlotExtension( PLOT_FORMAT::PDF ) );
160 }
161 else
162 {
163 BuildPlotFileName( &fn, aOutputPath, layerName, fileExt );
164 }
165 }
166
167 if( jobfile_writer )
168 {
169 wxString fullname = fn.GetFullName();
170 jobfile_writer->AddGbrFile( layer, fullname );
171 }
172
173 if( m_plotOpts.GetFormat() != PLOT_FORMAT::PDF
175 || ( pageNum == 1 && m_plotOpts.GetFormat() == PLOT_FORMAT::PDF
177 {
178 // this will only be used by pdf
179 wxString pageNumber = wxString::Format( "%zu", pageNum );
180 wxString pageName = layerName;
181 wxString sheetName = layerName;
182
183 if( aLayerName.has_value() )
184 {
185 layerName = aLayerName.value();
186 pageName = aLayerName.value();
187 }
188
189 if( aSheetName.has_value() )
190 sheetName = aSheetName.value();
191
192 if( aSheetPath.has_value() )
193 sheetPath = aSheetPath.value();
194
195 plotter = StartPlotBoard( m_board, &m_plotOpts, layer, layerName, fn.GetFullPath(),
196 sheetName, sheetPath, pageName, pageNumber, finalPageCount );
197 }
198
199 if( plotter )
200 {
201 plotter->SetTitle( ExpandTextVars( m_board->GetTitleBlock().GetTitle(), &textResolver ) );
202
204 {
205 msg = wxS( "AUTHOR" );
206
207 if( m_board->ResolveTextVar( &msg, 0 ) )
208 plotter->SetAuthor( msg );
209
210 msg = wxS( "SUBJECT" );
211
212 if( m_board->ResolveTextVar( &msg, 0 ) )
213 plotter->SetSubject( msg );
214 }
215
216 try
217 {
218 PlotBoardLayers( m_board, plotter, plotSequence, m_plotOpts );
220 }
221 catch( ... )
222 {
223 success = false;
224 break;
225 }
226
227 if( m_plotOpts.GetFormat() == PLOT_FORMAT::PDF && m_plotOpts.m_PDFSingle
228 && i != layersToPlot.size() - 1 )
229 {
230 wxString pageNumber = wxString::Format( "%zu", pageNum + 1 );
231 size_t nextI = i;
232 PCB_LAYER_ID nextLayer;
233
234 do
235 {
236 ++nextI;
237 nextLayer = layersToPlot[nextI];
238 } while( copperLayerShouldBeSkipped( nextLayer )
239 && ( nextI < layersToPlot.size() - 1 ) );
240
241 wxString pageName = m_board->GetLayerName( nextLayer );
242 wxString sheetName = layerName;
243
244 static_cast<PDF_PLOTTER*>( plotter )->ClosePage();
245 static_cast<PDF_PLOTTER*>( plotter )->StartPage( pageNumber, pageName );
246 setupPlotterNewPDFPage( plotter, m_board, &m_plotOpts, sheetName, sheetPath,
247 pageNumber, finalPageCount );
248 }
249
250
251 // last page
252 if( m_plotOpts.GetFormat() != PLOT_FORMAT::PDF
254 || i == aLayersToPlot.size() - 1
255 || pageNum == finalPageCount )
256 {
257 try
258 {
259 plotter->EndPlot();
260 }
261 catch( ... )
262 {
263 success = false;
264 }
265
266 delete plotter->RenderSettings();
267 delete plotter;
268 plotter = nullptr;
269
270 msg.Printf( _( "Plotted to '%s'." ), fn.GetFullPath() );
272 }
273 }
274 else
275 {
276 msg.Printf( _( "Failed to create file '%s'." ), fn.GetFullPath() );
278
279 success = false;
280 }
281
282 pageNum++;
283
284 wxSafeYield(); // displays report message.
285 }
286
287 if( jobfile_writer && m_plotOpts.GetCreateGerberJobFile() )
288 {
289 // Pick the basename from the board file
290 wxFileName fn( m_board->GetFileName() );
291
292 // Build gerber job file from basename
293 BuildPlotFileName( &fn, aOutputPath, wxT( "job" ), FILEEXT::GerberJobFileExtension );
294 jobfile_writer->CreateJobFile( fn.GetFullPath() );
295 }
296
298
299 if( m_plotOpts.GetFormat() == PLOT_FORMAT::SVG && m_plotOpts.GetSvgFitPagetoBoard() )
300 {
301 // restore the original page and aux origin
302 m_board->SetPageSettings( existingPageInfo );
303 m_board->GetDesignSettings().SetAuxOrigin( existingAuxOrigin );
304 }
305
306 return success;
307}
308
309
311{
312 return ( LSET::AllCuMask() & ~m_board->GetEnabledLayers() )[aLayerToPlot];
313}
314
315
316void PCB_PLOTTER::BuildPlotFileName( wxFileName* aFilename, const wxString& aOutputDir,
317 const wxString& aSuffix, const wxString& aExtension )
318{
319 // aFilename contains the base filename only (without path and extension)
320 // when calling this function.
321 // It is expected to be a valid filename (this is usually the board filename)
322 aFilename->SetPath( aOutputDir );
323
324 // Set the file extension
325 aFilename->SetExt( aExtension );
326
327 // remove leading and trailing spaces if any from the suffix, if
328 // something survives add it to the name;
329 // also the suffix can contain some not allowed chars in filename (/ \ . : and some others),
330 // so change them to underscore
331 // Remember it can be called from a python script, so the illegal chars
332 // have to be filtered here.
333 wxString suffix = aSuffix;
334 suffix.Trim( true );
335 suffix.Trim( false );
336
337 wxString badchars = wxFileName::GetForbiddenChars( wxPATH_DOS );
338 badchars.Append( "%." );
339
340 for( unsigned ii = 0; ii < badchars.Len(); ii++ )
341 suffix.Replace( badchars[ii], wxT( "_" ) );
342
343 if( !suffix.IsEmpty() )
344 aFilename->SetName( aFilename->GetName() + wxT( "-" ) + suffix );
345}
346
347
348LSEQ PCB_PLOTTER::getPlotSequence( PCB_LAYER_ID aLayerToPlot, LSEQ aPlotWithAllLayersSeq )
349{
350 LSEQ plotSequence;
351
352 // Base layer always gets plotted first.
353 plotSequence.push_back( aLayerToPlot );
354
355 for( PCB_LAYER_ID layer : aPlotWithAllLayersSeq )
356 {
357 // Don't plot the same layer more than once;
358 if( find( plotSequence.begin(), plotSequence.end(), layer ) != plotSequence.end() )
359 continue;
360
361 plotSequence.push_back( layer );
362 }
363
364 return plotSequence;
365}
366
367
369 REPORTER& aReporter )
370{
372 {
373 JOB_EXPORT_PCB_GERBERS* gJob = static_cast<JOB_EXPORT_PCB_GERBERS*>( aJob );
376 aOpts.SetUseGerberX2format( gJob->m_useX2Format );
379 aOpts.SetGerberPrecision( gJob->m_precision );
380 }
381
383 {
384 JOB_EXPORT_PCB_SVG* svgJob = static_cast<JOB_EXPORT_PCB_SVG*>( aJob );
385 aOpts.SetSvgPrecision( svgJob->m_precision );
386 aOpts.SetSvgFitPageToBoard( svgJob->m_fitPageToBoard );
387 }
388
390 {
391 JOB_EXPORT_PCB_DXF* dxfJob = static_cast<JOB_EXPORT_PCB_DXF*>( aJob );
393 ? DXF_UNITS::INCH
394 : DXF_UNITS::MM );
395
396 aOpts.SetPlotMode( dxfJob->m_plotGraphicItemsUsingContours ? OUTLINE_MODE::SKETCH
397 : OUTLINE_MODE::FILLED );
398
399 aOpts.SetDXFPlotPolygonMode( dxfJob->m_polygonMode );
400 }
401
403 {
404 JOB_EXPORT_PCB_PDF* pdfJob = static_cast<JOB_EXPORT_PCB_PDF*>( aJob );
407 aOpts.m_PDFMetadata = pdfJob->m_pdfMetadata;
408 aOpts.m_PDFSingle = pdfJob->m_pdfSingle;
409 }
410
411 aOpts.SetUseAuxOrigin( aJob->m_useDrillOrigin );
412 aOpts.SetPlotFrameRef( aJob->m_plotDrawingSheet );
414 aOpts.SetPlotReference( aJob->m_plotRefDes );
415 aOpts.SetPlotValue( aJob->m_plotFootprintValues );
420 aOpts.SetPlotPadNumbers( aJob->m_plotPadNumbers );
421
422 aOpts.SetBlackAndWhite( aJob->m_blackAndWhite );
423 aOpts.SetMirror( aJob->m_mirror );
424 aOpts.SetNegative( aJob->m_negative );
425
428
429 switch( aJob->m_plotFormat )
430 {
431 default:
432 case JOB_EXPORT_PCB_PLOT::PLOT_FORMAT::GERBER: aOpts.SetFormat( PLOT_FORMAT::GERBER ); break;
433 case JOB_EXPORT_PCB_PLOT::PLOT_FORMAT::POST: aOpts.SetFormat( PLOT_FORMAT::POST ); break;
434 case JOB_EXPORT_PCB_PLOT::PLOT_FORMAT::SVG: aOpts.SetFormat( PLOT_FORMAT::SVG ); break;
435 case JOB_EXPORT_PCB_PLOT::PLOT_FORMAT::DXF: aOpts.SetFormat( PLOT_FORMAT::DXF ); break;
436 case JOB_EXPORT_PCB_PLOT::PLOT_FORMAT::HPGL: aOpts.SetFormat( PLOT_FORMAT::HPGL ); break;
437 case JOB_EXPORT_PCB_PLOT::PLOT_FORMAT::PDF: aOpts.SetFormat( PLOT_FORMAT::PDF ); break;
438 }
439
440 switch( aJob->m_drillShapeOption )
441 {
443 aOpts.SetDrillMarksType( DRILL_MARKS::NO_DRILL_SHAPE );
444 break;
446 aOpts.SetDrillMarksType( DRILL_MARKS::SMALL_DRILL_SHAPE );
447 break;
448 default:
450 aOpts.SetDrillMarksType( DRILL_MARKS::FULL_DRILL_SHAPE );
451 break;
452 }
453
455 wxString theme = aJob->m_colorTheme;
456
457 // Theme may be empty when running from a job in GUI context, so use the GUI settings.
458 if( theme.IsEmpty() )
459 {
460 PCBNEW_SETTINGS* pcbSettings = mgr.GetAppSettings<PCBNEW_SETTINGS>( "pcbnew" );
461 theme = pcbSettings->m_ColorTheme;
462 }
463
464 COLOR_SETTINGS* colors = mgr.GetColorSettings( aJob->m_colorTheme );
465
466 if( colors->GetFilename() != theme )
467 {
468 aReporter.Report( wxString::Format(
469 _( "Color theme '%s' not found, will use theme from PCB Editor settings.\n" ),
470 theme ),
472 }
473
474 aOpts.SetColorSettings( colors );
476}
constexpr EDA_IU_SCALE pcbIUScale
Definition: base_units.h:108
wxString m_ColorTheme
Active color theme name.
Definition: app_settings.h:199
void SetAuxOrigin(const VECTOR2I &aOrigin)
const VECTOR2I & GetAuxOrigin() const
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:296
LSET GetEnabledLayers() const
A proxy function that calls the corresponding function in m_BoardSettings.
Definition: board.cpp:828
const PAGE_INFO & GetPageSettings() const
Definition: board.h:712
bool ResolveTextVar(wxString *token, int aDepth) const
Definition: board.cpp:436
TITLE_BLOCK & GetTitleBlock()
Definition: board.h:718
BOX2I ComputeBoundingBox(bool aBoardEdgesOnly=false) const
Calculate the bounding box containing all board items (or board edge segments).
Definition: board.cpp:1754
void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: board.h:713
const wxString & GetFileName() const
Definition: board.h:333
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
Definition: board.cpp:613
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Definition: board.cpp:945
constexpr size_type GetWidth() const
Definition: box2.h:214
constexpr size_type GetHeight() const
Definition: box2.h:215
constexpr const Vec & GetOrigin() const
Definition: box2.h:210
Color settings are a bit different than most of the settings objects in that there can be more than o...
bool m_pdfSingle
This is a hack to deal with cli having the wrong behavior We will deprecate out the wrong behavior,...
DRILL_MARKS m_drillShapeOption
Used by SVG/DXF/PDF/Gerbers.
bool m_mirror
Common Options.
LSEQ m_plotLayerSequence
Layers to include on all individual layer prints.
unsigned int m_precision
wxString GetConfiguredOutputPath() const
Returns the configured output path for the job.
Definition: job.h:226
wxString GetFilename() const
Definition: json_settings.h:81
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
Definition: lseq.h:47
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:572
Describe the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:59
void SetHeightMils(double aHeightInMils)
Definition: page_info.cpp:261
void SetWidthMils(double aWidthInMils)
Definition: page_info.cpp:247
LSEQ getPlotSequence(PCB_LAYER_ID aLayerToPlot, LSEQ aPlotWithAllLayersSeq)
Generates a final LSEQ for plotting by removing duplicates.
BOARD * m_board
Definition: pcb_plotter.h:77
bool Plot(const wxString &aOutputPath, const LSEQ &aLayersToPlot, const LSEQ &aCommonLayers, bool aUseGerberFileExtensions, bool aOutputPathIsSingle=false, std::optional< wxString > aLayerName=std::nullopt, std::optional< wxString > aSheetName=std::nullopt, std::optional< wxString > aSheetPath=std::nullopt)
Definition: pcb_plotter.cpp:49
static void PlotJobToPlotOpts(PCB_PLOT_PARAMS &aOpts, JOB_EXPORT_PCB_PLOT *aJob, REPORTER &aReporter)
Translate a JOB to PCB_PLOT_PARAMS.
PCB_PLOTTER(BOARD *aBoard, REPORTER *aReporter, PCB_PLOT_PARAMS &aParams)
Definition: pcb_plotter.cpp:41
PCB_PLOT_PARAMS m_plotOpts
Definition: pcb_plotter.h:78
REPORTER * m_reporter
Definition: pcb_plotter.h:79
bool copperLayerShouldBeSkipped(PCB_LAYER_ID aLayerToPlot)
All copper layers that are disabled are actually selected This is due to wonkyness in automatically s...
static void BuildPlotFileName(wxFileName *aFilename, const wxString &aOutputDir, const wxString &aSuffix, const wxString &aExtension)
Complete a plot filename.
Parameters and options when plotting/printing a board.
PLOT_FORMAT GetFormat() const
void SetDrillMarksType(DRILL_MARKS aVal)
void SetLayerSelection(LSET aSelection)
void SetOutputDirectory(const wxString &aDir)
void SetPlotReference(bool aFlag)
void SetSketchPadsOnFabLayers(bool aFlag)
void SetUseGerberX2format(bool aUse)
void SetPlotOnAllLayersSequence(LSEQ aSeq)
void SetDXFPlotPolygonMode(bool aFlag)
void SetPlotFrameRef(bool aFlag)
void SetSketchDNPFPsOnFabLayers(bool aFlag)
bool m_PDFMetadata
Generate PDF metadata for SUBJECT and AUTHOR.
bool GetCreateGerberJobFile() const
void SetPlotPadNumbers(bool aFlag)
bool GetSvgFitPagetoBoard() const
bool m_PDFFrontFPPropertyPopups
Generate PDF property popup menus for footprints.
void SetDisableGerberMacros(bool aDisable)
void SetMirror(bool aFlag)
void SetBlackAndWhite(bool blackAndWhite)
void SetGerberPrecision(int aPrecision)
void SetSubtractMaskFromSilk(bool aSubtract)
void SetHideDNPFPsOnFabLayers(bool aFlag)
void SetPlotValue(bool aFlag)
void SetUseGerberProtelExtensions(bool aUse)
void SetDXFPlotUnits(DXF_UNITS aUnit)
void SetColorSettings(COLOR_SETTINGS *aSettings)
void SetIncludeGerberNetlistInfo(bool aUse)
void SetCreateGerberJobFile(bool aCreate)
bool m_PDFSingle
Generate a single PDF file for all layers.
void SetNegative(bool aFlag)
void SetPlotMode(OUTLINE_MODE aPlotMode)
void SetUseAuxOrigin(bool aAux)
bool m_PDFBackFPPropertyPopups
on front and/or back of board
void SetSvgFitPageToBoard(int aSvgFitPageToBoard)
void SetSvgPrecision(unsigned aPrecision)
void SetCrossoutDNPFPsOnFabLayers(bool aFlag)
void SetFormat(PLOT_FORMAT aFormat)
virtual SETTINGS_MANAGER & GetSettingsManager() const
Definition: pgm_base.h:125
Base plotter engine class.
Definition: plotter.h:105
virtual void SetAuthor(const wxString &aAuthor)
Definition: plotter.h:156
virtual void SetTitle(const wxString &aTitle)
Definition: plotter.h:155
virtual bool EndPlot()=0
RENDER_SETTINGS * RenderSettings()
Definition: plotter.h:136
virtual void SetSubject(const wxString &aSubject)
Definition: plotter.h:157
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:73
virtual REPORTER & ReportTail(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
Places the report at the end of the list, for objects that support report ordering.
Definition: reporter.h:101
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Report a string with a given severity.
COLOR_SETTINGS * GetColorSettings(const wxString &aName="user")
Retrieve a color settings object that applications can read colors from.
T * GetAppSettings(const wxString &aFilename)
Return a handle to the a given settings by type.
const wxString & GetTitle() const
Definition: title_block.h:63
wxString ExpandTextVars(const wxString &aSource, const PROJECT *aProject, int aFlags)
Definition: common.cpp:59
wxString GetDefaultPlotExtension(PLOT_FORMAT aFormat)
Return the default plot extension for a format.
#define _(s)
Classes used to generate a Gerber job file in JSON.
static const std::string GerberJobFileExtension
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:60
const wxString GetGerberProtelExtension(int aLayer)
Definition: pcbplot.cpp:43
PLOTTER * StartPlotBoard(BOARD *aBoard, const PCB_PLOT_PARAMS *aPlotOpts, int aLayer, const wxString &aLayerName, const wxString &aFullFileName, const wxString &aSheetName, const wxString &aSheetPath, const wxString &aPageName=wxT("1"), const wxString &aPageNumber=wxEmptyString, const int aPageCount=1)
Open a new plotfile using the options (and especially the format) specified in the options and prepar...
void setupPlotterNewPDFPage(PLOTTER *aPlotter, BOARD *aBoard, const PCB_PLOT_PARAMS *aPlotOpts, const wxString &aSheetName, const wxString &aSheetPath, const wxString &aPageNumber, int aPageCount)
void PlotBoardLayers(BOARD *aBoard, PLOTTER *aPlotter, const LSEQ &aLayerSequence, const PCB_PLOT_PARAMS &aPlotOptions)
Plot a sequence of board layer IDs.
void PlotInteractiveLayer(BOARD *aBoard, PLOTTER *aPlotter, const PCB_PLOT_PARAMS &aPlotOpt)
Plot interactive items (hypertext links, properties, etc.).
PGM_BASE & Pgm()
The global program "get" accessor.
Definition: pgm_base.cpp:1073
see class PGM_BASE
Plotting engines similar to ps (PostScript, Gerber, svg)
@ RPT_SEVERITY_WARNING
@ RPT_SEVERITY_ERROR
@ RPT_SEVERITY_INFO
@ RPT_SEVERITY_ACTION
const double IU_PER_MILS
Definition: base_units.h:77