mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47: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
|
@ -301,6 +301,15 @@ inline bool expolygons_contain(ExPolygons &expolys, const Point &pt)
|
|||
return false;
|
||||
}
|
||||
|
||||
inline ExPolygons expolygons_simplify(const ExPolygons &expolys, double tolerance)
|
||||
{
|
||||
ExPolygons out;
|
||||
out.reserve(expolys.size());
|
||||
for (const ExPolygon &exp : expolys)
|
||||
exp.simplify(tolerance, &out);
|
||||
return out;
|
||||
}
|
||||
|
||||
extern BoundingBox get_extents(const ExPolygon &expolygon);
|
||||
extern BoundingBox get_extents(const ExPolygons &expolygons);
|
||||
extern BoundingBox get_extents_rotated(const ExPolygon &poly, double angle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue