improve seam performance (#5436)

This commit is contained in:
SoftFever
2024-05-23 22:03:28 +08:00
committed by GitHub
parent 0a7f787e30
commit b665dfb35d
2 changed files with 3 additions and 3 deletions

View File

@@ -1073,7 +1073,7 @@ void SeamPlacer::calculate_overhangs_and_layer_embedding(const PrintObject *po)
if (prev_layer_distancer.get() != nullptr) {
const auto _dist = prev_layer_distancer->distance_from_lines<true>(point.cast<double>());
perimeter_point.overhang = _dist
+ 0.6f * perimeter_point.perimeter.flow_width
+ 0.65f * perimeter_point.perimeter.flow_width
- tan(SeamPlacer::overhang_angle_threshold)
* po->layers()[layer_idx]->height;
perimeter_point.overhang =
@@ -1083,7 +1083,7 @@ void SeamPlacer::calculate_overhangs_and_layer_embedding(const PrintObject *po)
if (should_compute_layer_embedding) { // search for embedded perimeter points (points hidden inside the print ,e.g. multimaterial join, best position for seam)
perimeter_point.embedded_distance = current_layer_distancer->distance_from_lines<true>(point.cast<double>())
+ 0.6f * perimeter_point.perimeter.flow_width;
+ 0.65f * perimeter_point.perimeter.flow_width;
}
}