mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 11:17:51 -06:00
Merged with dev
This commit is contained in:
parent
d934b63424
commit
fe3b92870f
90 changed files with 3310 additions and 1748 deletions
|
@ -392,9 +392,12 @@ void Print::add_model_object(ModelObject* model_object, int idx)
|
|||
//FIXME lock mutex!
|
||||
this->invalidate_all_steps();
|
||||
|
||||
for (size_t volume_id = 0; volume_id < model_object->volumes.size(); ++ volume_id) {
|
||||
size_t volume_id = 0;
|
||||
for (const ModelVolume *volume : model_object->volumes) {
|
||||
if (! volume->is_model_part() && ! volume->is_modifier())
|
||||
continue;
|
||||
// Get the config applied to this volume.
|
||||
PrintRegionConfig config = this->_region_config_from_model_volume(*model_object->volumes[volume_id]);
|
||||
PrintRegionConfig config = this->_region_config_from_model_volume(*volume);
|
||||
// Find an existing print region with the same config.
|
||||
size_t region_id = size_t(-1);
|
||||
for (size_t i = 0; i < m_regions.size(); ++ i)
|
||||
|
@ -409,6 +412,7 @@ void Print::add_model_object(ModelObject* model_object, int idx)
|
|||
}
|
||||
// Assign volume to a region.
|
||||
object->add_region_volume(region_id, volume_id);
|
||||
++ volume_id;
|
||||
}
|
||||
|
||||
// Apply config to print object.
|
||||
|
@ -893,7 +897,7 @@ void Print::auto_assign_extruders(ModelObject* model_object) const
|
|||
for (size_t volume_id = 0; volume_id < model_object->volumes.size(); ++ volume_id) {
|
||||
ModelVolume *volume = model_object->volumes[volume_id];
|
||||
//FIXME Vojtech: This assigns an extruder ID even to a modifier volume, if it has a material assigned.
|
||||
if (! volume->material_id().empty() && ! volume->config.has("extruder"))
|
||||
if ((volume->is_model_part() || volume->is_modifier()) && ! volume->material_id().empty() && ! volume->config.has("extruder"))
|
||||
volume->config.opt<ConfigOptionInt>("extruder", true)->value = int(volume_id + 1);
|
||||
}
|
||||
}
|
||||
|
@ -1295,6 +1299,9 @@ void Print::_make_wipe_tower()
|
|||
}
|
||||
m_wipe_tower_data.final_purge = Slic3r::make_unique<WipeTower::ToolChangeResult>(
|
||||
wipe_tower.tool_change((unsigned int)-1, false));
|
||||
|
||||
m_wipe_tower_data.used_filament = wipe_tower.get_used_filament();
|
||||
m_wipe_tower_data.number_of_toolchanges = wipe_tower.get_number_of_toolchanges();
|
||||
}
|
||||
|
||||
std::string Print::output_filename() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue