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() );
403 if( !stepExporter.
Export() )
415 if( aRenderJob ==
nullptr )
475 boardAdapter.
m_Cfg = cfg;
487 static std::map<JOB_PCB_RENDER::SIDE, VIEW3D_TYPE> s_viewCmdMap = {
497 aRenderJob->
m_perspective ? PROJECTION_TYPE::PERSPECTIVE : PROJECTION_TYPE::ORTHO;
537 uint8_t* rgbaBuffer = raytrace.
GetBuffer();
539 bool success = !!rgbaBuffer;
543 const unsigned int wxh = realSize.x * realSize.y;
545 unsigned char* rgbBuffer = (
unsigned char*) malloc( wxh * 3 );
546 unsigned char* alphaBuffer = (
unsigned char*) malloc( wxh );
548 unsigned char* rgbaPtr = rgbaBuffer;
549 unsigned char* rgbPtr = rgbBuffer;
550 unsigned char* alphaPtr = alphaBuffer;
552 for(
int y = 0; y < realSize.y; y++ )
554 for(
int x = 0; x < realSize.x; x++ )
556 rgbPtr[0] = rgbaPtr[0];
557 rgbPtr[1] = rgbaPtr[1];
558 rgbPtr[2] = rgbaPtr[2];
559 alphaPtr[0] = rgbaPtr[3];
567 wxImage
image( realSize );
568 image.SetData( rgbBuffer );
569 image.SetAlpha( alphaBuffer );
572 image.SetOption( wxIMAGE_OPTION_QUALITY, 90 );
575 : wxBITMAP_TYPE_JPEG );
578 m_reporter->
Report( wxString::Format(
_(
"Actual image size: %dx%d" ), realSize.x, realSize.y )
597 if( aSvgJob ==
nullptr )
637 if( aDxfJob ==
nullptr )
652 fn.SetName( fn.GetName() );
713 if( aPdfJob ==
nullptr )
728 fn.SetName( fn.GetName() );
808 if( aGerberJob ==
nullptr )
855 plotSequence.push_back( layer );
861 if(
find( plotSequence.begin(), plotSequence.end(), layer_all ) != plotSequence.end() )
864 plotSequence.push_back( layer_all );
875 plotOpts = boardPlotOptions;
885 wxString fullname = fn.GetFullName();
900 layerName, fn.GetFullPath(),
901 sheetName, sheetPath );
905 m_reporter->
Report( wxString::Format(
_(
"Plotted to '%s'.\n" ), fn.GetFullPath() ),
935 if( aGencadJob ==
nullptr )
940 if( aBoard ==
nullptr )
959 fn.SetName( fn.GetName() );
984 aPlotOpts.
SetFormat( PLOT_FORMAT::GERBER );
1009 if( aGerberJob ==
nullptr )
1023 fn.SetName( fn.GetName() );
1059 sheetName, sheetPath );
1087 if( aDrillJob ==
nullptr )
1098 if( !fn.Mkdir( wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL ) )
1104 std::unique_ptr<GENDRILL_WRITER_BASE> drillWriter;
1107 drillWriter = std::make_unique<EXCELLON_WRITER>( brd );
1109 drillWriter = std::make_unique<GERBER_WRITER>( brd );
1159 if( excellonWriter ==
nullptr )
1181 if( gerberWriter ==
nullptr )
1206 if( aPosJob ==
nullptr )
1219 fn.SetName( fn.GetName() );
1234 FILE* file =
nullptr;
1237 if( file ==
nullptr )
1252 frontSide, backSide,
1258 fputs( data.c_str(), file );
1287 const wxString& aName );
1294 if( upgradeJob ==
nullptr )
1311 m_reporter->
Report(
_(
"Output path must be specified to convert legacy and non-KiCad libraries\n" ),
1321 m_reporter->
Report(
_(
"Footprint library path does not exist or is not accessible\n" ),
1341 bool shouldSave = upgradeJob->
m_force;
1345 if( footprint.second->GetFootprint()->GetFileFormatVersionAtLoad()
1394 if( svgJob ==
nullptr )
1422 bool singleFpPlotted =
false;
1423 for( FP_CACHE_FOOTPRINT_MAP::iterator it = footprintMap.begin(); it != footprintMap.end();
1426 const FOOTPRINT* fp = it->second->GetFootprint();
1436 singleFpPlotted =
true;
1445 if( !svgJob->
m_footprint.IsEmpty() && !singleFpPlotted )
1447 m_reporter->
Report(
_(
"The given footprint could not be found to export." ) + wxS(
"\n" ),
1459 std::unique_ptr<BOARD> brd;
1462 brd->SynchronizeProperties();
1475 pad->SetLocalRatsnestVisible(
false );
1476 pad->SetNetCode( 0 );
1482 brd->Add( fp, ADD_MODE::INSERT,
true );
1484 wxFileName outputFile;
1491 outputFile.GetFullPath() ),
1498 svgPlotOptions.
m_outputFile = outputFile.GetFullPath();
1519 if( drcJob ==
nullptr )
1533 fn.SetName( fn.GetName() );
1550 default: units = EDA_UNITS::MILLIMETRES;
break;
1554 std::unique_ptr<NETLIST>
netlist = std::make_unique<NETLIST>();
1568 typedef bool (*NETLIST_FN_PTR)(
const wxString&, std::string& );
1571 wxFileName schematicPath( drcJob->
m_filename );
1573 std::string netlist_str;
1577 if( !schematicPath.Exists() )
1580 if( !schematicPath.Exists() )
1587 (*netlister)( schematicPath.GetFullPath(), netlist_str );
1597 m_reporter->
Report(
_(
"Failed to fetch schematic netlist for parity tests.\n" ),
1601 drcEngine->SetSchematicNetlist(
netlist.get() );
1605 drcEngine->SetProgressReporter(
nullptr );
1606 drcEngine->SetViolationHandler(
1607 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
VECTOR2I aPos,
int aLayer )
1610 commit.
Add( marker );
1616 drcEngine->ClearViolationHandler();
1623 std::shared_ptr<DRC_ITEMS_PROVIDER> markersProvider = std::make_shared<DRC_ITEMS_PROVIDER>(
1626 std::shared_ptr<DRC_ITEMS_PROVIDER> ratsnestProvider =
1629 std::shared_ptr<DRC_ITEMS_PROVIDER> fpWarningsProvider =
1632 markersProvider->SetSeverities( drcJob->
m_severity );
1633 ratsnestProvider->SetSeverities( drcJob->
m_severity );
1634 fpWarningsProvider->SetSeverities( drcJob->
m_severity );
1637 markersProvider->GetCount() ),
1640 ratsnestProvider->GetCount() ),
1645 m_reporter->
Report( wxString::Format(
_(
"Found %d schematic parity issues\n" ),
1646 fpWarningsProvider->GetCount() ),
1650 DRC_REPORT reportWriter( brd, units, markersProvider, ratsnestProvider, fpWarningsProvider );
1652 bool wroteReport =
false;
1673 if( markersProvider->GetCount() > 0 || ratsnestProvider->GetCount() > 0
1674 || fpWarningsProvider->GetCount() > 0 )
1688 if( job ==
nullptr )
1699 fn.SetName( fn.GetName() );
1705 std::map<std::string, UTF8> props;
1708 props[
"sigfig"] = wxString::Format(
"%d", job->
m_precision );
1716 wxString tempFile = wxFileName::CreateTempFileName( wxS(
"pcbnew_ipc" ) );
1721 pi->SaveBoard( tempFile, brd, &props );
1725 m_reporter->
Report( wxString::Format(
_(
"Error generating IPC2581 file '%s'.\n%s" ),
1729 wxRemoveFile( tempFile );
1738 wxFileName zipfn = tempFile;
1739 zipfn.SetExt(
"zip" );
1741 wxFFileOutputStream fnout( zipfn.GetFullPath() );
1742 wxZipOutputStream
zip( fnout );
1743 wxFFileInputStream fnin( tempFile );
1745 zip.PutNextEntry( tempfn.GetFullName() );
1750 wxRemoveFile( tempFile );
1751 tempFile = zipfn.GetFullPath();
1757 m_reporter->
Report( wxString::Format(
_(
"Error generating IPC2581 file '%s'.\n"
1758 "Failed to rename temporary file '%s." )
1782 return drawingSheet;
1789 if( aSheetPath.IsEmpty() )
1793 [&](
const wxString&
path ) ->
bool
1809 + wxS(
"\n" ) + msg + wxS(
"\n" ),
1817 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 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, 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.