gcode preview - first installment - wip

This commit is contained in:
Enrico Turri 2018-01-08 13:44:10 +01:00
parent 696d420dc8
commit 0f4bec8af0
25 changed files with 2552 additions and 27 deletions

View file

@ -278,4 +278,22 @@ ThickPolyline::reverse()
std::swap(this->endpoints.first, this->endpoints.second);
}
//############################################################################################################
#if ENRICO_GCODE_PREVIEW
Lines3 Polyline3::lines() const
{
Lines3 lines;
if (points.size() >= 2)
{
lines.reserve(points.size() - 1);
for (Points3::const_iterator it = points.begin(); it != points.end() - 1; ++it)
{
lines.emplace_back(*it, *(it + 1));
}
}
return lines;
}
#endif // ENRICO_GCODE_PREVIEW
//############################################################################################################
}