For the wipe tower to work, verify that all objects are sliced

with the same layer heights.
Also enforce layer synchronization for soluble supports.
This commit is contained in:
bubnikv 2017-06-06 11:40:35 +02:00
parent 72f348658f
commit 3e764ada0c
2 changed files with 28 additions and 0 deletions

View File

@ -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.
}

View File

@ -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.";
}
}
{