mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-22 03:36:36 +00:00
* Remove unused `get_printer_preset` calls. * `Plater::check_printer_initialized` should skip nozzle flow type checks if nozzle is unknown. Also remove unnecessary `is_multi_extruders` check. * Remove unused `CalibUtils::is_same_nozzle_diameters()` fn. * Simplify `CalibUtils::check_printable_status_before_cali`. The single-arity can delegate to the vectorized arity. * Add `DevExtruderSystem::NozzleDiameterMatchesOrUnknown` to simply checks. * Update `CalibrationPresetPage::update_sync_button_status()` to use `NozzleDiameterMatchesOrUnknown`. Simplify logic by iterating over each extruder and checking for diameter and volume type match. The previous code had several mistakes (from what I could tell): - `curr_obj->is_multi_extruders()` doesn't imply exactly 2 extruders - the single/multi branch served no purpose - the single branch failed to check the volume type * Specify `std::fabs` and add explicit import. Ref: https://github.com/OrcaSlicer/OrcaSlicer/pull/13330#discussion_r3133613736 Not sure how idiomatic this is in C++ / OrcaSlicer codebase, but CoPilot suggested it and it seems reasonable. --------- Co-authored-by: SoftFever <softfeverever@gmail.com>