mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-02-02 00:48:43 +03:00
Prusa 2.7.2
This commit is contained in:
@@ -241,11 +241,14 @@ private:
|
||||
std::optional<std::reference_wrapper<const Polygons>> getArea(const TreeModelVolumes::RadiusLayerPair &key) const {
|
||||
std::lock_guard<std::mutex> guard(m_mutex);
|
||||
if (key.second >= LayerIndex(m_data.size()))
|
||||
return std::optional<std::reference_wrapper<const Polygons>>{};
|
||||
const auto &layer = m_data[key.second];
|
||||
return std::nullopt;
|
||||
|
||||
const LayerData &layer = m_data[key.second];
|
||||
auto it = layer.find(key.first);
|
||||
return it == layer.end() ?
|
||||
std::optional<std::reference_wrapper<const Polygons>>{} : std::optional<std::reference_wrapper<const Polygons>>{ it->second };
|
||||
if (it == layer.end())
|
||||
return std::nullopt;
|
||||
|
||||
return std::optional<std::reference_wrapper<const Polygons>>{it->second};
|
||||
}
|
||||
// Get a collision area at a given layer for a radius that is a lower or equial to the key radius.
|
||||
std::optional<std::pair<coord_t, std::reference_wrapper<const Polygons>>> get_lower_bound_area(const TreeModelVolumes::RadiusLayerPair &key) const {
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include "../BuildVolume.hpp"
|
||||
#include "../ClipperUtils.hpp"
|
||||
#include "../EdgeGrid.hpp"
|
||||
#include "../Fill/Fill.hpp"
|
||||
#include "../Layer.hpp"
|
||||
#include "../Print.hpp"
|
||||
#include "../MultiPoint.hpp"
|
||||
|
||||
Reference in New Issue
Block a user