Ported ModelObject::split() to XS

This commit is contained in:
Alessandro Ranellucci 2014-11-12 23:50:09 +01:00
parent 334086d605
commit a5df9fb795
4 changed files with 48 additions and 52 deletions

View file

@ -39,7 +39,7 @@ class Model
void swap(Model &other);
~Model();
ModelObject* add_object();
ModelObject* add_object(const ModelObject &other);
ModelObject* add_object(const ModelObject &other, bool copy_volumes = true);
void delete_object(size_t idx);
void clear_objects();
@ -60,7 +60,6 @@ class Model
void translate(coordf_t x, coordf_t y, coordf_t z);
void mesh(TriangleMesh* mesh) const;
void raw_mesh(TriangleMesh* mesh) const;
// void split_meshes();
// std::string get_material_name(t_model_material_id material_id);
@ -133,13 +132,14 @@ class ModelObject
size_t facets_count() const;
bool needed_repair() const;
void cut(coordf_t z, Model* model) const;
void split(ModelObjectPtrs* new_objects);
void update_bounding_box(); // this is a private method but we expose it until we need to expose it via XS
private:
Model* model;
ModelObject(Model *model);
ModelObject(Model *model, const ModelObject &other);
ModelObject(Model *model, const ModelObject &other, bool copy_volumes = true);
ModelObject& operator= (ModelObject other);
void swap(ModelObject &other);
~ModelObject();