Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoseph Lenox <lenox.joseph@gmail.com>2016-11-28 07:35:19 +0300
committerbubnikv <bubnikv@gmail.com>2017-02-21 18:11:09 +0300
commit3ee32ef1531f52d84f15ffa5ecb6e0a46877b9e7 (patch)
tree13ff84302c945ecbb6715022cb5f6dcd2a93fdf3 /lib
parentf44df28a96aa0eeb3fe91b5311128dcf1309b14a (diff)
Menu now works to select cylinders (reusing the gui options)
Diffstat (limited to 'lib')
-rw-r--r--lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm b/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm
index 31d693e78..59f3accb3 100644
--- a/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm
+++ b/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm
@@ -341,16 +341,18 @@ sub on_btn_lambda {
return;
}
my $params = $dlg->ObjectParameter;
+ my $type = "".$params->{"type"};
my $name = "lambda-".$params->{"type"};
my $mesh = Slic3r::TriangleMesh->new();
#TODO support non-boxes
- if ($name eq "box") {
+ if ($type eq "box") {
$mesh = $mesh->cube($params->{"dim"}[0], $params->{"dim"}[1], $params->{"dim"}[2]);
- } elsif ($name eq "cylinder") {
+ } elsif ($type eq "cylinder") {
$mesh = $mesh->cylinder($params->{"dim"}[0], $params->{"dim"}[1]);
+ } else {
+ return;
}
-
my $new_volume = $self->{model_object}->add_volume(mesh => $mesh);
$new_volume->set_modifier($is_modifier);
$new_volume->set_name($name);