Replacing ClipperLib::IntPoint with Eigen point as a first step to

make the ClipperLib paths and polygons compatible with Slic3r paths
and polygons without conversions and memory allocations.
This commit is contained in:
Vojtech Bubnik 2021-04-14 09:22:51 +02:00
parent 29cd8aac26
commit 7112ac61b6
14 changed files with 416 additions and 401 deletions

View file

@ -273,8 +273,8 @@ std::string SVG::get_path_d(const ClipperLib::Path &path, double scale, bool clo
std::ostringstream d;
d << "M ";
for (ClipperLib::Path::const_iterator p = path.begin(); p != path.end(); ++p) {
d << to_svg_x(scale * p->X - origin(0)) << " ";
d << to_svg_y(scale * p->Y - origin(1)) << " ";
d << to_svg_x(scale * p->x() - origin(0)) << " ";
d << to_svg_y(scale * p->y() - origin(1)) << " ";
}
if (closed) d << "z";
return d.str();