FIX: gen floating areas when holes of support_area propagate
jira: STUDIO-10271 Change-Id: Ib45d78c6f920613ba29cb97cead9192813cbb4fe
This commit is contained in:
parent
1f3dde9498
commit
1864b22478
|
@ -2539,11 +2539,12 @@ void TreeSupport::draw_circles()
|
||||||
for (const auto& hole : area->holes) {
|
for (const auto& hole : area->holes) {
|
||||||
// auto hole_bbox = get_extents(hole).polygon();
|
// auto hole_bbox = get_extents(hole).polygon();
|
||||||
for (auto& area_group_lower : area_groups_lower) {
|
for (auto& area_group_lower : area_groups_lower) {
|
||||||
if (area_group.type != SupportLayer::BaseType) continue;
|
|
||||||
auto& base_area_lower = *area_group_lower.area;
|
auto& base_area_lower = *area_group_lower.area;
|
||||||
Point pt_on_poly, pt_on_expoly, pt_far_on_poly;
|
Point pt_on_poly, pt_on_expoly, pt_far_on_poly;
|
||||||
// if a hole doesn't intersect with lower layer's contours, add a hole to lower layer and move it slightly to the contour
|
// if a hole doesn't intersect with lower layer's contours, add a hole to lower layer and move it slightly to the contour
|
||||||
if (base_area_lower.contour.contains(hole.points.front()) && !intersects_contour(hole, base_area_lower, pt_on_poly, pt_on_expoly, pt_far_on_poly)) {
|
if (base_area_lower.contour.contains(hole.points.front()) &&
|
||||||
|
!intersects_contour(hole, base_area_lower, pt_on_poly, pt_on_expoly, pt_far_on_poly,
|
||||||
|
0.01 + unscale_(line_width_scaled) * (area_group.need_extra_wall ? 2. : 0.5))) {
|
||||||
Polygon hole_lower = hole;
|
Polygon hole_lower = hole;
|
||||||
Point direction = normal(pt_on_expoly - pt_on_poly, line_width_scaled / 2);
|
Point direction = normal(pt_on_expoly - pt_on_poly, line_width_scaled / 2);
|
||||||
hole_lower.translate(direction);
|
hole_lower.translate(direction);
|
||||||
|
|
Loading…
Reference in New Issue