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 11:46:43 +0300
committerbubnikv <bubnikv@gmail.com>2017-02-21 18:11:52 +0300
commit716dc2e65079f8d0465a4831dbaa747f74e53bbf (patch)
tree9c4ca40705c76e4f09cb31fa07399d6d0b028abc /lib
parent26b6e4c6194f7abcd793b968c7e634a4d8d9e0cb (diff)
Made cube and cylinder static functions of the package, not some specific TriangleMesh object.
Diffstat (limited to 'lib')
-rw-r--r--lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm b/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm
index f4d55cb68..4adf9366e 100644
--- a/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm
+++ b/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm
@@ -344,12 +344,12 @@ sub on_btn_lambda {
my $params = $dlg->ObjectParameter;
my $type = "".$params->{"type"};
my $name = "lambda-".$params->{"type"};
- my $mesh = Slic3r::TriangleMesh->new();
+ my $mesh;
if ($type eq "box") {
- $mesh = $mesh->cube($params->{"dim"}[0], $params->{"dim"}[1], $params->{"dim"}[2]);
+ $mesh = Slic3r::TriangleMesh::cube($params->{"dim"}[0], $params->{"dim"}[1], $params->{"dim"}[2]);
} elsif ($type eq "cylinder") {
- $mesh = $mesh->cylinder($params->{"cyl_r"}, $params->{"cyl_h"});
+ $mesh = Slic3r::TriangleMesh::cylinder($params->{"cyl_r"}, $params->{"cyl_h"});
} else {
return;
}