mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 02:07:54 -06:00
improve seam performance (#5436)
This commit is contained in:
parent
0a7f787e30
commit
b665dfb35d
2 changed files with 3 additions and 3 deletions
|
@ -1073,7 +1073,7 @@ void SeamPlacer::calculate_overhangs_and_layer_embedding(const PrintObject *po)
|
||||||
if (prev_layer_distancer.get() != nullptr) {
|
if (prev_layer_distancer.get() != nullptr) {
|
||||||
const auto _dist = prev_layer_distancer->distance_from_lines<true>(point.cast<double>());
|
const auto _dist = prev_layer_distancer->distance_from_lines<true>(point.cast<double>());
|
||||||
perimeter_point.overhang = _dist
|
perimeter_point.overhang = _dist
|
||||||
+ 0.6f * perimeter_point.perimeter.flow_width
|
+ 0.65f * perimeter_point.perimeter.flow_width
|
||||||
- tan(SeamPlacer::overhang_angle_threshold)
|
- tan(SeamPlacer::overhang_angle_threshold)
|
||||||
* po->layers()[layer_idx]->height;
|
* po->layers()[layer_idx]->height;
|
||||||
perimeter_point.overhang =
|
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)
|
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>())
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ public:
|
||||||
// snapping angle - angles larger than this value will be snapped to during seam painting
|
// snapping angle - angles larger than this value will be snapped to during seam painting
|
||||||
static constexpr float sharp_angle_snapping_threshold = 55.0f * float(PI) / 180.0f;
|
static constexpr float sharp_angle_snapping_threshold = 55.0f * float(PI) / 180.0f;
|
||||||
// overhang angle for seam placement that still yields good results, in degrees, measured from vertical direction
|
// overhang angle for seam placement that still yields good results, in degrees, measured from vertical direction
|
||||||
static constexpr float overhang_angle_threshold = 50.0f * float(PI) / 180.0f;
|
static constexpr float overhang_angle_threshold = 45.0f * float(PI) / 180.0f;
|
||||||
|
|
||||||
// determines angle importance compared to visibility ( neutral value is 1.0f. )
|
// determines angle importance compared to visibility ( neutral value is 1.0f. )
|
||||||
static constexpr float angle_importance_aligned = 0.6f;
|
static constexpr float angle_importance_aligned = 0.6f;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue