Fix tree support bed exclusion area calculation (#9633)

Fix tree support bed exclusion area calculation (SoftFever/OrcaSlicer#9624)
This commit is contained in:
Noisyfox
2025-06-01 13:18:03 +08:00
committed by GitHub
parent c93e321ef0
commit 4ae4634976
4 changed files with 26 additions and 46 deletions

View File

@@ -458,17 +458,7 @@ void ArrangeJob::prepare()
auto& print = wxGetApp().plater()->get_partplate_list().get_current_fff_print();
auto print_config = print.config();
bed_poly.points = get_bed_shape(*m_plater->config());
Pointfs excluse_area_points = print_config.bed_exclude_area.values;
Polygons exclude_polys;
Polygon exclude_poly;
for (int i = 0; i < excluse_area_points.size(); i++) {
auto pt = excluse_area_points[i];
exclude_poly.points.emplace_back(scale_(pt.x()), scale_(pt.y()));
if (i % 4 == 3) { // exclude areas are always rectangle
exclude_polys.push_back(exclude_poly);
exclude_poly.points.clear();
}
}
Polygons exclude_polys = get_bed_excluded_area(print_config);
bed_poly = diff({ bed_poly }, exclude_polys)[0];
}