mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 04:55:55 +08:00
Fix neares corner seam picking
This commit is contained in:
parent
5998e2f78d
commit
33e57827bc
@ -288,12 +288,8 @@ struct NearestCorner {
|
|||||||
perimeter.point_classifications[i] == point_classification &&
|
perimeter.point_classifications[i] == point_classification &&
|
||||||
perimeter.angle_types[i] != Perimeters::AngleType::smooth) {
|
perimeter.angle_types[i] != Perimeters::AngleType::smooth) {
|
||||||
const Vec2d &point{perimeter.positions[i]};
|
const Vec2d &point{perimeter.positions[i]};
|
||||||
if (!corner_candidate) {
|
|
||||||
corner_candidate = {i, i, point};
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
const double distance{(prefered_position - point).norm()};
|
const double distance{(prefered_position - point).norm()};
|
||||||
if (distance < min_distance) {
|
if (!corner_candidate || distance < min_distance) {
|
||||||
corner_candidate = {i, i, point};
|
corner_candidate = {i, i, point};
|
||||||
min_distance = distance;
|
min_distance = distance;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user