mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-13 09:51:48 +08:00
gap fill overlap
also move the perimeter & extperi overlap to region
This commit is contained in:
parent
0d775d9ec8
commit
14c7a8ad7f
@ -224,8 +224,8 @@ group:Acceleration control (advanced)
|
|||||||
setting:first_layer_acceleration
|
setting:first_layer_acceleration
|
||||||
setting:default_acceleration
|
setting:default_acceleration
|
||||||
group:Autospeed (advanced)
|
group:Autospeed (advanced)
|
||||||
|
setting:label$Volumetric speed for Autospeed:max_volumetric_speed
|
||||||
setting:max_print_speed
|
setting:max_print_speed
|
||||||
setting:max_volumetric_speed
|
|
||||||
|
|
||||||
page:Width & Flow:width
|
page:Width & Flow:width
|
||||||
group:Extrusion width
|
group:Extrusion width
|
||||||
@ -241,8 +241,9 @@ group:Extrusion width
|
|||||||
recommended_extrusion_width_description
|
recommended_extrusion_width_description
|
||||||
group:Overlap
|
group:Overlap
|
||||||
line:Perimeter overlap
|
line:Perimeter overlap
|
||||||
|
setting:label$Default:perimeter_overlap
|
||||||
setting:label$External:external_perimeter_overlap
|
setting:label$External:external_perimeter_overlap
|
||||||
setting:label$Inner:perimeter_overlap
|
setting:label$Gap Fill:gap_fill_overlap
|
||||||
end_line
|
end_line
|
||||||
setting:infill_overlap
|
setting:infill_overlap
|
||||||
setting:bridge_overlap
|
setting:bridge_overlap
|
||||||
|
@ -827,7 +827,7 @@ public:
|
|||||||
ConfigOption* clone() const override { return new ConfigOptionPercent(*this); }
|
ConfigOption* clone() const override { return new ConfigOptionPercent(*this); }
|
||||||
ConfigOptionPercent& operator=(const ConfigOption *opt) { this->set(opt); return *this; }
|
ConfigOptionPercent& operator=(const ConfigOption *opt) { this->set(opt); return *this; }
|
||||||
bool operator==(const ConfigOptionPercent &rhs) const { return this->value == rhs.value; }
|
bool operator==(const ConfigOptionPercent &rhs) const { return this->value == rhs.value; }
|
||||||
double get_abs_value(double ratio_over) const { return ratio_over * this->value / 100; }
|
double get_abs_value(double ratio_over) const { return ratio_over * this->value / 100.; }
|
||||||
|
|
||||||
std::string serialize() const override
|
std::string serialize() const override
|
||||||
{
|
{
|
||||||
|
@ -136,17 +136,18 @@ void Layer::make_perimeters()
|
|||||||
/// if you don't do that, objects will share the same region, and the same settings.
|
/// if you don't do that, objects will share the same region, and the same settings.
|
||||||
if (config.perimeter_extruder == other_config.perimeter_extruder
|
if (config.perimeter_extruder == other_config.perimeter_extruder
|
||||||
&& config.perimeters == other_config.perimeters
|
&& config.perimeters == other_config.perimeters
|
||||||
&& config.perimeter_speed == other_config.perimeter_speed // it os mandatory? can't this be set at gcode.cpp?
|
|
||||||
&& config.external_perimeter_extrusion_width == other_config.external_perimeter_extrusion_width
|
&& config.external_perimeter_extrusion_width == other_config.external_perimeter_extrusion_width
|
||||||
|
&& config.external_perimeter_overlap == other_config.external_perimeter_overlap
|
||||||
|
&& config.external_perimeter_speed == other_config.external_perimeter_speed // it os mandatory? can't this be set at gcode.cpp?
|
||||||
&& config.external_perimeters_first == other_config.external_perimeters_first
|
&& config.external_perimeters_first == other_config.external_perimeters_first
|
||||||
&& config.external_perimeters_vase == other_config.external_perimeters_vase
|
|
||||||
&& config.external_perimeters_hole == other_config.external_perimeters_hole
|
&& config.external_perimeters_hole == other_config.external_perimeters_hole
|
||||||
&& config.external_perimeters_nothole == other_config.external_perimeters_nothole
|
&& config.external_perimeters_nothole == other_config.external_perimeters_nothole
|
||||||
&& config.external_perimeter_speed == other_config.external_perimeter_speed
|
&& config.external_perimeters_vase == other_config.external_perimeters_vase
|
||||||
&& config.extra_perimeters_odd_layers == other_config.extra_perimeters_odd_layers
|
&& config.extra_perimeters_odd_layers == other_config.extra_perimeters_odd_layers
|
||||||
&& config.extra_perimeters_overhangs == other_config.extra_perimeters_overhangs
|
&& config.extra_perimeters_overhangs == other_config.extra_perimeters_overhangs
|
||||||
&& config.gap_fill == other_config.gap_fill
|
&& config.gap_fill == other_config.gap_fill
|
||||||
&& config.gap_fill_min_area == other_config.gap_fill_min_area
|
&& config.gap_fill_min_area == other_config.gap_fill_min_area
|
||||||
|
&& config.gap_fill_overlap == other_config.gap_fill_overlap
|
||||||
&& config.gap_fill_speed == other_config.gap_fill_speed
|
&& config.gap_fill_speed == other_config.gap_fill_speed
|
||||||
&& config.infill_dense == other_config.infill_dense
|
&& config.infill_dense == other_config.infill_dense
|
||||||
&& config.infill_dense_algo == other_config.infill_dense_algo
|
&& config.infill_dense_algo == other_config.infill_dense_algo
|
||||||
@ -159,13 +160,15 @@ void Layer::make_perimeters()
|
|||||||
&& config.perimeter_extrusion_width == other_config.perimeter_extrusion_width
|
&& config.perimeter_extrusion_width == other_config.perimeter_extrusion_width
|
||||||
&& config.perimeter_loop == other_config.perimeter_loop
|
&& config.perimeter_loop == other_config.perimeter_loop
|
||||||
&& config.perimeter_loop_seam == other_config.perimeter_loop_seam
|
&& config.perimeter_loop_seam == other_config.perimeter_loop_seam
|
||||||
&& config.perimeter_speed == other_config.perimeter_speed
|
&& config.perimeter_overlap == other_config.perimeter_overlap
|
||||||
|
&& config.perimeter_speed == other_config.perimeter_speed // it os mandatory? can't this be set at gcode.cpp?
|
||||||
&& config.small_perimeter_speed == other_config.small_perimeter_speed
|
&& config.small_perimeter_speed == other_config.small_perimeter_speed
|
||||||
&& config.thin_walls == other_config.thin_walls
|
&& config.thin_walls == other_config.thin_walls
|
||||||
&& config.thin_walls_min_width == other_config.thin_walls_min_width
|
&& config.thin_walls_min_width == other_config.thin_walls_min_width
|
||||||
&& config.thin_walls_overlap == other_config.thin_walls_overlap
|
&& config.thin_walls_overlap == other_config.thin_walls_overlap
|
||||||
&& config.thin_perimeters == other_config.thin_perimeters
|
&& config.thin_perimeters == other_config.thin_perimeters
|
||||||
&& config.thin_perimeters_all == other_config.thin_perimeters_all
|
&& config.thin_perimeters_all == other_config.thin_perimeters_all
|
||||||
|
&& config.thin_walls_speed == other_config.thin_walls_speed
|
||||||
&& config.infill_overlap == other_config.infill_overlap
|
&& config.infill_overlap == other_config.infill_overlap
|
||||||
&& config.perimeter_loop == other_config.perimeter_loop) {
|
&& config.perimeter_loop == other_config.perimeter_loop) {
|
||||||
layerms.push_back(other_layerm);
|
layerms.push_back(other_layerm);
|
||||||
|
@ -38,8 +38,8 @@ namespace Slic3r {
|
|||||||
void PerimeterGenerator::process()
|
void PerimeterGenerator::process()
|
||||||
{
|
{
|
||||||
//set spacing
|
//set spacing
|
||||||
this->perimeter_flow.spacing_ratio = this->object_config->perimeter_overlap.get_abs_value(1);
|
this->perimeter_flow.spacing_ratio = this->config->perimeter_overlap.get_abs_value(1);
|
||||||
this->ext_perimeter_flow.spacing_ratio = this->object_config->external_perimeter_overlap.get_abs_value(1);
|
this->ext_perimeter_flow.spacing_ratio = this->config->external_perimeter_overlap.get_abs_value(1);
|
||||||
|
|
||||||
// other perimeters
|
// other perimeters
|
||||||
this->_mm3_per_mm = this->perimeter_flow.mm3_per_mm();
|
this->_mm3_per_mm = this->perimeter_flow.mm3_per_mm();
|
||||||
@ -58,12 +58,16 @@ void PerimeterGenerator::process()
|
|||||||
// overhang perimeters
|
// overhang perimeters
|
||||||
this->_mm3_per_mm_overhang = this->overhang_flow.mm3_per_mm();
|
this->_mm3_per_mm_overhang = this->overhang_flow.mm3_per_mm();
|
||||||
|
|
||||||
|
//gap fill
|
||||||
|
coord_t gap_fill_spacing = this->config->gap_fill_overlap.get_abs_value(this->perimeter_flow.scaled_spacing())
|
||||||
|
+ this->perimeter_flow.scaled_width() * (100 - this->config->gap_fill_overlap.value) / 100.;
|
||||||
|
|
||||||
// solid infill
|
// solid infill
|
||||||
coord_t solid_infill_spacing = this->solid_infill_flow.scaled_spacing();
|
coord_t solid_infill_spacing = this->solid_infill_flow.scaled_spacing();
|
||||||
|
|
||||||
//infill / perimeter
|
//infill / perimeter
|
||||||
coord_t infill_peri_overlap = (coord_t)scale_(this->config->get_abs_value("infill_overlap", unscale<coordf_t>(perimeter_spacing + solid_infill_spacing) / 2));
|
coord_t infill_peri_overlap = (coord_t)scale_(this->config->get_abs_value("infill_overlap", unscale<coordf_t>(perimeter_spacing + solid_infill_spacing) / 2));
|
||||||
// infill gap to add vs periemter (useful if using perimeter bonding)
|
// infill gap to add vs perimeter (useful if using perimeter bonding)
|
||||||
coord_t infill_gap = 0;
|
coord_t infill_gap = 0;
|
||||||
|
|
||||||
|
|
||||||
@ -541,7 +545,7 @@ void PerimeterGenerator::process()
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// If "detect thin walls" is not enabled, this paths will be entered, which
|
// If "overlapping_perimeters" is enabled, this paths will be entered, which
|
||||||
// leads to overflows, as in prusa3d/Slic3r GH #32
|
// leads to overflows, as in prusa3d/Slic3r GH #32
|
||||||
next_onion = offset_ex(last, double( - good_spacing));
|
next_onion = offset_ex(last, double( - good_spacing));
|
||||||
}
|
}
|
||||||
@ -553,7 +557,7 @@ void PerimeterGenerator::process()
|
|||||||
// (but still long enough to escape the area threshold) that gap fill
|
// (but still long enough to escape the area threshold) that gap fill
|
||||||
// won't be able to fill but we'd still remove from infill area
|
// won't be able to fill but we'd still remove from infill area
|
||||||
append(gaps, diff_ex(
|
append(gaps, diff_ex(
|
||||||
offset(last, -0.5f*good_spacing),
|
offset(last, -0.5f * gap_fill_spacing),
|
||||||
offset(next_onion, 0.5f * good_spacing + 10))); // safety offset
|
offset(next_onion, 0.5f * good_spacing + 10))); // safety offset
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1676,6 +1676,19 @@ void PrintConfigDef::init_fff_params()
|
|||||||
def->mode = comExpert;
|
def->mode = comExpert;
|
||||||
def->set_default_value(new ConfigOptionFloatOrPercent{ 100,true });
|
def->set_default_value(new ConfigOptionFloatOrPercent{ 100,true });
|
||||||
|
|
||||||
|
def = this->add("gap_fill_overlap", coPercent);
|
||||||
|
def->label = L("Gap fill overlap");
|
||||||
|
def->full_label = L("Gap fill overlap");
|
||||||
|
def->category = OptionCategory::width;
|
||||||
|
def->tooltip = L("This setting allow you to reduce the overlap between the perimeters and the gap fill."
|
||||||
|
" 100% means that no gaps is left, and 0% means that the gap fill won't touch the perimeters."
|
||||||
|
"\nIt's very experimental, please report about the usefulness. It may be removed if there is no use for it.");
|
||||||
|
def->sidetext = L("%");
|
||||||
|
def->min = 0;
|
||||||
|
def->max = 100;
|
||||||
|
def->mode = comExpert;
|
||||||
|
def->set_default_value(new ConfigOptionPercent(100));
|
||||||
|
|
||||||
def = this->add("gap_fill_speed", coFloat);
|
def = this->add("gap_fill_speed", coFloat);
|
||||||
def->label = L("Gap fill");
|
def->label = L("Gap fill");
|
||||||
def->full_label = L("Gap fill speed");
|
def->full_label = L("Gap fill speed");
|
||||||
|
@ -525,7 +525,6 @@ public:
|
|||||||
ConfigOptionBool dont_support_bridges;
|
ConfigOptionBool dont_support_bridges;
|
||||||
ConfigOptionPercent external_perimeter_cut_corners;
|
ConfigOptionPercent external_perimeter_cut_corners;
|
||||||
ConfigOptionBool exact_last_layer_height;
|
ConfigOptionBool exact_last_layer_height;
|
||||||
ConfigOptionPercent external_perimeter_overlap;
|
|
||||||
ConfigOptionFloatOrPercent extrusion_width;
|
ConfigOptionFloatOrPercent extrusion_width;
|
||||||
ConfigOptionFloatOrPercent first_layer_height;
|
ConfigOptionFloatOrPercent first_layer_height;
|
||||||
ConfigOptionFloat first_layer_size_compensation;
|
ConfigOptionFloat first_layer_size_compensation;
|
||||||
@ -536,7 +535,6 @@ public:
|
|||||||
ConfigOptionFloat layer_height;
|
ConfigOptionFloat layer_height;
|
||||||
ConfigOptionFloat model_precision;
|
ConfigOptionFloat model_precision;
|
||||||
ConfigOptionPercent perimeter_bonding;
|
ConfigOptionPercent perimeter_bonding;
|
||||||
ConfigOptionPercent perimeter_overlap;
|
|
||||||
ConfigOptionInt raft_layers;
|
ConfigOptionInt raft_layers;
|
||||||
ConfigOptionEnum<SeamPosition> seam_position;
|
ConfigOptionEnum<SeamPosition> seam_position;
|
||||||
ConfigOptionBool seam_travel;
|
ConfigOptionBool seam_travel;
|
||||||
@ -591,7 +589,6 @@ protected:
|
|||||||
OPT_PTR(dont_support_bridges);
|
OPT_PTR(dont_support_bridges);
|
||||||
OPT_PTR(external_perimeter_cut_corners);
|
OPT_PTR(external_perimeter_cut_corners);
|
||||||
OPT_PTR(exact_last_layer_height);
|
OPT_PTR(exact_last_layer_height);
|
||||||
OPT_PTR(external_perimeter_overlap);
|
|
||||||
OPT_PTR(extrusion_width);
|
OPT_PTR(extrusion_width);
|
||||||
OPT_PTR(hole_size_compensation);
|
OPT_PTR(hole_size_compensation);
|
||||||
OPT_PTR(first_layer_height);
|
OPT_PTR(first_layer_height);
|
||||||
@ -601,7 +598,6 @@ protected:
|
|||||||
OPT_PTR(layer_height);
|
OPT_PTR(layer_height);
|
||||||
OPT_PTR(model_precision);
|
OPT_PTR(model_precision);
|
||||||
OPT_PTR(perimeter_bonding);
|
OPT_PTR(perimeter_bonding);
|
||||||
OPT_PTR(perimeter_overlap);
|
|
||||||
OPT_PTR(raft_layers);
|
OPT_PTR(raft_layers);
|
||||||
OPT_PTR(seam_position);
|
OPT_PTR(seam_position);
|
||||||
OPT_PTR(seam_travel);
|
OPT_PTR(seam_travel);
|
||||||
@ -661,11 +657,12 @@ public:
|
|||||||
ConfigOptionBool enforce_full_fill_volume;
|
ConfigOptionBool enforce_full_fill_volume;
|
||||||
ConfigOptionFloatOrPercent external_infill_margin;
|
ConfigOptionFloatOrPercent external_infill_margin;
|
||||||
ConfigOptionFloatOrPercent external_perimeter_extrusion_width;
|
ConfigOptionFloatOrPercent external_perimeter_extrusion_width;
|
||||||
|
ConfigOptionPercent external_perimeter_overlap;
|
||||||
ConfigOptionFloatOrPercent external_perimeter_speed;
|
ConfigOptionFloatOrPercent external_perimeter_speed;
|
||||||
ConfigOptionBool external_perimeters_first;
|
ConfigOptionBool external_perimeters_first;
|
||||||
ConfigOptionBool external_perimeters_vase;
|
|
||||||
ConfigOptionBool external_perimeters_nothole;
|
|
||||||
ConfigOptionBool external_perimeters_hole;
|
ConfigOptionBool external_perimeters_hole;
|
||||||
|
ConfigOptionBool external_perimeters_nothole;
|
||||||
|
ConfigOptionBool external_perimeters_vase;
|
||||||
ConfigOptionBool extra_perimeters;
|
ConfigOptionBool extra_perimeters;
|
||||||
ConfigOptionBool extra_perimeters_odd_layers;
|
ConfigOptionBool extra_perimeters_odd_layers;
|
||||||
ConfigOptionBool extra_perimeters_overhangs;
|
ConfigOptionBool extra_perimeters_overhangs;
|
||||||
@ -679,6 +676,7 @@ public:
|
|||||||
ConfigOptionFloatOrPercent fill_smooth_width;
|
ConfigOptionFloatOrPercent fill_smooth_width;
|
||||||
ConfigOptionBool gap_fill;
|
ConfigOptionBool gap_fill;
|
||||||
ConfigOptionFloatOrPercent gap_fill_min_area;
|
ConfigOptionFloatOrPercent gap_fill_min_area;
|
||||||
|
ConfigOptionPercent gap_fill_overlap;
|
||||||
ConfigOptionFloat gap_fill_speed;
|
ConfigOptionFloat gap_fill_speed;
|
||||||
ConfigOptionBool hole_to_polyhole;
|
ConfigOptionBool hole_to_polyhole;
|
||||||
ConfigOptionInt infill_extruder;
|
ConfigOptionInt infill_extruder;
|
||||||
@ -705,6 +703,7 @@ public:
|
|||||||
ConfigOptionFloatOrPercent perimeter_extrusion_width;
|
ConfigOptionFloatOrPercent perimeter_extrusion_width;
|
||||||
ConfigOptionBool perimeter_loop;
|
ConfigOptionBool perimeter_loop;
|
||||||
ConfigOptionEnum<SeamPosition> perimeter_loop_seam;
|
ConfigOptionEnum<SeamPosition> perimeter_loop_seam;
|
||||||
|
ConfigOptionPercent perimeter_overlap;
|
||||||
ConfigOptionFloat perimeter_speed;
|
ConfigOptionFloat perimeter_speed;
|
||||||
// Total number of perimeters.
|
// Total number of perimeters.
|
||||||
ConfigOptionInt perimeters;
|
ConfigOptionInt perimeters;
|
||||||
@ -751,11 +750,12 @@ protected:
|
|||||||
OPT_PTR(enforce_full_fill_volume);
|
OPT_PTR(enforce_full_fill_volume);
|
||||||
OPT_PTR(external_infill_margin);
|
OPT_PTR(external_infill_margin);
|
||||||
OPT_PTR(external_perimeter_extrusion_width);
|
OPT_PTR(external_perimeter_extrusion_width);
|
||||||
|
OPT_PTR(external_perimeter_overlap);
|
||||||
OPT_PTR(external_perimeter_speed);
|
OPT_PTR(external_perimeter_speed);
|
||||||
OPT_PTR(external_perimeters_first);
|
OPT_PTR(external_perimeters_first);
|
||||||
OPT_PTR(external_perimeters_vase);
|
|
||||||
OPT_PTR(external_perimeters_nothole);
|
|
||||||
OPT_PTR(external_perimeters_hole);
|
OPT_PTR(external_perimeters_hole);
|
||||||
|
OPT_PTR(external_perimeters_nothole);
|
||||||
|
OPT_PTR(external_perimeters_vase);
|
||||||
OPT_PTR(extra_perimeters);
|
OPT_PTR(extra_perimeters);
|
||||||
OPT_PTR(extra_perimeters_odd_layers);
|
OPT_PTR(extra_perimeters_odd_layers);
|
||||||
OPT_PTR(extra_perimeters_overhangs);
|
OPT_PTR(extra_perimeters_overhangs);
|
||||||
@ -769,6 +769,7 @@ protected:
|
|||||||
OPT_PTR(fill_smooth_width);
|
OPT_PTR(fill_smooth_width);
|
||||||
OPT_PTR(gap_fill);
|
OPT_PTR(gap_fill);
|
||||||
OPT_PTR(gap_fill_min_area);
|
OPT_PTR(gap_fill_min_area);
|
||||||
|
OPT_PTR(gap_fill_overlap);
|
||||||
OPT_PTR(gap_fill_speed);
|
OPT_PTR(gap_fill_speed);
|
||||||
OPT_PTR(hole_to_polyhole);
|
OPT_PTR(hole_to_polyhole);
|
||||||
OPT_PTR(infill_extruder);
|
OPT_PTR(infill_extruder);
|
||||||
@ -794,6 +795,7 @@ protected:
|
|||||||
OPT_PTR(perimeter_extrusion_width);
|
OPT_PTR(perimeter_extrusion_width);
|
||||||
OPT_PTR(perimeter_loop);
|
OPT_PTR(perimeter_loop);
|
||||||
OPT_PTR(perimeter_loop_seam);
|
OPT_PTR(perimeter_loop_seam);
|
||||||
|
OPT_PTR(perimeter_overlap);
|
||||||
OPT_PTR(perimeter_speed);
|
OPT_PTR(perimeter_speed);
|
||||||
OPT_PTR(perimeters);
|
OPT_PTR(perimeters);
|
||||||
OPT_PTR(print_extrusion_multiplier);
|
OPT_PTR(print_extrusion_multiplier);
|
||||||
|
@ -472,6 +472,7 @@ const std::vector<std::string>& Preset::print_options()
|
|||||||
"bridge_speed",
|
"bridge_speed",
|
||||||
"gap_fill",
|
"gap_fill",
|
||||||
"gap_fill_min_area",
|
"gap_fill_min_area",
|
||||||
|
"gap_fill_overlap",
|
||||||
"gap_fill_speed",
|
"gap_fill_speed",
|
||||||
"travel_speed", "first_layer_speed", "perimeter_acceleration", "infill_acceleration",
|
"travel_speed", "first_layer_speed", "perimeter_acceleration", "infill_acceleration",
|
||||||
"bridge_acceleration", "first_layer_acceleration", "default_acceleration",
|
"bridge_acceleration", "first_layer_acceleration", "default_acceleration",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user