mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-31 13:57:07 +00:00
Refuse to slice a broken mixed filament
This commit is contained in:
@@ -11575,9 +11575,11 @@ void Plater::priv::set_current_panel(wxPanel* panel, bool no_slice)
|
|||||||
if (current_plate->is_slice_result_valid() && this->model.objects.empty() && !current_has_print_instances)
|
if (current_plate->is_slice_result_valid() && this->model.objects.empty() && !current_has_print_instances)
|
||||||
only_has_gcode_need_preview = true;
|
only_has_gcode_need_preview = true;
|
||||||
|
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": from set_current_panel, no_slice %1%, export_in_progress %2%, model_fits %3%, m_is_slicing %4%")%no_slice%export_in_progress%model_fits%m_is_slicing;
|
bool mixed_broken = sidebar->has_broken_mixed_filament();
|
||||||
|
|
||||||
if (!no_slice && !this->model.objects.empty() && !export_in_progress && model_fits && current_has_print_instances)
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": from set_current_panel, no_slice %1%, export_in_progress %2%, model_fits %3%, m_is_slicing %4%, mixed_broken %5%")%no_slice%export_in_progress%model_fits%m_is_slicing%mixed_broken;
|
||||||
|
|
||||||
|
if (!no_slice && !this->model.objects.empty() && !export_in_progress && model_fits && current_has_print_instances && !mixed_broken)
|
||||||
{
|
{
|
||||||
//if already running in background, not relice here
|
//if already running in background, not relice here
|
||||||
//BBS: add more judge for slicing
|
//BBS: add more judge for slicing
|
||||||
@@ -18792,6 +18794,15 @@ void Plater::reslice()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A mixed filament with deleted or type-mismatched components cannot be resolved at slicing
|
||||||
|
// time. MainFrame::get_enable_slice_status() already disables the Slice button for it, but the
|
||||||
|
// Preview-tab switch, auto-slice and queued slice events reach reslice() directly, so refuse
|
||||||
|
// here too instead of letting the engine slice the broken slot as a plain filament.
|
||||||
|
if (sidebar().has_broken_mixed_filament()) {
|
||||||
|
BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << ": broken mixed filament detected, refuse to slice";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// In case SLA gizmo is in editing mode, refuse to continue
|
// In case SLA gizmo is in editing mode, refuse to continue
|
||||||
// and notify user that he should leave it first.
|
// and notify user that he should leave it first.
|
||||||
if (get_view3D_canvas3D()->get_gizmos_manager().is_in_editing_mode(true))
|
if (get_view3D_canvas3D()->get_gizmos_manager().is_in_editing_mode(true))
|
||||||
|
|||||||
Reference in New Issue
Block a user