mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-26 18:21:18 -06:00
Merge branch 'dk_remote_devices' into dk_copy_file
This commit is contained in:
commit
2ee2180869
21 changed files with 312 additions and 122 deletions
|
|
@ -612,7 +612,7 @@ void ConfigBase::load_from_gcode_file(const std::string &file)
|
|||
}
|
||||
ifs.seekg(0, ifs.end);
|
||||
auto file_length = ifs.tellg();
|
||||
auto data_length = std::min<std::fstream::streampos>(65535, file_length);
|
||||
auto data_length = std::min<std::fstream::pos_type>(65535, file_length);
|
||||
ifs.seekg(file_length - data_length, ifs.beg);
|
||||
std::vector<char> data(size_t(data_length) + 1, 0);
|
||||
ifs.read(data.data(), data_length);
|
||||
|
|
|
|||
|
|
@ -1302,6 +1302,8 @@ void ModelObject::split(ModelObjectPtrs* new_objects)
|
|||
}
|
||||
|
||||
new_vol->set_offset(Vec3d::Zero());
|
||||
// reset the source to disable reload from disk
|
||||
new_vol->source = ModelVolume::Source();
|
||||
new_objects->emplace_back(new_object);
|
||||
delete mesh;
|
||||
}
|
||||
|
|
@ -1668,6 +1670,8 @@ size_t ModelVolume::split(unsigned int max_extruders)
|
|||
this->calculate_convex_hull();
|
||||
// Assign a new unique ID, so that a new GLVolume will be generated.
|
||||
this->set_new_unique_id();
|
||||
// reset the source to disable reload from disk
|
||||
this->source = ModelVolume::Source();
|
||||
}
|
||||
else
|
||||
this->object->volumes.insert(this->object->volumes.begin() + (++ivolume), new ModelVolume(object, *this, std::move(*mesh)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue