mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-21 20:25:20 +00:00
Fix auto-arrangement boundary for skirt loops (#12999)
https://github.com/bambulab/BambuStudio/pull/10086
This commit is contained in:
@@ -10949,8 +10949,32 @@ bool has_skirt(const DynamicPrintConfig& cfg)
|
|||||||
|| (opt_draft_shield && opt_draft_shield->getInt() != dsDisabled);
|
|| (opt_draft_shield && opt_draft_shield->getInt() != dsDisabled);
|
||||||
}
|
}
|
||||||
float get_real_skirt_dist(const DynamicPrintConfig& cfg) {
|
float get_real_skirt_dist(const DynamicPrintConfig& cfg) {
|
||||||
return has_skirt(cfg) ? cfg.opt_float("skirt_distance") : 0;
|
if (!has_skirt(cfg)) return 0.f;
|
||||||
|
|
||||||
|
float dist = cfg.opt_float("skirt_distance");
|
||||||
|
|
||||||
|
int loops = cfg.opt_int("skirt_loops");
|
||||||
|
auto opt_draft_shield = cfg.option("draft_shield");
|
||||||
|
if (opt_draft_shield && opt_draft_shield->getInt() != dsDisabled && loops == 0) {
|
||||||
|
loops = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
float width = cfg.opt_float("initial_layer_line_width");
|
||||||
|
if (width <= 0.f) {
|
||||||
|
width = cfg.opt_float("line_width");
|
||||||
|
}
|
||||||
|
if (width <= 0.f) {
|
||||||
|
auto* nd = cfg.opt<ConfigOptionFloats>("nozzle_diameter");
|
||||||
|
if (nd && !nd->values.empty()) {
|
||||||
|
width = *std::max_element(nd->values.begin(), nd->values.end());
|
||||||
|
} else {
|
||||||
|
width = 0.4f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return dist + loops * width;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool is_XL_printer(const std::string& printer_notes)
|
static bool is_XL_printer(const std::string& printer_notes)
|
||||||
{
|
{
|
||||||
return boost::algorithm::contains(printer_notes, "PRINTER_VENDOR_PRUSA3D")
|
return boost::algorithm::contains(printer_notes, "PRINTER_VENDOR_PRUSA3D")
|
||||||
|
|||||||
Reference in New Issue
Block a user