mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 18:27:58 -06:00
New experimental autospeed feature. #2810
This commit is contained in:
parent
6e280ab8cb
commit
7f70da97b4
12 changed files with 165 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue