Classes | |
| struct | LayersTexture |
| struct | Profile |
Public Types | |
| enum | EState : unsigned char { Unknown , Editing , Completed , Num_States } |
Public Member Functions | |
| void | set_shrinkage_compensation (const Vec3d &shrinkage_compensation) |
| LayersEditing ()=default | |
| ~LayersEditing () | |
| void | init () |
| void | set_config (const DynamicPrintConfig *config) |
| void | select_object (const Model &model, int object_id) |
| bool | is_allowed () const |
| bool | is_enabled () const |
| void | set_enabled (bool enabled) |
| void | render_variable_layer_height_dialog (GLCanvas3D &canvas) |
| void | render_overlay (GLCanvas3D &canvas) |
| void | render_volumes (const GLCanvas3D &canvas, const GLVolumeCollection &volumes) |
| void | adjust_layer_height_profile () |
| void | accept_changes (GLCanvas3D &canvas) |
| void | reset_layer_height_profile (GLCanvas3D &canvas) |
| void | adaptive_layer_height_profile (GLCanvas3D &canvas, float quality_factor) |
| void | smooth_layer_height_profile (GLCanvas3D &canvas, const HeightProfileSmoothingParams &smoothing_params) |
| float | object_max_z () const |
| std::string | get_tooltip (const GLCanvas3D &canvas) const |
Static Public Member Functions | |
| static float | get_cursor_z_relative (const GLCanvas3D &canvas) |
| static bool | bar_rect_contains (const GLCanvas3D &canvas, float x, float y) |
| static Rect | get_bar_rect_screen (const GLCanvas3D &canvas) |
| static float | get_overlay_window_width () |
Public Attributes | |
| EState | state { Unknown } |
| float | band_width { 2.0f } |
| float | strength { 0.005f } |
| int | last_object_id { -1 } |
| float | last_z { 0.0f } |
| LayerHeightEditActionType | last_action { LAYER_HEIGHT_EDIT_ACTION_INCREASE } |
| Profile | m_profile |
Static Public Attributes | |
| static const float | THICKNESS_BAR_WIDTH = 70.0f |
Private Member Functions | |
| bool | is_initialized () const |
| void | generate_layer_height_texture () |
| void | render_active_object_annotations (const GLCanvas3D &canvas) |
| void | render_profile (const GLCanvas3D &canvas) |
| void | update_slicing_parameters () |
Static Private Member Functions | |
| static float | thickness_bar_width (const GLCanvas3D &canvas) |
Private Attributes | |
| bool | m_enabled { false } |
| unsigned int | m_z_texture_id { 0 } |
| const DynamicPrintConfig * | m_config { nullptr } |
| const ModelObject * | m_model_object { nullptr } |
| float | m_object_max_z { 0.0f } |
| SlicingParameters * | m_slicing_parameters { nullptr } |
| std::vector< double > | m_layer_height_profile |
| Vec3d | m_shrinkage_compensation { Vec3d::Ones() } |
| float | m_adaptive_quality { 0.5f } |
| HeightProfileSmoothingParams | m_smooth_params |
| LayersTexture | m_layers_texture |
Static Private Attributes | |
| static float | s_overlay_window_width |
| struct Slic3r::GUI::GLCanvas3D::LayersEditing::LayersTexture |
| struct Slic3r::GUI::GLCanvas3D::LayersEditing::Profile |
| enum Slic3r::GUI::GLCanvas3D::LayersEditing::EState : unsigned char |
| Enumerator | |
|---|---|
| Unknown | |
| Editing | |
| Completed | |
| Num_States | |
|
default |
| Slic3r::GUI::GLCanvas3D::LayersEditing::~LayersEditing | ( | ) |
References ~LayersEditing(), glDeleteTextures, glsafe, m_slicing_parameters, and m_z_texture_id.
Referenced by ~LayersEditing().
| void Slic3r::GUI::GLCanvas3D::LayersEditing::accept_changes | ( | GLCanvas3D & | canvas | ) |
References Slic3r::GUI::GLCanvas3D::GLCanvas3D(), accept_changes(), last_object_id, m_layer_height_profile, m_model_object, and Slic3r::GUI::GLCanvas3D::post_event().
Referenced by accept_changes().
| void Slic3r::GUI::GLCanvas3D::LayersEditing::adaptive_layer_height_profile | ( | GLCanvas3D & | canvas, |
| float | quality_factor ) |
References Slic3r::GUI::GLCanvas3D::GLCanvas3D(), adaptive_layer_height_profile(), last_object_id, Slic3r::layer_height_profile_adaptive(), m_layer_height_profile, m_layers_texture, m_model_object, m_slicing_parameters, Slic3r::GUI::GLCanvas3D::post_event(), and update_slicing_parameters().
Referenced by adaptive_layer_height_profile().
| void Slic3r::GUI::GLCanvas3D::LayersEditing::adjust_layer_height_profile | ( | ) |
References Slic3r::adjust_layer_height_profile(), adjust_layer_height_profile(), band_width, last_action, last_z, m_layer_height_profile, m_layers_texture, m_model_object, m_slicing_parameters, strength, Slic3r::PrintObject::update_layer_height_profile(), and update_slicing_parameters().
Referenced by adjust_layer_height_profile().
|
static |
References Slic3r::GUI::GLCanvas3D::GLCanvas3D(), bar_rect_contains(), get_bar_rect_screen(), Slic3r::GUI::Rect::get_bottom(), Slic3r::GUI::Rect::get_left(), Slic3r::GUI::Rect::get_right(), and Slic3r::GUI::Rect::get_top().
Referenced by bar_rect_contains().
|
private |
References Slic3r::generate_layer_height_texture(), generate_layer_height_texture(), Slic3r::generate_object_layers(), m_layer_height_profile, m_layers_texture, m_model_object, m_slicing_parameters, Slic3r::PrintObject::update_layer_height_profile(), and update_slicing_parameters().
Referenced by generate_layer_height_texture().
|
static |
References Slic3r::GUI::GLCanvas3D::GLCanvas3D(), get_bar_rect_screen(), Slic3r::GUI::GLCanvas3D::get_canvas_size(), Slic3r::GUI::Size::get_height(), Slic3r::GUI::Size::get_width(), and thickness_bar_width().
Referenced by Slic3r::GUI::GLCanvas3D::_perform_layer_editing_action(), bar_rect_contains(), get_bar_rect_screen(), and get_cursor_z_relative().
|
static |
References Slic3r::GUI::GLCanvas3D::GLCanvas3D(), get_bar_rect_screen(), Slic3r::GUI::Rect::get_bottom(), get_cursor_z_relative(), Slic3r::GUI::Rect::get_left(), Slic3r::GUI::GLCanvas3D::get_local_mouse_position(), Slic3r::GUI::Rect::get_right(), and Slic3r::GUI::Rect::get_top().
Referenced by get_cursor_z_relative(), get_tooltip(), render_active_object_annotations(), and render_volumes().
|
inlinestatic |
References s_overlay_window_width.
| std::string Slic3r::GUI::GLCanvas3D::LayersEditing::get_tooltip | ( | const GLCanvas3D & | canvas | ) | const |
References Slic3r::GUI::GLCanvas3D::GLCanvas3D(), get_cursor_z_relative(), get_tooltip(), Slic3r::lerp(), m_enabled, m_layer_height_profile, and m_object_max_z.
Referenced by get_tooltip().
| void Slic3r::GUI::GLCanvas3D::LayersEditing::init | ( | ) |
References Slic3r::GUI::OpenGLManager::get_gl_info(), GL_CLAMP_TO_EDGE, GL_LINEAR, GL_LINEAR_MIPMAP_NEAREST, GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MAX_LEVEL, GL_TEXTURE_MIN_FILTER, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, glBindTexture, glGenTextures, glsafe, glTexParameteri, init(), and m_z_texture_id.
Referenced by init().
| bool Slic3r::GUI::GLCanvas3D::LayersEditing::is_allowed | ( | ) | const |
References is_allowed(), and m_z_texture_id.
Referenced by is_allowed(), render_volumes(), and set_enabled().
|
inline |
|
private |
References is_initialized().
Referenced by is_initialized().
|
inline |
References m_object_max_z.
|
private |
References Slic3r::GUI::GLCanvas3D::GLCanvas3D(), Slic3r::GUI::GLModel::Geometry::add_triangle(), Slic3r::GUI::GLModel::Geometry::add_vertex(), band_width, Slic3r::GUI::GLModel::Geometry::format, Slic3r::GUI::GLCanvas3D::get_canvas_size(), get_cursor_z_relative(), Slic3r::GUI::Size::get_height(), Slic3r::GUI::Size::get_width(), GL_TEXTURE_2D, GL_UNPACK_ALIGNMENT, glBindTexture, glPixelStorei, glsafe, m_enabled, m_layers_texture, m_object_max_z, m_profile, m_z_texture_id, Slic3r::GUI::GLModel::Geometry::P3N3T2, render_active_object_annotations(), Slic3r::GUI::GLModel::Geometry::reserve_indices(), Slic3r::GUI::GLModel::Geometry::reserve_vertices(), Slic3r::GLShaderProgram::set_uniform(), Slic3r::GLShaderProgram::start_using(), Slic3r::GLShaderProgram::stop_using(), THICKNESS_BAR_WIDTH, and Slic3r::GUI::GLModel::Geometry::Triangles.
Referenced by render_active_object_annotations(), and render_overlay().
| void Slic3r::GUI::GLCanvas3D::LayersEditing::render_overlay | ( | GLCanvas3D & | canvas | ) |
References Slic3r::GUI::GLCanvas3D::GLCanvas3D(), render_active_object_annotations(), render_overlay(), and render_profile().
Referenced by render_overlay().
|
private |
References Slic3r::GUI::GLCanvas3D::GLCanvas3D(), Slic3r::GUI::GLModel::Geometry::add_index(), Slic3r::GUI::GLModel::Geometry::add_line(), Slic3r::GUI::GLModel::Geometry::add_vertex(), Slic3r::ColorRGBA::BLACK(), Slic3r::ColorRGBA::BLUE(), Slic3r::GUI::GLModel::Geometry::color, Slic3r::GUI::GLModel::Geometry::format, Slic3r::GUI::GLCanvas3D::get_canvas_size(), Slic3r::GUI::OpenGLManager::get_gl_info(), Slic3r::GUI::Size::get_height(), Slic3r::GUI::Size::get_width(), Slic3r::GUI::GLModel::Geometry::Lines, Slic3r::GUI::GLModel::Geometry::LineStrip, m_enabled, m_layer_height_profile, m_object_max_z, m_profile, m_slicing_parameters, Slic3r::GUI::GLModel::Geometry::P2, render_profile(), Slic3r::GUI::GLModel::Geometry::reserve_indices(), Slic3r::GUI::GLModel::Geometry::reserve_vertices(), Slic3r::GLShaderProgram::set_uniform(), Slic3r::GLShaderProgram::start_using(), Slic3r::GLShaderProgram::stop_using(), and THICKNESS_BAR_WIDTH.
Referenced by render_overlay(), and render_profile().
| void Slic3r::GUI::GLCanvas3D::LayersEditing::render_variable_layer_height_dialog | ( | GLCanvas3D & | canvas | ) |
References Slic3r::GUI::GLCanvas3D::GLCanvas3D(), _L, _L_CONTEXT, Slic3r::GUI::ImGuiWrapper::bbl_checkbox(), Slic3r::GUI::ImGuiWrapper::bbl_slider_float_style(), Slic3r::GUI::ImGuiWrapper::begin(), Slic3r::GUI::GLGizmoUtils::begin_right_aligned_buttons(), Slic3r::GUI::ImGuiWrapper::button(), Slic3r::check_object_layers_fixed(), Slic3r::GUI::ImGuiWrapper::disabled_begin(), Slic3r::GUI::ImGuiWrapper::disabled_end(), Slic3r::GUI::ImGuiWrapper::end(), Slic3r::GUI::GLCanvas3D::get_canvas_size(), Slic3r::GUI::GLToolbar::get_height(), Slic3r::GUI::GLToolbar::get_item(), Slic3r::GUI::GLCanvas3D::get_scale(), Slic3r::GUI::Size::get_width(), Slic3r::GUI::GLCanvas3D::get_wxglcanvas(), m_adaptive_quality, m_enabled, m_layer_height_profile, Slic3r::GUI::GLCanvas3D::m_main_toolbar, m_slicing_parameters, m_smooth_params, Slic3r::GUI::GLToolbarItem::Normal, Slic3r::GUI::ImGuiWrapper::pop_toolbar_style(), Slic3r::GUI::ImGuiWrapper::push_toolbar_style(), Slic3r::GUI::GLToolbarItem::render_left_pos, Slic3r::GUI::GLGizmoUtils::render_tooltip_button(), render_variable_layer_height_dialog(), Slic3r::GUI::GLCanvas3D::request_extra_frame(), s_overlay_window_width, Slic3r::GUI::ImGuiWrapper::scaled(), Slic3r::GUI::GLCanvas3D::set_as_dirty(), Slic3r::GUI::ImGuiWrapper::set_next_window_pos(), Slic3r::GUI::GLToolbarItem::set_state(), Slic3r::GUI::shortkey_shift_prefix(), and Slic3r::GUI::ImGuiWrapper::text().
Referenced by render_variable_layer_height_dialog().
| void Slic3r::GUI::GLCanvas3D::LayersEditing::render_volumes | ( | const GLCanvas3D & | canvas, |
| const GLVolumeCollection & | volumes ) |
References Slic3r::GUI::GLCanvas3D::GLCanvas3D(), band_width, Slic3r::GUI::GLCanvas3D::camera, Slic3r::GLVolume::composite_id, Slic3r::generate_layer_height_texture(), get_cursor_z_relative(), GL_RGBA, GL_TEXTURE_2D, GL_UNPACK_ALIGNMENT, GL_UNSIGNED_BYTE, glBindTexture, glPixelStorei, glsafe, glTexImage2D, glTexSubImage2D, is_allowed(), last_object_id, m_layers_texture, m_object_max_z, m_z_texture_id, Slic3r::GLVolume::CompositeID::object_id, Slic3r::GLVolume::render(), render_volumes(), Slic3r::GLShaderProgram::set_uniform(), Slic3r::GLShaderProgram::start_using(), Slic3r::GLShaderProgram::stop_using(), Slic3r::GLVolumeCollection::volumes, and Slic3r::GLVolume::world_matrix().
Referenced by render_volumes().
| void Slic3r::GUI::GLCanvas3D::LayersEditing::reset_layer_height_profile | ( | GLCanvas3D & | canvas | ) |
References Slic3r::GUI::GLCanvas3D::GLCanvas3D(), last_object_id, m_layer_height_profile, m_layers_texture, m_model_object, Slic3r::GUI::GLCanvas3D::post_event(), and reset_layer_height_profile().
Referenced by reset_layer_height_profile().
| void Slic3r::GUI::GLCanvas3D::LayersEditing::select_object | ( | const Model & | model, |
| int | object_id ) |
References Slic3r::ObjectBase::id(), last_object_id, m_layer_height_profile, m_layers_texture, m_model_object, m_object_max_z, m_slicing_parameters, Slic3r::ModelObject::max_z(), Slic3r::Model::objects, and select_object().
Referenced by select_object().
| void Slic3r::GUI::GLCanvas3D::LayersEditing::set_config | ( | const DynamicPrintConfig * | config | ) |
References m_config, m_layer_height_profile, m_layers_texture, m_slicing_parameters, and set_config().
Referenced by set_config().
|
inline |
|
inline |
References m_shrinkage_compensation.
| void Slic3r::GUI::GLCanvas3D::LayersEditing::smooth_layer_height_profile | ( | GLCanvas3D & | canvas, |
| const HeightProfileSmoothingParams & | smoothing_params ) |
References Slic3r::GUI::GLCanvas3D::GLCanvas3D(), last_object_id, m_layer_height_profile, m_layers_texture, m_model_object, m_slicing_parameters, Slic3r::GUI::GLCanvas3D::post_event(), Slic3r::smooth_height_profile(), smooth_layer_height_profile(), and update_slicing_parameters().
Referenced by smooth_layer_height_profile().
|
staticprivate |
References Slic3r::GUI::GLCanvas3D::GLCanvas3D(), Slic3r::GUI::GLCanvas3D::get_canvas_size(), Slic3r::GUI::Size::get_scale_factor(), Slic3r::GUI::GLCanvas3D::get_wxglcanvas(), THICKNESS_BAR_WIDTH, and thickness_bar_width().
Referenced by get_bar_rect_screen(), and thickness_bar_width().
|
private |
References m_config, m_model_object, m_object_max_z, m_shrinkage_compensation, m_slicing_parameters, Slic3r::PrintObject::slicing_parameters(), and update_slicing_parameters().
Referenced by adaptive_layer_height_profile(), adjust_layer_height_profile(), generate_layer_height_texture(), smooth_layer_height_profile(), and update_slicing_parameters().
| float Slic3r::GUI::GLCanvas3D::LayersEditing::band_width { 2.0f } |
Referenced by adjust_layer_height_profile(), render_active_object_annotations(), and render_volumes().
| LayerHeightEditActionType Slic3r::GUI::GLCanvas3D::LayersEditing::last_action { LAYER_HEIGHT_EDIT_ACTION_INCREASE } |
Referenced by adjust_layer_height_profile().
| int Slic3r::GUI::GLCanvas3D::LayersEditing::last_object_id { -1 } |
Referenced by accept_changes(), adaptive_layer_height_profile(), render_volumes(), reset_layer_height_profile(), select_object(), and smooth_layer_height_profile().
| float Slic3r::GUI::GLCanvas3D::LayersEditing::last_z { 0.0f } |
Referenced by adjust_layer_height_profile().
|
mutableprivate |
Referenced by render_variable_layer_height_dialog().
|
private |
Referenced by set_config(), and update_slicing_parameters().
|
private |
Referenced by get_tooltip(), is_enabled(), render_active_object_annotations(), render_profile(), render_variable_layer_height_dialog(), and set_enabled().
|
private |
|
private |
|
private |
|
private |
Referenced by get_tooltip(), object_max_z(), render_active_object_annotations(), render_profile(), render_volumes(), select_object(), and update_slicing_parameters().
| Profile Slic3r::GUI::GLCanvas3D::LayersEditing::m_profile |
Referenced by render_active_object_annotations(), and render_profile().
|
private |
Referenced by set_shrinkage_compensation(), and update_slicing_parameters().
|
private |
|
mutableprivate |
Referenced by render_variable_layer_height_dialog().
|
private |
Referenced by ~LayersEditing(), init(), is_allowed(), render_active_object_annotations(), and render_volumes().
|
staticprivate |
Referenced by get_overlay_window_width(), and render_variable_layer_height_dialog().
| float Slic3r::GUI::GLCanvas3D::LayersEditing::strength { 0.005f } |
Referenced by adjust_layer_height_profile().
|
static |
Referenced by render_active_object_annotations(), render_profile(), and thickness_bar_width().