Fix
../src/libslic3r/QuadricEdgeCollapse.cpp:565:22: warning: comparison of integer expressions of different signedness: 'const int' and 'uint32_t' {aka 'unsigned int'} [-Wsign-compare] ../src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp:48:15: warning: unused variable 'min_triangle_count' [-Wunused-variable] ../src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp:160:9: warning: unused variable 'wanted_count' [-Wunused-variable] ..\src\slic3r\GUI\Gizmos\GLGizmoSimplify.cpp(167): warning C4305: '=': truncation from 'double' to 'float'
This commit is contained in:
parent
db6c984b36
commit
d7d4d52843
@ -562,7 +562,7 @@ bool QuadricEdgeCollapse::degenerate(uint32_t vi,
|
||||
if (e_info.t_index == ti1) continue; // ti1 will be deleted
|
||||
const Triangle &t = indices[e_info.t_index];
|
||||
for (size_t i = 0; i < 3; ++i)
|
||||
if (t[i] == vi) return true;
|
||||
if (static_cast<uint32_t>(t[i]) == vi) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -45,7 +45,6 @@ void GLGizmoSimplify::on_render_for_picking() {}
|
||||
|
||||
void GLGizmoSimplify::on_render_input_window(float x, float y, float bottom_limit)
|
||||
{
|
||||
const int min_triangle_count = 4; // tetrahedron
|
||||
const int max_char_in_name = 20;
|
||||
create_gui_cfg();
|
||||
|
||||
@ -119,11 +118,11 @@ void GLGizmoSimplify::on_render_input_window(float x, float y, float bottom_limi
|
||||
m_imgui->disabled_begin(m_configuration.use_count);
|
||||
ImGui::Text(_L("Detail level").c_str());
|
||||
std::vector<std::string> reduce_captions = {
|
||||
_u8L("Extra high"),
|
||||
_u8L("High"),
|
||||
_u8L("Medium"),
|
||||
_u8L("Low"),
|
||||
_u8L("Extra low")
|
||||
static_cast<std::string>(_u8L("Extra high")),
|
||||
static_cast<std::string>(_u8L("High")),
|
||||
static_cast<std::string>(_u8L("Medium")),
|
||||
static_cast<std::string>(_u8L("Low")),
|
||||
static_cast<std::string>(_u8L("Extra low"))
|
||||
};
|
||||
ImGui::SameLine(m_gui_cfg->bottom_left_width);
|
||||
ImGui::SetNextItemWidth(m_gui_cfg->input_width);
|
||||
@ -157,14 +156,13 @@ void GLGizmoSimplify::on_render_input_window(float x, float y, float bottom_limi
|
||||
m_imgui->disabled_begin(!m_configuration.use_count);
|
||||
ImGui::Text(_L("Ratio").c_str());
|
||||
ImGui::SameLine(m_gui_cfg->bottom_left_width);
|
||||
int wanted_count = m_configuration.wanted_count;
|
||||
ImGui::SetNextItemWidth(m_gui_cfg->input_width);
|
||||
const char * format = (m_configuration.wanted_percent > 10)? "%.0f %%":
|
||||
((m_configuration.wanted_percent > 1)? "%.1f %%":"%.2f %%");
|
||||
if (ImGui::SliderFloat("##triangle_ratio", &m_configuration.wanted_percent, 0.f, 100.f, format)) {
|
||||
m_is_valid_result = false;
|
||||
if (m_configuration.wanted_percent < 0.f)
|
||||
m_configuration.wanted_percent = 0.01;
|
||||
m_configuration.wanted_percent = 0.01f;
|
||||
if (m_configuration.wanted_percent > 100.f)
|
||||
m_configuration.wanted_percent = 100.f;
|
||||
m_configuration.update_percent(triangle_count);
|
||||
|
Loading…
Reference in New Issue
Block a user