From 82a4a92a702be767cda84c325738af755452ce78 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Wed, 14 Jun 2017 13:11:09 +0200 Subject: [PATCH] Do not generate support when layer number is negative CURA-3934 --- src/FffGcodeWriter.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index e9114105a6..9a19d387a7 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -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");