mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
[Feature] Introduced experimental option to fully disable solid infill against walls when ensure vertical thickness is turned off (#3235)
* ENH: Introduced experimental option to fully disable wall solid infill when ensure vertical thickness is turned off. * Merge branch 'main' into pr-reduce-wall-solid-infill * Merge remote-tracking branch 'upstream/main' into pr-reduce-wall-solid-infill * Merge branch 'pr-reduce-wall-solid-infill' of https://github.com/igiannakas/OrcaSlicer into pr-reduce-wall-solid-infill * Merge branch 'SoftFever:main' into pr-reduce-wall-solid-infill * Merge branch 'SoftFever:main' into pr-reduce-wall-solid-infill * Fixed bridges too short when ensure vertical thickness is off * Merge branch 'main' into pr-reduce-wall-solid-infill * Fixed if statement typo * Merge remote-tracking branch 'upstream/main' into pr-reduce-wall-solid-infill * Updated code comments and tweaked overlap parameter to generate top solid infill. * Parameter tweaks and caption adjustment * Code comment update * Merge branch 'SoftFever:main' into pr-reduce-wall-solid-infill * Merge branch 'SoftFever:main' into pr-reduce-wall-solid-infill * Merge branch 'SoftFever:main' into pr-reduce-wall-solid-infill * Merge branch 'main' into pr-reduce-wall-solid-infill * Merge branch 'main' into pr-reduce-wall-solid-infill * Merge branch 'SoftFever:main' into pr-reduce-wall-solid-infill
This commit is contained in:
parent
b2708fb1f4
commit
0b6968c36f
6 changed files with 48 additions and 15 deletions
|
@ -768,7 +768,7 @@ bool Preset::has_cali_lines(PresetBundle* preset_bundle)
|
|||
static std::vector<std::string> s_Preset_print_options {
|
||||
"layer_height", "initial_layer_print_height", "wall_loops", "alternate_extra_wall", "slice_closing_radius", "spiral_mode", "spiral_mode_smooth", "spiral_mode_max_xy_smoothing", "slicing_mode",
|
||||
"top_shell_layers", "top_shell_thickness", "bottom_shell_layers", "bottom_shell_thickness",
|
||||
"extra_perimeters_on_overhangs", "ensure_vertical_shell_thickness", "reduce_crossing_wall", "detect_thin_wall", "detect_overhang_wall", "overhang_reverse", "overhang_reverse_threshold","overhang_reverse_internal_only",
|
||||
"extra_perimeters_on_overhangs", "ensure_vertical_shell_thickness","reduce_wall_solid_infill", "reduce_crossing_wall", "detect_thin_wall", "detect_overhang_wall", "overhang_reverse", "overhang_reverse_threshold","overhang_reverse_internal_only",
|
||||
"seam_position", "staggered_inner_seams", "wall_sequence", "is_infill_first", "sparse_infill_density", "sparse_infill_pattern", "top_surface_pattern", "bottom_surface_pattern",
|
||||
"infill_direction",
|
||||
"minimum_sparse_infill_area", "reduce_infill_retraction","internal_solid_infill_pattern",
|
||||
|
|
|
@ -1298,6 +1298,16 @@ void PrintConfigDef::init_fff_params()
|
|||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionBool(true));
|
||||
|
||||
def = this->add("reduce_wall_solid_infill", coBool);
|
||||
def->label = L("Further reduce solid infill on walls (experimental)");
|
||||
def->category = L("Strength");
|
||||
def->tooltip = L("Further reduces any solid infill applied to walls. As there will be very limited infill supporting"
|
||||
" solid surfaces, make sure that you are using adequate number of walls to support the part on sloping surfaces.\n\n"
|
||||
"For heavily sloped surfaces this option is not suitable as it will generate too thin of a top layer "
|
||||
"and should be disabled.");
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionBool(false));
|
||||
|
||||
auto def_top_fill_pattern = def = this->add("top_surface_pattern", coEnum);
|
||||
def->label = L("Top surface pattern");
|
||||
def->category = L("Strength");
|
||||
|
|
|
@ -824,6 +824,7 @@ PRINT_CONFIG_CLASS_DEFINE(
|
|||
((ConfigOptionFloat, bridge_speed))
|
||||
((ConfigOptionFloatOrPercent, internal_bridge_speed))
|
||||
((ConfigOptionBool, ensure_vertical_shell_thickness))
|
||||
((ConfigOptionBool, reduce_wall_solid_infill))
|
||||
((ConfigOptionEnum<InfillPattern>, top_surface_pattern))
|
||||
((ConfigOptionEnum<InfillPattern>, bottom_surface_pattern))
|
||||
((ConfigOptionEnum<InfillPattern>, internal_solid_infill_pattern))
|
||||
|
|
|
@ -449,17 +449,6 @@ void PrintObject::prepare_infill()
|
|||
} // for each region
|
||||
#endif /* SLIC3R_DEBUG_SLICE_PROCESSING */
|
||||
|
||||
// this will detect bridges and reverse bridges
|
||||
// and rearrange top/bottom/internal surfaces
|
||||
// It produces enlarged overlapping bridging areas.
|
||||
//
|
||||
// 1) stBottomBridge / stBottom infill is grown by 3mm and clipped by the total infill area. Bridges are detected. The areas may overlap.
|
||||
// 2) stTop is grown by 3mm and clipped by the grown bottom areas. The areas may overlap.
|
||||
// 3) Clip the internal surfaces by the grown top/bottom surfaces.
|
||||
// 4) Merge surfaces with the same style. This will mostly get rid of the overlaps.
|
||||
//FIXME This does not likely merge surfaces, which are supported by a material with different colors, but same properties.
|
||||
this->process_external_surfaces();
|
||||
m_print->throw_if_canceled();
|
||||
|
||||
// Debugging output.
|
||||
#ifdef SLIC3R_DEBUG_SLICE_PROCESSING
|
||||
|
@ -478,9 +467,23 @@ void PrintObject::prepare_infill()
|
|||
// and to add a configurable number of solid layers above the BOTTOM / BOTTOMBRIDGE surfaces
|
||||
// to close these surfaces reliably.
|
||||
//FIXME Vojtech: Is this a good place to add supporting infills below sloping perimeters?
|
||||
// Orca: Brought this function call before the process_external_surfaces, to allow bridges over holes to expand more than
|
||||
// one perimeter. Example of this is the bridge over the benchy lettering.
|
||||
this->discover_horizontal_shells();
|
||||
m_print->throw_if_canceled();
|
||||
|
||||
// this will detect bridges and reverse bridges
|
||||
// and rearrange top/bottom/internal surfaces
|
||||
// It produces enlarged overlapping bridging areas.
|
||||
//
|
||||
// 1) stBottomBridge / stBottom infill is grown by 3mm and clipped by the total infill area. Bridges are detected. The areas may overlap.
|
||||
// 2) stTop is grown by 3mm and clipped by the grown bottom areas. The areas may overlap.
|
||||
// 3) Clip the internal surfaces by the grown top/bottom surfaces.
|
||||
// 4) Merge surfaces with the same style. This will mostly get rid of the overlaps.
|
||||
//FIXME This does not likely merge surfaces, which are supported by a material with different colors, but same properties.
|
||||
this->process_external_surfaces();
|
||||
m_print->throw_if_canceled();
|
||||
|
||||
#ifdef SLIC3R_DEBUG_SLICE_PROCESSING
|
||||
for (size_t region_id = 0; region_id < this->num_printing_regions(); ++ region_id) {
|
||||
for (const Layer *layer : m_layers) {
|
||||
|
@ -3224,7 +3227,10 @@ void PrintObject::discover_horizontal_shells()
|
|||
// No internal solid needed on this layer. In order to decide whether to continue
|
||||
// searching on the next neighbor (thus enforcing the configured number of solid
|
||||
// layers, use different strategies according to configured infill density:
|
||||
if (region_config.sparse_infill_density.value == 0) {
|
||||
|
||||
// Orca: Also use the same strategy if the user has selected to further reduce
|
||||
// the amount of solid infill on walls.
|
||||
if (region_config.sparse_infill_density.value == 0 || region_config.reduce_wall_solid_infill) {
|
||||
// If user expects the object to be void (for example a hollow sloping vase),
|
||||
// don't continue the search. In this case, we only generate the external solid
|
||||
// shell if the object would otherwise show a hole (gap between perimeters of
|
||||
|
@ -3237,12 +3243,19 @@ void PrintObject::discover_horizontal_shells()
|
|||
}
|
||||
}
|
||||
|
||||
if (region_config.sparse_infill_density.value == 0) {
|
||||
if (region_config.sparse_infill_density.value == 0 || region_config.reduce_wall_solid_infill) {
|
||||
// if we're printing a hollow object we discard any solid shell thinner
|
||||
// than a perimeter width, since it's probably just crossing a sloping wall
|
||||
// and it's not wanted in a hollow print even if it would make sense when
|
||||
// obeying the solid shell count option strictly (DWIM!)
|
||||
float margin = float(neighbor_layerm->flow(frExternalPerimeter).scaled_width());
|
||||
|
||||
// Orca: Also use the same strategy if the user has selected to reduce
|
||||
// the amount of solid infill on walls. However reduce the margin to 20% overhang
|
||||
// as we want to generate infill on sloped vertical surfaces but still keep a small amount of
|
||||
// filtering. This is an arbitrary value to make this option safe
|
||||
// by ensuring that top surfaces, especially slanted ones dont go **completely** unsupported
|
||||
// especially when using single perimeter top layers.
|
||||
float margin = region_config.reduce_wall_solid_infill? float(neighbor_layerm->flow(frExternalPerimeter).scaled_width()) * 0.2f : float(neighbor_layerm->flow(frExternalPerimeter).scaled_width());
|
||||
Polygons too_narrow = diff(
|
||||
new_internal_solid,
|
||||
opening(new_internal_solid, margin, margin + ClipperSafetyOffset, jtMiter, 5));
|
||||
|
|
|
@ -510,6 +510,14 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
|
|||
apply(config, &new_conf);
|
||||
}
|
||||
|
||||
bool have_ensure_vertical_thickness = config->opt_bool("ensure_vertical_shell_thickness");
|
||||
if(have_ensure_vertical_thickness) {
|
||||
DynamicPrintConfig new_conf = *config;
|
||||
new_conf.set_key_value("reduce_wall_solid_infill", new ConfigOptionBool(false));
|
||||
apply(config, &new_conf);
|
||||
}
|
||||
toggle_line("reduce_wall_solid_infill",!have_ensure_vertical_thickness);
|
||||
|
||||
bool have_perimeters = config->opt_int("wall_loops") > 0;
|
||||
for (auto el : { "extra_perimeters_on_overhangs", "ensure_vertical_shell_thickness", "detect_thin_wall", "detect_overhang_wall",
|
||||
"seam_position", "staggered_inner_seams", "wall_sequence", "outer_wall_line_width",
|
||||
|
|
|
@ -2019,6 +2019,7 @@ void TabPrint::build()
|
|||
optgroup->append_single_option_line("infill_combination");
|
||||
optgroup->append_single_option_line("detect_narrow_internal_solid_infill");
|
||||
optgroup->append_single_option_line("ensure_vertical_shell_thickness");
|
||||
optgroup->append_single_option_line("reduce_wall_solid_infill");
|
||||
|
||||
page = add_options_page(L("Speed"), "empty");
|
||||
optgroup = page->new_optgroup(L("Initial layer speed"), L"param_speed_first", 15);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue