diff --git a/lib/Slic3r/GUI/Tab.pm b/lib/Slic3r/GUI/Tab.pm index 35a7f6682..cb620fbb9 100644 --- a/lib/Slic3r/GUI/Tab.pm +++ b/lib/Slic3r/GUI/Tab.pm @@ -890,6 +890,22 @@ sub _update { $self->load_config($new_conf); } + if ($config->wipe_tower && $config->support_material && $config->support_material_contact_distance == 0 && + ! $config->support_material_synchronize_layers) { + my $dialog = Wx::MessageDialog->new($self, + "For the Wipe Tower to work with the soluble supports, the support layers\n" + . "need to be synchronized with the object layers.\n" + . "\nShall I synchronize support layers in order to enable the Wipe Tower?", + 'Wipe Tower', wxICON_WARNING | wxYES | wxNO); + my $new_conf = Slic3r::Config->new; + if ($dialog->ShowModal() == wxID_YES) { + $new_conf->set("support_material_synchronize_layers", 1); + } else { + $new_conf->set("wipe_tower", 0); + } + $self->load_config($new_conf); + } + if ($keys_modified->{'layer_height'}) { # If the user had set the variable layer height, reset it and let the user know. } diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index 81718d7bb..bbff4fc6d 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -573,6 +573,18 @@ std::string Print::validate() const return "The Wipe Tower is currently only supported for the RepRap (Marlin / Sprinter) G-code flavor."; if (! this->config.use_relative_e_distances) return "The Wipe Tower is currently only supported with the relative extruder addressing (use_relative_e_distances=1)."; + for (PrintObject *object : this->objects) { + if (std::abs(object->config.first_layer_height - this->objects.front()->config.first_layer_height) > EPSILON || + std::abs(object->config.layer_height - this->objects.front()->config.layer_height ) > EPSILON) + return "The Wipe Tower is only supported for multiple objects if they have equal layer heigths"; + object->update_layer_height_profile(); + if (object->layer_height_profile.size() != 8 || + std::abs(object->layer_height_profile[1] - object->config.first_layer_height) > EPSILON || + std::abs(object->layer_height_profile[3] - object->config.first_layer_height) > EPSILON || + std::abs(object->layer_height_profile[5] - object->config.layer_height) > EPSILON || + std::abs(object->layer_height_profile[7] - object->config.layer_height) > EPSILON) + return "The Wipe Tower is currently only supported with constant Z layer spacing. Layer editing is not allowed."; + } } {