|
@@ -518,7 +518,6 @@ WipeTower::ToolChangeResult WipeTower::construct_tcr(WipeTowerWriter& writer,
|
|
|
|
|
|
WipeTower::WipeTower(const PrintConfig& config, const PrintRegionConfig& default_region_config, const std::vector<std::vector<float>>& wiping_matrix, size_t initial_tool) :
|
|
|
m_semm(config.single_extruder_multi_material.value),
|
|
|
- m_ramming(true), // TESTING ONLY
|
|
|
m_wipe_tower_pos(config.wipe_tower_x, config.wipe_tower_y),
|
|
|
m_wipe_tower_width(float(config.wipe_tower_width)),
|
|
|
m_wipe_tower_rotation_angle(float(config.wipe_tower_rotation_angle)),
|
|
@@ -558,9 +557,8 @@ WipeTower::WipeTower(const PrintConfig& config, const PrintRegionConfig& default
|
|
|
m_cooling_tube_length = float(config.cooling_tube_length);
|
|
|
m_parking_pos_retraction = float(config.parking_pos_retraction);
|
|
|
m_extra_loading_move = float(config.extra_loading_move);
|
|
|
- }
|
|
|
- if (m_ramming)
|
|
|
m_set_extruder_trimpot = config.high_current_on_filament_swap;
|
|
|
+ }
|
|
|
|
|
|
// Calculate where the priming lines should be - very naive test not detecting parallelograms etc.
|
|
|
const std::vector<Vec2d>& bed_points = config.bed_shape.values;
|
|
@@ -620,7 +618,7 @@ void WipeTower::set_extruder(size_t idx, const PrintConfig& config)
|
|
|
|
|
|
m_perimeter_width = nozzle_diameter * Width_To_Nozzle_Ratio; // all extruders are now assumed to have the same diameter
|
|
|
|
|
|
- if (m_ramming) {
|
|
|
+ if (m_semm) {
|
|
|
std::istringstream stream{config.filament_ramming_parameters.get_at(idx)};
|
|
|
float speed = 0.f;
|
|
|
stream >> m_filpar[idx].ramming_line_width_multiplicator >> m_filpar[idx].ramming_step_multiplicator;
|
|
@@ -628,6 +626,14 @@ void WipeTower::set_extruder(size_t idx, const PrintConfig& config)
|
|
|
m_filpar[idx].ramming_step_multiplicator /= 100;
|
|
|
while (stream >> speed)
|
|
|
m_filpar[idx].ramming_speed.push_back(speed);
|
|
|
+ } else {
|
|
|
+ // We will use the same variables internally, but the correspondence to the configuration options will be different.
|
|
|
+ float vol = config.filament_multitool_ramming_volume.get_at(idx);
|
|
|
+ float flow = config.filament_multitool_ramming_flow.get_at(idx);
|
|
|
+ m_filpar[idx].multitool_ramming = config.filament_multitool_ramming.get_at(idx);
|
|
|
+ m_filpar[idx].ramming_line_width_multiplicator = 2.;
|
|
|
+ m_filpar[idx].ramming_step_multiplicator = 1.;
|
|
|
+ m_filpar[idx].ramming_speed.resize(4 *size_t(vol/flow + 0.5f), flow);
|
|
|
}
|
|
|
|
|
|
m_used_filament_length.resize(std::max(m_used_filament_length.size(), idx + 1)); // makes sure that the vector is big enough so we don't have to check later
|
|
@@ -842,12 +848,17 @@ void WipeTower::toolchange_Unload(
|
|
|
float remaining = xr - xl ; // keeps track of distance to the next turnaround
|
|
|
float e_done = 0; // measures E move done from each segment
|
|
|
|
|
|
- if (m_ramming)
|
|
|
+ const bool do_ramming = m_semm || m_filpar[m_current_tool].multitool_ramming;
|
|
|
+
|
|
|
+ if (do_ramming) {
|
|
|
writer.travel(ramming_start_pos); // move to starting position
|
|
|
+ writer.disable_linear_advance();
|
|
|
+ }
|
|
|
else
|
|
|
writer.set_position(ramming_start_pos);
|
|
|
+
|
|
|
// if the ending point of the ram would end up in mid air, align it with the end of the wipe tower:
|
|
|
- if (m_ramming && (m_layer_info > m_plan.begin() && m_layer_info < m_plan.end() && (m_layer_info-1!=m_plan.begin() || !m_adhesion ))) {
|
|
|
+ if (do_ramming && (m_layer_info > m_plan.begin() && m_layer_info < m_plan.end() && (m_layer_info-1!=m_plan.begin() || !m_adhesion ))) {
|
|
|
|
|
|
// this is y of the center of previous sparse infill border
|
|
|
float sparse_beginning_y = 0.f;
|
|
@@ -875,11 +886,10 @@ void WipeTower::toolchange_Unload(
|
|
|
sum_of_depths += tch.required_depth;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- writer.disable_linear_advance();
|
|
|
+
|
|
|
|
|
|
// now the ramming itself:
|
|
|
- while (m_ramming && i < m_filpar[m_current_tool].ramming_speed.size())
|
|
|
+ while (do_ramming && i < m_filpar[m_current_tool].ramming_speed.size())
|
|
|
{
|
|
|
const float x = volume_to_length(m_filpar[m_current_tool].ramming_speed[i] * 0.25f, line_width, m_layer_height);
|
|
|
const float e = m_filpar[m_current_tool].ramming_speed[i] * 0.25f / filament_area(); // transform volume per sec to E move;
|
|
@@ -956,7 +966,7 @@ void WipeTower::toolchange_Unload(
|
|
|
// this is to align ramming and future wiping extrusions, so the future y-steps can be uniform from the start:
|
|
|
// the perimeter_width will later be subtracted, it is there to not load while moving over just extruded material
|
|
|
Vec2f pos = Vec2f(end_of_ramming.x(), end_of_ramming.y() + (y_step/m_extra_spacing-m_perimeter_width) / 2.f + m_perimeter_width);
|
|
|
- if (m_ramming)
|
|
|
+ if (do_ramming)
|
|
|
writer.travel(pos, 2400.f);
|
|
|
else
|
|
|
writer.set_position(pos);
|