mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
Made cube and cylinder static functions of the package, not some specific TriangleMesh object.
This commit is contained in:
parent
26b6e4c619
commit
716dc2e650
2 changed files with 19 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue