![]() |
Prusa Slicer 2.6.0
|
Printing involves slicing and export of device dependent instructions. More...
#include <src/libslic3r/PrintBase.hpp>
Inheritance diagram for Slic3r::PrintBase:
Collaboration diagram for Slic3r::PrintBase:Classes | |
| struct | SlicingStatus |
| struct | TaskParams |
Public Types | |
| enum | ApplyStatus { APPLY_STATUS_UNCHANGED , APPLY_STATUS_CHANGED , APPLY_STATUS_INVALIDATED } |
| enum | CancelStatus { NOT_CANCELED = 0 , CANCELED_BY_USER = 1 , CANCELED_INTERNAL = 2 } |
| typedef std::function< void(const SlicingStatus &)> | status_callback_type |
| typedef std::function< void()> | cancel_callback_type |
| using | Timestamp = uint64_t |
Protected Member Functions | |
| std::mutex & | state_mutex () const |
| std::function< void()> | cancel_callback () |
| void | call_cancel_callback () |
| void | status_update_warnings (int step, PrintStateBase::WarningLevel warning_level, const std::string &message, const PrintObjectBase *print_object=nullptr) |
| void | throw_if_canceled () const |
| PrintTryCancel | make_try_cancel () const |
| std::string | output_filename (const std::string &format, const std::string &default_ext, const std::string &filename_base, const DynamicConfig *config_override=nullptr) const |
| void | update_object_placeholders (DynamicConfig &config, const std::string &default_ext) const |
| void | set_new_unique_id () |
| void | set_invalid_id () |
| void | copy_id (const ObjectBase &rhs) |
| virtual void | assign_new_unique_ids_recursive () |
Protected Attributes | |
| Model | m_model |
| DynamicPrintConfig | m_full_print_config |
| PlaceholderParser | m_placeholder_parser |
| status_callback_type | m_status_callback |
Private Member Functions | |
| template<class Archive > | |
| void | serialize (Archive &ar) |
Static Private Member Functions | |
| static ObjectID | generate_new_id () |
| template<class Archive > | |
| static void | load_and_construct (Archive &ar, cereal::construct< ObjectBase > &construct) |
Private Attributes | |
| std::atomic< CancelStatus > | m_cancel_status |
| cancel_callback_type | m_cancel_callback = [](){} |
| std::mutex | m_state_mutex |
| friend | PrintTryCancel |
| ObjectID | m_id |
Static Private Attributes | |
| static size_t | s_last_id = 0 |
Friends | |
| class | PrintObjectBase |
| class | BackgroundSlicingProcess |
Printing involves slicing and export of device dependent instructions.
Every technology has a potentially different set of requirements for slicing, support structures and output print instructions. The pipeline however remains roughly the same: slice -> convert to instructions -> send to printer
The PrintBase class will abstract this flow for different technologies.
| typedef std::function<void()> Slic3r::PrintBase::cancel_callback_type |
| typedef std::function<void(const SlicingStatus&)> Slic3r::PrintBase::status_callback_type |
|
inherited |
| Enumerator | |
|---|---|
| APPLY_STATUS_UNCHANGED | |
| APPLY_STATUS_CHANGED | |
| APPLY_STATUS_INVALIDATED | |
| Enumerator | |
|---|---|
| NOT_CANCELED | |
| CANCELED_BY_USER | |
| CANCELED_INTERNAL | |
|
inline |
References restart().
Here is the call graph for this function:
|
inlinevirtual |
|
pure virtual |
Implemented in Slic3r::Print, and Slic3r::SLAPrint.
Referenced by Slic3r::BackgroundSlicingProcess::apply(), and Slic3r::CLI::run().
Here is the caller graph for this function:
|
inlineprotectedvirtualinherited |
Reimplemented in Slic3r::Model, Slic3r::ModelObject, and Slic3r::ModelVolume.
References Slic3r::ObjectBase::set_new_unique_id().
Here is the call graph for this function:
|
inlineprotected |
References m_cancel_callback.
Referenced by Slic3r::SLAPrint::apply(), and Slic3r::PrintBaseWithState< PrintStepEnumType, COUNT >::set_task_impl().
Here is the caller graph for this function:
|
inline |
References CANCELED_BY_USER, and m_cancel_status.
Referenced by Slic3r::BackgroundSlicingProcess::stop().
Here is the caller graph for this function:
|
inlineprotected |
References m_cancel_callback.
Referenced by Slic3r::PrintObjectBase::cancel_callback(), Slic3r::PrintBaseWithState< PrintStepEnumType, COUNT >::invalidate_all_steps(), Slic3r::PrintBaseWithState< PrintStepEnumType, COUNT >::invalidate_step(), Slic3r::PrintBaseWithState< PrintStepEnumType, COUNT >::invalidate_steps(), and set_cancel_callback().
Here is the caller graph for this function:
|
inline |
References CANCELED_INTERNAL, and m_cancel_status.
Referenced by Slic3r::BackgroundSlicingProcess::stop_internal().
Here is the caller graph for this function:
|
inline |
References m_cancel_status.
Referenced by Slic3r::BackgroundSlicingProcess::thread_proc().
Here is the caller graph for this function:
|
inline |
References m_cancel_status, and NOT_CANCELED.
Referenced by Slic3r::SLAPrint::Steps::canceled(), Slic3r::BackgroundSlicingProcess::execute_ui_task(), Slic3r::SLAPrint::Steps::generate_pad(), Slic3r::SLAPrint::Steps::hollow_model(), Slic3r::SLAPrint::Steps::rasterize(), Slic3r::SLAPrint::Steps::slice_supports(), Slic3r::SLAPrint::Steps::support_tree(), Slic3r::BackgroundSlicingProcess::thread_proc(), and Slic3r::BackgroundSlicingProcess::throw_if_canceled().
Here is the caller graph for this function:
|
pure virtual |
Implemented in Slic3r::Print, and Slic3r::SLAPrint.
Referenced by Slic3r::BackgroundSlicingProcess::thread_proc().
Here is the caller graph for this function:
|
pure virtual |
Implemented in Slic3r::Print, and Slic3r::SLAPrint.
Referenced by Slic3r::BackgroundSlicingProcess::reset().
Here is the caller graph for this function:
|
inlineprotectedinherited |
References Slic3r::ObjectBase::id(), and Slic3r::ObjectBase::m_id.
Referenced by Slic3r::CutObjectBase::copy().
Here is the call graph for this function:
Here is the caller graph for this function:
|
pure virtual |
Implemented in Slic3r::Print, and Slic3r::SLAPrint.
Referenced by Slic3r::BackgroundSlicingProcess::empty(), Slic3r::CLI::run(), and Slic3r::BackgroundSlicingProcess::start().
Here is the caller graph for this function:
|
pure virtual |
Implemented in Slic3r::Print, and Slic3r::SLAPrint.
Referenced by Slic3r::BackgroundSlicingProcess::thread_proc().
Here is the caller graph for this function:
|
pure virtual |
Implemented in Slic3r::Print, and Slic3r::SLAPrint.
Referenced by Slic3r::BackgroundSlicingProcess::finished().
Here is the caller graph for this function:
|
inline |
References m_full_print_config.
Referenced by Slic3r::GCode::_do_export(), Slic3r::GCode::append_full_config(), Slic3r::anonymous_namespace{AnycubicSLA.cpp}::fill_header(), Slic3r::anonymous_namespace{SL1.cpp}::fill_iniconf(), Slic3r::anonymous_namespace{SL1.cpp}::fill_slicerconf(), Slic3r::BackgroundSlicingProcess::finalize_gcode(), Slic3r::BackgroundSlicingProcess::prepare_upload(), Slic3r::BackgroundSlicingProcess::process_sla(), and Slic3r::CLI::run().
Here is the caller graph for this function:
|
inlinestaticprivateinherited |
References Slic3r::ObjectBase::s_last_id.
Referenced by Slic3r::ObjectBase::set_new_unique_id().
Here is the caller graph for this function:
|
inlineinherited |
References Slic3r::ObjectBase::m_id.
Referenced by Slic3r::Model::Model(), Slic3r::ModelInstance::ModelInstance(), Slic3r::ModelMaterial::ModelMaterial(), Slic3r::ModelObject::ModelObject(), Slic3r::ModelObject::ModelObject(), Slic3r::ModelObject::ModelObject(), Slic3r::ModelObject::ModelObject(), Slic3r::ModelObject::ModelObject(), Slic3r::ModelVolume::ModelVolume(), Slic3r::ModelVolume::ModelVolume(), Slic3r::ModelVolume::ModelVolume(), Slic3r::_3MF_Importer::_load_model_from_file(), Slic3r::GUI::Plater::priv::actualize_slicing_warnings(), Slic3r::ModelObjectStatusDB::add(), Slic3r::ModelObjectStatusDB::add_if_new(), Slic3r::Print::apply(), Slic3r::SLAPrint::apply(), Slic3r::GUI::GLGizmoFdmSupports::apply_data_from_backend(), Slic3r::ModelVolume::check(), Slic3r::check_model_ids_equal(), Slic3r::ModelObject::convert_units(), Slic3r::ObjectBase::copy_id(), Slic3r::PrintObjectStatusDB::count(), anonymous_namespace{RaycastManager.cpp}::create_key(), priv::create_volume(), Slic3r::GUI::Emboss::create_volume_sources(), Slic3r::GUI::GLGizmoHollow::data_changed(), Slic3r::GUI::GLGizmoPainterBase::data_changed(), Slic3r::GUI::GLGizmoSlaSupports::data_changed(), Slic3r::Model::delete_object(), Slic3r::GUI::Plater::export_stl_obj(), Slic3r::ModelObjectStatusDB::get(), Slic3r::GUI::get_arrange_poly(), Slic3r::GUI::GLGizmoSlaSupports::get_data_from_backend(), Slic3r::PrintObjectStatusDB::get_range(), Slic3r::GUI::GLGizmoFdmSupports::has_backend_supports(), Slic3r::GUI::GLGizmoSlaSupports::has_backend_supports(), Slic3r::CutObjectBase::has_same_id(), Slic3r::UndoRedo::StackImpl::immutable_object_id_impl(), Slic3r::GUI::GLGizmoSimplify::init_model(), Slic3r::inner_brim_area(), Slic3r::ModelObject::is_cut(), Slic3r::CutObjectBase::is_equal(), Slic3r::ObjectBase::load_and_construct(), Slic3r::UndoRedo::StackImpl::load_snapshot(), Slic3r::GUI::ObjectList::merge(), Slic3r::model_property_changed(), Slic3r::model_volume_list_changed(), Slic3r::model_volume_list_copy_configs(), Slic3r::ModelConfigObject::object_id_and_timestamp_match(), Slic3r::ObjectWithTimestamp::object_id_and_timestamp_match(), Slic3r::GUI::GLGizmoEmboss::on_mouse_change_selection(), Slic3r::GUI::CommonGizmosDataObjects::SelectionInfo::on_update(), Slic3r::CutObjectBase::operator<(), Slic3r::Model::operator=(), Slic3r::ModelObject::operator=(), Slic3r::ModelObject::operator=(), Slic3r::CutObjectBase::operator==(), Slic3r::GUI::GLGizmoCut3D::perform_cut(), Slic3r::GUI::GLGizmoEmboss::process(), Slic3r::GUI::processed_objects_idxs(), Slic3r::GUI::GLCanvas3D::reload_scene(), Slic3r::GUI::GLCanvas3D::LayersEditing::select_object(), Slic3r::ModelMaterial::serialize(), Slic3r::SLAPrintObject::SliceRecord::set_model_slice_idx(), Slic3r::SLAPrintObject::SliceRecord::set_support_slice_idx(), Slic3r::slices_to_regions(), Slic3r::ModelObject::split(), Slic3r::UndoRedo::StackImpl::take_snapshot(), Slic3r::top_level_outer_brim_area(), Slic3r::GUI::update_object_cut_id(), and anonymous_namespace{EmbossJob.cpp}::update_volume_name().
|
inlinestaticprivateinherited |
|
inlineprotected |
References PrintTryCancel.
Referenced by Slic3r::Print::process().
Here is the caller graph for this function:References m_model.
Referenced by Slic3r::ToolOrdering::ToolOrdering(), Slic3r::GUI::Plater::priv::actualize_object_warnings(), Slic3r::SLAPrint::apply(), Slic3r::ToolOrdering::assign_custom_gcodes(), Slic3r::GUI::GLCanvas3D::reload_scene(), Slic3r::sort_object_instances_by_model_order(), and Slic3r::DoExport::validate_custom_gcode().
Here is the caller graph for this function:
|
pure virtual |
Implemented in Slic3r::Print, and Slic3r::SLAPrint.
Referenced by Slic3r::Print::output_filename(), Slic3r::SLAPrint::output_filename(), and output_filepath().
Here is the caller graph for this function:
|
protected |
References _u8L, Slic3r::format(), Slic3r::ConfigBase::opt_string(), placeholder_parser(), Slic3r::PlaceholderParser::process(), Slic3r::DynamicConfig::set_key_value(), update_object_placeholders(), and Slic3r::PlaceholderParser::update_timestamp().
Here is the call graph for this function:| std::string Slic3r::PrintBase::output_filepath | ( | const std::string & | path, |
| const std::string & | filename_base = std::string() |
||
| ) | const |
References m_model, output_filename(), and Slic3r::Model::propose_export_file_name_and_path().
Referenced by Slic3r::Print::export_gcode(), Slic3r::BackgroundSlicingProcess::output_filepath_for_project(), and Slic3r::CLI::run().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References m_placeholder_parser.
Referenced by Slic3r::GCode::_do_export(), and output_filename().
Here is the caller graph for this function:
|
pure virtual |
Implemented in Slic3r::Print, and Slic3r::SLAPrint.
Referenced by Slic3r::GUI::Plater::priv::actualize_slicing_warnings().
Here is the caller graph for this function:
|
pure virtual |
Implemented in Slic3r::Print, and Slic3r::SLAPrint.
Referenced by Slic3r::BackgroundSlicingProcess::process_fff(), Slic3r::BackgroundSlicingProcess::process_sla(), and Slic3r::CLI::run().
Here is the caller graph for this function:
|
inline |
References m_cancel_status, and NOT_CANCELED.
Referenced by PrintBase(), and Slic3r::BackgroundSlicingProcess::thread_proc().
Here is the caller graph for this function:
|
inlineprivateinherited |
References Slic3r::ObjectBase::m_id.
|
inline |
References cancel_callback(), and m_cancel_callback.
Referenced by Slic3r::BackgroundSlicingProcess::start(), Slic3r::BackgroundSlicingProcess::stop(), and Slic3r::BackgroundSlicingProcess::stop_internal().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprotectedinherited |
References Slic3r::ObjectBase::m_id.
Referenced by Slic3r::CutObjectBase::invalidate().
Here is the caller graph for this function:
|
inlineprotectedinherited |
References Slic3r::ObjectBase::generate_new_id(), and Slic3r::ObjectBase::m_id.
Referenced by Slic3r::ModelVolume::ModelVolume(), Slic3r::Model::assign_new_unique_ids_recursive(), Slic3r::ObjectBase::assign_new_unique_ids_recursive(), Slic3r::ModelObject::assign_new_unique_ids_recursive(), Slic3r::CutObjectBase::init(), Slic3r::ModelMaterial::set_new_unique_id(), Slic3r::ModelObject::set_new_unique_id(), and Slic3r::ModelVolume::set_new_unique_id().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References m_status_callback.
Referenced by Slic3r::Print::alert_when_supports_needed(), Slic3r::Print::export_gcode(), Slic3r::BackgroundSlicingProcess::finalize_gcode(), Slic3r::PrintObject::make_perimeters(), Slic3r::SLAPrint::StatusReporter::operator()(), Slic3r::BackgroundSlicingProcess::prepare_upload(), Slic3r::Print::process(), Slic3r::BackgroundSlicingProcess::process_fff(), and Slic3r::BackgroundSlicingProcess::process_sla().
Here is the caller graph for this function:
|
inline |
References m_status_callback.
Referenced by Slic3r::CLI::run().
Here is the caller graph for this function:
|
inline |
References m_status_callback.
|
inline |
References m_status_callback.
|
pure virtual |
Implemented in Slic3r::Print, and Slic3r::SLAPrint.
Referenced by Slic3r::BackgroundSlicingProcess::set_task().
Here is the caller graph for this function:
|
inlineprotected |
References m_state_mutex.
Referenced by Slic3r::PrintBaseWithState< PrintStepEnumType, COUNT >::active_step_add_warning(), Slic3r::SLAPrint::apply(), Slic3r::Print::clear(), Slic3r::SLAPrint::clear(), Slic3r::PrintBaseWithState< PrintStepEnumType, COUNT >::finalize_impl(), Slic3r::BackgroundSlicingProcess::is_step_done(), Slic3r::Print::is_step_done(), Slic3r::PrintBaseWithState< PrintStepEnumType, COUNT >::is_step_done(), Slic3r::SLAPrint::is_step_done(), Slic3r::BackgroundSlicingProcess::reset_export(), Slic3r::BackgroundSlicingProcess::schedule_export(), Slic3r::BackgroundSlicingProcess::schedule_upload(), Slic3r::PrintBaseWithState< PrintStepEnumType, COUNT >::set_done(), Slic3r::PrintBaseWithState< PrintStepEnumType, COUNT >::set_started(), Slic3r::BackgroundSlicingProcess::set_step_done(), Slic3r::BackgroundSlicingProcess::set_step_started(), Slic3r::PrintBaseWithState< PrintStepEnumType, COUNT >::set_task_impl(), Slic3r::PrintObjectBase::state_mutex(), Slic3r::PrintBaseWithState< PrintStepEnumType, COUNT >::step_state_with_timestamp(), Slic3r::PrintBaseWithState< PrintStepEnumType, COUNT >::step_state_with_warnings(), and Slic3r::BackgroundSlicingProcess::stop_internal().
Here is the caller graph for this function:
|
protected |
References m_status_callback.
Referenced by Slic3r::PrintBaseWithState< PrintStepEnumType, COUNT >::active_step_add_warning(), Slic3r::PrintBaseWithState< PrintStepEnumType, COUNT >::set_done(), and Slic3r::PrintObjectBase::status_update_warnings().
Here is the caller graph for this function:
|
pure virtualnoexcept |
Implemented in Slic3r::Print, and Slic3r::SLAPrint.
Referenced by Slic3r::BackgroundSlicingProcess::apply(), Slic3r::BackgroundSlicingProcess::current_printer_technology(), and Slic3r::BackgroundSlicingProcess::select_technology().
Here is the caller graph for this function:
|
inlineprotected |
References m_cancel_status.
Referenced by Slic3r::GCode::_do_export(), Slic3r::Print::_make_skirt(), Slic3r::Print::_make_wipe_tower(), Slic3r::SLAPrint::Steps::generate_pad(), Slic3r::SLAPrint::Steps::hollow_model(), Slic3r::PrintObject::make_perimeters(), Slic3r::PrintTryCancel::operator()(), Slic3r::SLAPrint::process(), Slic3r::GCode::process_layers(), Slic3r::GCode::process_layers(), Slic3r::PrintBaseWithState< PrintStepEnumType, COUNT >::set_done(), Slic3r::PrintBaseWithState< PrintStepEnumType, COUNT >::set_started(), Slic3r::PrintObject::slice_support_volumes(), Slic3r::SLAPrint::Steps::slice_supports(), Slic3r::PrintObject::slice_volumes(), Slic3r::SLAPrint::Steps::support_points(), Slic3r::SLAPrint::Steps::support_tree(), and Slic3r::SLAPrint::Steps::throw_if_canceled().
Here is the caller graph for this function:
|
inlinevirtualinherited |
Reimplemented in Slic3r::ModelConfigObject, and Slic3r::ObjectWithTimestamp.
Referenced by Slic3r::GUI::Plater::priv::undo_redo_to().
Here is the caller graph for this function:
|
protected |
References Slic3r::ModelInstance::get_scaling_factor(), m_model, Slic3r::Model::objects, Slic3r::DynamicConfig::set_key_value(), Slic3r::X, Slic3r::Y, and Slic3r::Z.
Referenced by Slic3r::GCode::_do_export(), and output_filename().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinevirtual |
Reimplemented in Slic3r::Print, and Slic3r::SLAPrint.
Referenced by Slic3r::CLI::run(), and Slic3r::BackgroundSlicingProcess::validate().
Here is the caller graph for this function:
|
friend |
|
friend |
|
private |
Referenced by call_cancel_callback(), cancel_callback(), and set_cancel_callback().
|
private |
Referenced by cancel(), cancel_internal(), cancel_status(), canceled(), restart(), and throw_if_canceled().
|
protected |
Referenced by Slic3r::SLAPrint::apply(), and full_print_config().
|
privateinherited |
|
protected |
|
protected |
Referenced by Slic3r::SLAPrint::apply(), and placeholder_parser().
|
mutableprivate |
Referenced by state_mutex().
|
protected |
Referenced by set_status(), set_status_callback(), set_status_default(), set_status_silent(), and status_update_warnings().
|
private |
Referenced by make_try_cancel().
|
staticprivateinherited |
Referenced by Slic3r::ObjectBase::generate_new_id().