mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 10:47:50 -06:00
New method to rotate only polygons, not translate.
New free function to_polygons. Whithout this function one needs to construct the ExPolygonCollection, which means a deep copy.
This commit is contained in:
parent
023310882f
commit
bcfbe02c8d
2 changed files with 36 additions and 0 deletions
|
@ -52,6 +52,15 @@ ExPolygon::translate(double x, double y)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
ExPolygon::rotate(double angle)
|
||||
{
|
||||
contour.rotate(angle);
|
||||
for (Polygons::iterator it = holes.begin(); it != holes.end(); ++it) {
|
||||
(*it).rotate(angle);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ExPolygon::rotate(double angle, const Point ¢er)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue