Skip to content

Commit 6f66612

Browse files
committed
Merge dev_27_62 into superslicer_2.7.62
2 parents 3f14b60 + c0a4fbd commit 6f66612

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

‎src/libslic3r/ExPolygon.hpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,9 @@ inline Polygons to_polygons(const ExPolygon &src)
374374
}
375375

376376

377-
inline Polygons to_polygons_unsafe(const ExPolygons &src) {
378-
// can be used for asserts, dsiplay, when it isn't fed into clipper
379-
}
377+
//inline Polygons to_polygons_unsafe(const ExPolygons &src) {
378+
// // can be used for asserts, dsiplay, when it isn't fed into clipper
379+
//}
380380

381381
inline Polygons to_polygons(const ExPolygons &src)
382382
{

‎src/libslic3r/MultiPoint.hpp‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@ inline OutputIterator douglas_peucker_double(InputIterator begin, InputIterator
168168
if ( length_squared_d == 0) {
169169
// Zero length segment, find the furthest point between anchor and floater.
170170
for (InputIterator it = std::next(anchor); it != floater; ++it) {
171-
double dist_sq_d = (point_getter(*it) - pt_start).cast<double>().squaredNorm();
171+
const Point ptit = point_getter(*it);
172+
const Vec2d pttemp = (ptit - pt_start).cast<double>();
173+
double dist_sq_d = pttemp.squaredNorm();
172174
if (dist_sq_d > max_dist_sq_d) {
173175
max_dist_sq_d = dist_sq_d;
174176
furthest = it;
@@ -275,7 +277,9 @@ inline OutputIterator douglas_peucker_int(InputIterator begin, InputIterator end
275277
// Zero length segment, find the furthest point between anchor and floater.
276278
for (InputIterator it = std::next(anchor); it != floater; ++it) {
277279
lengthsqr_t dist_sq = squared_int_norm(point_getter(*it) - pt_start);
278-
double dist_sq_d = (point_getter(*it) - pt_start).cast<double>().squaredNorm();
280+
const Vec2crd tempcrd = (point_getter(*it) - pt_start);
281+
const Vec2d temppt = tempcrd.cast<double>();
282+
const double dist_sq_d = temppt.squaredNorm();
279283
if ( dist_sq > max_dist_sq) {
280284
assert(dist_sq_d > max_dist_sq_d);
281285
max_dist_sq_d = dist_sq_d;

0 commit comments

Comments
 (0)