![]() |
Prusa Slicer 2.6.0
|
#include <src/slic3r/GUI/GUI_Preview.hpp>
Inheritance diagram for Slic3r::GUI::Preview:
Collaboration diagram for Slic3r::GUI::Preview:Public Types | |
| enum class | OptionType : unsigned int { Travel , Wipe , Retractions , Unretractions , Seams , ToolChanges , ColorChanges , PausePrints , CustomGCodes , CenterOfGravity , Shells , ToolMarker } |
Public Member Functions | |
| Preview (wxWindow *parent, Bed3D &bed, Model *model, DynamicPrintConfig *config, BackgroundSlicingProcess *process, GCodeProcessorResult *gcode_result, std::function< void()> schedule_background_process=[]() {}) | |
| virtual | ~Preview () |
| wxGLCanvas * | get_wxglcanvas () |
| GLCanvas3D * | get_canvas3d () |
| void | set_as_dirty () |
| void | bed_shape_changed () |
| void | select_view (const std::string &direction) |
| void | set_drop_target (wxDropTarget *target) |
| void | load_print (bool keep_z_range=false) |
| void | reload_print (bool keep_volumes=false) |
| void | refresh_print () |
| void | msw_rescale () |
| void | sys_color_changed () |
| void | jump_layers_slider (wxKeyEvent &evt) |
| void | move_layers_slider (wxKeyEvent &evt) |
| void | edit_layers_slider (wxKeyEvent &evt) |
| bool | is_loaded () const |
| void | update_moves_slider () |
| void | enable_moves_slider (bool enable) |
| void | move_moves_slider (wxKeyEvent &evt) |
| void | hide_layers_slider () |
| void | set_keep_current_preview_type (bool value) |
| void | set_layers_slider_values_range (int bottom, int top) |
Private Member Functions | |
| bool | init (wxWindow *parent, Bed3D &bed, Model *model) |
| void | bind_event_handlers () |
| void | unbind_event_handlers () |
| void | on_size (wxSizeEvent &evt) |
| wxBoxSizer * | create_layers_slider_sizer () |
| void | check_layers_slider_values (std::vector< CustomGCode::Item > &ticks_from_model, const std::vector< double > &layers_z) |
| void | reset_layers_slider () |
| void | update_layers_slider (const std::vector< double > &layers_z, bool keep_z_range=false) |
| void | update_layers_slider_mode () |
| void | update_layers_slider_from_canvas (wxKeyEvent &event) |
| void | load_print_as_fff (bool keep_z_range=false) |
| void | load_print_as_sla () |
| void | on_layers_slider_scroll_changed (wxCommandEvent &event) |
| void | on_moves_slider_scroll_changed (wxCommandEvent &event) |
Private Attributes | |
| wxGLCanvas * | m_canvas_widget { nullptr } |
| GLCanvas3D * | m_canvas { nullptr } |
| wxBoxSizer * | m_left_sizer { nullptr } |
| wxBoxSizer * | m_layers_slider_sizer { nullptr } |
| wxPanel * | m_bottom_toolbar_panel { nullptr } |
| DynamicPrintConfig * | m_config |
| BackgroundSlicingProcess * | m_process |
| GCodeProcessorResult * | m_gcode_result |
| std::function< void()> | m_schedule_background_process |
| unsigned int | m_number_extruders { 1 } |
| bool | m_keep_current_preview_type { false } |
| bool | m_loaded { false } |
| DoubleSlider::Control * | m_layers_slider { nullptr } |
| DoubleSlider::Control * | m_moves_slider { nullptr } |
|
strong |
| Enumerator | |
|---|---|
| Travel | |
| Wipe | |
| Retractions | |
| Unretractions | |
| Seams | |
| ToolChanges | |
| ColorChanges | |
| PausePrints | |
| CustomGCodes | |
| CenterOfGravity | |
| Shells | |
| ToolMarker | |
| Slic3r::GUI::Preview::Preview | ( | wxWindow * | parent, |
| Bed3D & | bed, | ||
| Model * | model, | ||
| DynamicPrintConfig * | config, | ||
| BackgroundSlicingProcess * | process, | ||
| GCodeProcessorResult * | gcode_result, | ||
| std::function< void()> | schedule_background_process = []() {} |
||
| ) |
References init(), and load_print().
Here is the call graph for this function:
|
virtual |
References m_canvas, m_canvas_widget, and unbind_event_handlers().
Here is the call graph for this function:| void Slic3r::GUI::Preview::bed_shape_changed | ( | ) |
References Slic3r::GUI::GLCanvas3D::bed_shape_changed(), and m_canvas.
Here is the call graph for this function:
|
private |
References m_moves_slider, on_moves_slider_scroll_changed(), and on_size().
Referenced by init().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References m_schedule_background_process.
Referenced by update_layers_slider().
Here is the caller graph for this function:
|
private |
References Slic3r::Model::custom_gcode_per_print_z, Slic3r::DoubleSlider::Control::enable_action_icon(), Slic3r::DoubleSlider::Control::GetTicksValues(), m_canvas_widget, m_keep_current_preview_type, m_layers_slider, m_schedule_background_process, on_layers_slider_scroll_changed(), Slic3r::ptSLA, reload_print(), Slic3r::DoubleSlider::Control::SetDrawMode(), update_layers_slider_from_canvas(), and Slic3r::DoubleSlider::Control::UseDefaultColors().
Referenced by init().
Here is the call graph for this function:
Here is the caller graph for this function:| void Slic3r::GUI::Preview::edit_layers_slider | ( | wxKeyEvent & | evt | ) |
References m_layers_slider, and Slic3r::DoubleSlider::Control::OnChar().
Here is the call graph for this function:| void Slic3r::GUI::Preview::enable_moves_slider | ( | bool | enable | ) |
References Slic3r::DoubleSlider::Control::is_rendering_as_disabled(), m_moves_slider, and Slic3r::DoubleSlider::Control::set_render_as_disabled().
Here is the call graph for this function:
|
inline |
References m_canvas.
Referenced by Slic3r::GUI::Plater::priv::is_legend_shown(), msw_rescale(), and Slic3r::GUI::Plater::priv::show_legend().
Here is the caller graph for this function:
|
inline |
References m_canvas_widget.
| void Slic3r::GUI::Preview::hide_layers_slider | ( | ) |
References m_layers_slider_sizer.
Referenced by load_print_as_fff(), and load_print_as_sla().
Here is the caller graph for this function:References Slic3r::GUI::GLCanvas3D::allow_multisample(), bind_event_handlers(), Slic3r::GUI::OpenGLManager::can_multisample(), create_layers_slider_sizer(), Slic3r::GUI::OpenGLManager::create_wxglcanvas(), Slic3r::DoubleSlider::dmSequentialGCodeView, Slic3r::GUI::GLCanvas3D::enable_dynamic_background(), Slic3r::GUI::GLCanvas3D::enable_legend_texture(), m_bottom_toolbar_panel, m_canvas, m_canvas_widget, m_config, m_layers_slider_sizer, m_left_sizer, m_moves_slider, m_process, Slic3r::GUI::GLCanvas3D::set_config(), Slic3r::GUI::GLCanvas3D::set_context(), Slic3r::GUI::GLCanvas3D::set_model(), Slic3r::GUI::GLCanvas3D::set_process(), and Slic3r::DoubleSlider::Control::SetDrawMode().
Referenced by Preview().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References m_loaded.
Referenced by Slic3r::GUI::Plater::priv::is_preview_loaded().
Here is the caller graph for this function:| void Slic3r::GUI::Preview::jump_layers_slider | ( | wxKeyEvent & | evt | ) |
References m_layers_slider, and Slic3r::DoubleSlider::Control::OnChar().
Here is the call graph for this function:| void Slic3r::GUI::Preview::load_print | ( | bool | keep_z_range = false | ) |
References Slic3r::BackgroundSlicingProcess::current_printer_technology(), load_print_as_fff(), load_print_as_sla(), m_process, Slic3r::ptFFF, and Slic3r::ptSLA.
Referenced by Preview(), refresh_print(), and reload_print().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References Slic3r::CustomGCode::ColorChange, Slic3r::GUI::GCodeViewer::ColorPrint, Slic3r::BackgroundSlicingProcess::current_printer_technology(), Slic3r::Print::extruders(), Slic3r::GUI::GCodeViewer::FeatureType, Slic3r::BackgroundSlicingProcess::fff_print(), Slic3r::GUI::GLCanvas3D::get_custom_gcode_per_print_z(), Slic3r::GUI::GLCanvas3D::get_gcode_extruders_count(), Slic3r::GUI::GLCanvas3D::get_gcode_layers_zs(), Slic3r::GUI::GLCanvas3D::get_gcode_view_preview_type(), Slic3r::GUI::GLCanvas3D::get_volumes_print_zs(), hide_layers_slider(), Slic3r::Print::is_step_done(), Slic3r::GUI::GLCanvas3D::load_gcode_preview(), Slic3r::GUI::GLCanvas3D::load_preview(), m_bottom_toolbar_panel, m_canvas, m_canvas_widget, m_gcode_result, m_keep_current_preview_type, m_left_sizer, m_loaded, m_process, Slic3r::GCodeProcessorResult::moves, Slic3r::Print::objects(), Slic3r::posSlice, Slic3r::posSupportMaterial, Slic3r::ptFFF, refresh_print(), Slic3r::GUI::GLCanvas3D::set_gcode_view_preview_type(), Slic3r::GUI::GLCanvas3D::set_selected_extruder(), Slic3r::GUI::GCodeViewer::Tool, and update_layers_slider().
Referenced by load_print().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References Slic3r::BackgroundSlicingProcess::current_printer_technology(), hide_layers_slider(), Slic3r::GUI::GLCanvas3D::load_sla_preview(), m_bottom_toolbar_panel, m_canvas, m_canvas_widget, m_left_sizer, m_loaded, m_process, Slic3r::SLAPrint::material_config(), Slic3r::SLAPrint::objects(), Slic3r::ptSLA, Slic3r::GUI::GLCanvas3D::reset_clipping_planes_cache(), SCALING_FACTOR, Slic3r::GUI::GLCanvas3D::set_use_clipping_planes(), Slic3r::BackgroundSlicingProcess::sla_print(), Slic3r::slaposSliceSupports, Slic3r::sort_remove_duplicates(), and update_layers_slider().
Referenced by load_print().
Here is the call graph for this function:
Here is the caller graph for this function:| void Slic3r::GUI::Preview::move_layers_slider | ( | wxKeyEvent & | evt | ) |
References m_layers_slider, and Slic3r::DoubleSlider::Control::OnKeyDown().
Here is the call graph for this function:| void Slic3r::GUI::Preview::move_moves_slider | ( | wxKeyEvent & | evt | ) |
References m_moves_slider, and Slic3r::DoubleSlider::Control::OnKeyDown().
Here is the call graph for this function:| void Slic3r::GUI::Preview::msw_rescale | ( | ) |
References get_canvas3d(), m_layers_slider, m_moves_slider, Slic3r::DoubleSlider::Control::msw_rescale(), Slic3r::GUI::GLCanvas3D::msw_rescale(), and refresh_print().
Here is the call graph for this function:
|
private |
References Slic3r::BackgroundSlicingProcess::current_printer_technology(), Slic3r::DoubleSlider::Control::GetHigherValue(), Slic3r::DoubleSlider::Control::GetHigherValueD(), Slic3r::DoubleSlider::Control::GetLowerValue(), Slic3r::DoubleSlider::Control::GetLowerValueD(), m_canvas, m_layers_slider, m_process, Slic3r::ptFFF, Slic3r::ptSLA, Slic3r::GUI::GLCanvas3D::render(), Slic3r::GUI::GLCanvas3D::set_as_dirty(), Slic3r::GUI::GLCanvas3D::set_clipping_plane(), Slic3r::GUI::GLCanvas3D::set_toolpaths_z_range(), and Slic3r::GUI::GLCanvas3D::set_volumes_z_range().
Referenced by create_layers_slider_sizer().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References Slic3r::DoubleSlider::Control::GetHigherValueD(), Slic3r::DoubleSlider::Control::GetLowerValueD(), m_canvas, m_moves_slider, Slic3r::GUI::GLCanvas3D::render(), and Slic3r::GUI::GLCanvas3D::update_gcode_sequential_view_current().
Referenced by bind_event_handlers(), and unbind_event_handlers().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Referenced by bind_event_handlers(), and unbind_event_handlers().
Here is the caller graph for this function:| void Slic3r::GUI::Preview::refresh_print | ( | ) |
References load_print(), and m_loaded.
Referenced by load_print_as_fff(), and msw_rescale().
Here is the call graph for this function:
Here is the caller graph for this function:| void Slic3r::GUI::Preview::reload_print | ( | bool | keep_volumes = false | ) |
References load_print(), m_canvas, m_loaded, and Slic3r::GUI::GLCanvas3D::reset_volumes().
Referenced by create_layers_slider_sizer().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References m_layers_slider, Slic3r::DoubleSlider::Control::SetHigherValue(), and Slic3r::DoubleSlider::Control::SetLowerValue().
Here is the call graph for this function:References m_canvas, and Slic3r::GUI::GLCanvas3D::select_view().
Here is the call graph for this function:| void Slic3r::GUI::Preview::set_as_dirty | ( | ) |
References m_canvas, and Slic3r::GUI::GLCanvas3D::set_as_dirty().
Here is the call graph for this function:| void Slic3r::GUI::Preview::set_drop_target | ( | wxDropTarget * | target | ) |
|
inline |
References m_keep_current_preview_type.
| void Slic3r::GUI::Preview::set_layers_slider_values_range | ( | int | bottom, |
| int | top | ||
| ) |
References Slic3r::DoubleSlider::Control::GetMaxValue(), Slic3r::DoubleSlider::Control::GetMinValue(), m_layers_slider, Slic3r::DoubleSlider::Control::SetHigherValue(), and Slic3r::DoubleSlider::Control::SetLowerValue().
Here is the call graph for this function:| void Slic3r::GUI::Preview::sys_color_changed | ( | ) |
References m_bottom_toolbar_panel, m_layers_slider, and Slic3r::DoubleSlider::Control::sys_color_changed().
Here is the call graph for this function:
|
private |
References m_moves_slider, on_moves_slider_scroll_changed(), and on_size().
Referenced by ~Preview().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References _u8L, Slic3r::GUI::NotificationManager::apply_in_preview(), Slic3r::area(), Slic3r::DoubleSlider::Control::auto_color_change(), Slic3r::DoubleSlider::check_color_change(), check_layers_slider_values(), Slic3r::CustomGCode::ColorChange, Slic3r::Model::custom_gcode_per_print_z, Slic3r::DoubleSlider::epsilon(), Slic3r::DoubleSlider::equivalent_areas(), Slic3r::GUI::find_close_layer_idx(), Slic3r::GUI::format(), Slic3r::CustomGCode::Info::gcodes, Slic3r::GUI::GLCanvas3D::get_custom_gcode_per_print_z(), Slic3r::GUI::Plater::get_extruder_colors_from_plater_config(), Slic3r::DoubleSlider::Control::GetHigherValueD(), Slic3r::DoubleSlider::Control::GetLowerValueD(), Slic3r::DoubleSlider::Control::GetMaxValue(), Slic3r::DoubleSlider::Control::GetMaxValueD(), Slic3r::DoubleSlider::Control::GetMinValue(), Slic3r::DoubleSlider::Control::is_higher_at_max(), Slic3r::DoubleSlider::Control::is_lower_at_min(), Slic3r::DoubleSlider::Control::IsNewPrint(), Slic3r::SLAPrintStatistics::layers_times, m_canvas, m_gcode_result, m_layers_slider, m_layers_slider_sizer, Slic3r::CustomGCode::Info::mode, Slic3r::GUI::Plater::model(), Slic3r::PrintEstimatedStatistics::modes, Slic3r::Print::objects(), Slic3r::GUI::plater(), Slic3r::GCodeProcessorResult::print_statistics, Slic3r::SLAPrint::print_statistics(), Slic3r::GUI::Plater::printer_technology(), Slic3r::GUI::NotificationManager::PrintInfoNotificationLevel, Slic3r::ptSLA, Slic3r::GUI::NotificationManager::push_notification(), Slic3r::DoubleSlider::Control::SetDrawMode(), Slic3r::DoubleSlider::Control::SetExtruderColors(), Slic3r::DoubleSlider::Control::SetLayersTimes(), Slic3r::DoubleSlider::Control::SetMaxValue(), Slic3r::DoubleSlider::Control::SetSelectionSpan(), Slic3r::DoubleSlider::Control::SetSliderValues(), Slic3r::DoubleSlider::Control::SetTicksValues(), Slic3r::GUI::SignDetected, Slic3r::CustomGCode::SingleExtruder, Slic3r::GUI::Plater::sla_print(), and update_layers_slider_mode().
Referenced by load_print_as_fff(), and load_print_as_sla().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References Slic3r::DoubleSlider::Control::ChangeOneLayerLock(), Slic3r::DoubleSlider::Control::GetHigherValue(), Slic3r::DoubleSlider::Control::is_one_layer(), m_layers_slider, m_moves_slider, Slic3r::DoubleSlider::Control::SetHigherValue(), Slic3r::DoubleSlider::Control::SetLowerValue(), and Slic3r::DoubleSlider::Control::UseDefaultColors().
Referenced by create_layers_slider_sizer().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References m_layers_slider, Slic3r::range(), and Slic3r::DoubleSlider::Control::SetModeAndOnlyExtruder().
Referenced by update_layers_slider().
Here is the call graph for this function:
Here is the caller graph for this function:| void Slic3r::GUI::Preview::update_moves_slider | ( | ) |
References Slic3r::GUI::GCodeViewer::SequentialView::current, Slic3r::GUI::GCodeViewer::SequentialView::endpoints, Slic3r::GUI::GCodeViewer::SequentialView::Endpoints::first, Slic3r::GUI::GCodeViewer::SequentialView::gcode_ids, Slic3r::GUI::GLCanvas3D::get_gcode_sequential_view(), Slic3r::GUI::GCodeViewer::SequentialView::Endpoints::last, m_canvas, m_moves_slider, Slic3r::DoubleSlider::Control::SetMaxValue(), Slic3r::DoubleSlider::Control::SetSelectionSpan(), Slic3r::DoubleSlider::Control::SetSliderAlternateValues(), and Slic3r::DoubleSlider::Control::SetSliderValues().
Here is the call graph for this function:
|
private |
Referenced by init(), load_print_as_fff(), load_print_as_sla(), and sys_color_changed().
|
private |
|
private |
Referenced by ~Preview(), create_layers_slider_sizer(), get_wxglcanvas(), init(), load_print_as_fff(), and load_print_as_sla().
|
private |
Referenced by init().
|
private |
Referenced by load_print_as_fff(), and update_layers_slider().
|
private |
Referenced by create_layers_slider_sizer(), load_print_as_fff(), and set_keep_current_preview_type().
|
private |
Referenced by create_layers_slider_sizer(), edit_layers_slider(), jump_layers_slider(), move_layers_slider(), msw_rescale(), on_layers_slider_scroll_changed(), reset_layers_slider(), set_layers_slider_values_range(), sys_color_changed(), update_layers_slider(), update_layers_slider_from_canvas(), and update_layers_slider_mode().
|
private |
Referenced by hide_layers_slider(), init(), and update_layers_slider().
|
private |
Referenced by init(), load_print_as_fff(), and load_print_as_sla().
|
private |
Referenced by is_loaded(), load_print_as_fff(), load_print_as_sla(), refresh_print(), and reload_print().
|
private |
|
private |
|
private |
Referenced by init(), load_print(), load_print_as_fff(), load_print_as_sla(), and on_layers_slider_scroll_changed().
|
private |
Referenced by check_layers_slider_values(), and create_layers_slider_sizer().