Follow-up of bc81c22e
(renamed the new CLI option --dont-ensure-on-bed to avoid double negatives)
This commit is contained in:
parent
7fd9a9cf6e
commit
e76b54b770
2 changed files with 7 additions and 9 deletions
src
|
@ -258,7 +258,6 @@ int CLI::run(int argc, char **argv)
|
||||||
Points bed = get_bed_shape(m_print_config);
|
Points bed = get_bed_shape(m_print_config);
|
||||||
ArrangeParams arrange_cfg;
|
ArrangeParams arrange_cfg;
|
||||||
arrange_cfg.min_obj_distance = scaled(min_object_distance(m_print_config));
|
arrange_cfg.min_obj_distance = scaled(min_object_distance(m_print_config));
|
||||||
bool user_ensure_on_bed = true;
|
|
||||||
|
|
||||||
for (auto const &opt_key : m_transforms) {
|
for (auto const &opt_key : m_transforms) {
|
||||||
if (opt_key == "merge") {
|
if (opt_key == "merge") {
|
||||||
|
@ -331,10 +330,8 @@ int CLI::run(int argc, char **argv)
|
||||||
}
|
}
|
||||||
} else if (opt_key == "dont_arrange") {
|
} else if (opt_key == "dont_arrange") {
|
||||||
// do nothing - this option alters other transform options
|
// do nothing - this option alters other transform options
|
||||||
} else if (opt_key == "dont_ensure_on_bed") {
|
} else if (opt_key == "ensure_on_bed") {
|
||||||
// Remember that we saw this so we don't lift objects from the bed
|
// do nothing, the value is used later
|
||||||
// after the other transformations are processed.
|
|
||||||
user_ensure_on_bed = false;
|
|
||||||
} else if (opt_key == "rotate") {
|
} else if (opt_key == "rotate") {
|
||||||
for (auto &model : m_models)
|
for (auto &model : m_models)
|
||||||
for (auto &o : model.objects)
|
for (auto &o : model.objects)
|
||||||
|
@ -439,7 +436,7 @@ int CLI::run(int argc, char **argv)
|
||||||
|
|
||||||
// All transforms have been dealt with. Now ensure that the objects are on bed.
|
// All transforms have been dealt with. Now ensure that the objects are on bed.
|
||||||
// (Unless the user said otherwise.)
|
// (Unless the user said otherwise.)
|
||||||
if (user_ensure_on_bed)
|
if (m_config.opt_bool("ensure_on_bed"))
|
||||||
for (auto &model : m_models)
|
for (auto &model : m_models)
|
||||||
for (auto &o : model.objects)
|
for (auto &o : model.objects)
|
||||||
o->ensure_on_bed();
|
o->ensure_on_bed();
|
||||||
|
|
|
@ -4154,9 +4154,10 @@ CLITransformConfigDef::CLITransformConfigDef()
|
||||||
def->label = L("Don't arrange");
|
def->label = L("Don't arrange");
|
||||||
def->tooltip = L("Do not rearrange the given models before merging and keep their original XY coordinates.");
|
def->tooltip = L("Do not rearrange the given models before merging and keep their original XY coordinates.");
|
||||||
|
|
||||||
def = this->add("dont_ensure_on_bed", coBool);
|
def = this->add("ensure_on_bed", coBool);
|
||||||
def->label = L("Don't ensure on bed");
|
def->label = L("Ensure on bed");
|
||||||
def->tooltip = L("Do not lift the object above the bed when it is partially below.");
|
def->tooltip = L("Lift the object above the bed when it is partially below. Enabled by default, use --no-ensure-on-bed to disable.");
|
||||||
|
def->set_default_value(new ConfigOptionBool(true));
|
||||||
|
|
||||||
def = this->add("duplicate", coInt);
|
def = this->add("duplicate", coInt);
|
||||||
def->label = L("Duplicate");
|
def->label = L("Duplicate");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue