mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 15:07:31 -06:00
ENH: auto-arrange uses inner NFP to simplify fixed_overfit
1. Add inner nfp algo.The final nfp result is inner nfp subtract outer nfp. 2. Leave 5(scaled) room in inflation to allow numeric float eps. Change-Id: I6be0b205c9811af24a238352b256bf1399ee3716 (cherry picked from commit dbab96efc7bfa16afd9db9607b862886606b0aa0)
This commit is contained in:
parent
29e6f71402
commit
9857f7384b
5 changed files with 51 additions and 12 deletions
|
@ -539,11 +539,11 @@ void ArrangeJob::process()
|
|||
std::for_each(m_selected.begin(), m_selected.end(), [&](ArrangePolygon &ap) {
|
||||
ap.inflation = params.min_obj_distance / 2;
|
||||
BoundingBox apbb = ap.poly.contour.bounding_box();
|
||||
coord_t diffx = bedbb.size().x() - apbb.size().x();
|
||||
coord_t diffy = bedbb.size().y() - apbb.size().y();
|
||||
if (diffx > 0 && diffy > 0) {
|
||||
coord_t min_diff = std::min(diffx, diffy);
|
||||
ap.inflation = std::min(min_diff / 2, ap.inflation);
|
||||
auto diffx = bedbb.size().x() - apbb.size().x() - 5;
|
||||
auto diffy = bedbb.size().y() - apbb.size().y() - 5;
|
||||
if (diffx > 0 && diffy > 0) {
|
||||
auto min_diff = std::min(diffx, diffy);
|
||||
ap.inflation = std::min(min_diff / 2, ap.inflation);
|
||||
}
|
||||
});
|
||||
// For occulusion regions, inflation should be larger to prevent genrating brim on them.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue