mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-19 06:41:14 -06:00
FIX: avoid wipe tower conflict with objects
Use a more accurate way to estimate wipe tower: 1. read wipe configure from front-end (the positions may be different at different plates). 2. when depth is unavailable, use all materials to estimate depth (the estimated wipe tower may be larger than the actual generated one). Change-Id: I42ffd03d9817b57f5023a6820cda0032509c6fe5 (cherry picked from commit 77ba9757023afb9160c996eeea6ead8a27b50ce4)
This commit is contained in:
parent
67d95d3fc8
commit
dd473bdc3f
6 changed files with 71 additions and 35 deletions
|
@ -545,11 +545,11 @@ public:
|
|||
|
||||
auto binbb = sl::boundingBox(m_bin);
|
||||
// BBS: excluded region (virtual object but not wipe tower) should not affect final alignment
|
||||
bool all_is_excluded_region = std::all_of(items.begin(), items.end(), [](Item &itm) { return itm.is_virt_object && !itm.is_wipe_tower; });
|
||||
if (!all_is_excluded_region)
|
||||
cfg.alignment = PConfig::Alignment::DONT_ALIGN;
|
||||
else
|
||||
cfg.alignment = PConfig::Alignment::CENTER;
|
||||
//bool all_is_excluded_region = std::all_of(items.begin(), items.end(), [](Item &itm) { return itm.is_virt_object && !itm.is_wipe_tower; });
|
||||
//if (!all_is_excluded_region)
|
||||
// cfg.alignment = PConfig::Alignment::DONT_ALIGN;
|
||||
//else
|
||||
// cfg.alignment = PConfig::Alignment::CENTER;
|
||||
|
||||
auto starting_point = cfg.starting_point == PConfig::Alignment::BOTTOM_LEFT ? binbb.minCorner() : binbb.center();
|
||||
// if we have wipe tower, items should be arranged around wipe tower
|
||||
|
|
|
@ -3360,18 +3360,20 @@ void ModelInstance::get_arrange_polygon(void *ap, const Slic3r::DynamicPrintConf
|
|||
return;
|
||||
}
|
||||
ret.extrude_ids = volume->get_extruders();
|
||||
if (ret.extrude_ids.empty()) //the default extruder
|
||||
ret.extrude_ids.push_back(1);
|
||||
|
||||
// get per-object support extruders
|
||||
auto op = object->get_config_value<ConfigOptionBool>(config_global, "enable_support");
|
||||
bool is_support_enabled = op && op->getBool();
|
||||
if (is_support_enabled) {
|
||||
auto op1 = object->get_config_value<ConfigOptionInt>(config_global, "support_filament");
|
||||
auto op2 = object->get_config_value<ConfigOptionInt>(config_global, "support_interface_filament");
|
||||
if (op1) ret.extrude_ids.push_back(op1->getInt());
|
||||
if (op2) ret.extrude_ids.push_back(op2->getInt());
|
||||
int extruder_id;
|
||||
// id==0 means follow previous material, so need not be recorded
|
||||
if (op1 && (extruder_id = op1->getInt()) > 0) ret.extrude_ids.push_back(extruder_id);
|
||||
if (op2 && (extruder_id = op2->getInt()) > 0) ret.extrude_ids.push_back(extruder_id);
|
||||
}
|
||||
|
||||
if (ret.extrude_ids.empty()) //the default extruder
|
||||
ret.extrude_ids.push_back(1);
|
||||
}
|
||||
|
||||
indexed_triangle_set FacetsAnnotation::get_facets(const ModelVolume& mv, EnforcerBlockerType type) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue