Skip to content

Commit

Permalink
Remove comments from gcode
Browse files Browse the repository at this point in the history
Signed-off-by: Vivek Anand <[email protected]>
  • Loading branch information
vivekanand1101 committed Feb 5, 2018
1 parent 84514e2 commit e7fb228
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions src/gcodeExport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,48 +416,30 @@ void GCodeExport::updateTotalPrintTime()

void GCodeExport::writeComment(std::string comment)
{
*output_stream << ";";
for (unsigned int i = 0; i < comment.length(); i++)
{
if (comment[i] == '\n')
{
*output_stream << "\\n";
}else{
*output_stream << comment[i];
}
}
*output_stream << new_line;
*output_stream << "";
}

void GCodeExport::writeTimeComment(const double time)
{
*output_stream << ";TIME_ELAPSED:" << time << new_line;
}

void GCodeExport::writeTypeComment(PrintFeatureType type)
{
switch (type)
{
case PrintFeatureType::OuterWall:
*output_stream << ";TYPE:WALL-OUTER" << new_line;
break;
case PrintFeatureType::InnerWall:
*output_stream << ";TYPE:WALL-INNER" << new_line;
break;
case PrintFeatureType::Skin:
*output_stream << ";TYPE:SKIN" << new_line;
break;
case PrintFeatureType::Support:
*output_stream << ";TYPE:SUPPORT" << new_line;
break;
case PrintFeatureType::SkirtBrim:
*output_stream << ";TYPE:SKIRT" << new_line;
break;
case PrintFeatureType::Infill:
*output_stream << ";TYPE:FILL" << new_line;
break;
case PrintFeatureType::SupportInfill:
*output_stream << ";TYPE:SUPPORT" << new_line;
break;
case PrintFeatureType::MoveCombing:
case PrintFeatureType::MoveRetraction:
Expand All @@ -470,12 +452,10 @@ void GCodeExport::writeTypeComment(PrintFeatureType type)

void GCodeExport::writeLayerComment(int layer_nr)
{
*output_stream << ";LAYER:" << layer_nr << new_line;
}

void GCodeExport::writeLayerCountComment(int layer_count)
{
*output_stream << ";LAYER_COUNT:" << layer_count << new_line;
}

void GCodeExport::writeLine(const char* line)
Expand Down

0 comments on commit e7fb228

Please sign in to comment.