Skip to content

Commit

Permalink
Np 208 various fixes (#2127)
Browse files Browse the repository at this point in the history
  • Loading branch information
rburema authored Aug 6, 2024
2 parents ead62ed + f590948 commit 1411c5b
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def requirements(self):
self.requires("protobuf/3.21.12")
self.requires("clipper/6.4.2@ultimaker/stable")
self.requires("boost/1.82.0")
self.requires("rapidjson/1.1.0")
self.requires("rapidjson/cci.20230929")
self.requires("stb/20200203")
self.requires("spdlog/1.12.0")
self.requires("fmt/10.1.1")
Expand Down
2 changes: 2 additions & 0 deletions include/utils/ExtrusionLine.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef UTILS_EXTRUSION_LINE_H
#define UTILS_EXTRUSION_LINE_H

#include <algorithm>

#include <range/v3/view/enumerate.hpp>
#include <range/v3/view/reverse.hpp>
#include <range/v3/view/sliding.hpp>
Expand Down
3 changes: 3 additions & 0 deletions src/geometry/PartsView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

#include "geometry/PartsView.h"

#include <algorithm>
#include <vector>

#include "geometry/Polygon.h"
#include "geometry/SingleShape.h"

Expand Down
11 changes: 3 additions & 8 deletions src/geometry/Polyline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "geometry/Polyline.h"

#include <algorithm>
#include <numbers>
#include <numeric>

Expand Down Expand Up @@ -104,10 +105,7 @@ Polyline::const_segments_iterator Polyline::endSegments() const
{
return const_segments_iterator(end(), begin(), end());
}
else
{
return const_segments_iterator(size() > 1 ? std::prev(end()) : end(), begin(), end());
}
return const_segments_iterator(size() > 1 ? std::prev(end()) : end(), begin(), end());
}

Polyline::segments_iterator Polyline::beginSegments()
Expand All @@ -121,10 +119,7 @@ Polyline::segments_iterator Polyline::endSegments()
{
return segments_iterator(end(), begin(), end());
}
else
{
return segments_iterator(size() > 1 ? std::prev(end()) : end(), begin(), end());
}
return segments_iterator(size() > 1 ? std::prev(end()) : end(), begin(), end());
}

coord_t Polyline::length() const
Expand Down
20 changes: 9 additions & 11 deletions src/infill/ZigzagConnectorProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "infill/ZigzagConnectorProcessor.h"

#include <algorithm>
#include <cassert>

#include "geometry/OpenPolyline.h"
Expand Down Expand Up @@ -93,17 +94,14 @@ bool ZigzagConnectorProcessor::handleConnectorTooCloseToSegment(const coord_t sc
{
return false;
}
else
{
return std::find_if(
current_connector_.begin(),
current_connector_.end(),
[scanline_x, min_distance_to_scanline](const Point2LL& point)
{
return std::abs(point.X - scanline_x) >= min_distance_to_scanline;
})
== current_connector_.end();
}
return std::find_if(
current_connector_.begin(),
current_connector_.end(),
[scanline_x, min_distance_to_scanline](const Point2LL& point)
{
return std::abs(point.X - scanline_x) >= min_distance_to_scanline;
})
== current_connector_.end();
}

void ZigzagConnectorProcessor::registerScanlineSegmentIntersection(const Point2LL& intersection, int scanline_index, coord_t min_distance_to_scanline)
Expand Down
1 change: 1 addition & 0 deletions src/utils/AABB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "utils/AABB.h"

#include <algorithm>
#include <limits>

#include "geometry/Polygon.h"
Expand Down

0 comments on commit 1411c5b

Please sign in to comment.