mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-07-29 12:54:31 +03:00
WIP VoronoiOffset: Squash merge of vb_voronoi_offset
Working contour offsetting, skeleton_edges_rough() to detect "important" skeleton edges. Radius of an inscribed circle along the "important" skeleton edges changes slowly, therefore these "important" skeleton edges signify oblong regions possibly needing a gap fill.
This commit is contained in:
@@ -228,6 +228,16 @@ ForwardIt binary_find_by_predicate(ForwardIt first, ForwardIt last, LowerThanKey
|
||||
return first != last && equal_to_key(*first) ? first : last;
|
||||
}
|
||||
|
||||
template<typename ContainerType, typename ValueType> inline bool contains(const ContainerType &c, const ValueType &v)
|
||||
{ return std::find(c.begin(), c.end(), v) != c.end(); }
|
||||
template<typename T> inline bool contains(const std::initializer_list<T> &il, const T &v)
|
||||
{ return std::find(il.begin(), il.end(), v) != il.end(); }
|
||||
|
||||
template<typename ContainerType, typename ValueType> inline bool one_of(const ValueType &v, const ContainerType &c)
|
||||
{ return contains(c, v); }
|
||||
template<typename T> inline bool one_of(const T& v, const std::initializer_list<T>& il)
|
||||
{ return contains(il, v); }
|
||||
|
||||
template<typename T>
|
||||
static inline T sqr(T x)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user