#306 also ignore thinwall/gapfill when asked for min_mm3_per_mm from loops & other multi-paths

This commit is contained in:
supermerill 2020-06-24 13:39:28 +02:00
parent 2440cefd3b
commit 27aa82c94f
2 changed files with 4 additions and 2 deletions

View File

@ -258,6 +258,7 @@ double ExtrusionLoop::min_mm3_per_mm() const
{ {
double min_mm3_per_mm = std::numeric_limits<double>::max(); double min_mm3_per_mm = std::numeric_limits<double>::max();
for (const ExtrusionPath &path : this->paths) for (const ExtrusionPath &path : this->paths)
if (path.role() != erGapFill && path.role() != erThinWall && path.role() != erMilling)
min_mm3_per_mm = std::min(min_mm3_per_mm, path.mm3_per_mm); min_mm3_per_mm = std::min(min_mm3_per_mm, path.mm3_per_mm);
return min_mm3_per_mm; return min_mm3_per_mm;
} }

View File

@ -319,6 +319,7 @@ public:
double min_mm3_per_mm() const override { double min_mm3_per_mm() const override {
double min_mm3_per_mm = std::numeric_limits<double>::max(); double min_mm3_per_mm = std::numeric_limits<double>::max();
for (const THING &entity : this->paths) for (const THING &entity : this->paths)
if (entity.role() != erGapFill && entity.role() != erThinWall && entity.role() != erMilling)
min_mm3_per_mm = std::min(min_mm3_per_mm, entity.min_mm3_per_mm()); min_mm3_per_mm = std::min(min_mm3_per_mm, entity.min_mm3_per_mm());
return min_mm3_per_mm; return min_mm3_per_mm;
} }