KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcbplot.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 (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <[email protected]>
6 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, you may find one here:
20 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21 * or you may search the http://www.gnu.org website for the version 2 license,
22 * or you may write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 */
25
26#include <plotters/plotter.h>
27#include <pcbplot.h>
28#include <common.h>
29#include <base_units.h>
30#include <lset.h>
31#include <locale_io.h>
32#include <reporter.h>
33#include <board.h>
35#include <plotcontroller.h>
36#include <pcb_plot_params.h>
37#include <wx/ffile.h>
38#include <dialog_plot.h>
39#include <build_version.h>
40#include <gbr_metadata.h>
41#include <render_settings.h>
42#include <pcb_plotter.h>
43
44const wxString GetGerberProtelExtension( int aLayer )
45{
46 if( IsCopperLayer( aLayer ) )
47 {
48 if( aLayer == F_Cu )
49 return wxT( "gtl" );
50 else if( aLayer == B_Cu )
51 return wxT( "gbl" );
52 else
53 return wxString( wxT( "g" ) ) << CopperLayerToOrdinal( ToLAYER_ID( aLayer ) );
54 }
55 else
56 {
57 switch( aLayer )
58 {
59 case B_Adhes: return wxT( "gba" );
60 case F_Adhes: return wxT( "gta" );
61
62 case B_Paste: return wxT( "gbp" );
63 case F_Paste: return wxT( "gtp" );
64
65 case B_SilkS: return wxT( "gbo" );
66 case F_SilkS: return wxT( "gto" );
67
68 case B_Mask: return wxT( "gbs" );
69 case F_Mask: return wxT( "gts" );
70
71 case Edge_Cuts: return wxT( "gm1" );
72
73 case Dwgs_User:
74 case Cmts_User:
75 case Eco1_User:
76 case Eco2_User:
77 default: return wxT( "gbr" );
78 }
79 }
80}
81
82
83const wxString GetGerberFileFunctionAttribute( const BOARD* aBoard, int aLayer )
84{
85 wxString attrib;
86
87
88 switch( aLayer )
89 {
90 case F_Adhes:
91 attrib = wxT( "Glue,Top" );
92 break;
93
94 case B_Adhes:
95 attrib = wxT( "Glue,Bot" );
96 break;
97
98 case F_SilkS:
99 attrib = wxT( "Legend,Top" );
100 break;
101
102 case B_SilkS:
103 attrib = wxT( "Legend,Bot" );
104 break;
105
106 case F_Mask:
107 attrib = wxT( "Soldermask,Top" );
108 break;
109
110 case B_Mask:
111 attrib = wxT( "Soldermask,Bot" );
112 break;
113
114 case F_Paste:
115 attrib = wxT( "Paste,Top" );
116 break;
117
118 case B_Paste:
119 attrib = wxT( "Paste,Bot" );
120 break;
121
122 case Edge_Cuts:
123 // Board outline.
124 // Can be "Profile,NP" (Not Plated: usual) or "Profile,P"
125 // This last is the exception (Plated)
126 attrib = wxT( "Profile,NP" );
127 break;
128
129 case Dwgs_User:
130 attrib = wxT( "OtherDrawing,Comment" );
131 break;
132
133 case Cmts_User:
134 attrib = wxT( "Other,Comment" );
135 break;
136
137 case Eco1_User:
138 attrib = wxT( "Other,ECO1" );
139 break;
140
141 case Eco2_User:
142 attrib = wxT( "Other,ECO2" );
143 break;
144
145 case B_Fab:
146 // This is actually a assembly layer
147 attrib = wxT( "AssemblyDrawing,Bot" );
148 break;
149
150 case F_Fab:
151 // This is actually a assembly layer
152 attrib = wxT( "AssemblyDrawing,Top" );
153 break;
154
155 case B_Cu:
156 attrib.Printf( wxT( "Copper,L%d,Bot" ), aBoard->GetCopperLayerCount() );
157 break;
158
159 case F_Cu:
160 attrib = wxT( "Copper,L1,Top" );
161 break;
162
163 default:
164 if( IsCopperLayer( aLayer ) )
165 {
166 // aLayer use even values, and the first internal layer
167 // is B_Cu + 2. And in gerber file, layer id is 2 (1 is F_Cu)
168 int ly_id = ( ( aLayer - B_Cu ) / 2 ) + 1;
169 attrib.Printf( wxT( "Copper,L%d,Inr" ), ly_id );
170 }
171 else
172 attrib.Printf( wxT( "Other,User" ), aLayer+1 );
173 break;
174 }
175
176 // This code adds a optional parameter: the type of copper layers.
177 // Because it is not used by Pcbnew (it can be used only by external autorouters)
178 // user do not really set this parameter.
179 // Therefore do not add it.
180 // However, this code is left here, for perhaps a future usage.
181#if 0
182 // Add the signal type of the layer, if relevant
183 if( IsCopperLayer( aLayer ) )
184 {
185 LAYER_T type = aBoard->GetLayerType( ToLAYER_ID( aLayer ) );
186
187 switch( type )
188 {
189 case LT_SIGNAL:
190 attrib += wxT( ",Signal" );
191 break;
192 case LT_POWER:
193 attrib += wxT( ",Plane" );
194 break;
195 case LT_MIXED:
196 attrib += wxT( ",Mixed" );
197 break;
198 default:
199 break; // do nothing (but avoid a warning for unhandled LAYER_T values from GCC)
200 }
201 }
202#endif
203
204 wxString fileFct;
205 fileFct.Printf( wxT( "%%TF.FileFunction,%s*%%" ), attrib );
206
207 return fileFct;
208}
209
210
211static const wxString GetGerberFilePolarityAttribute( int aLayer )
212{
213 /* build the string %TF.FilePolarity,Positive*%
214 * or %TF.FilePolarity,Negative*%
215 * an emply string for layers which do not use a polarity
216 *
217 * The value of the .FilePolarity specifies whether the image represents the
218 * presence or absence of material.
219 * This attribute can only be used when the file represents a pattern in a material layer,
220 * e.g. copper, solder mask, legend.
221 * Together with.FileFunction it defines the role of that image in
222 * the layer structure of the PCB.
223 * Note that the .FilePolarity attribute does not change the image -
224 * no attribute does.
225 * It changes the interpretation of the image.
226 * For example, in a copper layer in positive polarity a round flash generates a copper pad.
227 * In a copper layer in negative polarity it generates a clearance.
228 * Solder mask images usually represent solder mask openings and are then negative.
229 * This may be counter-intuitive.
230 */
231 int polarity = 0;
232
233 switch( aLayer )
234 {
235 case F_Adhes:
236 case B_Adhes:
237 case F_SilkS:
238 case B_SilkS:
239 case F_Paste:
240 case B_Paste:
241 polarity = 1;
242 break;
243
244 case F_Mask:
245 case B_Mask:
246 polarity = -1;
247 break;
248
249 default:
250 if( IsCopperLayer( aLayer ) )
251 polarity = 1;
252 break;
253 }
254
255 wxString filePolarity;
256
257 if( polarity == 1 )
258 filePolarity = wxT( "%TF.FilePolarity,Positive*%" );
259 if( polarity == -1 )
260 filePolarity = wxT( "%TF.FilePolarity,Negative*%" );
261
262 return filePolarity;
263}
264
265
266/* Add some X2 attributes to the file header, as defined in the
267 * Gerber file format specification J4 and "Revision 2015.06"
268 */
269
270
271// A helper function to convert a X2 attribute string to a X1 structured comment:
272static wxString& makeStringCompatX1( wxString& aText, bool aUseX1CompatibilityMode )
273{
274 if( aUseX1CompatibilityMode )
275 {
276 aText.Replace( wxT( "%" ), wxEmptyString );
277 aText.Prepend( wxT( "G04 #@! " ) );
278 }
279
280 return aText;
281}
282
283
284// A helper function to replace reserved chars (separators in gerber fields)
285// in a gerber string field.
286// reserved chars are replaced by _ (for ,) or an escaped sequence (for * and %)
287static void replaceReservedCharsField( wxString& aMsg )
288{
289 aMsg.Replace( wxT( "," ), wxT( "_" ) ); // can be replaced by \\u002C
290 aMsg.Replace( wxT( "*" ), wxT( "\\u002A" ) );
291 aMsg.Replace( wxT( "%" ), wxT( "\\u0025" ) );
292}
293
294
295void AddGerberX2Header( PLOTTER* aPlotter, const BOARD* aBoard, bool aUseX1CompatibilityMode )
296{
297 wxString text;
298
299 // Creates the TF,.GenerationSoftware. Format is:
300 // %TF,.GenerationSoftware,<vendor>,<application name>[,<application version>]*%
301 text.Printf( wxT( "%%TF.GenerationSoftware,KiCad,Pcbnew,%s*%%" ), GetBuildVersion() );
302 aPlotter->AddLineToHeader( makeStringCompatX1( text, aUseX1CompatibilityMode ) );
303
304 // creates the TF.CreationDate attribute:
307 aPlotter->AddLineToHeader( text );
308
309 // Creates the TF,.ProjectId. Format is (from Gerber file format doc):
310 // %TF.ProjectId,<project id>,<project GUID>,<revision id>*%
311 // <project id> is the name of the project, restricted to basic ASCII symbols only,
312 // Rem: <project id> accepts only ASCII 7 code (only basic ASCII codes are allowed in
313 // gerber files) and comma not accepted.
314 // All illegal chars will be replaced by underscore.
315 //
316 // <project GUID> is a string which is an unique id of a project.
317 // However Kicad does not handle such a project GUID, so it is built from the board name
318 wxFileName fn = aBoard->GetFileName();
319 wxString msg = fn.GetFullName();
320
321 // Build a <project GUID>, from the board name
322 wxString guid = GbrMakeProjectGUIDfromString( msg );
323
324 // build the <project id> string: this is the board short filename (without ext)
325 // and all non ASCII chars and reserved chars (, * % ) are replaced by '_'
326 msg = fn.GetName();
328
329 // build the <revision id> string. All non ASCII chars and reserved chars are replaced by '_'
330 wxString rev = ExpandTextVars( aBoard->GetTitleBlock().GetRevision(), aBoard->GetProject() );
332
333 if( rev.IsEmpty() )
334 rev = wxT( "rev?" );
335
336 text.Printf( wxT( "%%TF.ProjectId,%s,%s,%s*%%" ), msg.ToAscii(), guid, rev.ToAscii() );
337 aPlotter->AddLineToHeader( makeStringCompatX1( text, aUseX1CompatibilityMode ) );
338
339 // Add the TF.SameCoordinates to specify that all gerber files uses the same origin and
340 // orientation, and the registration between files is OK.
341 // The parameter of TF.SameCoordinates is a string that is common to all files using the
342 // same registration. The string value has no meaning; it is just a key.
343 // Because there is no mirroring/rotation in Kicad, only the plot offset origin can create
344 // incorrect registration, so we create a key from plot offset options.
345 //
346 // Currently the key is "Original" when using absolute Pcbnew coordinates, and the PY and PY
347 // position of the auxiliary axis when using it.
348 // If we ever add user-settable absolute Pcbnew coordinates, we'll need to change the way
349 // the key is built to ensure file only using the *same* axis have the same key.
350 wxString registration_id = wxT( "Original" );
351 VECTOR2I auxOrigin = aBoard->GetDesignSettings().GetAuxOrigin();
352
353 if( aBoard->GetPlotOptions().GetUseAuxOrigin() && auxOrigin.x && auxOrigin.y )
354 registration_id.Printf( wxT( "PX%xPY%x" ), auxOrigin.x, auxOrigin.y );
355
356 text.Printf( wxT( "%%TF.SameCoordinates,%s*%%" ), registration_id.GetData() );
357 aPlotter->AddLineToHeader( makeStringCompatX1( text, aUseX1CompatibilityMode ) );
358}
359
360
361void AddGerberX2Attribute( PLOTTER* aPlotter, const BOARD* aBoard, int aLayer,
362 bool aUseX1CompatibilityMode )
363{
364 AddGerberX2Header( aPlotter, aBoard, aUseX1CompatibilityMode );
365
366 wxString text;
367
368 // Add the TF.FileFunction
369 text = GetGerberFileFunctionAttribute( aBoard, aLayer );
370 aPlotter->AddLineToHeader( makeStringCompatX1( text, aUseX1CompatibilityMode ) );
371
372 // Add the TF.FilePolarity (for layers which support that)
374
375 if( !text.IsEmpty() )
376 aPlotter->AddLineToHeader( makeStringCompatX1( text, aUseX1CompatibilityMode ) );
377}
378
379
380void BuildPlotFileName( wxFileName* aFilename, const wxString& aOutputDir,
381 const wxString& aSuffix, const wxString& aExtension )
382{
383 // Kept as compat, incase python junk used it
384 PCB_PLOTTER::BuildPlotFileName( aFilename, aOutputDir, aSuffix, aExtension );
385}
386
387
389{
390 m_plotter = nullptr;
391 m_board = aBoard;
393}
394
395
400
401
402/*
403 * IMPORTANT: the locale during plots *MUST* be kept as C/POSIX using a LOCALE_IO object on the
404 * stack. This even when opening/closing the plotfile, as some drivers do I/O even then.
405 */
407{
408 if( m_plotter )
409 {
410 m_plotter->EndPlot();
411
412 delete m_plotter->RenderSettings();
413 delete m_plotter;
414
415 m_plotter = nullptr;
416 }
417}
418
419
420bool PLOT_CONTROLLER::OpenPlotfile( const wxString& aSuffix, PLOT_FORMAT aFormat,
421 const wxString& aSheetName, const wxString& aSheetPath )
422{
423 // Save the current format: sadly some plot routines depends on this but the main reason
424 // is that the StartPlot method uses it to dispatch the plotter creation
425 GetPlotOptions().SetFormat( aFormat );
426
427 // Ensure that the previous plot is closed
428 ClosePlot();
429
430 // Now compute the full filename for the output and start the plot (after ensuring the
431 // output directory is OK).
432
433 std::function<bool( wxString* )> textResolver =
434 [&]( wxString* token ) -> bool
435 {
436 // Handles m_board->GetTitleBlock() *and* m_board->GetProject()
437 return m_board->ResolveTextVar( token, 0 );
438 };
439
440 wxString outputDirName = GetPlotOptions().GetOutputDirectory();
441 outputDirName = ExpandTextVars( outputDirName, &textResolver );
442 outputDirName = ExpandEnvVarSubstitutions( outputDirName, m_board->GetProject() );
443
444 wxFileName outputDir = wxFileName::DirName( outputDirName );
445 wxString boardFilename = m_board->GetFileName();
446 PCB_LAYER_ID layer = ToLAYER_ID( GetLayer() );
447 wxString layerName = m_board->GetLayerName( layer );
448
449 if( EnsureFileDirectoryExists( &outputDir, boardFilename ) )
450 {
451 // outputDir contains now the full path of plot files
452 m_plotFile = boardFilename;
453 m_plotFile.SetPath( outputDir.GetPath() );
454 wxString fileExt = GetDefaultPlotExtension( aFormat );
455
456 // Gerber format *can* use layer-specific file extensions (this is no longer best
457 // practice as the official file ext is now .gbr).
458 if( GetPlotOptions().GetFormat() == PLOT_FORMAT::GERBER
459 && GetPlotOptions().GetUseGerberProtelExtensions() )
460 {
461 fileExt = GetGerberProtelExtension( GetLayer() );
462 }
463
464 // Build plot filenames from the board name and layer names:
465 BuildPlotFileName( &m_plotFile, outputDir.GetPath(), aSuffix, fileExt );
466
467 m_plotter = StartPlotBoard( m_board, &GetPlotOptions(), layer, layerName,
468 m_plotFile.GetFullPath(), aSheetName, aSheetPath );
469 }
470
471 return ( m_plotter != nullptr );
472}
473
474
476{
477 // No plot open, nothing to do...
478 if( !m_plotter )
479 return false;
480
481 // Fully delegated to the parent
482 // Note : PlotOneBoardLayer() do not plot drill marks
483 if( GetPlotOptions().GetDrillMarksType() == DRILL_MARKS::NO_DRILL_SHAPE )
485 else
486 {
487 LSEQ layerSequence( { ToLAYER_ID( GetLayer() ) } );
488 PlotBoardLayers( m_board, m_plotter, layerSequence, GetPlotOptions() );
489 }
490
492
493 return true;
494}
495
496
497bool PLOT_CONTROLLER::PlotLayers( const LSEQ& aLayerSequence )
498{
499 // No plot open, nothing to do...
500 if( !m_plotter )
501 return false;
502
503 // Fully delegated to the parent
504 PlotBoardLayers( m_board, m_plotter, aLayerSequence, GetPlotOptions() );
506 return true;
507}
508
509
510void PLOT_CONTROLLER::SetColorMode( bool aColorMode )
511{
512 if( !m_plotter )
513 return;
514
515 m_plotter->SetColorMode( aColorMode );
516}
517
518
520{
521 if( !m_plotter )
522 return false;
523
524 return m_plotter->GetColorMode();
525}
LAYER_T
The allowed types of layers, same as Specctra DSN spec.
Definition board.h:185
@ LT_POWER
Definition board.h:188
@ LT_MIXED
Definition board.h:189
@ LT_SIGNAL
Definition board.h:187
wxString GetBuildVersion()
Get the full KiCad version string.
const VECTOR2I & GetAuxOrigin() const
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:322
LAYER_T GetLayerType(PCB_LAYER_ID aLayer) const
Return the type of the copper layer given by aLayer.
Definition board.cpp:783
TITLE_BLOCK & GetTitleBlock()
Definition board.h:805
int GetCopperLayerCount() const
Definition board.cpp:919
const wxString & GetFileName() const
Definition board.h:359
const PCB_PLOT_PARAMS & GetPlotOptions() const
Definition board.h:802
PROJECT * GetProject() const
Definition board.h:579
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Definition board.cpp:1082
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
Definition lseq.h:47
static void BuildPlotFileName(wxFileName *aFilename, const wxString &aOutputDir, const wxString &aSuffix, const wxString &aExtension)
Complete a plot filename.
bool GetUseAuxOrigin() const
wxString GetOutputDirectory() const
void SetFormat(PLOT_FORMAT aFormat)
Base plotter engine class.
Definition plotter.h:136
void AddLineToHeader(const wxString &aExtraString)
Add a line to the list of free lines to print at the beginning of the file.
Definition plotter.h:198
~PLOT_CONTROLLER()
Ensure that the last plot is closed.
Definition pcbplot.cpp:396
bool GetColorMode()
Definition pcbplot.cpp:519
wxFileName m_plotFile
bool PlotLayer()
Plot a single layer on the current plotfile m_plotLayer is the layer to plot.
Definition pcbplot.cpp:475
PLOT_CONTROLLER(BOARD *aBoard)
Batch plotter constructor, nothing interesting here.
Definition pcbplot.cpp:388
void SetColorMode(bool aColorMode)
Choose color or bland and white plot mode.
Definition pcbplot.cpp:510
bool OpenPlotfile(const wxString &aSuffix, PLOT_FORMAT aFormat, const wxString &aSheetName=wxEmptyString, const wxString &aSheetPath=wxEmptyString)
Open a new plotfile; works as a factory for plotter objects/.
Definition pcbplot.cpp:420
bool PlotLayers(const LSEQ &aLayerSequence)
Plot a sequence of board layer IDs in the given order.
Definition pcbplot.cpp:497
PLOTTER * m_plotter
This is the plotter object; it starts NULL and become instantiated when a plotfile is.
PCB_PLOT_PARAMS & GetPlotOptions()
Accessor to the plot parameters and options.
void ClosePlot()
Close the current plot, nothing happens if it isn't open.
Definition pcbplot.cpp:406
const wxString & GetRevision() const
Definition title_block.h:86
const wxString ExpandEnvVarSubstitutions(const wxString &aString, const PROJECT *aProject)
Replace any environment variable & text variable references with their values.
Definition common.cpp:558
wxString ExpandTextVars(const wxString &aSource, const PROJECT *aProject, int aFlags)
Definition common.cpp:62
bool EnsureFileDirectoryExists(wxFileName *aTargetFullFileName, const wxString &aBaseFilename, REPORTER *aReporter)
Make aTargetFullFileName absolute and create the path of this file if it doesn't yet exist.
Definition common.cpp:579
The common library.
wxString GetDefaultPlotExtension(PLOT_FORMAT aFormat)
Return the default plot extension for a format.
wxString GbrMakeProjectGUIDfromString(const wxString &aText)
Build a project GUID using format RFC4122 Version 1 or 4 from the project name, because a KiCad proje...
wxString GbrMakeCreationDateAttributeString(GBR_NC_STRING_FORMAT aFormat)
Handle special data (items attributes) during plot.
@ GBR_NC_STRING_FORMAT_X1
@ GBR_NC_STRING_FORMAT_X2
bool IsCopperLayer(int aLayerId)
Test whether a layer is a copper layer.
Definition layer_ids.h:677
size_t CopperLayerToOrdinal(PCB_LAYER_ID aLayer)
Converts KiCad copper layer enum to an ordinal between the front and back layers.
Definition layer_ids.h:913
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:60
@ B_Adhes
Definition layer_ids.h:103
@ Edge_Cuts
Definition layer_ids.h:112
@ Dwgs_User
Definition layer_ids.h:107
@ F_Paste
Definition layer_ids.h:104
@ Cmts_User
Definition layer_ids.h:108
@ F_Adhes
Definition layer_ids.h:102
@ B_Mask
Definition layer_ids.h:98
@ B_Cu
Definition layer_ids.h:65
@ Eco1_User
Definition layer_ids.h:109
@ F_Mask
Definition layer_ids.h:97
@ B_Paste
Definition layer_ids.h:105
@ F_Fab
Definition layer_ids.h:119
@ F_SilkS
Definition layer_ids.h:100
@ UNDEFINED_LAYER
Definition layer_ids.h:61
@ Eco2_User
Definition layer_ids.h:110
@ B_SilkS
Definition layer_ids.h:101
@ F_Cu
Definition layer_ids.h:64
@ B_Fab
Definition layer_ids.h:118
PCB_LAYER_ID ToLAYER_ID(int aLayer)
Definition lset.cpp:754
const wxString GetGerberProtelExtension(int aLayer)
Definition pcbplot.cpp:44
static wxString & makeStringCompatX1(wxString &aText, bool aUseX1CompatibilityMode)
Definition pcbplot.cpp:272
void AddGerberX2Header(PLOTTER *aPlotter, const BOARD *aBoard, bool aUseX1CompatibilityMode)
Calculate some X2 attributes as defined in the Gerber file format specification J4 (chapter 5) and ad...
Definition pcbplot.cpp:295
const wxString GetGerberFileFunctionAttribute(const BOARD *aBoard, int aLayer)
Return the "file function" attribute for aLayer, as defined in the Gerber file format specification J...
Definition pcbplot.cpp:83
static void replaceReservedCharsField(wxString &aMsg)
Definition pcbplot.cpp:287
void AddGerberX2Attribute(PLOTTER *aPlotter, const BOARD *aBoard, int aLayer, bool aUseX1CompatibilityMode)
Calculate some X2 attributes as defined in the Gerber file format specification and add them to the g...
Definition pcbplot.cpp:361
void BuildPlotFileName(wxFileName *aFilename, const wxString &aOutputDir, const wxString &aSuffix, const wxString &aExtension)
Complete a plot filename.
Definition pcbplot.cpp:380
static const wxString GetGerberFilePolarityAttribute(int aLayer)
Definition pcbplot.cpp:211
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 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.).
void PlotOneBoardLayer(BOARD *aBoard, PLOTTER *aPlotter, PCB_LAYER_ID aLayer, const PCB_PLOT_PARAMS &aPlotOpt, bool isPrimaryLayer)
Plot one copper or technical layer.
PLOT_FORMAT
The set of supported output plot formats.
Definition plotter.h:64
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:695