KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_plotter.cpp File Reference
#include <pcb_plotter.h>
#include <common.h>
#include <plotters/plotter.h>
#include <plotters/plotters_pslike.h>
#include <board.h>
#include <board_loader.h>
#include <footprint.h>
#include <pad.h>
#include <project.h>
#include <pcb_drill_chart.h>
#include <reporter.h>
#include <pcbplot.h>
#include <wx/filename.h>
#include <gerber_jobfile_writer.h>
#include <jobs/job_export_pcb_gerbers.h>
#include <jobs/job_export_pcb_dxf.h>
#include <jobs/job_export_pcb_pdf.h>
#include <jobs/job_export_pcb_plot.h>
#include <jobs/job_export_pcb_png.h>
#include <jobs/job_export_pcb_ps.h>
#include <jobs/job_export_pcb_svg.h>
#include <pgm_base.h>
#include <pcbnew_settings.h>
#include <geometry/shape_poly_set.h>
#include <math/util.h>

Go to the source code of this file.

Functions

static int scaleToSelection (double scale)
 
bool PlotFootprintToSVG (const FOOTPRINT &aFootprint, PROJECT &aProject, const std::map< wxString, wxString > *aVarOverrides, PCB_PLOT_PARAMS &aPlotOpts, const LSEQ &aLayersToPlot, const LSEQ &aLayersOnAll, const wxString &aFileName, REPORTER *aReporter)
 Plot a footprint to an SVG file, with the footprint origin at the SVG origin and the page/viewBox sized to the footprint's bounding box.
 

Function Documentation

◆ PlotFootprintToSVG()

bool PlotFootprintToSVG ( const FOOTPRINT & aFootprint,
PROJECT & aProject,
const std::map< wxString, wxString > * aVarOverrides,
PCB_PLOT_PARAMS & aPlotOpts,
const LSEQ & aLayersToPlot,
const LSEQ & aLayersOnAll,
const wxString & aFileName,
REPORTER * aReporter = nullptr )

Plot a footprint to an SVG file, with the footprint origin at the SVG origin and the page/viewBox sized to the footprint's bounding box.

The footprint is plotted through a temporary board with the footprint placed at its origin. Fit-to-board is assumed.

Definition at line 546 of file pcb_plotter.cpp.

References ANGLE_0, FOOTPRINT::Clone(), BOARD_LOADER::CreateEmptyBoard(), INSERT, IS_NEW, niluuid, pad, FOOTPRINT::Pads(), PCB_PLOTTER::Plot(), EDA_ITEM::SetFlags(), PCB_PLOT_PARAMS::SetFormat(), FOOTPRINT::SetLink(), PCB_PLOT_PARAMS::SetMirror(), FOOTPRINT::SetOrientation(), EDA_ITEM::SetParent(), PCB_PLOT_PARAMS::SetPlotFrameRef(), FOOTPRINT::SetPosition(), PCB_PLOT_PARAMS::SetSkipPlotNPTH_Pads(), PCB_PLOT_PARAMS::SetSvgFitPageToBoard(), and SVG.

Referenced by PCBNEW_JOBS_HANDLER::doFpExportSvg(), and FOOTPRINT_EDITOR_CONTROL::ExportFootprintAsSVG().

◆ scaleToSelection()

static int scaleToSelection ( double scale)
static

Definition at line 47 of file pcb_plotter.cpp.

References scale.

Referenced by PCB_PLOTTER::PlotJobToPlotOpts().