ENH:add rib wall wipe tower

jira: none

Change-Id: I9699cc74e206851284949f89230e986435b9e1b7
(cherry picked from commit eabfa6b272590698886ecec33b89207605b91993)
(cherry picked from commit 1d33d1c37d4dada1cd1129ff16fe46d07933ad26)
This commit is contained in:
jiangkai.zhao
2025-01-17 16:45:50 +08:00
committed by Noisyfox
parent 606d28dc26
commit 16731a90b0
13 changed files with 934 additions and 89 deletions

View File

@@ -299,6 +299,10 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|| opt_key == "prime_tower_brim_width"
|| opt_key == "prime_tower_outer_first"
|| opt_key == "prime_tower_skip_points"
|| opt_key == "prime_tower_rib_wall"
|| opt_key == "prime_tower_extra_rib_length"
|| opt_key == "prime_tower_rib_width"
|| opt_key == "prime_tower_fillet_wall"
|| opt_key == "first_layer_print_sequence"
|| opt_key == "other_layers_print_sequence"
|| opt_key == "other_layers_print_sequence_nums"
@@ -2257,6 +2261,7 @@ void Print::process(long long *time_cost_with_cache, bool use_cache)
std::optional<const FakeWipeTower *> wipe_tower_opt = {};
if (this->has_wipe_tower()) {
m_fake_wipe_tower.set_pos({m_config.wipe_tower_x.get_at(m_plate_index), m_config.wipe_tower_y.get_at(m_plate_index)});
m_fake_wipe_tower.set_bbx();
wipe_tower_opt = std::make_optional<const FakeWipeTower *>(&m_fake_wipe_tower);
}
auto conflictRes = ConflictChecker::find_inter_of_lines_in_diff_objs(m_objects, wipe_tower_opt);
@@ -2980,6 +2985,7 @@ void Print::_make_wipe_tower()
wipe_tower.generate_new(m_wipe_tower_data.tool_changes);
m_wipe_tower_data.depth = wipe_tower.get_depth();
m_wipe_tower_data.brim_width = wipe_tower.get_brim_width();
m_wipe_tower_data.bbx = wipe_tower.get_bbx();
// Unload the current filament over the purge tower.
coordf_t layer_height = m_objects.front()->config().layer_height.value;
@@ -3006,6 +3012,8 @@ void Print::_make_wipe_tower()
m_fake_wipe_tower.set_fake_extrusion_data(wipe_tower.position(), wipe_tower.width(), wipe_tower.get_height(),
wipe_tower.get_layer_height(), m_wipe_tower_data.depth, m_wipe_tower_data.brim_width,
{scale_(origin.x()), scale_(origin.y())});
m_fake_wipe_tower.real_bbx = wipe_tower.get_bbx();
m_config.prime_tower_width.set(new ConfigOptionFloat( wipe_tower.width()));
} else {
// Get wiping matrix to get number of extruders and convert vector<double> to vector<float>:
std::vector<float> flush_matrix(cast<float>(m_config.flush_volumes_matrix.values));