mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
Ported ExPolygon->area()
This commit is contained in:
@@ -30,6 +30,16 @@ ExPolygon::rotate(double angle, Point* center)
|
||||
}
|
||||
}
|
||||
|
||||
double
|
||||
ExPolygon::area() const
|
||||
{
|
||||
double a = this->contour.area();
|
||||
for (Polygons::const_iterator it = this->holes.begin(); it != this->holes.end(); ++it) {
|
||||
a -= -(*it).area(); // holes have negative area
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
SV*
|
||||
ExPolygon::to_SV() {
|
||||
const unsigned int num_holes = this->holes.size();
|
||||
|
||||
Reference in New Issue
Block a user