mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-03 10:32:40 +00:00
Created a total_lengt() free function for Polygons and Polylines.
Modified the "extra perimeters when needed" function to use the new free functions, extended the tooltip of the "extra perimeters when needed" feature.
This commit is contained in:
@@ -59,6 +59,13 @@ extern BoundingBox get_extents_rotated(const Polygon &poly, double angle);
|
||||
extern BoundingBox get_extents_rotated(const Polygons &polygons, double angle);
|
||||
extern std::vector<BoundingBox> get_extents_vector(const Polygons &polygons);
|
||||
|
||||
inline double total_length(const Polygons &polylines) {
|
||||
double total = 0;
|
||||
for (Polygons::const_iterator it = polylines.begin(); it != polylines.end(); ++it)
|
||||
total += it->length();
|
||||
return total;
|
||||
}
|
||||
|
||||
// Remove sticks (tentacles with zero area) from the polygon.
|
||||
extern bool remove_sticks(Polygon &poly);
|
||||
extern bool remove_sticks(Polygons &polys);
|
||||
|
||||
Reference in New Issue
Block a user