mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 04:35:54 +08:00
Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_seams_as_models
This commit is contained in:
commit
dd5beee0bd
@ -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);
|
ImGui::SameLine(m_gui_cfg->bottom_left_width);
|
||||||
if (m_imgui->button(_L("Preview"))) {
|
if (m_imgui->button(_L("Preview"))) {
|
||||||
m_state = State::preview;
|
m_state = State::preview;
|
||||||
// simplify but not aply on mesh
|
// simplify but not apply on mesh
|
||||||
process();
|
process();
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
@ -207,15 +207,12 @@ void GLGizmoSimplify::on_render_input_window(float x, float y, float bottom_limi
|
|||||||
if (!m_is_valid_result) {
|
if (!m_is_valid_result) {
|
||||||
m_state = State::close_on_end;
|
m_state = State::close_on_end;
|
||||||
process();
|
process();
|
||||||
} else {
|
} else if (m_exist_preview) {
|
||||||
// use preview and close
|
// use preview and close
|
||||||
if (m_exist_preview) {
|
after_apply();
|
||||||
// fix hollowing, sla support points, modifiers, ...
|
} else { // no changes made
|
||||||
auto plater = wxGetApp().plater();
|
|
||||||
plater->changed_mesh(m_obj_index);
|
|
||||||
}
|
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
m_imgui->disabled_begin(m_state == State::canceling);
|
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);
|
m_parent.reload_scene(true);
|
||||||
// set m_state must be before close() !!!
|
// set m_state must be before close() !!!
|
||||||
m_state = State::settings;
|
m_state = State::settings;
|
||||||
if (close_on_end) {
|
if (close_on_end) after_apply();
|
||||||
// fix hollowing, sla support points, modifiers, ...
|
|
||||||
auto plater = wxGetApp().plater();
|
|
||||||
plater->changed_mesh(m_obj_index);
|
|
||||||
close();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fix warning icon in object list
|
// Fix warning icon in object list
|
||||||
wxGetApp().obj_list()->update_item_error_icon(m_obj_index, -1);
|
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() {
|
void GLGizmoSimplify::close() {
|
||||||
// close gizmo == open it again
|
// close gizmo == open it again
|
||||||
GLGizmosManager &gizmos_mgr = m_parent.get_gizmos_manager();
|
GLGizmosManager &gizmos_mgr = m_parent.get_gizmos_manager();
|
||||||
|
@ -32,6 +32,7 @@ protected:
|
|||||||
virtual void on_set_state() override;
|
virtual void on_set_state() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void after_apply();
|
||||||
void close();
|
void close();
|
||||||
void process();
|
void process();
|
||||||
void set_its(indexed_triangle_set &its);
|
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));
|
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"))));
|
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.
|
// 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;
|
print_volume.min(2) = -1e10;
|
||||||
this->q->model().update_print_volume_state(print_volume);
|
this->q->model().update_print_volume_state(print_volume);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user