mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-30 23:42:01 +08:00
Added option to manually reorder sequentially printed objects via plater (#4153)
* Added option to tell Slic3r CLI to not arrange at all. * Implement manual override to object printing order during sequential printing. * Undo accidental merge of pull request #4146 from alexrj/Slic3r.git
This commit is contained in:
parent
ed65c81d11
commit
dc6cfffae4
@ -219,7 +219,7 @@ sub export {
|
||||
if ($self->config->complete_objects) {
|
||||
# print objects from the smallest to the tallest to avoid collisions
|
||||
# when moving onto next object starting point
|
||||
my @obj_idx = sort { $self->objects->[$a]->size->z <=> $self->objects->[$b]->size->z } 0..($self->print->object_count - 1);
|
||||
my @obj_idx = sort { $self->objects->[$a]->config->sequential_print_priority <=> $self->objects->[$b]->config->sequential_print_priority or $self->objects->[$a]->size->z <=> $self->objects->[$b]->size->z} 0..($self->print->object_count - 1);
|
||||
|
||||
my $finished_objects = 0;
|
||||
for my $obj_idx (@obj_idx) {
|
||||
|
@ -91,7 +91,8 @@ sub set_model {
|
||||
# if all input objects have defined position(s) apply duplication to the whole model
|
||||
$model->duplicate($self->duplicate, $self->_print->config->min_object_distance, $bb);
|
||||
}
|
||||
$_->translate(0,0,-$_->bounding_box->z_min) for @{$model->objects};
|
||||
$_->translate(0,0,-$_->bounding_box->z_min) for @{$model->objects} ;
|
||||
|
||||
|
||||
if (!$self->dont_arrange) {
|
||||
my $print_center = $self->print_center
|
||||
|
@ -1662,6 +1662,13 @@ PrintConfigDef::PrintConfigDef()
|
||||
def->tooltip = "Set this to the number of *full* steps (not microsteps) needed for moving the Z axis by 1mm; you can calculate this by dividing the number of microsteps configured in your firmware by the microstepping amount (8, 16, 32). Slic3r will round your configured layer height to the nearest multiple of that value in order to ensure the best accuracy. This is most useful for machines with imperial leadscrews or belt-driven Z or for unusual layer heights with metric leadscrews. Set to zero to disable this experimental feature.";
|
||||
def->cli = "z-steps-per-mm=f";
|
||||
def->default_value = new ConfigOptionFloat(0);
|
||||
|
||||
def = this->add("sequential_print_priority", coInt);
|
||||
def->label = "Sequential Printing Priority";
|
||||
def->category = "Advanced";
|
||||
def->tooltip ="Set this to alter object priority for sequential printing. Objects are first sorted by priority (smaller integers print first), then by height.";
|
||||
def->cli = "sequential-print-priority=i";
|
||||
def->default_value = new ConfigOptionInt(0);
|
||||
}
|
||||
|
||||
const PrintConfigDef print_config_def;
|
||||
|
@ -182,6 +182,7 @@ class PrintObjectConfig : public virtual StaticPrintConfig
|
||||
ConfigOptionFloat support_material_speed;
|
||||
ConfigOptionFloatOrPercent support_material_threshold;
|
||||
ConfigOptionFloat xy_size_compensation;
|
||||
ConfigOptionInt sequential_print_priority;
|
||||
|
||||
PrintObjectConfig(bool initialize = true) : StaticPrintConfig() {
|
||||
if (initialize)
|
||||
@ -217,6 +218,7 @@ class PrintObjectConfig : public virtual StaticPrintConfig
|
||||
OPT_PTR(support_material_speed);
|
||||
OPT_PTR(support_material_threshold);
|
||||
OPT_PTR(xy_size_compensation);
|
||||
OPT_PTR(sequential_print_priority);
|
||||
|
||||
return NULL;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user