mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-24 02:21:49 -06:00
New custom backend for libnest2d using libslic3r types
Adapted to new clipper->eigen mod
This commit is contained in:
parent
7112ac61b6
commit
ad19ab219d
21 changed files with 656 additions and 765 deletions
|
@ -72,6 +72,16 @@ public:
|
|||
// Projection of a point onto the polygon.
|
||||
Point point_projection(const Point &point) const;
|
||||
std::vector<float> parameter_by_length() const;
|
||||
|
||||
using iterator = Points::iterator;
|
||||
using const_iterator = Points::const_iterator;
|
||||
|
||||
inline auto begin() { return points.begin(); }
|
||||
inline auto begin() const { return points.begin(); }
|
||||
inline auto end() { return points.end(); }
|
||||
inline auto end() const { return points.end(); }
|
||||
inline auto cbegin() const { return points.begin(); }
|
||||
inline auto cend() const { return points.end(); }
|
||||
};
|
||||
|
||||
inline bool operator==(const Polygon &lhs, const Polygon &rhs) { return lhs.points == rhs.points; }
|
||||
|
@ -90,6 +100,8 @@ inline double total_length(const Polygons &polylines) {
|
|||
return total;
|
||||
}
|
||||
|
||||
inline double area(const Polygon &poly) { return poly.area(); }
|
||||
|
||||
inline double area(const Polygons &polys)
|
||||
{
|
||||
double s = 0.;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue