Skip to content

Commit

Permalink
Add all arcwelder settings to gcode comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
FormerLurker committed Jan 24, 2021
1 parent 26264ed commit a6e1933
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions ArcWelder/arc_welder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -797,11 +797,34 @@ void arc_welder::add_arcwelder_comment_to_target()
{
p_logger_->log(logger_type_, DEBUG, "Adding ArcWelder comment to the target file.");
std::stringstream stream;
stream << std::fixed << std::setprecision(2);
stream << std::fixed;
stream << "; Postprocessed by [ArcWelder](https://github.com/FormerLurker/ArcWelderLib)\n";
stream << "; Copyright(C) 2020 - Brad Hochgesang\n";
stream << "; arc_welder_resolution_mm = " << resolution_mm_ << "\n";
stream << "; arc_welder_g90_influences_extruder = " << (gcode_position_args_.g90_influences_extruder ? "True" : "False") << "\n\n";
stream << "; resolution=" << std::setprecision(2) << resolution_mm_ << "mm\n";
stream << "; path_tolerance=" << std::setprecision(0) << (current_arc_.get_path_tolerance_percent() * 100.0) << "%\n";
stream << "; max_radius=" << std::setprecision(2) << (current_arc_.get_max_radius()) << "mm\n";
if (gcode_position_args_.g90_influences_extruder)
{
stream << "; g90_influences_extruder=True\n";
}
if (current_arc_.get_mm_per_arc_segment() > 0 && current_arc_.get_min_arc_segments() > 0)
{
stream << "; firmware_compensation=True\n";
stream << "; mm_per_arc_segment="<< std::setprecision(2) << current_arc_.get_mm_per_arc_segment() << "mm\n";
stream << "; min_arc_segments=" << std::setprecision(0) << current_arc_.get_min_arc_segments() << "\n";
}
if (allow_3d_arcs_)
{
stream << "; allow_3d_arcs=True\n";

}
if (allow_dynamic_precision_)
{
stream << "; allow_dynamic_precision=True\n";
}
stream << "; default_xyz_precision=" << std::setprecision(0) << static_cast<int>(current_arc_.get_xyz_precision()) << "\n";
stream << "; default_e_precision=" << std::setprecision(0) << static_cast<int>(current_arc_.get_e_precision()) << "\n\n";


output_file_ << stream.str();
}
Expand Down

0 comments on commit a6e1933

Please sign in to comment.