mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-10 02:37:04 +00:00
Shorten wipe tower guard comments
This commit is contained in:
@@ -3951,9 +3951,7 @@ int CLI::run(int argc, char **argv)
|
|||||||
ConfigOptionFloats *wipe_x_option = dynamic_cast<ConfigOptionFloats *>(print_config.option("wipe_tower_x"));
|
ConfigOptionFloats *wipe_x_option = dynamic_cast<ConfigOptionFloats *>(print_config.option("wipe_tower_x"));
|
||||||
ConfigOptionFloats *wipe_y_option = dynamic_cast<ConfigOptionFloats *>(print_config.option("wipe_tower_y"));
|
ConfigOptionFloats *wipe_y_option = dynamic_cast<ConfigOptionFloats *>(print_config.option("wipe_tower_y"));
|
||||||
|
|
||||||
// get_at() clamps an out-of-range index to entry 0 instead of erroring, which
|
// get_at() silently clamps an out-of-range index to entry 0 - make the reuse visible
|
||||||
// would silently reuse another plate's wipe tower position here. Warn so a mismatched
|
|
||||||
// wipe_tower_x/y array (e.g. from a project saved before this plate was added) is visible.
|
|
||||||
if (static_cast<size_t>(plate_index) >= wipe_x_option->values.size() || static_cast<size_t>(plate_index) >= wipe_y_option->values.size()) {
|
if (static_cast<size_t>(plate_index) >= wipe_x_option->values.size() || static_cast<size_t>(plate_index) >= wipe_y_option->values.size()) {
|
||||||
BOOST_LOG_TRIVIAL(warning) << boost::format("plate %1%: wipe_tower_x/y only has %2%/%3% entries, reusing entry 0's position")
|
BOOST_LOG_TRIVIAL(warning) << boost::format("plate %1%: wipe_tower_x/y only has %2%/%3% entries, reusing entry 0's position")
|
||||||
%(plate_index+1) %wipe_x_option->values.size() %wipe_y_option->values.size();
|
%(plate_index+1) %wipe_x_option->values.size() %wipe_y_option->values.size();
|
||||||
@@ -5548,11 +5546,8 @@ int CLI::run(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
finished_arrange = true;
|
finished_arrange = true;
|
||||||
}
|
}
|
||||||
// CLI has no m_plater, so PartPlateList::create_plate() never backfills
|
// CLI-created overflow plates get no wipe_tower_x/y backfill (that is GUI-only) -
|
||||||
// wipe_tower_x/y for plates created here during arrange overflow (unlike GUI's
|
// keep the arrays sized to the plate count so per-plate get_at() stays in range.
|
||||||
// set_default_wipe_tower_pos_for_plate()). Keep both arrays sized to the actual
|
|
||||||
// plate count so a later per-plate get_at() never silently reuses another plate's
|
|
||||||
// wipe tower position via ConfigOptionVector's out-of-range clamp.
|
|
||||||
{
|
{
|
||||||
int final_plate_count = partplate_list.get_plate_count();
|
int final_plate_count = partplate_list.get_plate_count();
|
||||||
ConfigOptionFloats* wipe_x_opt = m_print_config.option<ConfigOptionFloats>("wipe_tower_x");
|
ConfigOptionFloats* wipe_x_opt = m_print_config.option<ConfigOptionFloats>("wipe_tower_x");
|
||||||
|
|||||||
Reference in New Issue
Block a user