Skip to content

Commit

Permalink
Merge fe2b673 into b3cac9d
Browse files Browse the repository at this point in the history
  • Loading branch information
lordofhyphens committed Jan 6, 2019
2 parents b3cac9d + fe2b673 commit 4ca602b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 6 additions & 2 deletions src/test/libslic3r/test_print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,16 @@ SCENARIO("Print: Changing number of solid surfaces does not cause all surfaces t
std::string stage;
auto print {Slic3r::Test::init_print({m}, model, config)};
print->process();
test_is_solid_infill(print, 0, 39); // check to make sure it sliced properly
// Precondition: Ensure that the model has 2 solid top layers (39, 38)
// and one solid bottom layer (0).
test_is_solid_infill(print, 0, 0); // should be solid
test_is_solid_infill(print, 0, 39); // should be solid
test_is_solid_infill(print, 0, 38); // should be solid
WHEN("Model is re-sliced with top_solid_layers == 3") {
print->regions[0]->config.top_solid_layers = 3;
print->objects[0]->invalidate_step(posPrepareInfill);
print->process();
THEN("Print object does not have 0 bottom surfaces.") {
THEN("Print object does not have 0 solid bottom layers.") {
test_is_solid_infill(print, 0, 0);
}
AND_THEN("Print object has 3 top solid layers") {
Expand Down
8 changes: 3 additions & 5 deletions xs/src/libslic3r/PrintObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1055,17 +1055,15 @@ void
PrintObject::make_perimeters()
{
if (this->state.is_done(posPerimeters)) return;
this->state.set_started(posPerimeters);

// Temporary workaround for detect_surfaces_type() not being idempotent (see #3764).
// We can remove this when idempotence is restored. This make_perimeters() method
// will just call merge_slices() to undo the typed slices and invalidate posDetectSurfaces.
if (this->typed_slices) {
this->state.invalidate(posSlice);
// also invalidate posDetectSurfaces
this->state.invalidate(posDetectSurfaces);
this->invalidate_step(posSlice);
}

this->state.set_started(posPerimeters);

// prerequisites
this->slice();

Expand Down

0 comments on commit 4ca602b

Please sign in to comment.