mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 06:04:01 -06: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:
parent
dc4bdad84a
commit
a116914fce
6 changed files with 2018 additions and 548 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue