mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-08 06:24:01 -06:00
Fix threads, tests and require the most recent Moo version
This commit is contained in:
parent
d660a1de0a
commit
747fd25f6d
7 changed files with 31 additions and 21 deletions
|
@ -34,7 +34,7 @@ our $var = "$FindBin::Bin/var";
|
|||
use Encode;
|
||||
use Encode::Locale;
|
||||
use Boost::Geometry::Utils 0.15;
|
||||
use Moo 0.091009;
|
||||
use Moo 1.003001;
|
||||
|
||||
use Slic3r::XS; # import all symbols (constants etc.) before they get parsed
|
||||
use Slic3r::Config;
|
||||
|
@ -126,8 +126,10 @@ sub thread_cleanup {
|
|||
*Slic3r::Point::DESTROY = sub {};
|
||||
*Slic3r::Polygon::DESTROY = sub {};
|
||||
*Slic3r::Polyline::DESTROY = sub {};
|
||||
*Slic3r::Polyline::Collection::DESTROY = sub {};
|
||||
*Slic3r::Surface::DESTROY = sub {};
|
||||
*Slic3r::Surface::Collection::DESTROY = sub {};
|
||||
*Slic3r::TriangleMesh::DESTROY = sub {};
|
||||
}
|
||||
|
||||
sub encode_path {
|
||||
|
|
|
@ -56,7 +56,7 @@ sub new {
|
|||
}
|
||||
|
||||
{
|
||||
my @norms = map @$_, @{$mesh->normals};
|
||||
my @norms = map { @$_, @$_, @$_ } @{$mesh->normals};
|
||||
$v->{norms} = OpenGL::Array->new_list(GL_FLOAT, @norms);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,13 +67,14 @@ sub model {
|
|||
}
|
||||
|
||||
my $mesh = Slic3r::TriangleMesh->new;
|
||||
$mesh->ReadFromperl($vertices, $facets);
|
||||
$mesh->ReadFromPerl($vertices, $facets);
|
||||
$mesh->repair;
|
||||
$mesh->scale_xyz($params{scale_xyz}) if $params{scale_xyz};
|
||||
$mesh->scale($params{scale}) if $params{scale};
|
||||
|
||||
my $model = Slic3r::Model->new;
|
||||
my $object = $model->add_object(vertices => $mesh->vertices);
|
||||
$object->add_volume(facets => $mesh->facets);
|
||||
my $object = $model->add_object;
|
||||
$object->add_volume(mesh => $mesh);
|
||||
$object->add_instance(
|
||||
offset => [0,0],
|
||||
rotation => $params{rotation} // 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue