mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-07-28 04:14:27 +03:00
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:
@@ -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 <>
|
||||
|
||||
Reference in New Issue
Block a user