Removed m_ prefix from public member variables.

This commit is contained in:
Vojtech Bubnik 2020-10-09 13:09:03 +02:00
parent 32436aea6f
commit 95af708171
7 changed files with 31 additions and 31 deletions

View file

@ -1899,9 +1899,9 @@ namespace Slic3r {
assert(index < geometry.custom_supports.size());
assert(index < geometry.custom_seam.size());
if (! geometry.custom_supports[index].empty())
volume->m_supported_facets.set_triangle_from_string(i, geometry.custom_supports[index]);
volume->supported_facets.set_triangle_from_string(i, geometry.custom_supports[index]);
if (! geometry.custom_seam[index].empty())
volume->m_seam_facets.set_triangle_from_string(i, geometry.custom_seam[index]);
volume->seam_facets.set_triangle_from_string(i, geometry.custom_seam[index]);
}
@ -2417,11 +2417,11 @@ namespace Slic3r {
stream << "v" << j + 1 << "=\"" << its.indices[i][j] + volume_it->second.first_vertex_id << "\" ";
}
std::string custom_supports_data_string = volume->m_supported_facets.get_triangle_as_string(i);
std::string custom_supports_data_string = volume->supported_facets.get_triangle_as_string(i);
if (! custom_supports_data_string.empty())
stream << CUSTOM_SUPPORTS_ATTR << "=\"" << custom_supports_data_string << "\" ";
std::string custom_seam_data_string = volume->m_seam_facets.get_triangle_as_string(i);
std::string custom_seam_data_string = volume->seam_facets.get_triangle_as_string(i);
if (! custom_seam_data_string.empty())
stream << CUSTOM_SEAM_ATTR << "=\"" << custom_seam_data_string << "\" ";

View file

@ -1042,8 +1042,8 @@ void ModelObject::convert_units(ModelObjectPtrs& new_objects, bool from_imperial
int vol_idx = 0;
for (ModelVolume* volume : volumes)
{
volume->m_supported_facets.clear();
volume->m_seam_facets.clear();
volume->supported_facets.clear();
volume->seam_facets.clear();
if (!volume->mesh().empty()) {
TriangleMesh mesh(volume->mesh());
mesh.require_shared_vertices();
@ -1148,8 +1148,8 @@ ModelObjectPtrs ModelObject::cut(size_t instance, coordf_t z, bool keep_upper, b
for (ModelVolume *volume : volumes) {
const auto volume_matrix = volume->get_matrix();
volume->m_supported_facets.clear();
volume->m_seam_facets.clear();
volume->supported_facets.clear();
volume->seam_facets.clear();
if (! volume->is_model_part()) {
// Modifiers are not cut, but we still need to add the instance transformation
@ -1732,8 +1732,8 @@ void ModelVolume::assign_new_unique_ids_recursive()
{
ObjectBase::set_new_unique_id();
config.set_new_unique_id();
m_supported_facets.set_new_unique_id();
m_seam_facets.set_new_unique_id();
supported_facets.set_new_unique_id();
seam_facets.set_new_unique_id();
}
void ModelVolume::rotate(double angle, Axis axis)
@ -2020,7 +2020,7 @@ bool model_custom_supports_data_changed(const ModelObject& mo, const ModelObject
assert(! model_volume_list_changed(mo, mo_new, ModelVolumeType::MODEL_PART));
assert(mo.volumes.size() == mo_new.volumes.size());
for (size_t i=0; i<mo.volumes.size(); ++i) {
if (! mo_new.volumes[i]->m_supported_facets.timestamp_matches(mo.volumes[i]->m_supported_facets))
if (! mo_new.volumes[i]->supported_facets.timestamp_matches(mo.volumes[i]->supported_facets))
return true;
}
return false;
@ -2030,7 +2030,7 @@ bool model_custom_seam_data_changed(const ModelObject& mo, const ModelObject& mo
assert(! model_volume_list_changed(mo, mo_new, ModelVolumeType::MODEL_PART));
assert(mo.volumes.size() == mo_new.volumes.size());
for (size_t i=0; i<mo.volumes.size(); ++i) {
if (! mo_new.volumes[i]->m_seam_facets.timestamp_matches(mo.volumes[i]->m_seam_facets))
if (! mo_new.volumes[i]->seam_facets.timestamp_matches(mo.volumes[i]->seam_facets))
return true;
}
return false;

View file

@ -489,10 +489,10 @@ public:
ModelConfigObject config;
// List of mesh facets to be supported/unsupported.
FacetsAnnotation m_supported_facets;
FacetsAnnotation supported_facets;
// List of seam enforcers/blockers.
FacetsAnnotation m_seam_facets;
FacetsAnnotation seam_facets;
// A parent object owning this modifier volume.
ModelObject* get_object() const { return this->object; }
@ -623,7 +623,7 @@ private:
ObjectBase(other),
name(other.name), source(other.source), m_mesh(other.m_mesh), m_convex_hull(other.m_convex_hull),
config(other.config), m_type(other.m_type), object(object), m_transformation(other.m_transformation),
m_supported_facets(other.m_supported_facets), m_seam_facets(other.m_seam_facets)
supported_facets(other.supported_facets), seam_facets(other.seam_facets)
{
assert(this->id().valid()); assert(this->config.id().valid()); assert(this->id() != this->config.id());
assert(this->id() == other.id() && this->config.id() == other.config.id());
@ -641,8 +641,8 @@ private:
calculate_convex_hull();
assert(this->config.id().valid()); assert(this->config.id() != other.config.id()); assert(this->id() != this->config.id());
m_supported_facets.clear();
m_seam_facets.clear();
supported_facets.clear();
seam_facets.clear();
}
ModelVolume& operator=(ModelVolume &rhs) = delete;
@ -656,8 +656,8 @@ private:
template<class Archive> void load(Archive &ar) {
bool has_convex_hull;
ar(name, source, m_mesh, m_type, m_material_id, m_transformation, m_is_splittable, has_convex_hull);
cereal::load_by_value(ar, m_supported_facets);
cereal::load_by_value(ar, m_seam_facets);
cereal::load_by_value(ar, supported_facets);
cereal::load_by_value(ar, seam_facets);
cereal::load_by_value(ar, config);
assert(m_mesh);
if (has_convex_hull) {
@ -671,8 +671,8 @@ private:
template<class Archive> void save(Archive &ar) const {
bool has_convex_hull = m_convex_hull.get() != nullptr;
ar(name, source, m_mesh, m_type, m_material_id, m_transformation, m_is_splittable, has_convex_hull);
cereal::save_by_value(ar, m_supported_facets);
cereal::save_by_value(ar, m_seam_facets);
cereal::save_by_value(ar, supported_facets);
cereal::save_by_value(ar, seam_facets);
cereal::save_by_value(ar, config);
if (has_convex_hull)
cereal::save_optional(ar, m_convex_hull);

View file

@ -404,10 +404,10 @@ static inline void model_volume_list_copy_configs(ModelObject &model_object_dst,
// Copy the ModelVolume data.
mv_dst.name = mv_src.name;
mv_dst.config.assign_config(mv_src.config);
if (! mv_dst.m_supported_facets.timestamp_matches(mv_src.m_supported_facets))
mv_dst.m_supported_facets = mv_src.m_supported_facets;
if (! mv_dst.m_seam_facets.timestamp_matches(mv_src.m_seam_facets))
mv_dst.m_seam_facets = mv_src.m_seam_facets;
if (! mv_dst.supported_facets.timestamp_matches(mv_src.supported_facets))
mv_dst.supported_facets = mv_src.supported_facets;
if (! mv_dst.seam_facets.timestamp_matches(mv_src.seam_facets))
mv_dst.seam_facets = mv_src.seam_facets;
//FIXME what to do with the materials?
// mv_dst.m_material_id = mv_src.m_material_id;
++ i_src;

View file

@ -2748,8 +2748,8 @@ void PrintObject::project_and_append_custom_facets(
{
for (const ModelVolume* mv : this->model_object()->volumes) {
const indexed_triangle_set custom_facets = seam
? mv->m_seam_facets.get_facets(*mv, type)
: mv->m_supported_facets.get_facets(*mv, type);
? mv->seam_facets.get_facets(*mv, type)
: mv->supported_facets.get_facets(*mv, type);
if (! mv->is_model_part() || custom_facets.indices.empty())
continue;

View file

@ -287,7 +287,7 @@ void GLGizmoFdmSupports::update_model_object() const
if (! mv->is_model_part())
continue;
++idx;
updated |= mv->m_supported_facets.set(*m_triangle_selectors[idx].get());
updated |= mv->supported_facets.set(*m_triangle_selectors[idx].get());
}
if (updated)
@ -314,7 +314,7 @@ void GLGizmoFdmSupports::update_from_model_object()
const TriangleMesh* mesh = &mv->mesh();
m_triangle_selectors.emplace_back(std::make_unique<TriangleSelectorGUI>(*mesh));
m_triangle_selectors.back()->deserialize(mv->m_supported_facets.get_data());
m_triangle_selectors.back()->deserialize(mv->supported_facets.get_data());
}
}

View file

@ -202,7 +202,7 @@ void GLGizmoSeam::update_model_object() const
if (! mv->is_model_part())
continue;
++idx;
updated |= mv->m_seam_facets.set(*m_triangle_selectors[idx].get());
updated |= mv->seam_facets.set(*m_triangle_selectors[idx].get());
}
if (updated)
@ -229,7 +229,7 @@ void GLGizmoSeam::update_from_model_object()
const TriangleMesh* mesh = &mv->mesh();
m_triangle_selectors.emplace_back(std::make_unique<TriangleSelectorGUI>(*mesh));
m_triangle_selectors.back()->deserialize(mv->m_seam_facets.get_data());
m_triangle_selectors.back()->deserialize(mv->seam_facets.get_data());
}
}