mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 01:15:55 +08:00
Fixed objects bigger than print volume set as sinking after calling 'Scale to print volume' command - SPE-1155
This commit is contained in:
parent
373ea7ce75
commit
80324de45d
@ -954,7 +954,7 @@ void Selection::scale(const Vec3d& scale, TransformationType transformation_type
|
|||||||
#if ENABLE_ENHANCED_PRINT_VOLUME_FIT
|
#if ENABLE_ENHANCED_PRINT_VOLUME_FIT
|
||||||
void Selection::scale_to_fit_print_volume(const BuildVolume& volume)
|
void Selection::scale_to_fit_print_volume(const BuildVolume& volume)
|
||||||
{
|
{
|
||||||
auto fit = [this](double s, const Vec3d& offset) {
|
auto fit = [this](double s, Vec3d offset) {
|
||||||
if (s <= 0.0 || s == 1.0)
|
if (s <= 0.0 || s == 1.0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -972,6 +972,7 @@ void Selection::scale_to_fit_print_volume(const BuildVolume& volume)
|
|||||||
|
|
||||||
// center selection on print bed
|
// center selection on print bed
|
||||||
start_dragging();
|
start_dragging();
|
||||||
|
offset.z() = -get_bounding_box().min.z();
|
||||||
translate(offset);
|
translate(offset);
|
||||||
wxGetApp().plater()->canvas3D()->do_move(""); // avoid storing another snapshot
|
wxGetApp().plater()->canvas3D()->do_move(""); // avoid storing another snapshot
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user