mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-02-01 16:38:43 +03:00
PRUSA 2.7.0
This commit is contained in:
@@ -91,7 +91,7 @@ void fill_distances(const Polygon &poly, std::vector<double> &distances)
|
||||
|
||||
double dist = 0.;
|
||||
auto lrange = line_range(poly);
|
||||
for (const Line &l : lrange) {
|
||||
for (const Line l : lrange) {
|
||||
dist += l.length();
|
||||
distances.emplace_back(dist);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,9 @@ struct GravityKernel {
|
||||
std::optional<Vec2crd> item_sink;
|
||||
Vec2d active_sink;
|
||||
|
||||
GravityKernel(Vec2crd gravity_center) : sink{gravity_center} {}
|
||||
GravityKernel(Vec2crd gravity_center) :
|
||||
sink{gravity_center}, active_sink{unscaled(gravity_center)} {}
|
||||
|
||||
GravityKernel() = default;
|
||||
|
||||
template<class ArrItem>
|
||||
|
||||
@@ -24,6 +24,7 @@ bool find_initial_position(Itm &itm,
|
||||
{
|
||||
if (all_items_range(packing_context).empty()) {
|
||||
auto rotations = allowed_rotations(itm);
|
||||
set_rotation(itm, 0.);
|
||||
auto chull = envelope_convex_hull(itm);
|
||||
|
||||
for (double rot : rotations) {
|
||||
|
||||
@@ -129,7 +129,7 @@ Polygon ifp_convex_convex(const Polygon &fixed, const Polygon &movable)
|
||||
// the zero area polygon formed by the edge. The union of all these sub-nfps
|
||||
// will contain a hole that is the actual ifp.
|
||||
auto lrange = line_range(fixed);
|
||||
for (const Line &l : lrange) { // Older mac compilers generate warnging if line_range is called in-place
|
||||
for (const Line l : lrange) { // Older mac compilers generate warnging if line_range is called in-place
|
||||
Polygon fixed = {l.a, l.b};
|
||||
subnfps.emplace_back(nfp_convex_convex_legacy(fixed, movable));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user