Ported the G-code generator from Perl to C++.

Removed GCode.pm
Removed the Perl bindigns for AvoidCrossingPerimeters, OozePrevention, SpiralVase, Wipe
Changed the std::set of extruder IDs to vector of IDs.
Removed some MSVC compiler warnings, removed obnoxious compiler warnings when compiling the Perl bindings.
This commit is contained in:
bubnikv 2017-05-03 18:28:22 +02:00
parent 72ae3585e4
commit e90279c513
52 changed files with 1362 additions and 1632 deletions

View file

@ -93,6 +93,23 @@ inline void polygons_rotate(Polygons &polys, double angle)
p->rotate(angle);
}
inline Points to_points(const Polygon &poly)
{
return poly.points;
}
inline Points to_points(const Polygons &polys)
{
size_t n_points = 0;
for (size_t i = 0; i < polys.size(); ++ i)
n_points += polys[i].points.size();
Points points;
points.reserve(n_points);
for (const Polygon &poly : polys)
append(points, poly.points);
return points;
}
inline Lines to_lines(const Polygon &poly)
{
Lines lines;
@ -179,7 +196,7 @@ namespace boost { namespace polygon {
}
// Get the winding direction of the polygon
static inline winding_direction winding(const Slic3r::Polygon& t) {
static inline winding_direction winding(const Slic3r::Polygon& /* t */) {
return unknown_winding;
}
};
@ -220,8 +237,8 @@ namespace boost { namespace polygon {
}
//don't worry about these, just return false from them
static inline bool clean(const Slic3r::Polygons& polygon_set) { return false; }
static inline bool sorted(const Slic3r::Polygons& polygon_set) { return false; }
static inline bool clean(const Slic3r::Polygons& /* polygon_set */) { return false; }
static inline bool sorted(const Slic3r::Polygons& /* polygon_set */) { return false; }
};
template <>