mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-23 16:51:21 -06: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:
parent
c25ae35737
commit
4256af22ff
4 changed files with 18 additions and 11 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue