ENH: reopen confilctchecker with adpative height.

and fix conflict checking when the wipe tower's brim fully encloses the model

jira: STUDIO-10237, STUDIO-10296
Change-Id: I6e2a6640c06ddb6b3af700c9048fa26434411631
(cherry picked from commit b36c41e5146168325d8b7ec966eb97f1062442a7)
This commit is contained in:
jiangkai.zhao
2025-02-17 11:47:41 +08:00
committed by Noisyfox
parent d1d04d395e
commit 820f12a16b
5 changed files with 61 additions and 39 deletions

View File

@@ -225,16 +225,15 @@ ConflictResultOpt ConflictChecker::find_inter_of_lines_in_diff_objs(PrintObjectP
if (wtdptr.has_value()) { // wipe tower at 0 by default
//auto wtpaths = wtdptr.value()->getFakeExtrusionPathsFromWipeTower();
auto wtpaths = wtdptr.value()->getTrueExtrusionPathsFromWipeTower();
ExtrusionLayers wtels;
wtels.type = ExtrusionLayersType::WIPE_TOWER;
for (int i = 0; i < wtpaths.size(); ++i) { // assume that wipe tower always has same height
ExtrusionLayer el;
el.paths = wtpaths[i];
el.bottom_z = wtpaths[i].front().height * (float) i;
el.layer = nullptr;
wtels.push_back(el);
}
ExtrusionLayers wtels = wtdptr.value()->getTrueExtrusionLayersFromWipeTower();
//wtels.type = ExtrusionLayersType::WIPE_TOWER;
//for (int i = 0; i < wtpaths.size(); ++i) { // assume that wipe tower always has same height
// ExtrusionLayer el;
// el.paths = wtpaths[i];
// el.bottom_z = wtpaths[i].front().height * (float) i;
// el.layer = nullptr;
// wtels.push_back(el);
//}
conflictQueue.emplace_back_bucket(std::move(wtels), wtdptr.value(), {wtdptr.value()->plate_origin.x(), wtdptr.value()->plate_origin.y()});
}
for (PrintObject *obj : objs) {