mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-22 16:21:24 -06:00
Removed StringMap
This commit is contained in:
parent
05b2993769
commit
54a199919b
11 changed files with 35 additions and 162 deletions
|
@ -83,19 +83,17 @@ Model::delete_all_materials()
|
|||
}
|
||||
|
||||
ModelMaterial *
|
||||
Model::set_material(t_model_material_id material_id,
|
||||
const t_model_material_attributes &attributes)
|
||||
Model::set_material(t_model_material_id material_id)
|
||||
{
|
||||
ModelMaterialMap::iterator i = this->materials.find(material_id);
|
||||
|
||||
|
||||
ModelMaterial *mat;
|
||||
if (i == this->materials.end()) {
|
||||
mat = this->materials[material_id] = new ModelMaterial(this);
|
||||
} else {
|
||||
mat = i->second;
|
||||
}
|
||||
|
||||
mat->apply(attributes);
|
||||
|
||||
return mat;
|
||||
}
|
||||
|
||||
|
@ -142,12 +140,7 @@ REGISTER_CLASS(Model, "Model");
|
|||
#endif
|
||||
|
||||
|
||||
ModelMaterial::ModelMaterial(Model *model)
|
||||
: model(model),
|
||||
attributes(),
|
||||
config()
|
||||
{
|
||||
}
|
||||
ModelMaterial::ModelMaterial(Model *model) : model(model) {}
|
||||
|
||||
void
|
||||
ModelMaterial::apply(const t_model_material_attributes &attributes)
|
||||
|
|
|
@ -41,8 +41,7 @@ class Model
|
|||
void delete_object(size_t idx);
|
||||
void delete_all_objects();
|
||||
void delete_all_materials();
|
||||
ModelMaterial *set_material(t_model_material_id material_id,
|
||||
const t_model_material_attributes &attributes);
|
||||
ModelMaterial *set_material(t_model_material_id material_id);
|
||||
// void duplicate_objects_grid(unsigned int x, unsigned int y, coordf_t distance);
|
||||
// void duplicate_objects(size_t copies_num, coordf_t distance, const BoundingBox &bb);
|
||||
// void arrange_objects(coordf_t distance, const BoundingBox &bb);
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
#include "StringMap.hpp"
|
||||
#ifdef SLIC3RXS
|
||||
#include "perlglue.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
#ifdef SLIC3RXS
|
||||
__REGISTER_CLASS(StringMap, "StringMap");
|
||||
#endif
|
||||
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
#ifndef slic3r_StringMap_hpp_
|
||||
#define slic3r_StringMap_hpp_
|
||||
|
||||
#include <myinit.h>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
// this is just for XSPP, because it chokes on the template typename
|
||||
typedef std::map<std::string, std::string> StringMap;
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue