New experimental autospeed feature. #2810

This commit is contained in:
Alessandro Ranellucci 2015-05-31 22:04:32 +02:00
parent 6e280ab8cb
commit 7f70da97b4
12 changed files with 165 additions and 9 deletions

View file

@ -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