Ensure bed shape is in correct orientation (SoftFever/OrcaSlicer#9345)

This commit is contained in:
Noisyfox
2025-04-14 22:51:58 +08:00
parent 035b047fef
commit 228b50f858
15 changed files with 40 additions and 28 deletions

View File

@@ -1410,4 +1410,14 @@ ExPolygons variable_offset_inner_ex(const ExPolygon &expoly, const std::vector<s
return output;
}
Pointfs make_counter_clockwise(const Pointfs& pointfs)
{
Pointfs ps = pointfs;
if (Polygon::new_scale(pointfs).is_clockwise()) {
std::reverse(ps.begin(), ps.end());
}
return ps;
}
}