mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-04 23:20:37 +08:00
- Turn off external motion planner when the instance is the same for layer change. - Properly set the instance shift for travel_to_first_position. Affects simple rectangular layer change.
This commit is contained in:
parent
c7d9e55808
commit
9aed420c33
@ -2583,7 +2583,13 @@ LayerResult GCodeGenerator::process_layer(
|
|||||||
*layers[instance_to_print.object_layer_to_print_id].layer());
|
*layers[instance_to_print.object_layer_to_print_id].layer());
|
||||||
this->set_origin(unscale(first_instance->shift));
|
this->set_origin(unscale(first_instance->shift));
|
||||||
|
|
||||||
m_avoid_crossing_perimeters.use_external_mp_once = true;
|
const GCode::PrintObjectInstance next_instance{
|
||||||
|
&instances_to_print.front().print_object,
|
||||||
|
int(instances_to_print.front().instance_id)
|
||||||
|
};
|
||||||
|
if (m_current_instance != next_instance) {
|
||||||
|
m_avoid_crossing_perimeters.use_external_mp_once = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gcode += this->change_layer(previous_layer_z, print_z, result.spiral_vase_enable, first_point.head<2>(), first_layer); // this will increase m_layer_index
|
gcode += this->change_layer(previous_layer_z, print_z, result.spiral_vase_enable, first_point.head<2>(), first_layer); // this will increase m_layer_index
|
||||||
@ -2677,12 +2683,23 @@ LayerResult GCodeGenerator::process_layer(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!this->m_moved_to_first_layer_point) {
|
if (!this->m_moved_to_first_layer_point) {
|
||||||
gcode += this->travel_to_first_position(first_point, print_z, ExtrusionRole::Mixed, [this]() {
|
const Point shift{first_instance->shift};
|
||||||
|
this->set_origin(unscale(shift));
|
||||||
|
|
||||||
|
const GCode::PrintObjectInstance next_instance{
|
||||||
|
&instances_to_print.front().print_object,
|
||||||
|
int(instances_to_print.front().instance_id)
|
||||||
|
};
|
||||||
|
if (m_current_instance != next_instance) {
|
||||||
|
m_avoid_crossing_perimeters.use_external_mp_once = true;
|
||||||
|
}
|
||||||
|
gcode += this->travel_to_first_position(first_point - to_3d(shift, 0), print_z, ExtrusionRole::Mixed, [this]() {
|
||||||
if (m_writer.multiple_extruders) {
|
if (m_writer.multiple_extruders) {
|
||||||
return std::string{""};
|
return std::string{""};
|
||||||
}
|
}
|
||||||
return m_label_objects.maybe_change_instance(m_writer);
|
return m_label_objects.maybe_change_instance(m_writer);
|
||||||
});
|
});
|
||||||
|
this->set_origin({0, 0});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!extruder_extrusions.skirt.empty()) {
|
if (!extruder_extrusions.skirt.empty()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user