77#include <wx/wfstream.h>
78#include <wx/zipstrm.h>
102 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
111 return dlg.GetReturnCode() == wxID_OK;
115 [](
JOB* job, wxWindow* aParent ) ->
bool
120 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
129 return dlg.GetReturnCode() == wxID_OK;
133 [](
JOB* job, wxWindow* aParent ) ->
bool
138 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
148 return dlg.GetReturnCode() == wxID_OK;
151 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
161 return dlg.GetReturnCode() == wxID_OK;
165 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
175 return dlg.GetReturnCode() == wxID_OK;
179 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
189 return dlg.GetReturnCode() == wxID_OK;
193 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
200 return dlg.GetReturnCode() == wxID_OK;
203 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
210 return dlg.GetReturnCode() == wxID_OK;
214 [](
JOB* job, wxWindow* aParent ) ->
bool
220 [](
JOB* job, wxWindow* aParent ) ->
bool
225 [](
JOB* job, wxWindow* aParent ) ->
bool
231 [aKiway](
JOB* job, wxWindow* aParent ) ->
bool
240 return dlg.GetReturnCode() == wxID_OK;
247 BOARD* brd =
nullptr;
249 if( !
Pgm().IsGUI() &&
254 wxString pcbPath = aPath;
255 if( pcbPath.IsEmpty() )
260 pcbPath =
path.GetFullPath();
290 if( aStepJob ==
nullptr )
304 fn.SetName( fn.GetName() );
393 if( !stepExporter.
Export() )
405 if( aRenderJob ==
nullptr )
465 boardAdapter.
m_Cfg = cfg;
477 static std::map<JOB_PCB_RENDER::SIDE, VIEW3D_TYPE> s_viewCmdMap = {
487 aRenderJob->
m_perspective ? PROJECTION_TYPE::PERSPECTIVE : PROJECTION_TYPE::ORTHO;
527 uint8_t* rgbaBuffer = raytrace.
GetBuffer();
529 bool success = !!rgbaBuffer;
533 const unsigned int wxh = realSize.x * realSize.y;
535 unsigned char* rgbBuffer = (
unsigned char*) malloc( wxh * 3 );
536 unsigned char* alphaBuffer = (
unsigned char*) malloc( wxh );
538 unsigned char* rgbaPtr = rgbaBuffer;
539 unsigned char* rgbPtr = rgbBuffer;
540 unsigned char* alphaPtr = alphaBuffer;
542 for(
int y = 0; y < realSize.y; y++ )
544 for(
int x = 0; x < realSize.x; x++ )
546 rgbPtr[0] = rgbaPtr[0];
547 rgbPtr[1] = rgbaPtr[1];
548 rgbPtr[2] = rgbaPtr[2];
549 alphaPtr[0] = rgbaPtr[3];
557 wxImage
image( realSize );
558 image.SetData( rgbBuffer );
559 image.SetAlpha( alphaBuffer );
562 image.SetOption( wxIMAGE_OPTION_QUALITY, 90 );
565 : wxBITMAP_TYPE_JPEG );
568 m_reporter->
Report( wxString::Format(
_(
"Actual image size: %dx%d" ), realSize.x, realSize.y )
587 if( aSvgJob ==
nullptr )
630 if( aDxfJob ==
nullptr )
645 fn.SetName( fn.GetName() );
706 if( aPdfJob ==
nullptr )
721 fn.SetName( fn.GetName() );
801 if( aGerberJob ==
nullptr )
848 plotSequence.push_back( layer );
854 if(
find( plotSequence.begin(), plotSequence.end(), layer_all ) != plotSequence.end() )
857 plotSequence.push_back( layer_all );
868 plotOpts = boardPlotOptions;
878 wxString fullname = fn.GetFullName();
893 layerName, fn.GetFullPath(),
894 sheetName, sheetPath );
898 m_reporter->
Report( wxString::Format(
_(
"Plotted to '%s'.\n" ), fn.GetFullPath() ),
928 if( aGencadJob ==
nullptr )
933 if( aBoard ==
nullptr )
952 fn.SetName( fn.GetName() );
979 aPlotOpts.
SetFormat( PLOT_FORMAT::GERBER );
1004 if( aGerberJob ==
nullptr )
1018 fn.SetName( fn.GetName() );
1051 sheetName, sheetPath );
1079 if( aDrillJob ==
nullptr )
1090 if( !fn.Mkdir( wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL ) )
1096 std::unique_ptr<GENDRILL_WRITER_BASE> drillWriter;
1099 drillWriter = std::make_unique<EXCELLON_WRITER>( brd );
1101 drillWriter = std::make_unique<GERBER_WRITER>( brd );
1151 if( excellonWriter ==
nullptr )
1173 if( gerberWriter ==
nullptr )
1198 if( aPosJob ==
nullptr )
1211 fn.SetName( fn.GetName() );
1226 FILE* file =
nullptr;
1229 if( file ==
nullptr )
1244 frontSide, backSide,
1250 fputs( data.c_str(), file );
1279 const wxString& aName );
1286 if( upgradeJob ==
nullptr )
1303 m_reporter->
Report(
_(
"Output path must be specified to convert legacy and non-KiCad libraries\n" ),
1313 m_reporter->
Report(
_(
"Footprint library path does not exist or is not accessible\n" ),
1335 bool shouldSave = upgradeJob->
m_force;
1339 if( footprint.second->GetFootprint()->GetFileFormatVersionAtLoad()
1388 if( svgJob ==
nullptr )
1417 bool singleFpPlotted =
false;
1418 for( FP_CACHE_FOOTPRINT_MAP::iterator it = footprintMap.begin(); it != footprintMap.end();
1421 const FOOTPRINT* fp = it->second->GetFootprint();
1431 singleFpPlotted =
true;
1440 if( !svgJob->
m_footprint.IsEmpty() && !singleFpPlotted )
1442 m_reporter->
Report(
_(
"The given footprint could not be found to export." ) + wxS(
"\n" ),
1454 std::unique_ptr<BOARD> brd;
1457 brd->SynchronizeProperties();
1470 pad->SetLocalRatsnestVisible(
false );
1471 pad->SetNetCode( 0 );
1477 brd->Add( fp, ADD_MODE::INSERT,
true );
1479 wxFileName outputFile;
1486 outputFile.GetFullPath() ),
1493 svgPlotOptions.
m_outputFile = outputFile.GetFullPath();
1514 if( drcJob ==
nullptr )
1528 fn.SetName( fn.GetName() );
1545 default: units = EDA_UNITS::MILLIMETRES;
break;
1549 std::unique_ptr<NETLIST>
netlist = std::make_unique<NETLIST>();
1563 typedef bool (*NETLIST_FN_PTR)(
const wxString&, std::string& );
1566 wxFileName schematicPath( drcJob->
m_filename );
1568 std::string netlist_str;
1572 if( !schematicPath.Exists() )
1575 if( !schematicPath.Exists() )
1582 (*netlister)( schematicPath.GetFullPath(), netlist_str );
1592 m_reporter->
Report(
_(
"Failed to fetch schematic netlist for parity tests.\n" ),
1596 drcEngine->SetSchematicNetlist(
netlist.get() );
1600 drcEngine->SetProgressReporter(
nullptr );
1601 drcEngine->SetViolationHandler(
1602 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
VECTOR2I aPos,
int aLayer )
1605 commit.
Add( marker );
1611 drcEngine->ClearViolationHandler();
1618 std::shared_ptr<DRC_ITEMS_PROVIDER> markersProvider = std::make_shared<DRC_ITEMS_PROVIDER>(
1621 std::shared_ptr<DRC_ITEMS_PROVIDER> ratsnestProvider =
1624 std::shared_ptr<DRC_ITEMS_PROVIDER> fpWarningsProvider =
1627 markersProvider->SetSeverities( drcJob->
m_severity );
1628 ratsnestProvider->SetSeverities( drcJob->
m_severity );
1629 fpWarningsProvider->SetSeverities( drcJob->
m_severity );
1632 markersProvider->GetCount() ),
1635 ratsnestProvider->GetCount() ),
1640 m_reporter->
Report( wxString::Format(
_(
"Found %d schematic parity issues\n" ),
1641 fpWarningsProvider->GetCount() ),
1645 DRC_REPORT reportWriter( brd, units, markersProvider, ratsnestProvider, fpWarningsProvider );
1647 bool wroteReport =
false;
1668 if( markersProvider->GetCount() > 0 || ratsnestProvider->GetCount() > 0
1669 || fpWarningsProvider->GetCount() > 0 )
1683 if( job ==
nullptr )
1694 fn.SetName( fn.GetName() );
1700 std::map<std::string, UTF8> props;
1703 props[
"sigfig"] = wxString::Format(
"%d", job->
m_precision );
1711 wxString tempFile = wxFileName::CreateTempFileName( wxS(
"pcbnew_ipc" ) );
1716 pi->SaveBoard( tempFile, brd, &props );
1720 m_reporter->
Report( wxString::Format(
_(
"Error generating IPC2581 file '%s'.\n%s" ),
1724 wxRemoveFile( tempFile );
1733 wxFileName zipfn = tempFile;
1734 zipfn.SetExt(
"zip" );
1736 wxFFileOutputStream fnout( zipfn.GetFullPath() );
1737 wxZipOutputStream
zip( fnout );
1738 wxFFileInputStream fnin( tempFile );
1740 zip.PutNextEntry( tempfn.GetFullName() );
1745 wxRemoveFile( tempFile );
1746 tempFile = zipfn.GetFullPath();
1752 m_reporter->
Report( wxString::Format(
_(
"Error generating IPC2581 file '%s'.\n"
1753 "Failed to rename temporary file '%s." )
1777 return drawingSheet;
1784 if( aSheetPath.IsEmpty() )
1788 [&](
const wxString&
path ) ->
bool
1804 + wxS(
"\n" ) + msg + wxS(
"\n" ),
1812 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.
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
bool m_crossoutDNPFPsOnFabLayers
bool m_hideDNPFPsOnFabLayers
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 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
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.
Container for project specific data.
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.
T * GetAppSettings()
Returns a handle to the a given settings by type If the settings have already been loaded,...
COLOR_SETTINGS * GetColorSettings(const wxString &aName="user")
Retrieves a color settings object that applications can read colors from.
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 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, PROJECT *aProject)
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.