ClipperLib::Path Slic3rMultiPoint_to_ClipperPath(const MultiPoint &input) { ClipperLib::Path retval; for (Points::const_iterator pit = input.points.begin(); pit != input.points.end(); ++pit) retval.emplace_back((*pit)(0), (*pit)(1)); return retval; }
static ClipperLib::Path toClipperPath(const GeometryCoordinates& ring) { ClipperLib::Path result; result.reserve(ring.size()); for (const auto& p : ring) { result.emplace_back(p.x, p.y); } return result; }
ClipperLib::Path Slic3rMultiPoint_to_ClipperPath_reversed(const Slic3r::MultiPoint &input) { ClipperLib::Path output; output.reserve(input.points.size()); for (Slic3r::Points::const_reverse_iterator pit = input.points.rbegin(); pit != input.points.rend(); ++pit) output.emplace_back((*pit)(0), (*pit)(1)); return output; }