mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-03 06:30:40 +08:00
Auto align z preference (#4218)
* Add preference to disable auto alignment to the z plane * Make it clear auto-center preference only effects x,y
This commit is contained in:
parent
02b5014b57
commit
b5276e6e25
@ -84,6 +84,7 @@ our $Settings = {
|
|||||||
_ => {
|
_ => {
|
||||||
version_check => 1,
|
version_check => 1,
|
||||||
autocenter => 1,
|
autocenter => 1,
|
||||||
|
autoalignz => 1,
|
||||||
invert_zoom => 0,
|
invert_zoom => 0,
|
||||||
background_processing => 0,
|
background_processing => 0,
|
||||||
threads => $Slic3r::Config::Options->{threads}{default},
|
threads => $Slic3r::Config::Options->{threads}{default},
|
||||||
|
@ -1265,13 +1265,17 @@ sub load_model_objects {
|
|||||||
# if user turned autocentering off, automatic arranging would disappoint them
|
# if user turned autocentering off, automatic arranging would disappoint them
|
||||||
$need_arrange = 0;
|
$need_arrange = 0;
|
||||||
|
|
||||||
|
if ($Slic3r::GUI::Settings->{_}{autoalignz}) {
|
||||||
$o->align_to_ground; # aligns object to Z = 0
|
$o->align_to_ground; # aligns object to Z = 0
|
||||||
|
}
|
||||||
$o->add_instance();
|
$o->add_instance();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if ($Slic3r::GUI::Settings->{_}{autoalignz}) {
|
||||||
# if object has defined positions we still need to ensure it's aligned to Z = 0
|
# if object has defined positions we still need to ensure it's aligned to Z = 0
|
||||||
$o->align_to_ground;
|
$o->align_to_ground;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
# if the object is too large (more than 5 times the bed), scale it down
|
# if the object is too large (more than 5 times the bed), scale it down
|
||||||
|
@ -38,10 +38,17 @@ sub new {
|
|||||||
$optgroup->append_single_option_line(Slic3r::GUI::OptionsGroup::Option->new(
|
$optgroup->append_single_option_line(Slic3r::GUI::OptionsGroup::Option->new(
|
||||||
opt_id => 'autocenter',
|
opt_id => 'autocenter',
|
||||||
type => 'bool',
|
type => 'bool',
|
||||||
label => 'Auto-center parts',
|
label => 'Auto-center parts (x,y)',
|
||||||
tooltip => 'If this is enabled, Slic3r will auto-center objects around the print bed center.',
|
tooltip => 'If this is enabled, Slic3r will auto-center objects around the print bed center.',
|
||||||
default => $Slic3r::GUI::Settings->{_}{autocenter},
|
default => $Slic3r::GUI::Settings->{_}{autocenter},
|
||||||
));
|
));
|
||||||
|
$optgroup->append_single_option_line(Slic3r::GUI::OptionsGroup::Option->new(
|
||||||
|
opt_id => 'autoalignz',
|
||||||
|
type => 'bool',
|
||||||
|
label => 'Auto-align parts (z=0)',
|
||||||
|
tooltip => 'If this is enabled, Slic3r will auto-align objects z value to be on the print bed at z=0.',
|
||||||
|
default => $Slic3r::GUI::Settings->{_}{autoalignz},
|
||||||
|
));
|
||||||
$optgroup->append_single_option_line(Slic3r::GUI::OptionsGroup::Option->new(
|
$optgroup->append_single_option_line(Slic3r::GUI::OptionsGroup::Option->new(
|
||||||
opt_id => 'invert_zoom',
|
opt_id => 'invert_zoom',
|
||||||
type => 'bool',
|
type => 'bool',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user