mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-27 19:01:02 +00:00
NEW:tracking stl model files
jira:[STUDIO-5372] Change-Id: Idb1275b07441f0cd06c24588d5f7c20f81f1556c
This commit is contained in:
@@ -17,6 +17,8 @@ namespace Slic3r {
|
||||
bool load_stl(const char *path, Model *model, const char *object_name_in, ImportstlProgressFn stlFn)
|
||||
{
|
||||
TriangleMesh mesh;
|
||||
std::string design_id;
|
||||
|
||||
if (! mesh.ReadSTLFile(path, true, stlFn)) {
|
||||
// die "Failed to open $file\n" if !-e $path;
|
||||
return false;
|
||||
@@ -59,4 +61,4 @@ bool store_stl(const char *path, Model *model, bool binary)
|
||||
return store_stl(path, &mesh, binary);
|
||||
}
|
||||
|
||||
}; // namespace Slic3r
|
||||
}; // namespace Slic3r
|
||||
@@ -84,6 +84,7 @@ Model& Model::assign_copy(const Model &rhs)
|
||||
// BBS: for design info
|
||||
this->design_info = rhs.design_info;
|
||||
this->model_info = rhs.model_info;
|
||||
this->stl_design_id = rhs.stl_design_id;
|
||||
this->profile_info = rhs.profile_info;
|
||||
|
||||
return *this;
|
||||
@@ -113,6 +114,7 @@ Model& Model::assign_copy(Model &&rhs)
|
||||
|
||||
//BBS: add auxiliary path logic
|
||||
// BBS: backup, all in one temp dir
|
||||
this->stl_design_id = rhs.stl_design_id;
|
||||
this->backup_path = std::move(rhs.backup_path);
|
||||
this->object_backup_id_map = std::move(rhs.object_backup_id_map);
|
||||
this->next_object_backup_id = rhs.next_object_backup_id;
|
||||
@@ -910,6 +912,7 @@ void Model::load_from(Model& model)
|
||||
object_backup_id_map = model.object_backup_id_map;
|
||||
next_object_backup_id = model.next_object_backup_id;
|
||||
design_info = model.design_info;
|
||||
stl_design_id = model.stl_design_id;
|
||||
model_info = model.model_info;
|
||||
profile_info = model.profile_info;
|
||||
model.design_info.reset();
|
||||
|
||||
@@ -1508,6 +1508,7 @@ public:
|
||||
static GlobalSpeedMap printSpeedMap;
|
||||
|
||||
// DesignInfo of Model
|
||||
std::string stl_design_id;
|
||||
std::shared_ptr<ModelDesignInfo> design_info = nullptr;
|
||||
std::shared_ptr<ModelInfo> model_info = nullptr;
|
||||
std::shared_ptr<ModelProfileInfo> profile_info = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user