Fixed full statistics calculation

(calculate sum of volume and part_count only for solid parts)
This commit is contained in:
YuSanka 2019-05-03 13:09:42 +02:00
parent d2107fad2f
commit 4be4dc623c
4 changed files with 19 additions and 15 deletions

View file

@ -1467,7 +1467,7 @@ stl_stats ModelObject::get_object_stl_stats() const
const stl_stats& stats = volume->mesh.stl.stats;
// initialize full_stats (for repaired errors)
full_stats.degenerate_facets+= stats.degenerate_facets;
full_stats.degenerate_facets += stats.degenerate_facets;
full_stats.edges_fixed += stats.edges_fixed;
full_stats.facets_removed += stats.facets_removed;
full_stats.facets_added += stats.facets_added;
@ -1475,10 +1475,11 @@ stl_stats ModelObject::get_object_stl_stats() const
full_stats.backwards_edges += stats.backwards_edges;
// another used satistics value
if (volume->is_model_part())
if (volume->is_model_part()) {
full_stats.volume += stats.volume;
full_stats.number_of_parts += stats.number_of_parts;
}
}
return full_stats;
}

View file

@ -303,13 +303,13 @@ bool GUI_App::dark_mode_menus()
void GUI_App::init_label_colours()
{
if (dark_mode()) {
m_color_label_modified = wxColour(252, 77, 1);
m_color_label_sys = wxColour(26, 132, 57);
}
else {
m_color_label_modified = wxColour(253, 111, 40);
m_color_label_sys = wxColour(115, 220, 103);
}
else {
m_color_label_modified = wxColour(252, 77, 1);
m_color_label_sys = wxColour(26, 132, 57);
}
m_color_label_default = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
}

View file

@ -21,9 +21,9 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
OG_Settings(parent, true)
#ifndef __APPLE__
, m_focused_option("")
, m_manifold_warning_bmp(ScalableBitmap(parent, "exclamation"))
#endif // __APPLE__
{
m_manifold_warning_bmp = ScalableBitmap(parent, "exclamation");
m_og->set_name(_(L("Object Manipulation")));
m_og->label_width = 12;//125;
m_og->set_grid_vgap(5);
@ -77,6 +77,9 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
def.gui_type = "legend";
def.tooltip = L("Object name");
def.width = 21;
#ifdef __APPLE__
def.width = 19;
#endif
def.default_value = new ConfigOptionString{ " " };
line.append_option(Option(def, "object_name"));
m_og->append_line(line);

View file

@ -724,7 +724,7 @@ Sidebar::Sidebar(Plater *parent)
auto init_btn = [this](wxButton **btn, wxString label) {
*btn = new wxButton(this, wxID_ANY, label, wxDefaultPosition,
wxDefaultSize, wxBU_EXACTFIT | wxNO_BORDER);
wxDefaultSize, wxBU_EXACTFIT);
(*btn)->SetFont(wxGetApp().bold_font());
};