Prusa 2.7.2

This commit is contained in:
sunsets
2024-03-27 14:38:03 +08:00
parent 63daf0c087
commit 2387bc9cdb
203 changed files with 6053 additions and 15634 deletions

View File

@@ -146,16 +146,26 @@ class Integrals{
* @param polygons List of polygons specifing the domain.
*/
explicit Integrals(const Polygons& polygons);
explicit Integrals(const Polygon& polygon);
/**
* Construct integral x_i int x_i^2 (i=1,2), xy and integral 1 (area) over
* a set of rectangles defined by a "thick" polyline.
*/
explicit Integrals(const Polylines& polylines, const std::vector<float>& widths);
// TODO refactor and delete the default constructor
Integrals() = default;
Integrals(float area, Vec2f x_i, Vec2f x_i_squared, float xy);
float area{};
Vec2f x_i{Vec2f::Zero()};
Vec2f x_i_squared{Vec2f::Zero()};
float xy{};
private:
void add(const Integrals& other);
};
Integrals operator+(const Integrals& a, const Integrals& b);
float compute_second_moment(
const Integrals& integrals,
const Vec2f& axis_direction