FIX: fix the value of margin

jira: STUDIO-11817
Change-Id: I086eed22c9f474f59ce5b1aac4012815750ead5e
This commit is contained in:
zhimin.zeng 2025-05-24 15:23:21 +08:00 committed by lane.wei
parent 3e2e115e0e
commit e606a86085
3 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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();

View File

@ -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())