mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 13:25:56 +08:00
SPE-2577 - Fixed processing of gcodes when using absolute values for E (#13623)
This commit is contained in:
parent
9aed420c33
commit
47bba48b34
@ -2844,12 +2844,13 @@ void GCodeProcessor::process_G1(const std::array<std::optional<double>, 4>& axes
|
||||
&& m_extrusion_role != GCodeExtrusionRole::OverhangPerimeter
|
||||
)
|
||||
)) {
|
||||
const Vec3f curr_pos(m_end_position[X], m_end_position[Y], m_end_position[Z]);
|
||||
const AxisCoords curr_pos = m_end_position;
|
||||
const Vec3f new_pos = m_result.moves.back().position - m_extruder_offsets[m_extruder_id];
|
||||
|
||||
m_end_position = create_axis_coords(new_pos + m_z_offset * Vec3f::UnitZ());
|
||||
for (unsigned char a = X; a < E; ++a) {
|
||||
m_end_position[a] = double(new_pos[a]);
|
||||
}
|
||||
store_move_vertex(EMoveType::Seam);
|
||||
m_end_position = create_axis_coords(curr_pos);
|
||||
m_end_position = curr_pos;
|
||||
|
||||
m_seams_detector.activate(false);
|
||||
} else if (type == EMoveType::Extrude && m_extrusion_role == GCodeExtrusionRole::ExternalPerimeter) {
|
||||
|
@ -779,10 +779,6 @@ namespace Slic3r {
|
||||
|
||||
double extract_absolute_position_on_axis(Axis axis, const GCodeReader::GCodeLine& line, double area_filament_cross_section);
|
||||
|
||||
AxisCoords create_axis_coords(const Vec3f &vec) {
|
||||
return AxisCoords{vec[0], vec[1], vec[2], 0};
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
} /* namespace Slic3r */
|
||||
|
Loading…
x
Reference in New Issue
Block a user