mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-28 19:21:20 -06: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:
parent
5446167c11
commit
44801f4429
9 changed files with 164 additions and 153 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue