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:
bubnikv 2018-08-17 14:14:24 +02:00
parent 3b89717149
commit 1ba64da3fe
45 changed files with 526 additions and 792 deletions

View file

@ -49,7 +49,7 @@ static inline Polyline make_wave(
point.y() = clamp(0., height, double(point.y()));
if (vertical)
std::swap(point.x(), point.y());
polyline.points.emplace_back(convert_to<Point>(point * scaleFactor));
polyline.points.emplace_back((point * scaleFactor).cast<coord_t>());
}
return polyline;
@ -177,7 +177,7 @@ void FillGyroid::_fill_surface_single(
// TODO: we should also check that both points are on a fill_boundary to avoid
// connecting paths on the boundaries of internal regions
// TODO: avoid crossing current infill path
if (first_point.distance_to(last_point) <= 5 * distance &&
if ((last_point - first_point).cast<double>().norm() <= 5 * distance &&
expolygon_off.contains(Line(last_point, first_point))) {
// Append the polyline.
pts_end.insert(pts_end.end(), polyline.points.begin(), polyline.points.end());