From e606a8608519583a4bf5c9d1d4be808cd58d8586 Mon Sep 17 00:00:00 2001 From: "zhimin.zeng" Date: Sat, 24 May 2025 15:23:21 +0800 Subject: [PATCH] FIX: fix the value of margin jira: STUDIO-11817 Change-Id: I086eed22c9f474f59ce5b1aac4012815750ead5e --- src/libslic3r/libslic3r.h | 3 ++- src/slic3r/GUI/PartPlate.cpp | 2 +- src/slic3r/GUI/Selection.cpp | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libslic3r/libslic3r.h b/src/libslic3r/libslic3r.h index 5c7829abb..51a314084 100644 --- a/src/libslic3r/libslic3r.h +++ b/src/libslic3r/libslic3r.h @@ -74,7 +74,8 @@ static constexpr double INSET_OVERLAP_TOLERANCE = 0.4; //FIXME This is quite a lot. static constexpr double EXTERNAL_INFILL_MARGIN = 3; static constexpr double BRIDGE_INFILL_MARGIN = 1; -static constexpr double WIPE_TOWER_MARGIN = 0.2; +static constexpr double WIPE_TOWER_MARGIN = 15.; +static constexpr double WIPE_TOWER_MARGIN_AFTER_SLICING = 0.2; //FIXME Better to use an inline function with an explicit return type. //inline coord_t scale_(coordf_t v) { return coord_t(floor(v / SCALING_FACTOR + 0.5f)); } #define scale_(val) ((val) / SCALING_FACTOR) diff --git a/src/slic3r/GUI/PartPlate.cpp b/src/slic3r/GUI/PartPlate.cpp index 755af8706..e3b801bf5 100644 --- a/src/slic3r/GUI/PartPlate.cpp +++ b/src/slic3r/GUI/PartPlate.cpp @@ -3765,7 +3765,7 @@ void PartPlateList::set_default_wipe_tower_pos_for_plate(int plate_idx, bool ini y = I3_WIPE_TOWER_DEFAULT_Y_POS; } - const float margin = 15; // old WIPE_TOWER_MARGIN, keep the same value + const float margin = WIPE_TOWER_MARGIN; PartPlate* part_plate = get_plate(plate_idx); Vec3d plate_origin = part_plate->get_origin(); BoundingBoxf3 plate_bbox = part_plate->get_bounding_box(); diff --git a/src/slic3r/GUI/Selection.cpp b/src/slic3r/GUI/Selection.cpp index d490ddc77..42038fef0 100644 --- a/src/slic3r/GUI/Selection.cpp +++ b/src/slic3r/GUI/Selection.cpp @@ -1214,9 +1214,8 @@ void Selection::translate(const Vec3d &displacement, TransformationType transfor Vec3d tower_origin = m_cache.volumes_data[i].get_volume_position(); Vec3d actual_displacement = displacement; bool show_read_wipe_tower = wxGetApp().plater()->get_partplate_list().get_plate(plate_idx)->fff_print()->is_step_done(psWipeTower); - float brim_width = wxGetApp().preset_bundle->prints.get_edited_preset().config.opt_float("prime_tower_brim_width"); - const double margin = show_read_wipe_tower ? WIPE_TOWER_MARGIN : brim_width + 0.5; // 0.5 is the line width of wipe tower + const double margin = show_read_wipe_tower ? WIPE_TOWER_MARGIN_AFTER_SLICING : WIPE_TOWER_MARGIN; actual_displacement = (m_cache.volumes_data[i].get_instance_rotation_matrix() * m_cache.volumes_data[i].get_instance_scale_matrix() * m_cache.volumes_data[i].get_instance_mirror_matrix())