Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/CuraEngine.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2019-09-10 14:40:34 +0300
committerGhostkeeper <rubend@tutanota.com>2019-09-10 14:40:34 +0300
commit673ce81c5bab7231644e4fe96fb51cc7b9cf9a8e (patch)
treeb404067169587bd26db52142a5be658230240c32
parent73afa29f6998620090158c6ae6947d57f2876ae7 (diff)
Fix bug that caused the corner shift to be weighted too much4.3.04.3
The *2 was applied to the entire score. It should be applied just to the weighting of the corner angle. Contributes to issue CURA-6760.
-rw-r--r--src/pathOrderOptimizer.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pathOrderOptimizer.cpp b/src/pathOrderOptimizer.cpp
index 64bd48872..def56dc95 100644
--- a/src/pathOrderOptimizer.cpp
+++ b/src/pathOrderOptimizer.cpp
@@ -181,13 +181,16 @@ int PathOrderOptimizer::getClosestPointInPolygon(Point prev_point, int poly_idx)
dist_score -= fabs(corner_angle - 1) * corner_shift;
break;
case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_WEIGHTED:
+ {
//More curve is better score (reduced distance), but slightly in favour of concave curves.
- dist_score -= fabs(corner_angle - 1) * corner_shift;
+ float dist_score_corner = fabs(corner_angle - 1) * corner_shift;
if (corner_angle < 1)
{
- dist_score *= 2;
+ dist_score_corner *= 2;
}
+ dist_score -= dist_score_corner;
break;
+ }
case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE:
default:
// do nothing