81 m_printMirror( false ),
82 m_oneFileOnly( false )
116 cfg->m_ExportSvg.layers.clear();
133 m_printBW = cfg->m_ExportSvg.black_and_white;
192 wxDirDialog dirDialog(
this,
_(
"Select Output Directory" ), path );
194 if( dirDialog.ShowModal() == wxID_CANCEL )
197 wxFileName dirName = wxFileName::DirName( dirDialog.GetPath() );
199 wxMessageDialog dialog(
this,
_(
"Use a relative path?" ),
_(
"Plot Output Directory" ),
200 wxYES_NO | wxICON_QUESTION | wxYES_DEFAULT );
202 if( dialog.ShowModal() == wxID_YES )
206 boardFilePath = wxPathOnly( boardFilePath );
208 if( !dirName.MakeRelativeTo( boardFilePath ) )
209 wxMessageBox(
_(
"Cannot make path relative (target volume different from board file volume)!" ),
210 _(
"Plot Output Directory" ), wxOK | wxICON_ERROR );
225 wxFileName outputDir = wxFileName::DirName( path );
232 wxString msg =
wxString::Format(
_(
"Could not write plot files to folder \"%s\"." ),
233 outputDir.GetPath() );
243 for(
LSEQ seq = all_selected.
Seq(); seq; ++seq )
246 wxFileName fn( boardFilename );
250 wxString svgPath = fn.GetFullPath();
315 aFullFileName, wxEmptyString );
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
const PAGE_INFO & GetPageSettings() const
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
wxString m_outputDirectory
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
void OnOutputDirectoryBrowseClicked(wxCommandEvent &event) override
void SetUseAuxOrigin(bool aAux)
wxCheckListBox * m_CopperLayersList
wxTextCtrl * m_outputDirectoryName
This file is part of the common library.
const BITMAP_OPAQUE small_folder_xpm[1]
void PlotOneBoardLayer(BOARD *aBoard, PLOTTER *aPlotter, PCB_LAYER_ID aLayer, const PCB_PLOT_PARAMS &aPlotOpt)
Function PlotOneBoardLayer main function to plot one copper or technical layer.
virtual void SetColorMode(bool aColorMode)
Plot in B/W or color.
void SetPageSettings(const PAGE_INFO &aPageSettings)
wxRadioBox * m_ModeColorOption
bool CreateSVGFile(const wxString &FullFileName)
wxCheckBox * m_printMirrorOpt
void SetMirror(bool aFlag)
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
LSET GetEnabledLayers() const
A proxy function that calls the corresponding function in m_BoardSettings Returns a bit-mask of all t...
LSEQ SeqStackupBottom2Top() const
Return the sequence that is typical for a bottom-to-top stack-up.
void SetDrillMarksType(DrillMarksType aVal)
const wxString ExpandEnvVarSubstitutions(const wxString &aString, PROJECT *aProject)
Replace any environment variable & text variable references with their values.
A pure virtual class used to derive REPORTER objects from.
LSEQ Seq(const PCB_LAYER_ID *aWishListSequence, unsigned aCount) const
Return an LSEQ from the union of this LSET and a desired sequence.
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
const wxString & GetFileName() const
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Report a string with a given severity.
virtual const wxString AbsolutePath(const wxString &aFileName) const
Fix up aFileName if it is relative to the project's directory to be an absolute path and filename.
wxCheckBox * m_PrintBoardEdgesCtrl
Board plot function definition file.
virtual bool EndPlot() override
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
void SetPlotFrameRef(bool aFlag)
PCB_LAYER_ID
A quick note on layer IDs:
DIALOG_EXPORT_SVG m_ExportSvg
LSET is a set of PCB_LAYER_IDs.
wxCheckListBox * m_TechnicalLayersList
DIALOG_EXPORT_SVG(PCB_EDIT_FRAME *aParent, BOARD *aBoard)
wxBitmapButton * m_browseButton
void OnButtonPlot(wxCommandEvent &event) override
void SetColorSettings(COLOR_SETTINGS *aSettings)
const wxPoint GetOrigin() const
Describe the page size and margins of a paper page on which to eventually print or plot.
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
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.
wxRadioBox * m_rbSvgPageSizeOpt
void SetSkipPlotNPTH_Pads(bool aSkip)
Definition of file extensions used in Kicad.
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
Returns # of elements in an array.
AppSettings * GetAppSettings(bool aLoadNow=true)
Returns a handle to the a given settings by type If the settings have already been loaded,...
LSET getCheckBoxSelectedLayers() const
void SetFormat(PLOT_FORMAT aFormat)
PCB_PLOT_PARAMS handles plot parameters and options when plotting/printing a board.
void SetHeightMils(int aHeightInMils)
bool contains(const _Container &__container, _Value __value)
Returns true if the container contains the given value.
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
Plotting engines similar to ps (PostScript, Gerber, svg)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
void BuildPlotFileName(wxFileName *aFilename, const wxString &aOutputDir, const wxString &aSuffix, const wxString &aExtension)
Function BuildPlotFileName (helper function) Complete a plot filename: forces the output directory,...
Class DIALOG_EXPORT_SVG_BASE.
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
COLOR_SETTINGS * GetColorSettings(const wxString &aName="user")
Retrieves a color settings object that applications can read colors from.
~DIALOG_EXPORT_SVG() override
wxStdDialogButtonSizer * m_sdbSizer1
Information pertinent to a Pcbnew printed circuit board.
WX_HTML_REPORT_PANEL * m_messagesPanel
void SetWidthMils(int aWidthInMils)
Handle the component boundary box.
The main frame for Pcbnew.
PCBNEW_SETTINGS * GetPcbNewSettings() const
const std::string SVGFileExtension
bool InvokeExportSVG(PCB_EDIT_FRAME *aCaller, BOARD *aBoard)
Function InvokeExportSVG shows the Export SVG dialog.
EDA_RECT ComputeBoundingBox(bool aBoardEdgesOnly=false) const
Calculate the bounding box containing all board items (or board edge segments).
bool IsCopperLayer(LAYER_NUM aLayerId)
Tests whether a layer is a copper layer.
PCB_EDIT_FRAME * m_parent
void ExportSVGFile(bool aOnlyOneFile)
PLOTTER * StartPlotBoard(BOARD *aBoard, PCB_PLOT_PARAMS *aPlotOpts, int aLayer, const wxString &aFullFileName, const wxString &aSheetDesc)
Open a new plotfile using the options (and especially the format) specified in the options and prepar...
void SetFileName(const wxString &aReportFileName)
wxPoint m_AuxOrigin
origin for plot exports
std::pair< wxCheckListBox *, int > m_boxSelectLayer[PCB_LAYER_ID_COUNT]
wxButton * m_sdbSizer1Cancel
static wxString GetStandardLayerName(PCB_LAYER_ID aLayerId)
Return an "English Standard" name of a PCB layer when given aLayerNumber.
wxString m_ColorTheme
Active color theme name.