1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-07-15 08:44:26 +00:00

Use Clipper for line clipping

This commit is contained in:
Alessandro Ranellucci
2013-11-21 14:15:38 +01:00
parent 1d6a18071a
commit 3025c77675
20 changed files with 202 additions and 211 deletions
+4 -6
View File
@@ -66,18 +66,16 @@ double
Polygon::area() const
{
ClipperLib::Path p;
Slic3rPolygon_to_ClipperPolygon(*this, p);
Slic3rMultiPoint_to_ClipperPath(*this, p);
return ClipperLib::Area(p);
}
bool
Polygon::is_counter_clockwise() const
{
ClipperLib::Path* p = new ClipperLib::Path();
Slic3rPolygon_to_ClipperPolygon(*this, *p);
bool orientation = ClipperLib::Orientation(*p);
delete p;
return orientation;
ClipperLib::Path p;
Slic3rMultiPoint_to_ClipperPath(*this, p);
return ClipperLib::Orientation(p);
}
bool