mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 22:24:01 -06:00
Random extruder sequence for MMU.
Related to https://github.com/prusa3d/PrusaSlicer/issues/1866
This commit is contained in:
parent
a2788f3a73
commit
0b5ea8f429
4 changed files with 65 additions and 13 deletions
|
@ -146,6 +146,8 @@ struct ExtrudersSequence
|
|||
bool is_mm_intervals = true;
|
||||
double interval_by_mm = 3.0;
|
||||
int interval_by_layers = 10;
|
||||
bool random_sequence { true };
|
||||
bool color_repetition { false };
|
||||
std::vector<size_t> extruders = { 0 };
|
||||
|
||||
bool operator==(const ExtrudersSequence& other) const
|
||||
|
@ -153,19 +155,23 @@ struct ExtrudersSequence
|
|||
return (other.is_mm_intervals == this->is_mm_intervals ) &&
|
||||
(other.interval_by_mm == this->interval_by_mm ) &&
|
||||
(other.interval_by_layers == this->interval_by_layers ) &&
|
||||
(other.random_sequence == this->random_sequence ) &&
|
||||
(other.color_repetition == this->color_repetition ) &&
|
||||
(other.extruders == this->extruders ) ;
|
||||
}
|
||||
bool operator!=(const ExtrudersSequence& other) const
|
||||
{
|
||||
return (other.is_mm_intervals != this->is_mm_intervals ) &&
|
||||
(other.interval_by_mm != this->interval_by_mm ) &&
|
||||
(other.interval_by_layers != this->interval_by_layers ) &&
|
||||
return (other.is_mm_intervals != this->is_mm_intervals ) ||
|
||||
(other.interval_by_mm != this->interval_by_mm ) ||
|
||||
(other.interval_by_layers != this->interval_by_layers ) ||
|
||||
(other.random_sequence != this->random_sequence ) ||
|
||||
(other.color_repetition != this->color_repetition ) ||
|
||||
(other.extruders != this->extruders ) ;
|
||||
}
|
||||
|
||||
void add_extruder(size_t pos)
|
||||
void add_extruder(size_t pos, size_t extruder_id = size_t(0))
|
||||
{
|
||||
extruders.insert(extruders.begin() + pos+1, size_t(0));
|
||||
extruders.insert(extruders.begin() + pos+1, extruder_id);
|
||||
}
|
||||
|
||||
void delete_extruder(size_t pos)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue