Merge branch 'master' into fs_emboss
This commit is contained in:
commit
8a1fc4b16b
8 changed files with 133 additions and 36 deletions
|
@ -1279,6 +1279,14 @@ void ModelObject::invalidate_cut()
|
|||
volume->invalidate_cut_info();
|
||||
}
|
||||
|
||||
void ModelObject::delete_connectors()
|
||||
{
|
||||
for (int id = int(this->volumes.size()) - 1; id >= 0; id--) {
|
||||
if (volumes[id]->is_cut_connector())
|
||||
this->delete_volume(size_t(id));
|
||||
}
|
||||
}
|
||||
|
||||
void ModelObject::synchronize_model_after_cut()
|
||||
{
|
||||
for (ModelObject* obj : m_model->objects) {
|
||||
|
@ -1994,6 +2002,14 @@ int ModelObject::get_repaired_errors_count(const int vol_idx /*= -1*/) const
|
|||
stats.facets_reversed + stats.backwards_edges;
|
||||
}
|
||||
|
||||
bool ModelObject::has_solid_mesh() const
|
||||
{
|
||||
for (const ModelVolume* volume : volumes)
|
||||
if (volume->is_model_part())
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void ModelVolume::set_material_id(t_model_material_id material_id)
|
||||
{
|
||||
m_material_id = material_id;
|
||||
|
|
|
@ -448,6 +448,8 @@ public:
|
|||
void apply_cut_connectors(const std::string& name);
|
||||
// invalidate cut state for this object and its connectors/volumes
|
||||
void invalidate_cut();
|
||||
// delete volumes which are marked as connector for this object
|
||||
void delete_connectors();
|
||||
void synchronize_model_after_cut();
|
||||
void apply_cut_attributes(ModelObjectCutAttributes attributes);
|
||||
void clone_for_cut(ModelObject **obj);
|
||||
|
@ -481,6 +483,8 @@ public:
|
|||
// Get count of errors in the mesh( or all object's meshes, if volume index isn't defined)
|
||||
int get_repaired_errors_count(const int vol_idx = -1) const;
|
||||
|
||||
// Detect if object has at least one solid mash
|
||||
bool has_solid_mesh() const;
|
||||
bool is_cut() const { return cut_id.id().valid(); }
|
||||
bool has_connectors() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue