Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_seams_as_models
This commit is contained in:
commit
dd5beee0bd
3 changed files with 17 additions and 14 deletions
|
@ -199,7 +199,7 @@ void GLGizmoSimplify::on_render_input_window(float x, float y, float bottom_limi
|
|||
ImGui::SameLine(m_gui_cfg->bottom_left_width);
|
||||
if (m_imgui->button(_L("Preview"))) {
|
||||
m_state = State::preview;
|
||||
// simplify but not aply on mesh
|
||||
// simplify but not apply on mesh
|
||||
process();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
|
@ -207,15 +207,12 @@ void GLGizmoSimplify::on_render_input_window(float x, float y, float bottom_limi
|
|||
if (!m_is_valid_result) {
|
||||
m_state = State::close_on_end;
|
||||
process();
|
||||
} else {
|
||||
} else if (m_exist_preview) {
|
||||
// use preview and close
|
||||
if (m_exist_preview) {
|
||||
// fix hollowing, sla support points, modifiers, ...
|
||||
auto plater = wxGetApp().plater();
|
||||
plater->changed_mesh(m_obj_index);
|
||||
}
|
||||
after_apply();
|
||||
} else { // no changes made
|
||||
close();
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
m_imgui->disabled_begin(m_state == State::canceling);
|
||||
|
@ -237,18 +234,22 @@ void GLGizmoSimplify::on_render_input_window(float x, float y, float bottom_limi
|
|||
m_parent.reload_scene(true);
|
||||
// set m_state must be before close() !!!
|
||||
m_state = State::settings;
|
||||
if (close_on_end) {
|
||||
// fix hollowing, sla support points, modifiers, ...
|
||||
auto plater = wxGetApp().plater();
|
||||
plater->changed_mesh(m_obj_index);
|
||||
close();
|
||||
}
|
||||
if (close_on_end) after_apply();
|
||||
|
||||
// Fix warning icon in object list
|
||||
wxGetApp().obj_list()->update_item_error_icon(m_obj_index, -1);
|
||||
}
|
||||
}
|
||||
|
||||
void GLGizmoSimplify::after_apply() {
|
||||
// set flag to NOT revert changes when switch GLGizmoBase::m_state
|
||||
m_exist_preview = false;
|
||||
// fix hollowing, sla support points, modifiers, ...
|
||||
auto plater = wxGetApp().plater();
|
||||
plater->changed_mesh(m_obj_index);
|
||||
close();
|
||||
}
|
||||
|
||||
void GLGizmoSimplify::close() {
|
||||
// close gizmo == open it again
|
||||
GLGizmosManager &gizmos_mgr = m_parent.get_gizmos_manager();
|
||||
|
|
|
@ -32,6 +32,7 @@ protected:
|
|||
virtual void on_set_state() override;
|
||||
|
||||
private:
|
||||
void after_apply();
|
||||
void close();
|
||||
void process();
|
||||
void set_its(indexed_triangle_set &its);
|
||||
|
|
|
@ -2915,6 +2915,7 @@ void Plater::priv::update_print_volume_state()
|
|||
BoundingBox bed_box_2D = get_extents(Polygon::new_scale(this->config->opt<ConfigOptionPoints>("bed_shape")->values));
|
||||
BoundingBoxf3 print_volume(unscale(bed_box_2D.min(0), bed_box_2D.min(1), 0.0), unscale(bed_box_2D.max(0), bed_box_2D.max(1), scale_(this->config->opt_float("max_print_height"))));
|
||||
// Allow the objects to protrude below the print bed, only the part of the object above the print bed will be sliced.
|
||||
print_volume.offset(BedEpsilon);
|
||||
print_volume.min(2) = -1e10;
|
||||
this->q->model().update_print_volume_state(print_volume);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue