mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 17:58:03 -06:00
Use Clipper for line clipping
This commit is contained in:
parent
1d6a18071a
commit
3025c77675
20 changed files with 202 additions and 211 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue