Menu now works to select cylinders (reusing the gui options)

This commit is contained in:
Joseph Lenox 2016-11-27 22:35:19 -06:00 committed by bubnikv
parent f44df28a96
commit 3ee32ef153

View File

@ -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);