mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-05 06:17:45 -07:00
ENH: Add prompt information when mixture of PLA and PETG
jira: STUDIO-9659 Change-Id: I03a09dd796074d0872010672bdd85688bb7f1715 (cherry picked from commit 903b230f389ac8fce2816a8d46a0675019af0b04)
This commit is contained in:
parent
cb26af8477
commit
10e676e439
5 changed files with 35 additions and 3 deletions
|
|
@ -2970,6 +2970,9 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
|
|||
bool filament_printable = cur_plate->check_filament_printable(wxGetApp().preset_bundle->full_config(), filament_printable_error_msg);
|
||||
_set_warning_notification(EWarning::FilamentPrintableError, !filament_printable);
|
||||
|
||||
bool mix_pla_and_petg = cur_plate->check_mixture_of_pla_and_petg(wxGetApp().preset_bundle->full_config());
|
||||
_set_warning_notification(EWarning::MixUsePLAAndPETG, !mix_pla_and_petg);
|
||||
|
||||
bool model_fits = contained_min_one && !m_model->objects.empty() && !partlyOut && object_results.filaments.empty() && tpu_valid;
|
||||
post_event(Event<bool>(EVT_GLCANVAS_ENABLE_ACTION_BUTTONS, model_fits));
|
||||
ppl.get_curr_plate()->update_slice_ready_status(model_fits);
|
||||
|
|
@ -2981,6 +2984,7 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
|
|||
//_set_warning_notification(EWarning::SlaSupportsOutside, false);
|
||||
_set_warning_notification(EWarning::TPUPrintableError, false);
|
||||
_set_warning_notification(EWarning::FilamentPrintableError, false);
|
||||
_set_warning_notification(EWarning::MixUsePLAAndPETG, false);
|
||||
post_event(Event<bool>(EVT_GLCANVAS_ENABLE_ACTION_BUTTONS, false));
|
||||
}
|
||||
}
|
||||
|
|
@ -10018,6 +10022,9 @@ void GLCanvas3D::_set_warning_notification(EWarning warning, bool state)
|
|||
error = ErrorType::SLICING_ERROR;
|
||||
break;
|
||||
}
|
||||
case EWarning::MixUsePLAAndPETG:
|
||||
text = _u8L("PLA and PETG filaments detected in the mixture. Adjust parameters according to the Wiki to ensure print quality.");
|
||||
break;
|
||||
}
|
||||
//BBS: this may happened when exit the app, plater is null
|
||||
if (!wxGetApp().plater())
|
||||
|
|
|
|||
|
|
@ -388,7 +388,8 @@ class GLCanvas3D
|
|||
FilamentPrintableError,
|
||||
MultiExtruderPrintableError, // after slice
|
||||
MultiExtruderHeightOutside, // after slice
|
||||
FilamentUnPrintableOnFirstLayer
|
||||
FilamentUnPrintableOnFirstLayer,
|
||||
MixUsePLAAndPETG
|
||||
};
|
||||
|
||||
class RenderStats
|
||||
|
|
|
|||
|
|
@ -1780,6 +1780,29 @@ bool PartPlate::check_tpu_printable_status(const DynamicPrintConfig & config, co
|
|||
return tpu_valid;
|
||||
}
|
||||
|
||||
bool PartPlate::check_mixture_of_pla_and_petg(const DynamicPrintConfig &config)
|
||||
{
|
||||
bool has_pla = false;
|
||||
bool has_petg = false;
|
||||
|
||||
std::vector<int> used_filaments = get_extruders(true); // 1 base
|
||||
if (!used_filaments.empty()) {
|
||||
for (auto filament_idx : used_filaments) {
|
||||
int filament_id = filament_idx - 1;
|
||||
std::string filament_type = config.option<ConfigOptionStrings>("filament_type")->values.at(filament_id);
|
||||
if (filament_type == "PLA")
|
||||
has_pla = true;
|
||||
if (filament_type == "PETG")
|
||||
has_petg = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (has_pla && has_petg)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Vec3d PartPlate::estimate_wipe_tower_size(const DynamicPrintConfig & config, const double w, const double d, int plate_extruder_size, bool use_global_objects) const
|
||||
{
|
||||
Vec3d wipe_tower_size;
|
||||
|
|
|
|||
|
|
@ -333,6 +333,7 @@ public:
|
|||
int get_physical_extruder_by_filament_id(const DynamicConfig& g_config, int idx) const;
|
||||
bool check_filament_printable(const DynamicPrintConfig & config, wxString& error_message);
|
||||
bool check_tpu_printable_status(const DynamicPrintConfig & config, const std::vector<int> &tpu_filaments);
|
||||
bool check_mixture_of_pla_and_petg(const DynamicPrintConfig & config);
|
||||
|
||||
/* instance related operations*/
|
||||
//judge whether instance is bound in plate or not
|
||||
|
|
|
|||
|
|
@ -3709,7 +3709,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
|||
"nozzle_height", "skirt_type", "skirt_loops", "skirt_speed","min_skirt_length", "skirt_distance", "skirt_start_angle",
|
||||
"brim_width", "brim_object_gap", "brim_type", "nozzle_diameter", "single_extruder_multi_material", "preferred_orientation",
|
||||
"enable_prime_tower", "wipe_tower_x", "wipe_tower_y", "prime_tower_width", "prime_tower_brim_width", "prime_tower_outer_first", "prime_tower_skip_points", "prime_volume",
|
||||
"extruder_colour", "filament_colour", "material_colour", "printable_height", "extruder_printable_height", "printer_model", "printer_technology",
|
||||
"extruder_colour", "filament_colour", "filament_type", "material_colour", "printable_height", "extruder_printable_height", "printer_model", "printer_technology",
|
||||
// These values are necessary to construct SlicingParameters by the Canvas3D variable layer height editor.
|
||||
"layer_height", "initial_layer_print_height", "min_layer_height", "max_layer_height",
|
||||
"brim_width", "wall_loops", "wall_filament", "sparse_infill_density", "sparse_infill_filament", "top_shell_layers",
|
||||
|
|
@ -14441,7 +14441,7 @@ void Plater::on_config_change(const DynamicPrintConfig &config)
|
|||
continue;
|
||||
}
|
||||
}
|
||||
if (opt_key == "material_colour") {
|
||||
if (opt_key == "material_colour" || opt_key == "filament_type") {
|
||||
update_scheduled = true; // update should be scheduled (for update 3DScene)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue