mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 05:15:58 +08:00
Greatly improve performance of extra perimeters on overhangs, fix gap fill on extra perimeters, mark as Experimental
This commit is contained in:
parent
a439590c1d
commit
24e9807387
@ -817,10 +817,12 @@ std::tuple<std::vector<ExtrusionPaths>, Polygons> generate_extra_perimeters_over
|
|||||||
{
|
{
|
||||||
coord_t anchors_size = scale_(EXTERNAL_INFILL_MARGIN);
|
coord_t anchors_size = scale_(EXTERNAL_INFILL_MARGIN);
|
||||||
|
|
||||||
Polygons anchors = intersection(infill_area, lower_slices_polygons);
|
BoundingBox infill_area_bb = get_extents(infill_area).inflated(SCALED_EPSILON);
|
||||||
Polygons overhangs = diff(infill_area, lower_slices_polygons);
|
Polygons optimized_lower_slices = ClipperUtils::clip_clipper_polygons_with_subject_bbox(lower_slices_polygons, infill_area_bb);
|
||||||
if (overhangs.empty()) { return {}; }
|
Polygons overhangs = diff(infill_area, optimized_lower_slices);
|
||||||
|
|
||||||
|
if (overhangs.empty()) { return {}; }
|
||||||
|
Polygons anchors = intersection(infill_area, optimized_lower_slices);
|
||||||
Polygons inset_anchors; // anchored area inset by the anchor length
|
Polygons inset_anchors; // anchored area inset by the anchor length
|
||||||
{
|
{
|
||||||
std::vector<double> deltas{anchors_size * 0.15 + 0.5 * overhang_flow.scaled_spacing(),
|
std::vector<double> deltas{anchors_size * 0.15 + 0.5 * overhang_flow.scaled_spacing(),
|
||||||
@ -951,7 +953,7 @@ std::tuple<std::vector<ExtrusionPaths>, Polygons> generate_extra_perimeters_over
|
|||||||
|
|
||||||
//gap = expolygons_simplify(gap, overhang_flow.scaled_spacing());
|
//gap = expolygons_simplify(gap, overhang_flow.scaled_spacing());
|
||||||
for (const ExPolygon &ep : gap) {
|
for (const ExPolygon &ep : gap) {
|
||||||
ep.medial_axis(overhang_flow.scaled_spacing() * 2.0, 0.3 * overhang_flow.scaled_width(), &fills);
|
ep.medial_axis(0.3 * overhang_flow.scaled_width(), overhang_flow.scaled_spacing() * 2.0, &fills);
|
||||||
}
|
}
|
||||||
if (!fills.empty()) {
|
if (!fills.empty()) {
|
||||||
fills = intersection_pl(fills, inset_overhang_area);
|
fills = intersection_pl(fills, inset_overhang_area);
|
||||||
|
@ -833,9 +833,9 @@ void PrintConfigDef::init_fff_params()
|
|||||||
def->set_default_value(new ConfigOptionBool(true));
|
def->set_default_value(new ConfigOptionBool(true));
|
||||||
|
|
||||||
def = this->add("extra_perimeters_on_overhangs", coBool);
|
def = this->add("extra_perimeters_on_overhangs", coBool);
|
||||||
def->label = L("Extra perimeters on overhangs");
|
def->label = L("Extra perimeters on overhangs (Experimental)");
|
||||||
def->category = L("Layers and Perimeters");
|
def->category = L("Layers and Perimeters");
|
||||||
def->tooltip = L("Create additional perimeter paths over steep overhangs and areas where bridges cannot be anchored. ");
|
def->tooltip = L("Create additional perimeter paths over steep overhangs and areas where bridges cannot be anchored.");
|
||||||
def->mode = comExpert;
|
def->mode = comExpert;
|
||||||
def->set_default_value(new ConfigOptionBool(false));
|
def->set_default_value(new ConfigOptionBool(false));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user