KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PCBNEW_JOBS_HANDLER Class Reference

#include <pcbnew_jobs_handler.h>

Inheritance diagram for PCBNEW_JOBS_HANDLER:
JOB_DISPATCHER

Public Member Functions

 PCBNEW_JOBS_HANDLER (KIWAY *aKiway)
 
int JobExportStep (JOB *aJob)
 
int JobExportRender (JOB *aJob)
 
int JobExportSvg (JOB *aJob)
 
int JobExportDxf (JOB *aJob)
 
int JobExportPdf (JOB *aJob)
 
int JobExportGerber (JOB *aJob)
 
int JobExportGerbers (JOB *aJob)
 
int JobExportGencad (JOB *aJob)
 
int JobExportDrill (JOB *aJob)
 
int JobExportPos (JOB *aJob)
 
int JobExportFpUpgrade (JOB *aJob)
 
int JobExportFpSvg (JOB *aJob)
 
int JobExportDrc (JOB *aJob)
 
int JobExportIpc2581 (JOB *aJob)
 
int JobExportOdb (JOB *aJob)
 
void Register (const std::string &aJobTypeName, std::function< int(JOB *job)> aHandler, std::function< bool(JOB *job, wxWindow *aParent)> aConfigHandler)
 
int RunJob (JOB *aJob, REPORTER *aReporter)
 
bool HandleJobConfig (JOB *aJob, wxWindow *aParent)
 
void SetReporter (REPORTER *aReporter)
 
void SetProgressReporter (PROGRESS_REPORTER *aReporter)
 

Protected Attributes

KIWAYm_kiway
 
REPORTERm_reporter
 
PROGRESS_REPORTERm_progressReporter
 

Private Member Functions

BOARDgetBoard (const wxString &aPath=wxEmptyString)
 
void populateGerberPlotOptionsFromJob (PCB_PLOT_PARAMS &aPlotOpts, JOB_EXPORT_PCB_GERBER *aJob)
 
int doFpExportSvg (JOB_FP_EXPORT_SVG *aSvgJob, const FOOTPRINT *aFootprint)
 
void loadOverrideDrawingSheet (BOARD *brd, const wxString &aSheetPath)
 
DS_PROXY_VIEW_ITEMgetDrawingSheetProxyView (BOARD *aBrd)
 

Private Attributes

BOARDm_cliBoard
 
std::map< std::string, std::function< int(JOB *job)> > m_jobHandlers
 
std::map< std::string, std::function< bool(JOB *job, wxWindow *aParent)> > m_jobConfigHandlers
 

Detailed Description

Definition at line 34 of file pcbnew_jobs_handler.h.

Constructor & Destructor Documentation

◆ PCBNEW_JOBS_HANDLER()

Member Function Documentation

◆ doFpExportSvg()

◆ getBoard()

◆ getDrawingSheetProxyView()

◆ HandleJobConfig()

bool JOB_DISPATCHER::HandleJobConfig ( JOB aJob,
wxWindow *  aParent 
)
inherited

Definition at line 68 of file job_dispatcher.cpp.

References JOB::GetType(), and JOB_DISPATCHER::m_jobConfigHandlers.

◆ JobExportDrc()

int PCBNEW_JOBS_HANDLER::JobExportDrc ( JOB aJob)

Definition at line 1758 of file pcbnew_jobs_handler.cpp.

References _, COMMIT::Add(), PROJECT::ApplyTextVars(), BOARD::DeleteMARKERs(), PATHS::EnsurePathExists(), CLI::EXIT_CODES::ERR_INVALID_INPUT_FILE, CLI::EXIT_CODES::ERR_INVALID_OUTPUT_CONFLICT, CLI::EXIT_CODES::ERR_RC_VIOLATIONS, CLI::EXIT_CODES::ERR_UNKNOWN, KIWAY::ExpressMail(), FRAME_SCH, getBoard(), JOB::GetConfiguredOutputPath(), BOARD::GetDesignSettings(), getDrawingSheetProxyView(), BOARD::GetFileName(), JOB::GetFullOutputPath(), BOARD::GetProject(), BOARD::GetTitleBlock(), JOB::GetVarOverrides(), JOB_RC::INCHES, JOB_RC::JSON, FILEEXT::JsonFileExtension, Kiface(), KICAD_NETLIST_READER::LoadNetlist(), BOARD_DESIGN_SETTINGS::m_DRCEngine, JOB_RC::m_exitCodeViolations, JOB_RC::m_filename, JOB_RC::m_format, JOB_DISPATCHER::m_kiway, JOB_PCB_DRC::m_parity, JOB_PCB_DRC::m_reportAllTrackErrors, JOB_DISPATCHER::m_reporter, JOB_RC::m_severity, JOB_RC::m_units, MAIL_SCH_GET_NETLIST, MARKER_BASE::MARKER_DRAWING_SHEET, MARKER_BASE::MARKER_DRC, MARKER_BASE::MARKER_PARITY, MARKER_BASE::MARKER_RATSNEST, JOB_RC::MILLIMETERS, JOB_RC::MILS, netlist, BOARD_COMMIT::Push(), BOARD::RecordDRCExclusions(), REPORTER::Report(), FILEEXT::ReportFileExtension, BOARD::ResolveDRCExclusions(), RPT_SEVERITY_ACTION, RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, TOOL_MANAGER::SetEnvironment(), JOB::SetTitleBlock(), JOB::SetWorkingOutputPath(), SKIP_SET_DIRTY, SKIP_UNDO, CLI::EXIT_CODES::SUCCESS, BOARD::SynchronizeProperties(), DRC_REPORT::WriteJsonReport(), and DRC_REPORT::WriteTextReport().

Referenced by PCBNEW_JOBS_HANDLER().

◆ JobExportDrill()

int PCBNEW_JOBS_HANDLER::JobExportDrill ( JOB aJob)

Definition at line 1228 of file pcbnew_jobs_handler.cpp.

References _, JOB_EXPORT_PCB_DRILL::ABS, EXCELLON_WRITER::CreateDrillandMapFilesSet(), GERBER_WRITER::CreateDrillandMapFilesSet(), JOB_EXPORT_PCB_DRILL::DECIMAL, GENDRILL_WRITER_BASE::DECIMAL_FORMAT, JOB_EXPORT_PCB_DRILL::DXF, PATHS::EnsurePathExists(), CLI::EXIT_CODES::ERR_INVALID_INPUT_FILE, CLI::EXIT_CODES::ERR_INVALID_OUTPUT_CONFLICT, CLI::EXIT_CODES::ERR_UNKNOWN, JOB_EXPORT_PCB_DRILL::EXCELLON, JOB_EXPORT_PCB_DRILL::GERBER, JOB_EXPORT_PCB_DRILL::GERBER_X2, BOARD_DESIGN_SETTINGS::GetAuxOrigin(), getBoard(), BOARD::GetDesignSettings(), JOB::GetFullOutputPath(), BOARD::GetProject(), BOARD::GetTitleBlock(), JOB_EXPORT_PCB_DRILL::INCHES, JOB_EXPORT_PCB_DRILL::KEEP_ZEROS, GENDRILL_WRITER_BASE::KEEP_ZEROS, JOB_EXPORT_PCB_DRILL::m_drillOrigin, JOB_EXPORT_PCB_DRILL::m_drillUnits, JOB_EXPORT_PCB_DRILL::m_excellonCombinePTHNPTH, JOB_EXPORT_PCB_DRILL::m_excellonMinimalHeader, JOB_EXPORT_PCB_DRILL::m_excellonMirrorY, JOB_EXPORT_PCB_DRILL::m_excellonOvalDrillRoute, JOB_EXPORT_PCB_DRILL::m_filename, JOB_EXPORT_PCB_DRILL::m_format, JOB_EXPORT_PCB_DRILL::m_generateMap, JOB_EXPORT_PCB_DRILL::m_gerberPrecision, DRILL_PRECISION::m_Lhs, JOB_EXPORT_PCB_DRILL::m_mapFormat, JOB_DISPATCHER::m_reporter, DRILL_PRECISION::m_Rhs, JOB_EXPORT_PCB_DRILL::m_zeroFormat, JOB_EXPORT_PCB_DRILL::MILLIMETERS, CLI::EXIT_CODES::OK, JOB_EXPORT_PCB_DRILL::PDF, JOB_EXPORT_PCB_DRILL::POSTSCRIPT, precisionListForInches, precisionListForMetric, REPORTER::Report(), RPT_SEVERITY_ERROR, EXCELLON_WRITER::SetFormat(), GERBER_WRITER::SetFormat(), GENDRILL_WRITER_BASE::SetMapFileFormat(), EXCELLON_WRITER::SetOptions(), GERBER_WRITER::SetOptions(), EXCELLON_WRITER::SetRouteModeForOvalHoles(), JOB::SetTitleBlock(), JOB_EXPORT_PCB_DRILL::SUPPRESS_LEADING, GENDRILL_WRITER_BASE::SUPPRESS_LEADING, JOB_EXPORT_PCB_DRILL::SUPPRESS_TRAILING, GENDRILL_WRITER_BASE::SUPPRESS_TRAILING, and JOB_EXPORT_PCB_DRILL::SVG.

Referenced by PCBNEW_JOBS_HANDLER().

◆ JobExportDxf()

◆ JobExportFpSvg()

◆ JobExportFpUpgrade()

◆ JobExportGencad()

◆ JobExportGerber()

◆ JobExportGerbers()

int PCBNEW_JOBS_HANDLER::JobExportGerbers ( JOB aJob)

◆ JobExportIpc2581()

◆ JobExportOdb()

◆ JobExportPdf()

◆ JobExportPos()

int PCBNEW_JOBS_HANDLER::JobExportPos ( JOB aJob)

◆ JobExportRender()

int PCBNEW_JOBS_HANDLER::JobExportRender ( JOB aJob)

Definition at line 453 of file pcbnew_jobs_handler.cpp.

References _, PROJECT::ApplyTextVars(), JOB_PCB_RENDER::BACK, JOB_PCB_RENDER::BASIC, BOARD_ADAPTER::BiuTo3dUnits(), JOB_PCB_RENDER::BOTTOM, JOB_PCB_RENDER::DEFAULT, DEG2RAD(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::differentiate_plated_copper, PATHS::EnsurePathExists(), CLI::EXIT_CODES::ERR_ARGS, CLI::EXIT_CODES::ERR_INVALID_INPUT_FILE, CLI::EXIT_CODES::ERR_INVALID_OUTPUT_CONFLICT, CLI::EXIT_CODES::ERR_UNKNOWN, JOB_PCB_RENDER::FRONT, PROJECT_PCB::Get3DCacheManager(), SETTINGS_MANAGER::GetAppSettings(), getBoard(), RENDER_3D_RAYTRACE_RAM::GetBuffer(), JOB::GetConfiguredOutputPath(), BOARD::GetFileName(), JOB::GetFullOutputPath(), CAMERA::GetLookAtPos_T1(), BOARD::GetProject(), RENDER_3D_RAYTRACE_RAM::GetRealBufferSize(), PGM_BASE::GetSettingsManager(), BOARD::GetTitleBlock(), JOB::GetVarOverrides(), JOB_PCB_RENDER::HIGH, image, TRACK_BALL::Interpolate(), JOB_PCB_RENDER::JPEG, FILEEXT::JpegFileExtension, LAYER_3D_BACKGROUND_BOTTOM, LAYER_3D_BACKGROUND_TOP, JOB_PCB_RENDER::LEFT, JOB_PCB_RENDER::m_bgStyle, BOARD_ADAPTER::m_Cfg, BOARD_ADAPTER::m_ColorOverrides, JOB_PCB_RENDER::m_colorPreset, EDA_3D_VIEWER_SETTINGS::m_CurrentPreset, JOB_PCB_RENDER::m_filename, JOB_PCB_RENDER::m_floor, JOB_PCB_RENDER::m_format, JOB_PCB_RENDER::m_height, BOARD_ADAPTER::m_IsBoardView, BOARD_ADAPTER::m_IsPreviewer, JOB_PCB_RENDER::m_lightBottomIntensity, JOB_PCB_RENDER::m_lightCameraIntensity, JOB_PCB_RENDER::m_lightSideElevation, JOB_PCB_RENDER::m_lightSideIntensity, JOB_PCB_RENDER::m_lightTopIntensity, JOB_PCB_RENDER::m_pan, JOB_PCB_RENDER::m_perspective, JOB_PCB_RENDER::m_pivot, JOB_PCB_RENDER::m_quality, EDA_3D_VIEWER_SETTINGS::m_Render, JOB_DISPATCHER::m_reporter, JOB_PCB_RENDER::m_rotation, JOB_PCB_RENDER::m_side, JOB_PCB_RENDER::m_width, JOB_PCB_RENDER::m_zoom, EDA_IU_SCALE::mmToIU(), CLI::EXIT_CODES::OK, TRACK_BALL::Pan_T1(), CAMERA::ParametersChanged(), pcbIUScale, Pgm(), JOB_PCB_RENDER::PNG, FILEEXT::PngFileExtension, RANGE_SCALE_3D, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::raytrace_anti_aliasing, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::raytrace_backfloor, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::raytrace_lightAzimuth, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::raytrace_lightColor, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::raytrace_lightColorBottom, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::raytrace_lightColorCamera, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::raytrace_lightColorTop, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::raytrace_lightElevation, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::raytrace_post_processing, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::raytrace_procedural_textures, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::raytrace_recursivelevel_refractions, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::raytrace_reflections, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::raytrace_refractions, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::raytrace_shadows, RENDER_3D_RAYTRACE_RAM::Redraw(), REPORTER::Report(), JOB_PCB_RENDER::RIGHT, CAMERA::RotateX_T1(), CAMERA::RotateY_T1(), CAMERA::RotateZ_T1(), RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, BOARD_ADAPTER::Set3dCacheManager(), BOARD_ADAPTER::SetBoard(), CAMERA::SetCurWindowSize(), RENDER_3D_RAYTRACE_RAM::SetCurWindowSize(), CAMERA::SetLookAtPos_T1(), CAMERA::SetProjection(), TRACK_BALL::SetT0_and_T1_current_T(), JOB::SetTitleBlock(), JOB::SetWorkingOutputPath(), BOARD::SynchronizeProperties(), JOB_PCB_RENDER::TOP, JOB_PCB_RENDER::TRANSPARENT, CAMERA::ViewCommand_T1(), VECTOR3< T >::x, VECTOR3< T >::y, VECTOR3< T >::z, and CAMERA::Zoom_T1().

Referenced by PCBNEW_JOBS_HANDLER().

◆ JobExportStep()

int PCBNEW_JOBS_HANDLER::JobExportStep ( JOB aJob)

Definition at line 317 of file pcbnew_jobs_handler.cpp.

References _, PROJECT::ApplyTextVars(), EXPORTER_STEP_PARAMS::BREP, JOB_EXPORT_PCB_3D::BREP, FILEEXT::BrepFileExtension, BOARD::ComputeBoundingBox(), PATHS::EnsurePathExists(), CLI::EXIT_CODES::ERR_INVALID_INPUT_FILE, CLI::EXIT_CODES::ERR_INVALID_OUTPUT_CONFLICT, CLI::EXIT_CODES::ERR_UNKNOWN, EXPORTER_STEP::Export(), EXPORTER_VRML::ExportVRML_File(), getBoard(), BOX2< Vec >::GetCenter(), JOB::GetConfiguredOutputPath(), BOARD::GetFileName(), JOB::GetFullOutputPath(), BOARD::GetProject(), BOARD::GetTitleBlock(), JOB::GetVarOverrides(), EXPORTER_STEP_PARAMS::GLB, JOB_EXPORT_PCB_3D::GLB, FILEEXT::GltfBinaryFileExtension, JOB_EXPORT_PCB_3D::INCHES, EDA_IU_SCALE::IUTomm(), JOB_EXPORT_PCB_3D::m_3dparams, JOB_EXPORT_PCB_3D::m_filename, EXPORTER_STEP_PARAMS::m_Format, JOB_EXPORT_PCB_3D::m_format, JOB_EXPORT_PCB_3D::m_hasUserOrigin, EXPORTER_STEP_PARAMS::m_IncludeDNP, EXPORTER_STEP_PARAMS::m_IncludeUnspecified, EXPORTER_STEP_PARAMS::m_Origin, EXPORTER_STEP::m_outputFile, JOB_DISPATCHER::m_reporter, JOB_EXPORT_PCB_3D::m_vrmlModelDir, JOB_EXPORT_PCB_3D::m_vrmlRelativePaths, JOB_EXPORT_PCB_3D::m_vrmlUnits, JOB_EXPORT_PCB_3D::METERS, JOB_EXPORT_PCB_3D::MILLIMETERS, CLI::EXIT_CODES::OK, pcbIUScale, EXPORTER_STEP_PARAMS::PLY, JOB_EXPORT_PCB_3D::PLY, FILEEXT::PlyFileExtension, REPORTER::Report(), RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, scale, JOB::SetTitleBlock(), JOB::SetWorkingOutputPath(), EXPORTER_STEP_PARAMS::STEP, JOB_EXPORT_PCB_3D::STEP, FILEEXT::StepFileExtension, EXPORTER_STEP_PARAMS::STL, JOB_EXPORT_PCB_3D::STL, FILEEXT::StlFileExtension, BOARD::SynchronizeProperties(), JOB_EXPORT_PCB_3D::TENTHS, JOB_EXPORT_PCB_3D::VRML, FILEEXT::VrmlFileExtension, VECTOR2< T >::x, EXPORTER_STEP_PARAMS::XAO, JOB_EXPORT_PCB_3D::XAO, FILEEXT::XaoFileExtension, and VECTOR2< T >::y.

Referenced by PCBNEW_JOBS_HANDLER().

◆ JobExportSvg()

◆ loadOverrideDrawingSheet()

◆ populateGerberPlotOptionsFromJob()

◆ Register()

void JOB_DISPATCHER::Register ( const std::string &  aJobTypeName,
std::function< int(JOB *job)>  aHandler,
std::function< bool(JOB *job, wxWindow *aParent)>  aConfigHandler 
)
inherited

◆ RunJob()

int JOB_DISPATCHER::RunJob ( JOB aJob,
REPORTER aReporter 
)
inherited

◆ SetProgressReporter()

void JOB_DISPATCHER::SetProgressReporter ( PROGRESS_REPORTER aReporter)
inherited

Definition at line 86 of file job_dispatcher.cpp.

References JOB_DISPATCHER::m_progressReporter.

◆ SetReporter()

void JOB_DISPATCHER::SetReporter ( REPORTER aReporter)
inherited

Definition at line 79 of file job_dispatcher.cpp.

References JOB_DISPATCHER::m_reporter.

Member Data Documentation

◆ m_cliBoard

BOARD* PCBNEW_JOBS_HANDLER::m_cliBoard
private

Definition at line 63 of file pcbnew_jobs_handler.h.

Referenced by getBoard().

◆ m_jobConfigHandlers

std::map<std::string, std::function<bool( JOB* job, wxWindow* aParent )> > JOB_DISPATCHER::m_jobConfigHandlers
privateinherited

Definition at line 55 of file job_dispatcher.h.

Referenced by JOB_DISPATCHER::HandleJobConfig(), and JOB_DISPATCHER::Register().

◆ m_jobHandlers

std::map<std::string, std::function<int( JOB* job )> > JOB_DISPATCHER::m_jobHandlers
privateinherited

Definition at line 53 of file job_dispatcher.h.

Referenced by JOB_DISPATCHER::Register(), and JOB_DISPATCHER::RunJob().

◆ m_kiway

KIWAY* JOB_DISPATCHER::m_kiway
protectedinherited

◆ m_progressReporter

PROGRESS_REPORTER* JOB_DISPATCHER::m_progressReporter
protectedinherited

◆ m_reporter


The documentation for this class was generated from the following files: