mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-09-18 19:13:14 +08:00
Fix warnings
libslic3r/SLA/SupportPointGenerator.cpp:20:6: warning: unused function 'exist_point_in_distance' [-Wunused-function] libslic3r/SLA/SupportPointGenerator.cpp:600:45: warning: lambda capture 'is_lower' is not used [-Wunused-lambda-capture] libslic3r/SLA/SupportPointGenerator.cpp:728:15: warning: lambda capture 'sample_distance_in_um2' is not used [-Wunused-lambda-capture] libslic3r/SLAPrintSteps.cpp:172:11: warning: lambda capture 'tree' is not used [-Wunused-lambda-capture] slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp:790:40: warning: format string is not a string literal (potentially insecure) [-Wformat-security] slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp:90:12: warning: unused variable 'border' [-Wunused-variable]
This commit is contained in:
parent
11c7398cd3
commit
c7d79ec966
@ -17,11 +17,13 @@ using namespace Slic3r;
|
||||
using namespace Slic3r::sla;
|
||||
|
||||
namespace {
|
||||
#ifndef NDEBUG
|
||||
bool exist_point_in_distance(const Vec3f &p, float distance, const LayerSupportPoints &pts) {
|
||||
float distance_sq = sqr(distance);
|
||||
return std::any_of(pts.begin(), pts.end(), [&p, distance_sq](const LayerSupportPoint &sp) {
|
||||
return (sp.pos - p).squaredNorm() < distance_sq; });
|
||||
}
|
||||
#endif // NDEBUG
|
||||
|
||||
/// <summary>
|
||||
/// Struct to store support points in KD tree to fast search for nearest ones.
|
||||
@ -597,7 +599,7 @@ void create_peninsulas(LayerPart &part, const PrepareSupportConfig &config) {
|
||||
// Check, wheather line exist in set of belowe lines
|
||||
// True .. line exist in previous layer (or partialy overlap previous line), connection to land
|
||||
// False .. line is made by border of current layer part(peninsula coast)
|
||||
auto exist_belowe = [&get_angle, &idx, &is_lower, &below_lines, &belowe_line_angle]
|
||||
auto exist_belowe = [&get_angle, &idx, &below_lines, &belowe_line_angle]
|
||||
(const Line &l) {
|
||||
// It is edge case of expand
|
||||
if (below_lines.empty())
|
||||
@ -720,12 +722,9 @@ SupportPointGeneratorData Slic3r::sla::prepare_generator_data(
|
||||
}
|
||||
}, 4 /*gransize*/);
|
||||
|
||||
double sample_distance_in_um = scale_(config.discretize_overhang_step);
|
||||
double sample_distance_in_um2 = sample_distance_in_um * sample_distance_in_um;
|
||||
|
||||
// Link parts by intersections
|
||||
execution::for_each(ex_tbb, size_t(1), result.slices.size(),
|
||||
[&result, sample_distance_in_um2, throw_on_cancel](size_t layer_id) {
|
||||
[&result, throw_on_cancel](size_t layer_id) {
|
||||
if ((layer_id % 16) == 0)
|
||||
throw_on_cancel();
|
||||
|
||||
@ -754,6 +753,8 @@ SupportPointGeneratorData Slic3r::sla::prepare_generator_data(
|
||||
}, 8 /* gransize */);
|
||||
|
||||
// Sample overhangs part of island
|
||||
double sample_distance_in_um = scale_(config.discretize_overhang_step);
|
||||
double sample_distance_in_um2 = sample_distance_in_um * sample_distance_in_um;
|
||||
execution::for_each(ex_tbb, size_t(1), result.slices.size(),
|
||||
[&result, sample_distance_in_um2, throw_on_cancel](size_t layer_id) {
|
||||
if ((layer_id % 32) == 0)
|
||||
|
@ -169,7 +169,7 @@ void prepare_permanent_support_points(
|
||||
}
|
||||
|
||||
permanent_supports.erase(std::remove_if(permanent_supports.begin(), permanent_supports.end(),
|
||||
[&tree](const SupportPoint &p) { return p.head_front_radius < 0.f; }),permanent_supports.end());
|
||||
[](const SupportPoint &p) { return p.head_front_radius < 0.f; }),permanent_supports.end());
|
||||
|
||||
std::sort(permanent_supports.begin(), permanent_supports.end(),
|
||||
[](const SupportPoint& p1,const SupportPoint& p2){ return p1.pos.z() < p2.pos.z(); });
|
||||
|
@ -85,9 +85,6 @@ const IconManager::Icon &get_icon(const IconManager::Icons &icons, IconType type
|
||||
bool draw_view_mode(bool &show_support_structure, const IconManager::Icons &icons) {
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ChildBorderSize, 8.);
|
||||
ScopeGuard sg([] { ImGui::PopStyleVar(); });
|
||||
|
||||
ImVec4 tint(1, 1, 1, 1);
|
||||
ImVec4 border = ImGuiPureWrap::COL_ORANGE_DARK;
|
||||
if (show_support_structure) {
|
||||
draw(get_icon(icons, IconType::show_support_structure_selected));
|
||||
if(ImGui::IsItemHovered())
|
||||
@ -787,7 +784,7 @@ RENDER_AGAIN:
|
||||
(int) supports.size(), count_user_edited, count_island);
|
||||
}
|
||||
ImVec4 light_gray{0.4f, 0.4f, 0.4f, 1.0f};
|
||||
ImGui::TextColored(light_gray, stats.c_str());
|
||||
ImGui::TextColored(light_gray, "%s", stats.c_str());
|
||||
|
||||
//ImGui::Separator(); // START temporary debug
|
||||
//ImGui::Text("Between delimiters is temporary GUI");
|
||||
|
Loading…
x
Reference in New Issue
Block a user