mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 06:04:01 -06:00
WIP PrintRegion refactoring: Squashed some bugs.
This commit is contained in:
parent
c8bdc62af4
commit
72d1faa03e
6 changed files with 50 additions and 34 deletions
|
@ -63,9 +63,9 @@ class PrintRegion
|
|||
public:
|
||||
PrintRegion() = default;
|
||||
PrintRegion(const PrintRegionConfig &config);
|
||||
PrintRegion(const PrintRegionConfig &config, const size_t config_hash) : m_config(config), m_config_hash(config_hash) {}
|
||||
PrintRegion(const PrintRegionConfig &config, const size_t config_hash, int print_object_region_id = -1) : m_config(config), m_config_hash(config_hash), m_print_object_region_id(print_object_region_id) {}
|
||||
PrintRegion(PrintRegionConfig &&config);
|
||||
PrintRegion(PrintRegionConfig &&config, const size_t config_hash) : m_config(std::move(config)), m_config_hash(config_hash) {}
|
||||
PrintRegion(PrintRegionConfig &&config, const size_t config_hash, int print_object_region_id = -1) : m_config(std::move(config)), m_config_hash(config_hash), m_print_object_region_id(print_object_region_id) {}
|
||||
~PrintRegion() = default;
|
||||
|
||||
// Methods NOT modifying the PrintRegion's state:
|
||||
|
@ -209,7 +209,7 @@ public:
|
|||
std::vector<PaintedRegion> painted_regions;
|
||||
|
||||
bool has_volume(const ObjectID id) const {
|
||||
auto it = lower_bound_by_predicate(this->volumes.begin(), this->volumes.end(), [id](const VolumeExtents& v) { return v.volume_id == id; });
|
||||
auto it = lower_bound_by_predicate(this->volumes.begin(), this->volumes.end(), [id](const VolumeExtents &l) { return l.volume_id < id; });
|
||||
return it != this->volumes.end() && it->volume_id == id;
|
||||
}
|
||||
};
|
||||
|
@ -380,7 +380,7 @@ private:
|
|||
|
||||
// Object split into layer ranges and regions with their associated configurations.
|
||||
// Shared among PrintObjects created for the same ModelObject.
|
||||
PrintObjectRegions *m_shared_regions;
|
||||
PrintObjectRegions *m_shared_regions { nullptr };
|
||||
|
||||
SlicingParameters m_slicing_params;
|
||||
LayerPtrs m_layers;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue