![]() |
Prusa Slicer 2.6.0
|
#include <src/slic3r/GUI/BackgroundSlicingProcess.hpp>
Collaboration diagram for Slic3r::BackgroundSlicingProcess:Classes | |
| struct | UITask |
Public Types | |
| enum | State { STATE_INITIAL = 0 , STATE_IDLE , STATE_STARTED , STATE_RUNNING , STATE_FINISHED , STATE_CANCELED , STATE_EXIT , STATE_EXITED } |
Private Member Functions | |
| void | thread_proc () |
| void | thread_proc_safe () throw () |
| void | join_background_thread () |
| void | stop_internal () |
| void | process_fff () |
| void | process_sla () |
| void | call_process (std::exception_ptr &ex) throw () |
| bool | set_step_started (BackgroundSlicingProcessStep step) |
| void | set_step_done (BackgroundSlicingProcessStep step) |
| bool | is_step_done (BackgroundSlicingProcessStep step) const |
| bool | invalidate_step (BackgroundSlicingProcessStep step) |
| bool | invalidate_all_steps () |
| void | throw_if_canceled () const |
| void | finalize_gcode () |
| void | prepare_upload () |
| ThumbnailsList | render_thumbnails (const ThumbnailsParams ¶ms) |
| bool | execute_ui_task (std::function< void()> task) |
Static Private Member Functions | |
| static void | cancel_ui_task (std::shared_ptr< BackgroundSlicingProcess::UITask > task) |
Private Attributes | |
| PrintBase * | m_print = nullptr |
| Print * | m_fff_print = nullptr |
| SLAPrint * | m_sla_print = nullptr |
| GCodeProcessorResult * | m_gcode_result = nullptr |
| ThumbnailsGeneratorCallback | m_thumbnail_cb = nullptr |
| std::string | m_temp_output_path |
| std::string | m_export_path |
| bool | m_export_path_on_removable_media = false |
| PrintHostJob | m_upload_job |
| boost::thread | m_thread |
| std::mutex | m_mutex |
| std::condition_variable | m_condition |
| State | m_state = STATE_INITIAL |
| std::shared_ptr< UITask > | m_ui_task |
| PrintState< BackgroundSlicingProcessStep, bspsCount > | m_step_state |
| int | m_event_slicing_completed_id = 0 |
| int | m_event_finished_id = 0 |
| int | m_event_export_began_id = 0 |
| Enumerator | |
|---|---|
| STATE_INITIAL | |
| STATE_IDLE | |
| STATE_STARTED | |
| STATE_RUNNING | |
| STATE_FINISHED | |
| STATE_CANCELED | |
| STATE_EXIT | |
| STATE_EXITED | |
| Slic3r::BackgroundSlicingProcess::BackgroundSlicingProcess | ( | ) |
References Slic3r::get_current_pid(), and m_temp_output_path.
Here is the call graph for this function:| Slic3r::BackgroundSlicingProcess::~BackgroundSlicingProcess | ( | ) |
References join_background_thread(), m_temp_output_path, and stop().
Here is the call graph for this function:| Print::ApplyStatus Slic3r::BackgroundSlicingProcess::apply | ( | const Model & | model, |
| const DynamicPrintConfig & | config | ||
| ) |
References Slic3r::PrintBase::apply(), Slic3r::PrintBase::APPLY_STATUS_INVALIDATED, Slic3r::Print::is_step_done(), m_fff_print, m_gcode_result, m_print, Slic3r::ConfigBase::opt_enum(), Slic3r::psGCodeExport, Slic3r::ptFFF, Slic3r::GCodeProcessorResult::reset(), and Slic3r::PrintBase::technology().
Here is the call graph for this function:
|
private | ||||||||||||||
References Slic3r::ptFFF, and Slic3r::ptSLA.
Referenced by thread_proc().
Here is the caller graph for this function:
|
staticprivate |
References Slic3r::BackgroundSlicingProcess::UITask::Canceled.
Referenced by stop(), and stop_internal().
Here is the caller graph for this function:References m_print.
Referenced by prepare_upload(), and process_sla().
Here is the caller graph for this function:| PrinterTechnology Slic3r::BackgroundSlicingProcess::current_printer_technology | ( | ) | const |
References m_print, and Slic3r::PrintBase::technology().
Referenced by Slic3r::GUI::GLCanvas3D::current_printer_technology(), Slic3r::GUI::Preview::load_print(), Slic3r::GUI::Preview::load_print_as_fff(), Slic3r::GUI::Preview::load_print_as_sla(), and Slic3r::GUI::Preview::on_layers_slider_scroll_changed().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Slic3r::BackgroundSlicingProcess::empty | ( | ) | const |
References Slic3r::PrintBase::empty(), and m_print.
Here is the call graph for this function:
|
private |
References Slic3r::PrintBase::canceled(), Slic3r::BackgroundSlicingProcess::UITask::Canceled, Slic3r::BackgroundSlicingProcess::UITask::Finished, m_mutex, m_print, m_ui_task, Slic3r::BackgroundSlicingProcess::UITask::Planned, and running().
Referenced by render_thumbnails().
Here is the call graph for this function:
Here is the caller graph for this function:References m_fff_print.
Referenced by Slic3r::GUI::Preview::load_print_as_fff(), and Slic3r::GUI::GLCanvas3D::reload_scene().
Here is the caller graph for this function:
|
private |
References _L, _u8L, Slic3r::copy_file(), error, Slic3r::FAIL_CHECK_ORIGIN_NOT_OPENED, Slic3r::FAIL_CHECK_TARGET_NOT_OPENED, Slic3r::FAIL_COPY_FILE, Slic3r::FAIL_FILES_DIFFERENT, Slic3r::FAIL_RENAMING, Slic3r::PrintStatistics::finalize_output_path(), Slic3r::GUI::format(), Slic3r::PrintBase::full_print_config(), m_export_path, m_export_path_on_removable_media, m_fff_print, m_print, m_temp_output_path, Slic3r::Print::print_statistics(), Slic3r::run_post_process_scripts(), Slic3r::PrintBase::set_status(), and Slic3r::SUCCESS.
Referenced by process_fff().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References Slic3r::PrintBase::finished(), and m_print.
Here is the call graph for this function:
|
inline |
References m_state, and STATE_IDLE.
Referenced by start().
Here is the caller graph for this function:
|
private |
References Slic3r::PrintState< StepType, COUNT >::invalidate_all(), m_step_state, and stop_internal().
Referenced by reset().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References Slic3r::PrintState< StepType, COUNT >::invalidate(), m_step_state, and stop_internal().
Referenced by reset_export(), schedule_export(), and schedule_upload().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References m_export_path.
|
private |
References Slic3r::PrintState< StepType, COUNT >::is_done(), m_print, m_step_state, and Slic3r::PrintBase::state_mutex().
Here is the call graph for this function:
|
inline |
References Slic3r::PrintHostJob::empty(), and m_upload_job.
Here is the call graph for this function:
|
private |
References m_condition, m_mutex, m_state, m_thread, STATE_EXIT, STATE_IDLE, and STATE_INITIAL.
Referenced by ~BackgroundSlicingProcess().
Here is the caller graph for this function:| std::string Slic3r::BackgroundSlicingProcess::output_filepath_for_project | ( | const boost::filesystem::path & | project_path | ) |
References m_print, and Slic3r::PrintBase::output_filepath().
Here is the call graph for this function:
|
private |
References _L, _u8L, Slic3r::copy_file(), current_print(), Slic3r::SLAPrint::export_print(), Slic3r::PrintStatistics::finalize_output_path(), Slic3r::SLAPrintStatistics::finalize_output_path(), Slic3r::GUI::format(), Slic3r::PrintBase::full_print_config(), m_fff_print, m_print, m_sla_print, m_temp_output_path, m_upload_job, Slic3r::ConfigBase::option(), Slic3r::Print::print_statistics(), Slic3r::SLAPrint::print_statistics(), Slic3r::PrintHostJob::printhost, render_thumbnails(), Slic3r::run_post_process_scripts(), Slic3r::PrintBase::set_status(), Slic3r::PrintHostUpload::source_path, Slic3r::SUCCESS, Slic3r::PrintHostJob::upload_data, and Slic3r::PrintHostUpload::upload_path.
Referenced by process_fff(), and process_sla().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References _u8L, Slic3r::bspsGCodeFinalize, Slic3r::PrintHostJob::empty(), Slic3r::Print::export_gcode(), finalize_gcode(), m_event_export_began_id, m_event_slicing_completed_id, m_export_path, m_fff_print, m_gcode_result, m_print, m_temp_output_path, m_upload_job, prepare_upload(), Slic3r::PrintBase::process(), Slic3r::psSlicingFinished, render_thumbnails(), Slic3r::PrintBase::set_status(), set_step_done(), set_step_started(), Slic3r::PrintBaseWithState< PrintStepEnumType, COUNT >::step_state_with_timestamp(), and Slic3r::PrintStateBase::StateWithTimeStamp::timestamp.
Here is the call graph for this function:
|
private |
References _L, _u8L, Slic3r::bspsGCodeFinalize, current_print(), Slic3r::PrintHostJob::empty(), Slic3r::SLAPrint::export_print(), Slic3r::SLAPrintStatistics::finalize_output_path(), Slic3r::GUI::format(), Slic3r::PrintBase::full_print_config(), m_event_export_began_id, m_export_path, m_print, m_sla_print, m_upload_job, Slic3r::ConfigBase::option(), prepare_upload(), Slic3r::SLAPrint::print_statistics(), Slic3r::PrintBase::process(), render_thumbnails(), Slic3r::PrintBase::set_status(), set_step_done(), and set_step_started().
Here is the call graph for this function:
|
private |
References execute_ui_task(), and m_thumbnail_cb.
Referenced by prepare_upload(), process_fff(), and process_sla().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Slic3r::BackgroundSlicingProcess::reset | ( | ) |
References Slic3r::PrintBase::clear(), invalidate_all_steps(), m_print, reset_export(), and stop().
Referenced by select_technology().
Here is the call graph for this function:
Here is the caller graph for this function:| void Slic3r::BackgroundSlicingProcess::reset_export | ( | ) |
References Slic3r::bspsGCodeFinalize, invalidate_step(), m_export_path, m_export_path_on_removable_media, m_print, running(), and Slic3r::PrintBase::state_mutex().
Referenced by reset().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References m_state, STATE_CANCELED, STATE_FINISHED, STATE_RUNNING, and STATE_STARTED.
Referenced by execute_ui_task(), reset_export(), and start().
Here is the caller graph for this function:| void Slic3r::BackgroundSlicingProcess::schedule_export | ( | const std::string & | path, |
| bool | export_path_on_removable_media | ||
| ) |
References Slic3r::bspsGCodeFinalize, invalidate_step(), m_export_path, m_export_path_on_removable_media, m_print, and Slic3r::PrintBase::state_mutex().
Here is the call graph for this function:| void Slic3r::BackgroundSlicingProcess::schedule_upload | ( | Slic3r::PrintHostJob | upload_job | ) |
References Slic3r::bspsGCodeFinalize, invalidate_step(), m_export_path, m_print, m_upload_job, and Slic3r::PrintBase::state_mutex().
Here is the call graph for this function:| bool Slic3r::BackgroundSlicingProcess::select_technology | ( | PrinterTechnology | tech | ) |
References m_fff_print, m_print, m_sla_print, Slic3r::ptFFF, Slic3r::ptSLA, reset(), and Slic3r::PrintBase::technology().
Here is the call graph for this function:
|
inline |
References m_event_export_began_id.
References m_fff_print.
|
inline |
References m_event_finished_id.
|
inline |
References m_gcode_result.
References m_sla_print.
|
inline |
References m_event_slicing_completed_id.
|
private |
References m_print, m_step_state, Slic3r::PrintState< StepType, COUNT >::set_done(), and Slic3r::PrintBase::state_mutex().
Referenced by process_fff(), and process_sla().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References m_print, m_step_state, Slic3r::PrintState< StepType, COUNT >::set_started(), and Slic3r::PrintBase::state_mutex().
Referenced by process_fff(), and process_sla().
Here is the call graph for this function:
Here is the caller graph for this function:| void Slic3r::BackgroundSlicingProcess::set_task | ( | const PrintBase::TaskParams & | params | ) |
References m_print, and Slic3r::PrintBase::set_task().
Here is the call graph for this function:
|
inline |
References m_thumbnail_cb.
References m_sla_print.
Referenced by Slic3r::GUI::Preview::load_print_as_sla().
Here is the caller graph for this function:| bool Slic3r::BackgroundSlicingProcess::start | ( | ) |
References Slic3r::create_thread(), Slic3r::PrintBase::empty(), idle(), m_condition, m_mutex, m_print, m_state, m_thread, running(), Slic3r::PrintBase::set_cancel_callback(), STATE_IDLE, STATE_INITIAL, STATE_STARTED, stop_internal(), and thread_proc_safe().
Here is the call graph for this function:
|
inline |
| bool Slic3r::BackgroundSlicingProcess::stop | ( | ) |
References Slic3r::PrintBase::cancel(), cancel_ui_task(), m_condition, m_mutex, m_print, m_state, m_ui_task, Slic3r::PrintBase::set_cancel_callback(), STATE_CANCELED, STATE_FINISHED, STATE_IDLE, STATE_INITIAL, STATE_RUNNING, and STATE_STARTED.
Referenced by ~BackgroundSlicingProcess(), and reset().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References Slic3r::PrintBase::cancel_internal(), cancel_ui_task(), m_condition, m_mutex, m_print, m_state, m_ui_task, Slic3r::PrintBase::set_cancel_callback(), STATE_CANCELED, STATE_FINISHED, STATE_IDLE, Slic3r::PrintBase::state_mutex(), STATE_RUNNING, and STATE_STARTED.
Referenced by invalidate_all_steps(), invalidate_step(), and start().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References call_process(), Slic3r::PrintBase::cancel_status(), Slic3r::PrintBase::canceled(), Slic3r::PrintBase::CANCELED_INTERNAL, Slic3r::SlicingProcessCompletedEvent::Cancelled, Slic3r::PrintBase::cleanup(), Slic3r::SlicingProcessCompletedEvent::Clone(), Slic3r::SlicingProcessCompletedEvent::Error, Slic3r::PrintBase::finalize(), Slic3r::SlicingProcessCompletedEvent::Finished, m_condition, m_event_finished_id, m_fff_print, m_mutex, m_print, m_sla_print, m_state, Slic3r::name_tbb_thread_pool_threads_set_locale(), Slic3r::PrintBase::restart(), Slic3r::set_current_thread_name(), STATE_CANCELED, STATE_EXIT, STATE_EXITED, STATE_FINISHED, STATE_IDLE, STATE_RUNNING, and STATE_STARTED.
Referenced by thread_proc_safe().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private | |||||||||||||
References thread_proc().
Referenced by start().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
| std::string Slic3r::BackgroundSlicingProcess::validate | ( | std::vector< std::string > * | warnings = nullptr | ) |
References m_print, and Slic3r::PrintBase::validate().
Here is the call graph for this function:
|
private |
Referenced by join_background_thread(), start(), stop(), stop_internal(), and thread_proc().
|
private |
Referenced by process_fff(), process_sla(), and set_export_began_event().
|
private |
Referenced by set_finished_event(), and thread_proc().
|
private |
Referenced by process_fff(), and set_slicing_completed_event().
|
private |
Referenced by finalize_gcode(), is_export_scheduled(), process_fff(), process_sla(), reset_export(), schedule_export(), and schedule_upload().
|
private |
Referenced by finalize_gcode(), reset_export(), and schedule_export().
|
private |
Referenced by apply(), fff_print(), finalize_gcode(), prepare_upload(), process_fff(), select_technology(), set_fff_print(), and thread_proc().
|
private |
Referenced by apply(), process_fff(), and set_gcode_result().
|
private |
Referenced by execute_ui_task(), join_background_thread(), start(), stop(), stop_internal(), and thread_proc().
|
private |
Referenced by apply(), current_print(), current_printer_technology(), empty(), execute_ui_task(), finalize_gcode(), finished(), is_step_done(), output_filepath_for_project(), prepare_upload(), process_fff(), process_sla(), reset(), reset_export(), schedule_export(), schedule_upload(), select_technology(), set_step_done(), set_step_started(), set_task(), start(), stop(), stop_internal(), thread_proc(), throw_if_canceled(), and validate().
|
private |
Referenced by prepare_upload(), process_sla(), select_technology(), set_sla_print(), sla_print(), and thread_proc().
|
private |
Referenced by idle(), join_background_thread(), running(), start(), state(), stop(), stop_internal(), and thread_proc().
|
private |
Referenced by invalidate_all_steps(), invalidate_step(), is_step_done(), set_step_done(), and set_step_started().
|
private |
Referenced by BackgroundSlicingProcess(), ~BackgroundSlicingProcess(), finalize_gcode(), prepare_upload(), and process_fff().
|
private |
Referenced by join_background_thread(), and start().
|
private |
Referenced by render_thumbnails(), and set_thumbnail_cb().
|
private |
Referenced by execute_ui_task(), stop(), and stop_internal().
|
private |
Referenced by is_upload_scheduled(), prepare_upload(), process_fff(), process_sla(), and schedule_upload().