Implemented volumetric flow rate hints,

removed some C++11 conditioned compilation. Slic3r now requires C++11.
This commit is contained in:
bubnikv 2017-11-09 15:10:20 +01:00
parent 9a0100d6de
commit b23b9ea1d2
10 changed files with 151 additions and 236 deletions

View file

@ -176,11 +176,7 @@ void Fill3DHoneycomb::_fill_surface_single(
}
}
Polylines chained = PolylineCollection::chained_path_from(
#if SLIC3R_CPPVER >= 11
std::move(polylines),
#else
polylines,
#endif
PolylineCollection::leftmost_point(polylines), false); // reverse allowed
bool first = true;
for (Polylines::iterator it_polyline = chained.begin(); it_polyline != chained.end(); ++ it_polyline) {
@ -199,12 +195,7 @@ void Fill3DHoneycomb::_fill_surface_single(
}
}
// The lines cannot be connected.
#if SLIC3R_CPPVER >= 11
polylines_out.push_back(std::move(*it_polyline));
#else
polylines_out.push_back(Polyline());
std::swap(polylines_out.back(), *it_polyline);
#endif
polylines_out.emplace_back(std::move(*it_polyline));
first = false;
}
}

View file

@ -17,12 +17,7 @@ void FillHoneycomb::_fill_surface_single(
CacheID cache_id(params.density, this->spacing);
Cache::iterator it_m = this->cache.find(cache_id);
if (it_m == this->cache.end()) {
#if 0
// #if SLIC3R_CPPVER > 11
it_m = this->cache.emplace_hint(it_m);
#else
it_m = this->cache.insert(it_m, std::pair<CacheID, CacheData>(cache_id, CacheData()));
#endif
CacheData &m = it_m->second;
coord_t min_spacing = scale_(this->spacing);
m.distance = min_spacing / params.density;
@ -99,11 +94,7 @@ void FillHoneycomb::_fill_surface_single(
// connect paths
if (! paths.empty()) { // prevent calling leftmost_point() on empty collections
Polylines chained = PolylineCollection::chained_path_from(
#if SLIC3R_CPPVER >= 11
std::move(paths),
#else
paths,
#endif
PolylineCollection::leftmost_point(paths), false);
assert(paths.empty());
paths.clear();

View file

@ -93,11 +93,7 @@ void FillRectilinear::_fill_surface_single(
}
}
Polylines chained = PolylineCollection::chained_path_from(
#if SLIC3R_CPPVER >= 11
std::move(polylines),
#else
polylines,
#endif
PolylineCollection::leftmost_point(polylines), false); // reverse allowed
bool first = true;
for (Polylines::iterator it_polyline = chained.begin(); it_polyline != chained.end(); ++ it_polyline) {
@ -118,12 +114,7 @@ void FillRectilinear::_fill_surface_single(
}
}
// The lines cannot be connected.
#if SLIC3R_CPPVER >= 11
polylines_out.push_back(std::move(*it_polyline));
#else
polylines_out.push_back(Polyline());
std::swap(polylines_out.back(), *it_polyline);
#endif
polylines_out.emplace_back(std::move(*it_polyline));
first = false;
}
}