mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-18 15:39:04 -07:00
Completely replaced the homebrew Pointf3 class with Eigen Vec3d.
Replaced the unscale macro with a template, implemented templates for unscaling Eigen vectors.
This commit is contained in:
@@ -290,7 +290,7 @@ std::string GCodeWriter::travel_to_xy(const Pointf &point, const std::string &co
|
||||
return gcode.str();
|
||||
}
|
||||
|
||||
std::string GCodeWriter::travel_to_xyz(const Pointf3 &point, const std::string &comment)
|
||||
std::string GCodeWriter::travel_to_xyz(const Vec3d &point, const std::string &comment)
|
||||
{
|
||||
/* If target Z is lower than current Z but higher than nominal Z we
|
||||
don't perform the Z move but we only move in the XY plane and
|
||||
@@ -299,7 +299,7 @@ std::string GCodeWriter::travel_to_xyz(const Pointf3 &point, const std::string &
|
||||
if (!this->will_move_z(point(2))) {
|
||||
double nominal_z = m_pos(2) - m_lifted;
|
||||
m_lifted = m_lifted - (point(2) - nominal_z);
|
||||
return this->travel_to_xy(point.xy());
|
||||
return this->travel_to_xy(to_2d(point));
|
||||
}
|
||||
|
||||
/* In all the other cases, we perform an actual XYZ move and cancel
|
||||
@@ -373,7 +373,7 @@ std::string GCodeWriter::extrude_to_xy(const Pointf &point, double dE, const std
|
||||
return gcode.str();
|
||||
}
|
||||
|
||||
std::string GCodeWriter::extrude_to_xyz(const Pointf3 &point, double dE, const std::string &comment)
|
||||
std::string GCodeWriter::extrude_to_xyz(const Vec3d &point, double dE, const std::string &comment)
|
||||
{
|
||||
m_pos = point;
|
||||
m_lifted = 0;
|
||||
|
||||
Reference in New Issue
Block a user