Testing for the required parameter combinations before enabling the wipe tower.

The wipe tower needs to be made more general in the future to overcome
these limitations.
This commit is contained in:
bubnikv 2017-06-06 10:36:14 +02:00
parent 88c9ae6ca6
commit 72f348658f
2 changed files with 48 additions and 4 deletions

View File

@ -841,19 +841,53 @@ sub _update {
. "- no ensure_vertical_shell_thickness\n"
. "\nShall I adjust those settings in order to enable Spiral Vase?",
'Spiral Vase', wxICON_WARNING | wxYES | wxNO);
my $new_conf = Slic3r::Config->new;
if ($dialog->ShowModal() == wxID_YES) {
my $new_conf = Slic3r::Config->new;
$new_conf->set("perimeters", 1);
$new_conf->set("top_solid_layers", 0);
$new_conf->set("fill_density", 0);
$new_conf->set("support_material", 0);
$new_conf->set("ensure_vertical_shell_thickness", 0);
$self->load_config($new_conf);
} else {
my $new_conf = Slic3r::Config->new;
$new_conf->set("spiral_vase", 0);
$self->load_config($new_conf);
}
$self->load_config($new_conf);
}
if ($config->wipe_tower &&
($config->first_layer_height != 0.2 || ($config->layer_height != 0.15 && $config->layer_height != 0.2))) {
my $dialog = Wx::MessageDialog->new($self,
"The Wipe Tower currently supports only:\n"
. "- first layer height 0.2mm\n"
. "- layer height 0.15mm or 0.2mm\n"
. "\nShall I adjust those settings 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("first_layer_height", 0.2);
$new_conf->set("layer_height", 0.15) if $config->layer_height != 0.15 && $config->layer_height != 0.2;
} else {
$new_conf->set("wipe_tower", 0);
}
$self->load_config($new_conf);
}
if ($config->wipe_tower && $config->support_material && $config->support_material_contact_distance > 0. &&
($config->support_material_extruder != 0 || $config->support_material_interface_extruder != 0)) {
my $dialog = Wx::MessageDialog->new($self,
"The Wipe Tower currently supports the non-soluble supports only\n"
. "if they are printed with the current extruder without triggering a tool change.\n"
. "(both support_material_extruder and support_material_interface_extruder need to be set to 0).\n"
. "\nShall I adjust those settings 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_extruder", 0);
$new_conf->set("support_material_interface_extruder", 0);
} else {
$new_conf->set("wipe_tower", 0);
}
$self->load_config($new_conf);
}
if ($keys_modified->{'layer_height'}) {

View File

@ -564,6 +564,16 @@ std::string Print::validate() const
if (this->regions.size() > 1)
return "The Spiral Vase option can only be used when printing single material objects.";
}
if (this->config.wipe_tower) {
for (auto dmr : this->config.nozzle_diameter.values)
if (std::abs(dmr - 0.4) > EPSILON)
return "The Wipe Tower is currently only supported for the 0.4mm nozzle diameter.";
if (this->config.gcode_flavor != gcfRepRap)
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).";
}
{
// find the smallest nozzle diameter