ENH: add new arrangement features for wrapping detection area

Jira: STUDIO-13735

Change-Id: I198d19f5e6ef70f0adfa6370269290c81d21a557
(cherry picked from commit dc83637652526111611d0833d5f5798aaa3e7be7)
This commit is contained in:
shan.chang
2025-08-04 21:44:39 +08:00
committed by Noisyfox
parent 942d023a1e
commit bd066e7f96
11 changed files with 127 additions and 31 deletions

View File

@@ -3431,6 +3431,7 @@ int CLI::run(int argc, char **argv)
//use Pointfs insteadof Points
Pointfs current_printable_area = m_print_config.opt<ConfigOptionPoints>("printable_area")->values;
Pointfs current_exclude_area = m_print_config.opt<ConfigOptionPoints>("bed_exclude_area")->values;
Pointfs current_wrapping_exclude_area = m_print_config.opt<ConfigOptionPoints>("wrapping_exclude_area", true)->values;
std::vector<Pointfs> current_extruder_areas;
//update part plate's size
double print_height = m_print_config.opt_float("printable_height");
@@ -3497,7 +3498,8 @@ int CLI::run(int argc, char **argv)
else {
partplate_list.reset_size(old_printable_width, old_printable_depth, old_printable_height, false);
}
partplate_list.set_shapes(make_counter_clockwise(current_printable_area), current_exclude_area, current_extruder_areas, current_extruder_print_heights, bed_texture, height_to_lid, height_to_rod);
partplate_list.set_shapes(make_counter_clockwise(current_printable_area), current_exclude_area, current_wrapping_exclude_area, current_extruder_areas, current_extruder_print_heights, bed_texture,
height_to_lid, height_to_rod);
//plate_stride = partplate_list.plate_stride_x();
}
@@ -4426,7 +4428,7 @@ int CLI::run(int argc, char **argv)
}
// add the virtual object into unselect list if has
partplate_list.preprocess_exclude_areas(unselected, i + 1);
partplate_list.preprocess_exclude_areas(unselected, enable_wrapping_detect, i + 1);
if (avoid_extrusion_cali_region)
partplate_list.preprocess_nonprefered_areas(unselected, i + 1);
@@ -4454,7 +4456,7 @@ int CLI::run(int argc, char **argv)
beds = get_shrink_bedpts(&m_print_config, arrange_cfg);
partplate_list.preprocess_exclude_areas(arrange_cfg.excluded_regions, 1, scale_(1));
partplate_list.preprocess_exclude_areas(arrange_cfg.excluded_regions, enable_wrapping_detect, 1, scale_(1));
{
BOOST_LOG_TRIVIAL(debug) << "arrange bedpts:" << beds[0].transpose() << ", " << beds[1].transpose() << ", " << beds[2].transpose() << ", " << beds[3].transpose();
@@ -4663,7 +4665,7 @@ int CLI::run(int argc, char **argv)
}
//add the virtual object into unselect list if has
partplate_list.preprocess_exclude_areas(unselected);
partplate_list.preprocess_exclude_areas(unselected, enable_wrapping_detect);
if (used_filament_set.size() > 0)
{
@@ -4877,7 +4879,7 @@ int CLI::run(int argc, char **argv)
}
// add the virtual object into unselect list if has
partplate_list.preprocess_exclude_areas(unselected, plate_to_slice);
partplate_list.preprocess_exclude_areas(unselected, enable_wrapping_detect, plate_to_slice);
}
@@ -4905,7 +4907,7 @@ int CLI::run(int argc, char **argv)
beds=get_shrink_bedpts(&m_print_config, arrange_cfg);
partplate_list.preprocess_exclude_areas(arrange_cfg.excluded_regions, 1, scale_(1));
partplate_list.preprocess_exclude_areas(arrange_cfg.excluded_regions, enable_wrapping_detect, 1, scale_(1));
{
BOOST_LOG_TRIVIAL(debug) << "arrange bedpts:" << beds[0].transpose() << ", " << beds[1].transpose() << ", " << beds[2].transpose() << ", " << beds[3].transpose();