mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Mostly refactoring of the wipe tower improvements
- setting of the wipe tower parameters based od whether SE MM printer is selected is done in the WipeTowerPrusaMM constructor, so it does not distract in Print.cpp - WipeTowerPrusaMM.cpp conditions checking for SE MM printer are now using a more descriptive const member variable, not the loading/unloading speeds (hopefully the functionality is the same)
This commit is contained in:
parent
da1aea889f
commit
9df93c0125
3 changed files with 51 additions and 76 deletions
|
@ -1789,78 +1789,40 @@ void Print::_make_wipe_tower()
|
|||
}
|
||||
}
|
||||
this->throw_if_canceled();
|
||||
|
||||
bool semm = m_config.single_extruder_multi_material.value;
|
||||
float cooling_tube_retraction = 0.0;
|
||||
float cooling_tube_length = 0.0;
|
||||
float parking_pos_retraction = 0.0;
|
||||
bool extra_loading_move = 0.0;
|
||||
bool high_current_on_filament_swap = false;
|
||||
|
||||
if (semm) {
|
||||
cooling_tube_retraction = float(m_config.cooling_tube_retraction.value);
|
||||
cooling_tube_length = float(m_config.cooling_tube_length.value);
|
||||
parking_pos_retraction = float(m_config.parking_pos_retraction.value);
|
||||
extra_loading_move = float(m_config.extra_loading_move.value);
|
||||
high_current_on_filament_swap = m_config.high_current_on_filament_swap.value;
|
||||
}
|
||||
|
||||
// Initialize the wipe tower.
|
||||
WipeTowerPrusaMM wipe_tower(
|
||||
m_config.single_extruder_multi_material.value,
|
||||
float(m_config.wipe_tower_x.value), float(m_config.wipe_tower_y.value),
|
||||
float(m_config.wipe_tower_width.value),
|
||||
float(m_config.wipe_tower_rotation_angle.value), cooling_tube_retraction,
|
||||
cooling_tube_length, parking_pos_retraction,
|
||||
extra_loading_move, float(m_config.wipe_tower_bridging),
|
||||
high_current_on_filament_swap, m_config.gcode_flavor, wipe_volumes,
|
||||
float(m_config.wipe_tower_rotation_angle.value), float(m_config.cooling_tube_retraction.value),
|
||||
float(m_config.cooling_tube_length.value), float(m_config.parking_pos_retraction.value),
|
||||
float(m_config.extra_loading_move.value), float(m_config.wipe_tower_bridging),
|
||||
m_config.high_current_on_filament_swap.value, m_config.gcode_flavor, wipe_volumes,
|
||||
m_wipe_tower_data.tool_ordering.first_extruder());
|
||||
|
||||
//wipe_tower.set_retract();
|
||||
//wipe_tower.set_zhop();
|
||||
|
||||
// Set the extruder & material properties at the wipe tower object.
|
||||
for (size_t i = 0; i < number_of_extruders; ++ i) {
|
||||
float loading_speed = 0.0;
|
||||
float loading_speed_start = 0.0;
|
||||
float unloading_speed = 0.0;
|
||||
float unloading_speed_start = 0.0;
|
||||
float toolchange_delay = 0.0;
|
||||
int cooling_moves = 0;
|
||||
float cooling_initial_speed = 0.0;
|
||||
float cooling_final_speed = 0.0;
|
||||
float max_volumetric_speed = 0.f;
|
||||
std::string ramming_parameters;
|
||||
|
||||
if (semm) {
|
||||
loading_speed = m_config.filament_loading_speed.get_at(i);
|
||||
loading_speed_start = m_config.filament_loading_speed_start.get_at(i);
|
||||
unloading_speed = m_config.filament_unloading_speed.get_at(i);
|
||||
unloading_speed_start = m_config.filament_unloading_speed_start.get_at(i);
|
||||
toolchange_delay = m_config.filament_toolchange_delay.get_at(i);
|
||||
cooling_moves = m_config.filament_cooling_moves.get_at(i);
|
||||
cooling_initial_speed = m_config.filament_cooling_initial_speed.get_at(i);
|
||||
cooling_final_speed = m_config.filament_cooling_final_speed.get_at(i);
|
||||
ramming_parameters = m_config.filament_ramming_parameters.get_at(i);
|
||||
max_volumetric_speed = m_config.filament_max_volumetric_speed.get_at(i);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < number_of_extruders; ++ i)
|
||||
|
||||
wipe_tower.set_extruder(
|
||||
i,
|
||||
WipeTowerPrusaMM::parse_material(m_config.filament_type.get_at(i).c_str()),
|
||||
m_config.temperature.get_at(i),
|
||||
m_config.first_layer_temperature.get_at(i),
|
||||
loading_speed,
|
||||
loading_speed_start,
|
||||
unloading_speed,
|
||||
unloading_speed_start,
|
||||
toolchange_delay,
|
||||
cooling_moves,
|
||||
cooling_initial_speed,
|
||||
cooling_final_speed,
|
||||
ramming_parameters,
|
||||
max_volumetric_speed,
|
||||
m_config.filament_loading_speed.get_at(i),
|
||||
m_config.filament_loading_speed_start.get_at(i),
|
||||
m_config.filament_unloading_speed.get_at(i),
|
||||
m_config.filament_unloading_speed_start.get_at(i),
|
||||
m_config.filament_toolchange_delay.get_at(i),
|
||||
m_config.filament_cooling_moves.get_at(i),
|
||||
m_config.filament_cooling_initial_speed.get_at(i),
|
||||
m_config.filament_cooling_final_speed.get_at(i),
|
||||
m_config.filament_ramming_parameters.get_at(i),
|
||||
m_config.filament_max_volumetric_speed.get_at(i),
|
||||
m_config.nozzle_diameter.get_at(i));
|
||||
}
|
||||
|
||||
m_wipe_tower_data.priming = Slic3r::make_unique<WipeTower::ToolChangeResult>(
|
||||
wipe_tower.prime(this->skirt_first_layer_height(), m_wipe_tower_data.tool_ordering.all_extruders(), false));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue