mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-01 21:21:10 -06:00
Merge branch 'stable'
Conflicts: lib/Slic3r/Geometry/Clipper.pm lib/Slic3r/Layer/Region.pm
This commit is contained in:
commit
bd8c430afd
10 changed files with 32 additions and 17 deletions
|
|
@ -547,8 +547,11 @@ TriangleMesh::split() const
|
|||
mesh->stl.stats.original_num_facets = mesh->stl.stats.number_of_facets;
|
||||
stl_allocate(&mesh->stl);
|
||||
|
||||
int first = 1;
|
||||
for (std::deque<int>::const_iterator facet = facets.begin(); facet != facets.end(); facet++) {
|
||||
mesh->stl.facet_start[facet - facets.begin()] = this->stl.facet_start[*facet];
|
||||
stl_facet_stats(&mesh->stl, this->stl.facet_start[*facet], first);
|
||||
first = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -178,6 +178,6 @@ extern void stl_initialize(stl_file *stl);
|
|||
static void stl_count_facets(stl_file *stl, char *file);
|
||||
extern void stl_allocate(stl_file *stl);
|
||||
static void stl_read(stl_file *stl, int first_facet, int first);
|
||||
static void stl_facet_stats(stl_file *stl, stl_facet facet, int first);
|
||||
extern void stl_facet_stats(stl_file *stl, stl_facet facet, int first);
|
||||
extern void stl_reallocate(stl_file *stl);
|
||||
extern void stl_get_size(stl_file *stl);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use strict;
|
|||
use warnings;
|
||||
|
||||
use Slic3r::XS;
|
||||
use Test::More tests => 51;
|
||||
use Test::More tests => 52;
|
||||
|
||||
is Slic3r::TriangleMesh::hello_world(), 'Hello world!',
|
||||
'hello world';
|
||||
|
|
@ -59,6 +59,7 @@ my $cube = {
|
|||
my $meshes = $m->split;
|
||||
is scalar(@$meshes), 1, 'split';
|
||||
isa_ok $meshes->[0], 'Slic3r::TriangleMesh', 'split';
|
||||
is_deeply $m->bb3, $meshes->[0]->bb3, 'split populates stats';
|
||||
}
|
||||
|
||||
my $m2 = Slic3r::TriangleMesh->new;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue