78#include <wx/wfstream.h>
79#include <wx/zipstrm.h>
101 m_cliBoard( nullptr )
104 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
113 return dlg.GetReturnCode() == wxID_OK;
117 [](
JOB* job, wxWindow* aParent ) ->
bool
122 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
132 return dlg.GetReturnCode() == wxID_OK;
136 [](
JOB* job, wxWindow* aParent ) ->
bool
141 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
151 return dlg.GetReturnCode() == wxID_OK;
154 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
164 return dlg.GetReturnCode() == wxID_OK;
168 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
178 return dlg.GetReturnCode() == wxID_OK;
182 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
192 return dlg.GetReturnCode() == wxID_OK;
196 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
203 return dlg.GetReturnCode() == wxID_OK;
206 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
213 return dlg.GetReturnCode() == wxID_OK;
217 [](
JOB* job, wxWindow* aParent ) ->
bool
223 [](
JOB* job, wxWindow* aParent ) ->
bool
228 [](
JOB* job, wxWindow* aParent ) ->
bool
234 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
239 wxCHECK( ipcJob && editFrame,
false );
244 return dlg.GetReturnCode() == wxID_OK;
248 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
251 wxCHECK( odbJob,
false );
258 return dlg.GetReturnCode() == wxID_OK;
265 BOARD* brd =
nullptr;
267 if( !
Pgm().IsGUI() &&
270 wxString pcbPath = aPath;
272 if( pcbPath.IsEmpty() )
277 pcbPath =
path.GetFullPath();
316 if( aStepJob ==
nullptr )
330 fn.SetName( fn.GetName() );
429 if( !stepExporter.
Export() )
441 if( aRenderJob ==
nullptr )
500 boardAdapter.
m_Cfg = cfg;
512 static std::map<JOB_PCB_RENDER::SIDE, VIEW3D_TYPE> s_viewCmdMap = {
522 aRenderJob->
m_perspective ? PROJECTION_TYPE::PERSPECTIVE : PROJECTION_TYPE::ORTHO;
562 uint8_t* rgbaBuffer = raytrace.
GetBuffer();
564 bool success = !!rgbaBuffer;
568 const unsigned int wxh = realSize.x * realSize.y;
570 unsigned char* rgbBuffer = (
unsigned char*) malloc( wxh * 3 );
571 unsigned char* alphaBuffer = (
unsigned char*) malloc( wxh );
573 unsigned char* rgbaPtr = rgbaBuffer;
574 unsigned char* rgbPtr = rgbBuffer;
575 unsigned char* alphaPtr = alphaBuffer;
577 for(
int y = 0; y < realSize.y; y++ )
579 for(
int x = 0; x < realSize.x; x++ )
581 rgbPtr[0] = rgbaPtr[0];
582 rgbPtr[1] = rgbaPtr[1];
583 rgbPtr[2] = rgbaPtr[2];
584 alphaPtr[0] = rgbaPtr[3];
592 wxImage
image( realSize );
593 image.SetData( rgbBuffer );
594 image.SetAlpha( alphaBuffer );
597 image.SetOption( wxIMAGE_OPTION_QUALITY, 90 );
600 : wxBITMAP_TYPE_JPEG );
603 m_reporter->
Report( wxString::Format(
_(
"Actual image size: %dx%d" ), realSize.x, realSize.y )
622 if( aSvgJob ==
nullptr )
663 if( aDxfJob ==
nullptr )
678 fn.SetName( fn.GetName() );
740 if( aPdfJob ==
nullptr )
755 fn.SetName( fn.GetName() );
836 if( aGerberJob ==
nullptr )
883 plotSequence.push_back( layer );
889 if(
find( plotSequence.begin(), plotSequence.end(), layer_all ) != plotSequence.end() )
892 plotSequence.push_back( layer_all );
903 plotOpts = boardPlotOptions;
913 wxString fullname = fn.GetFullName();
928 layerName, fn.GetFullPath(),
929 sheetName, sheetPath );
933 m_reporter->
Report( wxString::Format(
_(
"Plotted to '%s'.\n" ), fn.GetFullPath() ),
963 if( aGencadJob ==
nullptr )
968 if( aBoard ==
nullptr )
987 fn.SetName( fn.GetName() );
1012 aPlotOpts.
SetFormat( PLOT_FORMAT::GERBER );
1037 if( aGerberJob ==
nullptr )
1051 fn.SetName( fn.GetName() );
1088 sheetName, sheetPath );
1116 if( aDrillJob ==
nullptr )
1127 if( !fn.Mkdir( wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL ) )
1133 std::unique_ptr<GENDRILL_WRITER_BASE> drillWriter;
1136 drillWriter = std::make_unique<EXCELLON_WRITER>( brd );
1138 drillWriter = std::make_unique<GERBER_WRITER>( brd );
1188 if( excellonWriter ==
nullptr )
1210 if( gerberWriter ==
nullptr )
1235 if( aPosJob ==
nullptr )
1248 fn.SetName( fn.GetName() );
1263 FILE* file =
nullptr;
1266 if( file ==
nullptr )
1281 frontSide, backSide,
1287 fputs( data.c_str(), file );
1316 const wxString& aName );
1323 if( upgradeJob ==
nullptr )
1340 m_reporter->
Report(
_(
"Output path must be specified to convert legacy and non-KiCad libraries\n" ),
1350 m_reporter->
Report(
_(
"Footprint library path does not exist or is not accessible\n" ),
1370 bool shouldSave = upgradeJob->
m_force;
1374 if( footprint.second->GetFootprint()->GetFileFormatVersionAtLoad()
1423 if( svgJob ==
nullptr )
1451 bool singleFpPlotted =
false;
1452 for( FP_CACHE_FOOTPRINT_MAP::iterator it = footprintMap.begin(); it != footprintMap.end();
1455 const FOOTPRINT* fp = it->second->GetFootprint();
1465 singleFpPlotted =
true;
1474 if( !svgJob->
m_footprint.IsEmpty() && !singleFpPlotted )
1476 m_reporter->
Report(
_(
"The given footprint could not be found to export." ) + wxS(
"\n" ),
1488 std::unique_ptr<BOARD> brd;
1491 brd->SynchronizeProperties();
1504 pad->SetLocalRatsnestVisible(
false );
1505 pad->SetNetCode( 0 );
1511 brd->Add( fp, ADD_MODE::INSERT,
true );
1513 wxFileName outputFile;
1520 outputFile.GetFullPath() ),
1527 svgPlotOptions.
m_outputFile = outputFile.GetFullPath();
1548 if( drcJob ==
nullptr )
1562 fn.SetName( fn.GetName() );
1579 default: units = EDA_UNITS::MILLIMETRES;
break;
1583 std::unique_ptr<NETLIST>
netlist = std::make_unique<NETLIST>();
1597 typedef bool (*NETLIST_FN_PTR)(
const wxString&, std::string& );
1600 wxFileName schematicPath( drcJob->
m_filename );
1602 std::string netlist_str;
1606 if( !schematicPath.Exists() )
1609 if( !schematicPath.Exists() )
1616 (*netlister)( schematicPath.GetFullPath(), netlist_str );
1626 m_reporter->
Report(
_(
"Failed to fetch schematic netlist for parity tests.\n" ),
1630 drcEngine->SetSchematicNetlist(
netlist.get() );
1634 drcEngine->SetProgressReporter(
nullptr );
1635 drcEngine->SetViolationHandler(
1636 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
VECTOR2I aPos,
int aLayer )
1639 commit.
Add( marker );
1645 drcEngine->ClearViolationHandler();
1652 std::shared_ptr<DRC_ITEMS_PROVIDER> markersProvider = std::make_shared<DRC_ITEMS_PROVIDER>(
1655 std::shared_ptr<DRC_ITEMS_PROVIDER> ratsnestProvider =
1658 std::shared_ptr<DRC_ITEMS_PROVIDER> fpWarningsProvider =
1661 markersProvider->SetSeverities( drcJob->
m_severity );
1662 ratsnestProvider->SetSeverities( drcJob->
m_severity );
1663 fpWarningsProvider->SetSeverities( drcJob->
m_severity );
1666 markersProvider->GetCount() ),
1669 ratsnestProvider->GetCount() ),
1674 m_reporter->
Report( wxString::Format(
_(
"Found %d schematic parity issues\n" ),
1675 fpWarningsProvider->GetCount() ),
1679 DRC_REPORT reportWriter( brd, units, markersProvider, ratsnestProvider, fpWarningsProvider );
1681 bool wroteReport =
false;
1702 if( markersProvider->GetCount() > 0 || ratsnestProvider->GetCount() > 0
1703 || fpWarningsProvider->GetCount() > 0 )
1717 if( job ==
nullptr )
1728 fn.SetName( fn.GetName() );
1734 std::map<std::string, UTF8> props;
1737 props[
"sigfig"] = wxString::Format(
"%d", job->
m_precision );
1745 wxString tempFile = wxFileName::CreateTempFileName( wxS(
"pcbnew_ipc" ) );
1750 pi->SaveBoard( tempFile, brd, &props );
1754 m_reporter->
Report( wxString::Format(
_(
"Error generating IPC2581 file '%s'.\n%s" ),
1758 wxRemoveFile( tempFile );
1767 wxFileName zipfn = tempFile;
1768 zipfn.SetExt(
"zip" );
1770 wxFFileOutputStream fnout( zipfn.GetFullPath() );
1771 wxZipOutputStream
zip( fnout );
1772 wxFFileInputStream fnin( tempFile );
1774 zip.PutNextEntry( tempfn.GetFullName() );
1779 wxRemoveFile( tempFile );
1780 tempFile = zipfn.GetFullPath();
1786 m_reporter->
Report( wxString::Format(
_(
"Error generating IPC2581 file '%s'.\n"
1787 "Failed to rename temporary file '%s." )
1801 if( job ==
nullptr )
1812 fn.SetName( fn.GetName() );
1838 return drawingSheet;
1845 if( aSheetPath.IsEmpty() )
1849 [&](
const wxString&
path ) ->
bool
1865 + wxS(
"\n" ) + msg + wxS(
"\n" ),
1873 if( loadSheet( aSheetPath ) )
constexpr EDA_IU_SCALE pcbIUScale
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
#define RANGE_SCALE_3D
This defines the range that all coord will have to be rendered.
static wxString m_DrawingSheetFileName
the name of the drawing sheet file, or empty to use the default drawing sheet
Helper class to handle information needed to display 3D board.
double BiuTo3dUnits() const noexcept
Board integer units To 3D units.
bool m_IsPreviewer
true if we're in a 3D preview panel, false for the standard 3D viewer
void SetBoard(BOARD *aBoard) noexcept
Set current board to be rendered.
EDA_3D_VIEWER_SETTINGS * m_Cfg
std::map< int, COLOR4D > m_ColorOverrides
allows to override color scheme colors
void Set3dCacheManager(S3D_CACHE *aCacheMgr) noexcept
Update the cache manager pointer.
virtual void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Revert the commit by restoring the modified items state.
std::shared_ptr< DRC_ENGINE > m_DRCEngine
const VECTOR2I & GetAuxOrigin()
Information pertinent to a Pcbnew printed circuit board.
LSET GetEnabledLayers() const
A proxy function that calls the corresponding function in m_BoardSettings.
EMBEDDED_FILES * GetEmbeddedFiles() override
const PAGE_INFO & GetPageSettings() const
void RecordDRCExclusions()
Scan existing markers and record data from any that are Excluded.
TITLE_BLOCK & GetTitleBlock()
BOX2I ComputeBoundingBox(bool aBoardEdgesOnly=false) const
Calculate the bounding box containing all board items (or board edge segments).
const std::map< wxString, wxString > & GetProperties() const
const wxString & GetFileName() const
std::vector< PCB_MARKER * > ResolveDRCExclusions(bool aCreateMarkers)
Rebuild DRC markers from the serialized data in BOARD_DESIGN_SETTINGS.
const PCB_PLOT_PARAMS & GetPlotOptions() const
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
PROJECT * GetProject() const
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
void SynchronizeProperties()
Copy the current project's text variables into the boards property cache.
void DeleteMARKERs()
Delete all MARKERS from the board.
constexpr const Vec GetCenter() const
void SetProjection(PROJECTION_TYPE aProjection)
void RotateY_T1(float aAngleInRadians)
bool Zoom_T1(float aFactor)
bool SetCurWindowSize(const wxSize &aSize)
Update the windows size of the camera.
bool ViewCommand_T1(VIEW3D_TYPE aRequestedView)
void RotateX_T1(float aAngleInRadians)
void SetLookAtPos_T1(const SFVEC3F &aLookAtPos)
const SFVEC3F & GetLookAtPos_T1() const
void RotateZ_T1(float aAngleInRadians)
COMMIT & Add(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Notify observers that aItem has been added.
static void GenerateODBPPFiles(const JOB_EXPORT_PCB_ODB &aJob, BOARD *aBoard, PCB_EDIT_FRAME *aParentFrame=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr, REPORTER *aErrorReporter=nullptr)
A dialog to set the plot options and create plot files in various formats.
bool WriteJsonReport(const wxString &aFullFileName)
bool WriteTextReport(const wxString &aFullFileName)
Helper to handle drill precision format in excellon files.
bool LoadDrawingSheet(const wxString &aFullFileName, wxString *aMsg, bool aAppend=false)
Populates the list with a custom layout or the default layout if no custom layout is available.
static DS_DATA_MODEL & GetTheInstance()
static function: returns the instance of DS_DATA_MODEL used in the application
void SetSheetPath(const std::string &aSheetPath)
Set the sheet path displayed in the title block.
void SetSheetName(const std::string &aSheetName)
Set the sheet name displayed in the title block.
void SetIsFirstPage(bool aIsFirstPage)
Change if this is first page.
void SetFileName(const std::string &aFileName)
Set the file name displayed in the title block.
virtual bool EndPlot() override
void SetFlags(EDA_ITEM_FLAGS aMask)
virtual void SetParent(EDA_ITEM *aParent)
Create Excellon drill, drill map, and drill report files.
void SetFormat(bool aMetric, ZEROS_FMT aZerosFmt=DECIMAL_FORMAT, int aLeftDigits=0, int aRightDigits=0)
Initialize internal parameters to match the given format.
bool CreateDrillandMapFilesSet(const wxString &aPlotDirectory, bool aGenDrill, bool aGenMap, REPORTER *aReporter=nullptr)
Create the full set of Excellon drill file for the board.
void SetOptions(bool aMirror, bool aMinimalHeader, const VECTOR2I &aOffset, bool aMerge_PTH_NPTH)
Initialize internal parameters to match drill options.
void SetRouteModeForOvalHoles(bool aUseRouteModeForOvalHoles)
bool m_IncludeUnspecified
Wrapper to expose an API for writing VRML files, without exposing all the many structures used in the...
bool ExportVRML_File(PROJECT *aProject, wxString *aMessages, const wxString &aFullFileName, double aMMtoWRMLunit, bool aIncludeUnspecified, bool aIncludeDNP, bool aExport3DFiles, bool aUseRelativePaths, const wxString &a3D_Subdir, double aXRef, double aYRef)
Exports the board and its footprint shapes 3D (vrml files only) as a vrml file.
static bool Plot(BOARD *aBoard, const PCB_PLOT_SVG_OPTIONS &aSvgPlotOptions)
Provide an extensible class to resolve 3D model paths.
bool SetProject(PROJECT *aProject, bool *flgChanged=nullptr)
Set the current KiCad project directory as the first entry in the model path list.
void SetProgramBase(PGM_BASE *aBase)
Set a pointer to the application's PGM_BASE instance used to extract the local env vars.
wxString ResolvePath(const wxString &aFileName, const wxString &aWorkingPath, const EMBEDDED_FILES *aFiles)
Determines the full path of the given file name.
FP_CACHE_FOOTPRINT_MAP & GetFootprints()
void Save(FOOTPRINT *aFootprint=nullptr)
Save the footprint cache or a single footprint from it to disk.
void SetPath(const wxString &aPath)
void UseIndividualShapes(bool aUnique)
Make pad shapes unique.
void UsePinNamesUnique(bool aUnique)
Make pin names unique.
void StoreOriginCoordsInFile(bool aStore)
Store coord origin in genCAD file.
void FlipBottomPads(bool aFlip)
Flip pad shapes on the bottom side.
void SetPlotOffet(VECTOR2I aOffset)
Set the coordinates offet when exporting items.
bool WriteFile(const wxString &aFullFileName)
Export a genCAD file.
void SetMapFileFormat(PLOT_FORMAT aMapFmt)
Initialize the format for the drill map file.
GERBER_JOBFILE_WRITER is a class used to create Gerber job file a Gerber job file stores info to make...
bool CreateJobFile(const wxString &aFullFilename)
Creates a Gerber job file.
void AddGbrFile(PCB_LAYER_ID aLayer, wxString &aFilename)
add a gerber file name and type in job file list
virtual bool EndPlot() override
Used to create Gerber drill files.
bool CreateDrillandMapFilesSet(const wxString &aPlotDirectory, bool aGenDrill, bool aGenMap, REPORTER *aReporter=nullptr)
Create the full set of Excellon drill file for the board filenames are computed from the board name,...
void SetOptions(const VECTOR2I &aOffset)
Initialize internal parameters to match drill options.
void SetFormat(int aRightDigits=6)
Initialize internal parameters to match the given format.
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
virtual const wxString What() const
A composite of Problem() and Where()
void Register(const std::string &aJobTypeName, std::function< int(JOB *job)> aHandler, std::function< bool(JOB *job, wxWindow *aParent)> aConfigHandler)
PROGRESS_REPORTER * m_progressReporter
JOB_EXPORT_PCB_3D::FORMAT m_format
EXPORTER_STEP_PARAMS m_3dparams
Despite the name; also used for other formats.
ZEROS_FORMAT m_zeroFormat
bool m_excellonOvalDrillRoute
DRILL_ORIGIN m_drillOrigin
bool m_excellonCombinePTHNPTH
bool m_excellonMinimalHeader
bool m_plotGraphicItemsUsingContours
bool m_useIndividualShapes
bool m_useBoardPlotParams
bool m_layersIncludeOnAllSet
LSET m_layersIncludeOnAll
bool m_useProtelFileExtension
bool m_includeNetlistAttributes
bool m_disableApertureMacros
bool m_subtractSolderMaskFromSilk
IPC2581_VERSION m_version
bool m_sketchDNPFPsOnFabLayers
bool m_plotFootprintValues
bool m_sketchPadsOnFabLayers
LSEQ m_printMaskLayersToIncludeOnAllLayers
bool m_crossoutDNPFPsOnFabLayers
bool m_hideDNPFPsOnFabLayers
LSEQ m_printMaskLayer
Layers to include on all individual layer prints.
bool m_mirror
Common Options.
bool m_useDrillPlaceFileOrigin
bool m_excludeFootprintsWithTh
bool m_sketchDNPFPsOnFabLayers
bool m_hideDNPFPsOnFabLayers
bool m_sketchPadsOnFabLayers
bool m_crossoutDNPFPsOnFabLayers
wxString m_outputDirectory
wxString m_outputLibraryPath
bool m_reportAllTrackErrors
bool m_exitCodeViolations
std::string m_colorPreset
An simple container class that lets us dispatch output jobs to kifaces.
void AddOutput(wxString aOutputPath)
wxString GetFullOutputPath() const
bool OutputPathFullSpecified() const
void SetOutputPath(const wxString &aPath)
const std::map< wxString, wxString > & GetVarOverrides() const
wxString GetOutputPath() const
Read the new s-expression based KiCad netlist format.
virtual void LoadNetlist() override
Load the contents of the netlist file into aNetlist.
A color representation with 4 components: red, green, blue, alpha.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
virtual KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, wxTopLevelWindow *aParent=nullptr)
Return the KIWAY_PLAYER* given a FRAME_T.
virtual KIFACE * KiFACE(FACE_T aFaceId, bool doLoad=true)
Return the KIFACE* given a FACE_T.
const UTF8 & GetLibItemName() const
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
LSET is a set of PCB_LAYER_IDs.
LSEQ UIOrder() const
Returns the copper, technical and user layers in the order shown in layer widget.
LSEQ SeqStackupForPlotting() const
Return the sequence that is typical for a bottom-to-top stack-up.
static LSET AllNonCuMask()
Return a mask holding all layer minus CU layers.
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
int JobExportStep(JOB *aJob)
int JobExportPos(JOB *aJob)
int JobExportFpSvg(JOB *aJob)
void populateGerberPlotOptionsFromJob(PCB_PLOT_PARAMS &aPlotOpts, JOB_EXPORT_PCB_GERBER *aJob)
int JobExportOdb(JOB *aJob)
int JobExportDrc(JOB *aJob)
int JobExportFpUpgrade(JOB *aJob)
int JobExportGerber(JOB *aJob)
DS_PROXY_VIEW_ITEM * getDrawingSheetProxyView(BOARD *aBrd)
int JobExportDxf(JOB *aJob)
int JobExportPdf(JOB *aJob)
int JobExportDrill(JOB *aJob)
int JobExportSvg(JOB *aJob)
void loadOverrideDrawingSheet(BOARD *brd, const wxString &aSheetPath)
PCBNEW_JOBS_HANDLER(KIWAY *aKiway)
int JobExportGerbers(JOB *aJob)
int JobExportGencad(JOB *aJob)
BOARD * getBoard(const wxString &aPath=wxEmptyString)
int JobExportIpc2581(JOB *aJob)
int JobExportRender(JOB *aJob)
int doFpExportSvg(JOB_FP_EXPORT_SVG *aSvgJob, const FOOTPRINT *aFootprint)
The main frame for Pcbnew.
A #PLUGIN derivation for saving and loading Pcbnew s-expression formatted files.
static PCB_IO * PluginFind(PCB_FILE_T aFileType)
Return a #PLUGIN which the caller can use to import, export, save, or load design documents.
PCB_FILE_T
The set of file types that the PCB_IO_MGR knows about, and for which there has been a plugin written,...
@ KICAD_SEXP
S-expression Pcbnew file format.
static bool ConvertLibrary(std::map< std::string, UTF8 > *aOldFileProps, const wxString &aOldFilePath, const wxString &aNewFilePath, REPORTER *aReporter)
Convert a schematic symbol library to the latest KiCad format.
static PCB_FILE_T GuessPluginTypeFromLibPath(const wxString &aLibPath, int aCtl=0)
Return a plugin type given a footprint library's libPath.
Parameters and options when plotting/printing a board.
void SetDrillMarksType(DRILL_MARKS aVal)
void SetLayerSelection(LSET aSelection)
void SetPlotReference(bool aFlag)
void SetSketchPadsOnFabLayers(bool aFlag)
void SetUseGerberX2format(bool aUse)
void SetDXFPlotPolygonMode(bool aFlag)
void SetPlotFrameRef(bool aFlag)
void SetSketchDNPFPsOnFabLayers(bool aFlag)
void SetPlotPadNumbers(bool aFlag)
LSET GetLayerSelection() const
void SetPlotOnAllLayersSelection(LSET aSelection)
LSET GetPlotOnAllLayersSelection() const
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 SetNegative(bool aFlag)
void SetUseAuxOrigin(bool aAux)
bool GetUseGerberProtelExtensions() const
void SetCrossoutDNPFPsOnFabLayers(bool aFlag)
void SetFormat(PLOT_FORMAT aFormat)
virtual bool EndPlot() override
virtual SETTINGS_MANAGER & GetSettingsManager() const
Used to create Gerber drill files.
int CreatePlaceFile(const wxString &aFullFilename, PCB_LAYER_ID aLayer, bool aIncludeBrdEdges)
Create an pnp gerber file.
The ASCII format of the kicad place file is:
std::string GenPositionData()
build a string filled with the position data
wxString m_BoardDrawingSheetFile
PcbNew params.
static S3D_CACHE * Get3DCacheManager(PROJECT *aProject, bool updateProjDir=false)
Return a pointer to an instance of the 3D cache manager.
virtual const wxString GetProjectFullName() const
Return the full path and name of the project.
virtual const wxString GetProjectPath() const
Return the full path of the project.
virtual void ApplyTextVars(const std::map< wxString, wxString > &aVarsMap)
Applies the given var map, it will create or update existing vars.
virtual PROJECT_FILE & GetProjectFile() const
bool Redraw(bool aIsMoving, REPORTER *aStatusReporter, REPORTER *aWarningReporter) override
Redraw the view.
wxSize GetRealBufferSize()
void SetCurWindowSize(const wxSize &aSize) override
Before each render, the canvas will tell the render what is the size of its windows,...
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")
Retrieves a color settings object that applications can read colors from.
T * GetAppSettings(const wxString &aFilename)
Returns a handle to the a given settings by type If the settings have already been loaded,...
PROJECT & Prj() const
A helper while we are not MDI-capable – return the one and only project.
Is a LINE_READER that reads from a multiline 8 bit wide std::string.
void Pan_T1(const SFVEC3F &aDeltaOffsetInc) override
void SetT0_and_T1_current_T() override
This will set T0 and T1 with the current values.
void Interpolate(float t) override
It will update the matrix to interpolate between T0 and T1 values.
wxString GetDefaultPlotExtension(PLOT_FORMAT aFormat)
Returns the default plot extension for a format.
static DRILL_PRECISION precisionListForInches(2, 4)
static DRILL_PRECISION precisionListForMetric(3, 3)
static constexpr EDA_ANGLE ANGLE_0
#define IS_NEW
New item, just created.
static FILENAME_RESOLVER * resolver
Classes used in drill files, map files and report files generation.
Classes used in drill files, map files and report files generation.
Classes used to generate a Gerber job file in JSON.
Classes used in place file generation.
static const std::string LegacySchematicFileExtension
static const std::string BrepFileExtension
static const std::string GerberJobFileExtension
static const std::string GerberFileExtension
static const std::string XaoFileExtension
static const std::string ReportFileExtension
static const std::string GltfBinaryFileExtension
static const std::string FootprintPlaceFileExtension
static const std::string JsonFileExtension
static const std::string KiCadSchematicFileExtension
static const std::string CsvFileExtension
static const std::string Ipc2581FileExtension
static const std::string StlFileExtension
static const std::string PlyFileExtension
static const std::string StepFileExtension
static const std::string SVGFileExtension
static const std::string VrmlFileExtension
static const std::string KiCadPcbFileExtension
std::unique_ptr< T > IO_RELEASER
Helper to hold and release an IO_BASE object when exceptions are thrown.
@ KIFACE_NETLIST_SCHEMATIC
@ LAYER_3D_BACKGROUND_TOP
@ LAYER_3D_BACKGROUND_BOTTOM
PCB_LAYER_ID
A quick note on layer IDs:
This file contains miscellaneous commonly used macros and functions.
static const int ERR_RC_VIOLATIONS
static const int ERR_INVALID_INPUT_FILE
static const int ERR_INVALID_OUTPUT_CONFLICT
Rules check violation count was greater than 0.
static const int ERR_UNKNOWN
#define SEXPR_BOARD_FILE_VERSION
Current s-expression file format version. 2 was the last legacy format version.
boost::ptr_map< wxString, FP_CACHE_ITEM > FP_CACHE_FOOTPRINT_MAP
#define CTL_FOR_LIBRARY
Format output for a footprint library instead of clipboard or BOARD.
static DRILL_PRECISION precisionListForInches(2, 4)
static DRILL_PRECISION precisionListForMetric(3, 3)
FOOTPRINT * try_load_footprint(const wxFileName &aFileName, PCB_IO_MGR::PCB_FILE_T aFileType, const wxString &aName)
SETTINGS_MANAGER * GetSettingsManager()
BOARD * CreateEmptyBoard()
Construct a default BOARD with a temporary (no filename) project.
BOARD * LoadBoard(const wxString &aFileName, bool aSetActive)
Loads a board from file This function identifies the file type by extension and determines the correc...
const wxString GetGerberProtelExtension(int aLayer)
void BuildPlotFileName(wxFileName *aFilename, const wxString &aOutputDir, const wxString &aSuffix, const wxString &aExtension)
Complete a plot filename.
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.).
PLOTTER * StartPlotBoard(BOARD *aBoard, const PCB_PLOT_PARAMS *aPlotOpts, int aLayer, const wxString &aLayerName, const wxString &aFullFileName, const wxString &aSheetName, const wxString &aSheetPath)
Open a new plotfile using the options (and especially the format) specified in the options and prepar...
PGM_BASE & Pgm()
The global Program "get" accessor.
PLOT_FORMAT
The set of supported output plot formats.
Plotting engines similar to ps (PostScript, Gerber, svg)
MODEL3D_FORMAT_TYPE fileType(const char *aFileName)
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
bool raytrace_post_processing
bool raytrace_reflections
bool differentiate_plated_copper
bool raytrace_refractions
bool raytrace_procedural_textures
int raytrace_recursivelevel_refractions
bool raytrace_anti_aliasing
constexpr double IUTomm(int iu) const
constexpr int mmToIU(double mm) const
Implement a participant in the KIWAY alchemy.
bool m_sketchPadsOnFabLayers
bool m_sketchDNPFPsOnFabLayers
bool m_crossoutDNPFPsOnFabLayers
bool m_hideDNPFPsOnFabLayers
Declaration for a track ball camera.
double DEG2RAD(double deg)
VECTOR2< int32_t > VECTOR2I
Definition of file extensions used in Kicad.