Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Overhang Printable #1615

Merged
merged 16 commits into from
Jul 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add settings for Make overhang printable hole size
  • Loading branch information
Noisyfox committed Jul 19, 2023
commit 46e1b32d409a83ed9da50d4f09fa4b3e06150777
3 changes: 2 additions & 1 deletion src/libslic3r/Preset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,8 @@ bool Preset::is_bbl_vendor_preset(PresetBundle *preset_bundle)
static std::vector<std::string> s_Preset_print_options {
"layer_height", "initial_layer_print_height", "wall_loops", "slice_closing_radius", "spiral_mode", "slicing_mode",
"top_shell_layers", "top_shell_thickness", "bottom_shell_layers", "bottom_shell_thickness",
"ensure_vertical_shell_thickness", "reduce_crossing_wall", "detect_thin_wall", "detect_overhang_wall", "make_overhang_printable", "make_overhang_printable_angle",
"ensure_vertical_shell_thickness", "reduce_crossing_wall", "detect_thin_wall", "detect_overhang_wall",
"make_overhang_printable", "make_overhang_printable_angle", "make_overhang_printable_hole_size",
"seam_position", "staggered_inner_seams", "wall_infill_order", "sparse_infill_density", "sparse_infill_pattern", "top_surface_pattern", "bottom_surface_pattern",
"infill_direction",
"minimum_sparse_infill_area", "reduce_infill_retraction",
Expand Down
10 changes: 10 additions & 0 deletions src/libslic3r/PrintConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2366,6 +2366,16 @@ void PrintConfigDef::init_fff_params()
def->max = 90.;
def->set_default_value(new ConfigOptionFloat(62.));

def = this->add("make_overhang_printable_hole_size", coFloat);
def->label = L("Make overhang printable hole area");
def->category = L("Quality");
def->tooltip = L("Maximum area of a hole in the base of the model before it's filled by conical material."
"A value of 0 will fill all the holes in the model base.");
def->sidetext = L("mm²");
def->mode = comAdvanced;
def->min = 0.;
def->set_default_value(new ConfigOptionFloat(0.));

def = this->add("detect_overhang_wall", coBool);
def->label = L("Detect overhang wall");
def->category = L("Quality");
Expand Down
1 change: 1 addition & 0 deletions src/libslic3r/PrintConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,7 @@ PRINT_CONFIG_CLASS_DEFINE(
// SoftFever
((ConfigOptionBool, make_overhang_printable))
((ConfigOptionFloat, make_overhang_printable_angle))
((ConfigOptionFloat, make_overhang_printable_hole_size))

)

Expand Down
2 changes: 1 addition & 1 deletion src/libslic3r/PrintObjectSlice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ void PrintObject::apply_conical_overhang() {

const double conical_overhang_angle = this->config().make_overhang_printable_angle;
const double angle_radians = conical_overhang_angle * M_PI / 180.;
const double max_hole_area = 0.; // in MM^2
const double max_hole_area = this->config().make_overhang_printable_hole_size; // in MM^2
const double tan_angle = tan(angle_radians); // the XY-component of the angle
BOOST_LOG_TRIVIAL(info) << "angle " << angle_radians << " maxHoleArea " << max_hole_area << " tan_angle "
<< tan_angle;
Expand Down
1 change: 1 addition & 0 deletions src/slic3r/GUI/ConfigManipulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
// SoftFever
bool have_make_overhang_printable = config->opt_bool("make_overhang_printable");
toggle_line("make_overhang_printable_angle", have_make_overhang_printable);
toggle_line("make_overhang_printable_hole_size", have_make_overhang_printable);

toggle_line("exclude_object", gcflavor == gcfKlipper);

Expand Down
1 change: 1 addition & 0 deletions src/slic3r/GUI/Tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1889,6 +1889,7 @@ void TabPrint::build()
optgroup->append_single_option_line("detect_overhang_wall");
optgroup->append_single_option_line("make_overhang_printable");
optgroup->append_single_option_line("make_overhang_printable_angle");
optgroup->append_single_option_line("make_overhang_printable_hole_size");
optgroup->append_single_option_line("reduce_crossing_wall");
optgroup->append_single_option_line("max_travel_detour_distance");

Expand Down