Remove unused move_to overload, accept move_to comments

This commit is contained in:
thewildmage
2023-05-29 22:28:51 -06:00
parent d3cc8b7575
commit c999eeebf8
2 changed files with 7 additions and 8 deletions

View File

@@ -6,20 +6,20 @@
#include <map>
namespace Slic3r {
std::string calib_pressure_advance::move_to(Vec3d pt) {
std::string calib_pressure_advance::move_to(Vec2d pt, std::string comment = std::string()) {
std::stringstream gcode;
gcode << mp_gcodegen->retract();
gcode << mp_gcodegen->writer().travel_to_xyz(pt);
if (comment.empty()) {
gcode << mp_gcodegen->writer().travel_to_xy(pt);
} else {
gcode << mp_gcodegen->writer().travel_to_xy(pt, comment);
}
gcode << mp_gcodegen->unretract();
return gcode.str();
}
std::string calib_pressure_advance::move_to(Vec2d pt) {
return calib_pressure_advance::move_to(Vec3d(pt.x(), pt.y(), 0.2));
}
std::string convert_number_to_string(double num) {
auto sNumber = std::to_string(value);
sNumber.erase(sNumber.find_last_not_of('0') + 1, std::string::npos);

View File

@@ -34,8 +34,7 @@ public:
Vertical
};
private:
std::string move_to(Ved3d pt);
std::string move_to(Vec2d pt);
std::string move_to(Vec2d pt, std::string comment = std::string());
std::string convert_number_to_string(double num);
std::string draw_digit(double startx, double starty, char c, calib_pressure_advance::DrawDigitMode mode);
std::string draw_number(double startx, double starty, double value, calib_pressure_advance::DrawDigitMode mode);