mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-18 22:31:13 -06:00
ENH: add "ensure_vertical_shell_thickness" back
See the new requirement of the latest update at github issue #317 Signed-off-by: salt.wei <salt.wei@bambulab.com> Change-Id: I68c9922a272b1d426126a531bfdee7a4f7e53620
This commit is contained in:
parent
7b437d4f58
commit
35edf03eca
8 changed files with 18 additions and 13 deletions
|
@ -692,7 +692,7 @@ bool Preset::is_custom_defined()
|
|||
static std::vector<std::string> s_Preset_print_options {
|
||||
"layer_height", "initial_layer_print_height", "wall_loops", "slice_closing_radius", "spiral_mode",
|
||||
"top_shell_layers", "top_shell_thickness", "bottom_shell_layers", "bottom_shell_thickness",
|
||||
"reduce_crossing_wall", "detect_thin_wall", "detect_overhang_wall",
|
||||
"ensure_vertical_shell_thickness", "reduce_crossing_wall", "detect_thin_wall", "detect_overhang_wall",
|
||||
"seam_position", "wall_infill_order", "sparse_infill_density", "sparse_infill_pattern", "top_surface_pattern", "bottom_surface_pattern",
|
||||
"infill_direction", "bridge_angle",
|
||||
"minimum_sparse_infill_area", "reduce_infill_retraction",
|
||||
|
|
|
@ -515,7 +515,6 @@ private:
|
|||
// This was a per-object setting and now we default enable it.
|
||||
static bool clip_multipart_objects;
|
||||
static bool infill_only_where_needed;
|
||||
static bool ensure_vertical_shell_thickness;
|
||||
};
|
||||
|
||||
struct WipeTowerData
|
||||
|
|
|
@ -904,6 +904,14 @@ void PrintConfigDef::init_fff_params()
|
|||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionStrings { " " });
|
||||
|
||||
def = this->add("ensure_vertical_shell_thickness", coBool);
|
||||
def->label = L("Ensure vertical shell thickness");
|
||||
def->category = L("Strength");
|
||||
def->tooltip = L("Add solid infill near sloping surfaces to guarantee the vertical shell thickness "
|
||||
"(top+bottom solid layers)");
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionBool(true));
|
||||
|
||||
auto def_top_fill_pattern = def = this->add("top_surface_pattern", coEnum);
|
||||
def->label = L("Top surface pattern");
|
||||
def->category = L("Strength");
|
||||
|
|
|
@ -661,6 +661,7 @@ PRINT_CONFIG_CLASS_DEFINE(
|
|||
((ConfigOptionFloat, bridge_angle))
|
||||
((ConfigOptionFloat, bridge_flow))
|
||||
((ConfigOptionFloat, bridge_speed))
|
||||
((ConfigOptionBool, ensure_vertical_shell_thickness))
|
||||
((ConfigOptionEnum<InfillPattern>, top_surface_pattern))
|
||||
((ConfigOptionEnum<InfillPattern>, bottom_surface_pattern))
|
||||
((ConfigOptionFloat, outer_wall_line_width))
|
||||
|
|
|
@ -770,6 +770,7 @@ bool PrintObject::invalidate_state_by_config_options(
|
|||
|| opt_key == "sparse_infill_filament"
|
||||
|| opt_key == "solid_infill_filament"
|
||||
|| opt_key == "sparse_infill_line_width"
|
||||
|| opt_key == "ensure_vertical_shell_thickness"
|
||||
|| opt_key == "bridge_angle") {
|
||||
steps.emplace_back(posPrepareInfill);
|
||||
} else if (
|
||||
|
@ -1224,9 +1225,7 @@ void PrintObject::discover_vertical_shells()
|
|||
bool has_extra_layers = false;
|
||||
for (size_t region_id = 0; region_id < this->num_printing_regions(); ++region_id) {
|
||||
const PrintRegionConfig &config = this->printing_region(region_id).config();
|
||||
//BBS
|
||||
//if (config.ensure_vertical_shell_thickness.value && has_extra_layers_fn(config)) {
|
||||
if (PrintObject::ensure_vertical_shell_thickness && has_extra_layers_fn(config)) {
|
||||
if (config.ensure_vertical_shell_thickness.value && has_extra_layers_fn(config)) {
|
||||
has_extra_layers = true;
|
||||
break;
|
||||
}
|
||||
|
@ -1306,9 +1305,7 @@ void PrintObject::discover_vertical_shells()
|
|||
PROFILE_BLOCK(discover_vertical_shells_region);
|
||||
|
||||
const PrintRegion ®ion = this->printing_region(region_id);
|
||||
//BBS
|
||||
//if (! region.config().ensure_vertical_shell_thickness.value)
|
||||
if (! PrintObject::ensure_vertical_shell_thickness)
|
||||
if (! region.config().ensure_vertical_shell_thickness.value)
|
||||
// This region will be handled by discover_horizontal_shells().
|
||||
continue;
|
||||
if (! has_extra_layers_fn(region.config()))
|
||||
|
@ -2049,9 +2046,7 @@ void PrintObject::discover_horizontal_shells()
|
|||
#endif
|
||||
|
||||
// If ensure_vertical_shell_thickness, then the rest has already been performed by discover_vertical_shells().
|
||||
//BBS
|
||||
//if (region_config.ensure_vertical_shell_thickness.value)
|
||||
if (PrintObject::ensure_vertical_shell_thickness)
|
||||
if (region_config.ensure_vertical_shell_thickness.value)
|
||||
continue;
|
||||
|
||||
coordf_t print_z = layer->print_z;
|
||||
|
|
|
@ -18,7 +18,6 @@ namespace Slic3r {
|
|||
|
||||
bool PrintObject::clip_multipart_objects = true;
|
||||
bool PrintObject::infill_only_where_needed = false;
|
||||
bool PrintObject::ensure_vertical_shell_thickness = true;
|
||||
|
||||
LayerPtrs new_layers(
|
||||
PrintObject *print_object,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue