mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 21:58:03 -06:00
Reverted the perimeter generator to not save the perimeter areas.
These could be calculated from the fill areas if needed. On the other side, the non-classified (non-split) fill areas are stored now for use in the "ensure vertical wall thickness" feature, also the non-split fill areas are re-used when recalculating the infills. This is safer than trying to stitch the fill region together from the classified fragments. Modified the "ensure vertical wall thickness" feature to use the non-split fill areas instead of perimeter areas for the calculation of non-supported regions. This is cheaper as the fill areas contain roughly half the edges.
This commit is contained in:
parent
2085a482c7
commit
79f5a16536
12 changed files with 94 additions and 116 deletions
|
@ -259,7 +259,7 @@ sub slice {
|
|||
}
|
||||
}
|
||||
|
||||
# merge all regions' slices to get islands
|
||||
# Merge all regions' slices to get islands, chain them by a shortest path.
|
||||
$layer->make_slices;
|
||||
}
|
||||
|
||||
|
@ -367,6 +367,9 @@ sub _slice_region {
|
|||
return $mesh->slice($z);
|
||||
}
|
||||
|
||||
# 1) Merges typed region slices into stInternal type.
|
||||
# 2) Increases an "extra perimeters" counter at region slices where needed.
|
||||
# 3) Generates perimeters, gap fills and fill regions (fill regions of type stInternal).
|
||||
sub make_perimeters {
|
||||
my $self = shift;
|
||||
|
||||
|
@ -377,7 +380,8 @@ sub make_perimeters {
|
|||
$self->set_step_started(STEP_PERIMETERS);
|
||||
$self->print->status_cb->(20, "Generating perimeters");
|
||||
|
||||
# merge slices if they were split into types
|
||||
# Merge region slices if they were split into types.
|
||||
# FIXME this is using a safety offset, so the region slices will be slightly bigger with each iteration.
|
||||
if ($self->typed_slices) {
|
||||
$_->merge_slices for @{$self->layers};
|
||||
$self->set_typed_slices(0);
|
||||
|
@ -487,11 +491,12 @@ sub prepare_infill {
|
|||
$self->set_step_started(STEP_PREPARE_INFILL);
|
||||
$self->print->status_cb->(30, "Preparing infill");
|
||||
|
||||
# this will assign a type (top/bottom/internal) to $layerm->slices
|
||||
# and transform $layerm->fill_surfaces from expolygon
|
||||
# to typed top/bottom/internal surfaces;
|
||||
# This will assign a type (top/bottom/internal) to $layerm->slices.
|
||||
# Then the classifcation of $layerm->slices is transfered onto
|
||||
# the $layerm->fill_surfaces by clipping $layerm->fill_surfaces
|
||||
# by the cummulative area of the previous $layerm->fill_surfaces.
|
||||
$self->detect_surfaces_type;
|
||||
# Mark the object to have the slices classified (typed, which also means they are split based on whether they are supported, bridging, top layers etc.)
|
||||
# Mark the object to have the region slices classified (typed, which also means they are split based on whether they are supported, bridging, top layers etc.)
|
||||
$self->set_typed_slices(1);
|
||||
|
||||
# Decide what surfaces are to be filled.
|
||||
|
@ -615,6 +620,7 @@ sub infill {
|
|||
);
|
||||
|
||||
### we could free memory now, but this would make this step not idempotent
|
||||
### Vojtech: Cannot release the fill_surfaces, they are used by the support generator.
|
||||
### $_->fill_surfaces->clear for map @{$_->regions}, @{$object->layers};
|
||||
|
||||
$self->set_step_done(STEP_INFILL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue