mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-23 08:41:11 -06: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:
parent
3b89717149
commit
1ba64da3fe
45 changed files with 526 additions and 792 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue