mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-14 01:31:46 +08:00
Menu now works to select cylinders (reusing the gui options)
This commit is contained in:
parent
d961a88969
commit
7aede7aa28
@ -341,16 +341,18 @@ sub on_btn_lambda {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
my $params = $dlg->ObjectParameter;
|
my $params = $dlg->ObjectParameter;
|
||||||
|
my $type = "".$params->{"type"};
|
||||||
my $name = "lambda-".$params->{"type"};
|
my $name = "lambda-".$params->{"type"};
|
||||||
my $mesh = Slic3r::TriangleMesh->new();
|
my $mesh = Slic3r::TriangleMesh->new();
|
||||||
|
|
||||||
#TODO support non-boxes
|
#TODO support non-boxes
|
||||||
if ($name eq "box") {
|
if ($type eq "box") {
|
||||||
$mesh = $mesh->cube($params->{"dim"}[0], $params->{"dim"}[1], $params->{"dim"}[2]);
|
$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]);
|
$mesh = $mesh->cylinder($params->{"dim"}[0], $params->{"dim"}[1]);
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $new_volume = $self->{model_object}->add_volume(mesh => $mesh);
|
my $new_volume = $self->{model_object}->add_volume(mesh => $mesh);
|
||||||
$new_volume->set_modifier($is_modifier);
|
$new_volume->set_modifier($is_modifier);
|
||||||
$new_volume->set_name($name);
|
$new_volume->set_name($name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user