mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-05 21:06:09 +08:00
* Update some language used * Completely check pre-condition in test. Make sure that we have 1 solid bottom layer and 2 solid top layers before invoking our change. * Use step_invalidate() instead to ensure dependencies are invalidated as well. Move set_started() until after invalidations.
This commit is contained in:
parent
dabb5f3823
commit
364f2a6e8c
@ -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") {
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user