mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-07-30 11:05:50 +00:00
Removed Point::scale(),translate(),coincides_with(),distance_to(),
distance_to_squared(),perp_distance_to(),negative(),vector_to(), translate(), distance_to() etc, replaced with the Eigen equivalents.
This commit is contained in:
@@ -55,14 +55,14 @@ static inline coordf_t segment_length(const Polygon &poly, size_t seg1, const Po
|
||||
coordf_t len = 0;
|
||||
if (seg1 <= seg2) {
|
||||
for (size_t i = seg1; i < seg2; ++ i, pPrev = pThis)
|
||||
len += pPrev->distance_to(*(pThis = &poly.points[i]));
|
||||
len += (*pPrev - *(pThis = &poly.points[i])).cast<double>().norm();
|
||||
} else {
|
||||
for (size_t i = seg1; i < poly.points.size(); ++ i, pPrev = pThis)
|
||||
len += pPrev->distance_to(*(pThis = &poly.points[i]));
|
||||
len += (*pPrev - *(pThis = &poly.points[i])).cast<double>().norm();
|
||||
for (size_t i = 0; i < seg2; ++ i, pPrev = pThis)
|
||||
len += pPrev->distance_to(*(pThis = &poly.points[i]));
|
||||
len += (*pPrev - *(pThis = &poly.points[i])).cast<double>().norm();
|
||||
}
|
||||
len += pPrev->distance_to(p2);
|
||||
len += (*pPrev - p2).cast<double>().norm();
|
||||
return len;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user