diff --git a/src/BambuStudio.cpp b/src/BambuStudio.cpp index 2d75185a1f..947ebb896e 100644 --- a/src/BambuStudio.cpp +++ b/src/BambuStudio.cpp @@ -497,7 +497,7 @@ int CLI::run(int argc, char **argv) //BBS: add plate data related logic PlateDataPtrs plate_data_src; int arrange_option; - int plate_to_slice = 0, filament_count = 0; + int plate_to_slice = 0, filament_count = 0, duplicate_count = 0; bool first_file = true, is_bbl_3mf = false, need_arrange = true, has_thumbnails = false, up_config_to_date = false, normative_check = true; Semver file_version; std::map orients_requirement; @@ -1545,6 +1545,20 @@ int CLI::run(int argc, char **argv) m_models.clear(); m_models.emplace_back(std::move(m));*/ } + else if (opt_key == "repetitions") { + int repetitions_count = m_config.option("repetitions")->value; + if (repetitions_count <= 1) + { + BOOST_LOG_TRIVIAL(info) << "invalid repetitions value " << repetitions_count << ", just skip\n"; + } + else { + //todo + //copy model objects and instances + BOOST_LOG_TRIVIAL(info) << "repetitions value " << repetitions_count << ", will copy model object first\n"; + need_arrange = true; + duplicate_count = repetitions_count - 1; + } + } else if (opt_key == "convert_unit") { for (auto& model : m_models) { if (model.looks_like_saved_in_meters()) { diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 7f1d63ff37..a8a0b68e48 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -1462,7 +1462,7 @@ void PrintConfigDef::init_fff_params() def->max = 100; def->mode = comAdvanced; def->set_default_value(new ConfigOptionPercent(50)); - + def = this->add("default_jerk", coFloat); def->label = L("Default"); def->tooltip = L("Default jerk"); @@ -1622,7 +1622,7 @@ void PrintConfigDef::init_fff_params() def->tooltip = L("Filter out gaps smaller than the threshold specified. This setting won't affact top/bottom layers"); def->mode = comDevelop; def->set_default_value(new ConfigOptionFloat(0)); - + def = this->add("gap_infill_speed", coFloat); def->label = L("Gap infill"); def->category = L("Speed"); @@ -5043,6 +5043,12 @@ CLITransformConfigDef::CLITransformConfigDef() //def->cli = "arrange|a"; def->set_default_value(new ConfigOptionInt(0)); + def = this->add("repetitions", coInt); + def->label = L("Repetions count"); + def->tooltip = L("Repetions count of the whole model"); + def->cli_params = "count"; + def->set_default_value(new ConfigOptionInt(1)); + /*def = this->add("ensure_on_bed", coBool); def->label = L("Ensure on bed"); def->tooltip = L("Lift the object above the bed when it is partially below. Enabled by default, use --no-ensure-on-bed to disable.");