mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-24 07:19:24 -07:00
New experimental autospeed feature. #2810
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "ExPolygonCollection.hpp"
|
||||
#include "ClipperUtils.hpp"
|
||||
#include "Extruder.hpp"
|
||||
#include <cmath>
|
||||
#include <sstream>
|
||||
|
||||
namespace Slic3r {
|
||||
@@ -375,6 +376,20 @@ ExtrusionLoop::grow() const
|
||||
return pp;
|
||||
}
|
||||
|
||||
double
|
||||
ExtrusionLoop::min_mm3_per_mm() const
|
||||
{
|
||||
double min_mm3_per_mm = 0;
|
||||
for (ExtrusionPaths::const_iterator path = this->paths.begin(); path != this->paths.end(); ++path) {
|
||||
if (min_mm3_per_mm == 0) {
|
||||
min_mm3_per_mm = path->mm3_per_mm;
|
||||
} else {
|
||||
min_mm3_per_mm = fmin(min_mm3_per_mm, path->mm3_per_mm);
|
||||
}
|
||||
}
|
||||
return min_mm3_per_mm;
|
||||
}
|
||||
|
||||
#ifdef SLIC3RXS
|
||||
REGISTER_CLASS(ExtrusionLoop, "ExtrusionLoop");
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user