mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 17:27:52 -06:00
New functions for variable offsets of polygons / expolygons.
Test cases for the above. Improvements of older test cases.
This commit is contained in:
parent
18bbefcd61
commit
5e8572a196
8 changed files with 565 additions and 27 deletions
|
@ -102,6 +102,15 @@ inline void polygons_append(Polygons &dst, Polygons &&src)
|
|||
}
|
||||
}
|
||||
|
||||
inline Polygons polygons_simplify(const Polygons &polys, double tolerance)
|
||||
{
|
||||
Polygons out;
|
||||
out.reserve(polys.size());
|
||||
for (const Polygon &p : polys)
|
||||
polygons_append(out, p.simplify(tolerance));
|
||||
return out;
|
||||
}
|
||||
|
||||
inline void polygons_rotate(Polygons &polys, double angle)
|
||||
{
|
||||
const double cos_angle = cos(angle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue