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:
@@ -69,6 +69,13 @@ public:
|
||||
extern BoundingBox get_extents(const Polyline &polyline);
|
||||
extern BoundingBox get_extents(const Polylines &polylines);
|
||||
|
||||
inline double total_length(const Polylines &polylines) {
|
||||
double total = 0;
|
||||
for (Polylines::const_iterator it = polylines.begin(); it != polylines.end(); ++it)
|
||||
total += it->length();
|
||||
return total;
|
||||
}
|
||||
|
||||
inline Lines to_lines(const Polyline &poly)
|
||||
{
|
||||
Lines lines;
|
||||
|
||||
Reference in New Issue
Block a user