Skip to content

Commit 4948ff4

Browse files
committed
Basically working new skin support calculation
CURA-12361
1 parent be69c8a commit 4948ff4

File tree

3 files changed

+464
-10
lines changed

3 files changed

+464
-10
lines changed

include/geometry/PointsSet.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ class PointsSet
9090
push_back(other.points_.begin(), other.points_.end());
9191
}
9292

93+
void push_back(PointsSet&& other)
94+
{
95+
points_.insert(points_.end(), std::make_move_iterator(other.points_.begin()), std::make_move_iterator(other.points_.end()));
96+
}
97+
9398
void push_back(const const_iterator& begin, const const_iterator& end)
9499
{
95100
points_.insert(points_.end(), begin, end);

include/utils/Coord_t.h

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,26 @@ template<utils::floating_point FactorType>
3838
return std::llrint(std::lerp(static_cast<double>(a), static_cast<double>(b), t));
3939
}
4040

41-
[[nodiscard]] inline bool fuzzy_equal(coord_t a, coord_t b)
41+
[[nodiscard]] inline bool fuzzy_is_null(const coord_t value)
4242
{
43-
return std::abs(b - a) <= EPSILON;
43+
return std::abs(value) <= EPSILON;
4444
}
4545

46-
[[nodiscard]] inline bool fuzzy_not_equal(coord_t a, coord_t b)
46+
[[nodiscard]] inline bool fuzzy_equal(const coord_t a, const coord_t b)
47+
{
48+
return fuzzy_is_null(b - a);
49+
}
50+
51+
[[nodiscard]] inline bool fuzzy_not_equal(const coord_t a, const coord_t b)
4752
{
4853
return ! fuzzy_equal(a, b);
4954
}
5055

56+
[[nodiscard]] inline bool fuzzy_is_greater(const coord_t a, const coord_t b)
57+
{
58+
return a - b > EPSILON;
59+
}
60+
5161
} // namespace cura
5262

5363

0 commit comments

Comments
 (0)