Skip to content

Commit

Permalink
Don't remove parts without walls if they are meant to have no walls
Browse files Browse the repository at this point in the history
This is an optimisation that removes parts that are too small to print, if they don't even generate an outer wall. But if the wall line count is zero, there is not going to be any outer wall either. So if it's zero, don't remove any parts with this optimisation.

Contributes to issue CURA-7943.
  • Loading branch information
Ghostkeeper committed Feb 4, 2021
1 parent ff3c515 commit ccad27a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/WallsComputation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ void WallsComputation::generateWalls(SliceLayerPart* part)
const Ratio line_width_x_factor = first_layer ? settings.get<ExtruderTrain&>("wall_x_extruder_nr").settings.get<Ratio>("initial_layer_line_width_factor") : 1.0_r;
const coord_t line_width_x = settings.get<coord_t>("wall_line_width_x") * line_width_x_factor;


// When spiralizing, generate the spiral insets using simple offsets instead of generating toolpaths
if (spiralize)
{
Expand Down Expand Up @@ -92,7 +91,7 @@ void WallsComputation::generateWalls(SliceLayer* layer)

//Remove the parts which did not generate a wall. As these parts are too small to print,
// and later code can now assume that there is always minimal 1 wall line.
if(!settings.get<bool>("fill_outline_gaps"))
if(settings.get<size_t>("wall_line_count") >= 1 && !settings.get<bool>("fill_outline_gaps"))
{
for(size_t part_idx = 0; part_idx < layer->parts.size(); part_idx++)
{
Expand Down

0 comments on commit ccad27a

Please sign in to comment.