mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 09:17:52 -06:00
More work to avoid working with vertices outside XS
This commit is contained in:
parent
11e18f681d
commit
a821eb7f3c
9 changed files with 61 additions and 35 deletions
|
@ -144,15 +144,13 @@ sub slice {
|
|||
# process facets
|
||||
for my $region_id (0 .. $#{$self->meshes}) {
|
||||
my $mesh = $self->meshes->[$region_id] // next; # ignore undef meshes
|
||||
$mesh->repair;
|
||||
|
||||
{
|
||||
my $m = Slic3r::TriangleMesh->new;
|
||||
$m->ReadFromPerl($mesh->vertices, $mesh->facets);
|
||||
$m->repair;
|
||||
my $lines = $m->slice([ map $_->slice_z, @{$self->layers} ]);
|
||||
for my $layer_id (0..$#$lines) {
|
||||
my $loops = $mesh->slice([ map $_->slice_z, @{$self->layers} ]);
|
||||
for my $layer_id (0..$#$loops) {
|
||||
my $layerm = $self->layers->[$layer_id]->regions->[$region_id];
|
||||
$layerm->make_surfaces($lines->[$layer_id]);
|
||||
$layerm->make_surfaces($loops->[$layer_id]);
|
||||
}
|
||||
# TODO: read slicing_errors
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue