bugfix "G1" alone in gcode.

This commit is contained in:
supermerill 2020-01-14 17:10:29 +01:00
parent 64915b10fc
commit aa854a5c99
2 changed files with 4 additions and 2 deletions

View File

@ -793,7 +793,9 @@ std::string CoolingBuffer::apply_layer_cooldown(
// Roll the pointer before the 'F' word.
for (f -= 2; f > line_start && (*f == ' ' || *f == '\t'); -- f);
// Append up to the F word, without the trailing whitespace.
new_gcode.append(line_start, f - line_start + 1);
//but only if there are something else than a simple "G1" (F is always put at the end of a G1 command)
if(f - line_start > 2)
new_gcode.append(line_start, f - line_start + 1);
}
// Skip the non-whitespaces of the F parameter up the comment or end of line.
for (; fpos != end && *fpos != ' ' && *fpos != ';' && *fpos != '\n'; ++fpos);

View File

@ -1255,7 +1255,7 @@ std::string Print::validate() const
// #4043
if (total_copies_count > 1 && ! m_config.complete_objects.value)
return L("The Spiral Vase option can only be used when printing a single object.");
assert(m_objects.size() == 1);
assert(m_objects.size() == 1 || config().complete_objects.value);
size_t num_regions = 0;
for (const std::vector<std::pair<t_layer_height_range, int>> &volumes_per_region : m_objects.front()->region_volumes)
if (! volumes_per_region.empty())