mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 13:56:01 +08:00
Fix warnings:
⚠️ ../src/libslic3r/SLA/SupportIslands/SampleIslandUtils.cpp:1495:68: warning: lambda capture 'tiny_done' is not used [-Wunused-lambda-capture] ⚠️ ../src/libslic3r/SLA/SupportIslands/SampleIslandUtils.cpp:1830:23: warning: unused variable 'line' [-Wunused-variable] ⚠️ ../src/libslic3r/SLA/SupportIslands/SampleIslandUtils.cpp:624:6: warning: unused function 'is_points_in_distance' [-Wunused-function] ⚠️ ../src/libslic3r/SLA/SupportIslands/VoronoiDiagramCGAL.cpp:37:7: warning: unused function 'to_point_d' [-Wunused-function] ⚠️ ../src/libslic3r/SLA/SupportPointGenerator.cpp:359:6: warning: unused function 'exist_same_points' [-Wunused-function] ⚠️ ../src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp:813:27: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] ⚠️ ../src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp:892:146: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
This commit is contained in:
parent
5e0b351f71
commit
3df99c16be
@ -620,6 +620,7 @@ void SampleIslandUtils::align_samples(SupportIslandPoints &samples,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
namespace {
|
namespace {
|
||||||
bool is_points_in_distance(const Slic3r::Point & p,
|
bool is_points_in_distance(const Slic3r::Point & p,
|
||||||
const Slic3r::Points &points,
|
const Slic3r::Points &points,
|
||||||
@ -633,6 +634,7 @@ bool is_points_in_distance(const Slic3r::Point & p,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
#endif // NDEBUG
|
||||||
|
|
||||||
coord_t SampleIslandUtils::align_once(
|
coord_t SampleIslandUtils::align_once(
|
||||||
SupportIslandPoints &samples,
|
SupportIslandPoints &samples,
|
||||||
@ -1492,7 +1494,7 @@ SampleIslandUtils::Field SampleIslandUtils::create_field(
|
|||||||
|
|
||||||
// Prepare data for field outline,
|
// Prepare data for field outline,
|
||||||
// when field transit into tiny part of island
|
// when field transit into tiny part of island
|
||||||
auto add_wide_tiny_change_only = [&wide_tiny_changes, &lines, &tiny_done]
|
auto add_wide_tiny_change_only = [&wide_tiny_changes, &lines]
|
||||||
(const VoronoiGraph::Position &position){
|
(const VoronoiGraph::Position &position){
|
||||||
Point p1, p2;
|
Point p1, p2;
|
||||||
std::tie(p1, p2) = VoronoiGraphUtils::point_on_lines(position, lines);
|
std::tie(p1, p2) = VoronoiGraphUtils::point_on_lines(position, lines);
|
||||||
@ -1827,7 +1829,6 @@ SupportIslandPoints SampleIslandUtils::sample_outline(
|
|||||||
using RestrictionPtr = std::shared_ptr<SupportOutlineIslandPoint::Restriction>;
|
using RestrictionPtr = std::shared_ptr<SupportOutlineIslandPoint::Restriction>;
|
||||||
auto add_sample = [&](size_t index, const RestrictionPtr& restriction, coord_t &last_support) {
|
auto add_sample = [&](size_t index, const RestrictionPtr& restriction, coord_t &last_support) {
|
||||||
using Position = SupportOutlineIslandPoint::Position;
|
using Position = SupportOutlineIslandPoint::Position;
|
||||||
const Line & line = restriction->lines[index];
|
|
||||||
const double &line_length_double = restriction->lengths[index];
|
const double &line_length_double = restriction->lengths[index];
|
||||||
coord_t line_length = static_cast<coord_t>(std::round(line_length_double));
|
coord_t line_length = static_cast<coord_t>(std::round(line_length_double));
|
||||||
if (last_support + line_length > sample_distance) {
|
if (last_support + line_length > sample_distance) {
|
||||||
|
@ -100,7 +100,7 @@ public:
|
|||||||
/// Can move?
|
/// Can move?
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>FALSE</returns>
|
/// <returns>FALSE</returns>
|
||||||
virtual bool can_move() const override { return false; }
|
bool can_move() const override { return false; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// No move!
|
/// No move!
|
||||||
@ -108,7 +108,7 @@ public:
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="destination">Wanted position</param>
|
/// <param name="destination">Wanted position</param>
|
||||||
/// <returns>No move means zero distance</returns>
|
/// <returns>No move means zero distance</returns>
|
||||||
virtual coord_t move(const Point &destination) { return 0; }
|
coord_t move(const Point &destination) override { return 0; }
|
||||||
};
|
};
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -34,11 +34,8 @@ using Halfedge_handle = VD::Halfedge_handle;
|
|||||||
using Ccb_halfedge_circulator = VD::Ccb_halfedge_circulator;
|
using Ccb_halfedge_circulator = VD::Ccb_halfedge_circulator;
|
||||||
|
|
||||||
namespace{
|
namespace{
|
||||||
Vec2d to_point_d(const Site_2 &s) { return {s.x(), s.y()}; }
|
// conversion from double to coor_t
|
||||||
Slic3r::Point to_point(const Site_2 &s) {
|
Slic3r::Point to_point(const Site_2 &s) { return Slic3r::Point(s.x(), s.y()); }
|
||||||
// conversion from double to coor_t
|
|
||||||
return Slic3r::Point(s.x(), s.y());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create line segment lay between given points with distance limited by maximal_distance
|
/// Create line segment lay between given points with distance limited by maximal_distance
|
||||||
|
@ -356,6 +356,7 @@ bool contain_point(const Point &p, const Points &sorted_points) {
|
|||||||
return it->x() == p.x() && it->y() == p.y();
|
return it->x() == p.x() && it->y() == p.y();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
bool exist_same_points(const ExPolygon &shape, const Points& prev_points) {
|
bool exist_same_points(const ExPolygon &shape, const Points& prev_points) {
|
||||||
auto shape_points = to_points(shape);
|
auto shape_points = to_points(shape);
|
||||||
return shape_points.end() !=
|
return shape_points.end() !=
|
||||||
@ -363,6 +364,7 @@ bool exist_same_points(const ExPolygon &shape, const Points& prev_points) {
|
|||||||
return contain_point(p, prev_points);
|
return contain_point(p, prev_points);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
#endif // NDEBUG
|
||||||
|
|
||||||
Points sample_overhangs(const LayerPart& part, double dist2) {
|
Points sample_overhangs(const LayerPart& part, double dist2) {
|
||||||
const ExPolygon &shape = *part.shape;
|
const ExPolygon &shape = *part.shape;
|
||||||
|
@ -817,7 +817,7 @@ void GLGizmoSlaSupports::draw_island_config() {
|
|||||||
#ifdef OPTION_TO_STORE_ISLAND
|
#ifdef OPTION_TO_STORE_ISLAND
|
||||||
bool store_islands = !sample_config.path.empty();
|
bool store_islands = !sample_config.path.empty();
|
||||||
if (ImGui::Checkbox("StoreIslands", &store_islands)) {
|
if (ImGui::Checkbox("StoreIslands", &store_islands)) {
|
||||||
if (store_islands = true)
|
if (store_islands == true)
|
||||||
sample_config.path = "C:/data/temp/island<<order>>.svg";
|
sample_config.path = "C:/data/temp/island<<order>>.svg";
|
||||||
} else if (ImGui::IsItemHovered())
|
} else if (ImGui::IsItemHovered())
|
||||||
ImGui::SetTooltip("Store islands in file\n<<order>> is replaced by island order number");
|
ImGui::SetTooltip("Store islands in file\n<<order>> is replaced by island order number");
|
||||||
@ -896,7 +896,7 @@ void GLGizmoSlaSupports::draw_island_config() {
|
|||||||
ImGui::SetTooltip("Minimal width to be supported by outline\nMust be smaller or equal to thin max width(to make hysteresis)");
|
ImGui::SetTooltip("Minimal width to be supported by outline\nMust be smaller or equal to thin max width(to make hysteresis)");
|
||||||
|
|
||||||
ImGui::Text("head radius is set to %.2f", unscale<float>(sample_config.head_radius));
|
ImGui::Text("head radius is set to %.2f", unscale<float>(sample_config.head_radius));
|
||||||
ImGui::Text("Alignment stop criteria: min_move(%.0f um), iter(%d x), max_VD_move(%.2f mm)", unscale<float>(sample_config.minimal_move)*1000, sample_config.count_iteration,
|
ImGui::Text("Alignment stop criteria: min_move(%.0f um), iter(%d x), max_VD_move(%.2f mm)", unscale<float>(sample_config.minimal_move)*1000, (int)sample_config.count_iteration,
|
||||||
unscale<float>(sample_config.max_align_distance)
|
unscale<float>(sample_config.max_align_distance)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user