Fix only one wall on first layer when raft is used (#6656)

Fix #6616
This commit is contained in:
SoftFever 2024-09-07 16:25:01 +08:00 committed by GitHub
commit 372a525f2e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1729,7 +1729,7 @@ void PerimeterGenerator::process_classic()
int sparse_infill_density = this->config->sparse_infill_density.value;
if (this->config->alternate_extra_wall && this->layer_id % 2 == 1 && !m_spiral_vase && sparse_infill_density > 0) // add alternating extra wall
loop_number++;
if (this->layer_id == 0 && this->config->only_one_wall_first_layer)
if (this->layer_id == object_config->raft_layers && this->config->only_one_wall_first_layer)
loop_number = 0;
// Set the topmost layer to be one wall
if (loop_number > 0 && config->only_one_wall_top && this->upper_slices == nullptr)
@ -2646,7 +2646,7 @@ void PerimeterGenerator::process_arachne()
loop_number++;
// Set the bottommost layer to be one wall
const bool is_bottom_layer = (this->layer_id == 0) ? true : false;
const bool is_bottom_layer = (this->layer_id == object_config->raft_layers) ? true : false;
if (is_bottom_layer && this->config->only_one_wall_first_layer)
loop_number = 0;