mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-10-15 11:42:52 +02:00
Ported Polygon->area
This commit is contained in:
1 parent
1f734807b9
commit
792fcba7be
5 files changed
+12
-7
No files matched your search
@@ -54,6 +54,14 @@ Polygon::split_at_first_point()
|
||||
return this->split_at_index(0);
|
||||
}
|
||||
|
||||
double
|
||||
Polygon::area()
|
||||
{
|
||||
ClipperLib::Polygon p;
|
||||
Slic3rPolygon_to_ClipperPolygon(*this, p);
|
||||
return ClipperLib::Area(p);
|
||||
}
|
||||
|
||||
bool
|
||||
Polygon::is_counter_clockwise()
|
||||
{
|
||||
|
||||
@@ -16,6 +16,7 @@ class Polygon : public MultiPoint {
|
||||
Polyline* split_at(const Point* point);
|
||||
Polyline* split_at_index(int index);
|
||||
Polyline* split_at_first_point();
|
||||
double area();
|
||||
bool is_counter_clockwise();
|
||||
bool make_counter_clockwise();
|
||||
bool make_clockwise();
|
||||
|
||||
Reference in new issue
Block a user