Skip to content

Commit

Permalink
Do not generate support when layer number is negative
Browse files Browse the repository at this point in the history
  • Loading branch information
LipuFei committed Jun 14, 2017
1 parent 60395d0 commit 82a4a92
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/FffGcodeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1459,6 +1459,13 @@ bool FffGcodeWriter::addSupportToGCode(const SliceDataStorage& storage, LayerPla
return support_added;
}

// when raft is enabled, we will get negative layer numbers
// in this case, we don't generate support
if (layer_nr < 0)
{
return support_added;
}

const int support_roof_extruder_nr = getSettingAsIndex("support_roof_extruder_nr");
const int support_bottom_extruder_nr = getSettingAsIndex("support_bottom_extruder_nr");
int support_infill_extruder_nr = (layer_nr <= 0)? getSettingAsIndex("support_extruder_nr_layer_0") : getSettingAsIndex("support_infill_extruder_nr");
Expand Down

0 comments on commit 82a4a92

Please sign in to comment.