mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-18 11:02:08 +00:00
Priority for wipe tower, Increased safety distance from bed edges.
* WipeTowerInfo class extended in plater (WipeTower) instead of GLCanvas3D * Bed origin support in ModelInstance and WipeTower
This commit is contained in:
@@ -68,7 +68,7 @@ class _Item {
|
||||
BBCache(): valid(false) {}
|
||||
} bb_cache_;
|
||||
|
||||
int binid_{BIN_ID_UNSET};
|
||||
int binid_{BIN_ID_UNSET}, priority_{0};
|
||||
bool fixed_{false};
|
||||
|
||||
public:
|
||||
@@ -130,8 +130,12 @@ public:
|
||||
|
||||
inline bool isFixed() const noexcept { return fixed_; }
|
||||
inline void markAsFixed(bool fixed = true) { fixed_ = fixed; }
|
||||
|
||||
inline void binId(int idx) { binid_ = idx; }
|
||||
inline int binId() const noexcept { return binid_; }
|
||||
|
||||
inline void priority(int p) { priority_ = p; }
|
||||
inline int priority() const noexcept { return priority_; }
|
||||
|
||||
/**
|
||||
* @brief Convert the polygon to string representation. The format depends
|
||||
|
||||
@@ -62,9 +62,10 @@ public:
|
||||
placers.back().configure(pconfig);
|
||||
placers.back().preload(ig);
|
||||
}
|
||||
|
||||
|
||||
auto sortfunc = [](Item& i1, Item& i2) {
|
||||
return i1.area() > i2.area();
|
||||
int p1 = i1.priority(), p2 = i2.priority();
|
||||
return p1 == p2 ? i1.area() > i2.area() : p1 > p2;
|
||||
};
|
||||
|
||||
std::sort(store_.begin(), store_.end(), sortfunc);
|
||||
|
||||
Reference in New Issue
Block a user