Skip to content

Commit

Permalink
Merge a10cf71 into 28d5e87
Browse files Browse the repository at this point in the history
  • Loading branch information
supermerill authored Aug 23, 2020
2 parents 28d5e87 + a10cf71 commit ed173b1
Show file tree
Hide file tree
Showing 28 changed files with 2,621 additions and 491 deletions.
20 changes: 16 additions & 4 deletions lib/Slic3r/GUI/PresetEditor.pm
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@ sub options {
adaptive_slicing adaptive_slicing_quality match_horizontal_surfaces
perimeters spiral_vase
top_solid_layers min_shell_thickness min_top_bottom_shell_thickness bottom_solid_layers
extra_perimeters avoid_crossing_perimeters thin_walls overhangs
extra_perimeters avoid_crossing_perimeters
thin_walls thin_walls_min_width thin_walls_overlap overhangs
seam_position external_perimeters_first
fill_density fill_pattern top_infill_pattern bottom_infill_pattern fill_gaps
infill_every_layers infill_only_where_needed
Expand Down Expand Up @@ -540,7 +541,13 @@ sub build {
my $optgroup = $page->new_optgroup('Quality (slower slicing)');
$optgroup->append_single_option_line('extra_perimeters');
$optgroup->append_single_option_line('avoid_crossing_perimeters');
$optgroup->append_single_option_line('thin_walls');
my $line = Slic3r::GUI::OptionsGroup::Line->new(
label => 'Detect thin walls',
);
$line->append_option($optgroup->get_option('thin_walls'));
$line->append_option($optgroup->get_option('thin_walls_min_width'));
$line->append_option($optgroup->get_option('thin_walls_overlap'));
$optgroup->append_line($line);
$optgroup->append_single_option_line('overhangs');
}
{
Expand Down Expand Up @@ -888,8 +895,9 @@ sub _update {
my $have_perimeters = ($config->perimeters > 0) || ($config->min_shell_thickness > 0);
if (any { /$opt_key/ } qw(all_keys perimeters)) {
$self->get_field($_)->toggle($have_perimeters)
for qw(extra_perimeters thin_walls overhangs seam_position external_perimeters_first
external_perimeter_extrusion_width
for qw(extra_perimeters thin_walls thin_walls_min_width thin_walls_overlap
overhangs seam_position
external_perimeters_first external_perimeter_extrusion_width
perimeter_speed small_perimeter_speed external_perimeter_speed);
}

Expand Down Expand Up @@ -975,6 +983,10 @@ sub _update {
$self->get_field($_)->toggle($have_support_material && $have_support_interface)
for qw(support_material_interface_spacing support_material_interface_extruder
support_material_interface_speed);

# thin walls settigns only when thins walls is activated
$self->get_field($_)->toggle($config->thin_walls)
for qw(thin_walls_min_width thin_walls_overlap);

$self->get_field('perimeter_extrusion_width')->toggle($have_perimeters || $have_skirt || $have_brim);
$self->get_field('support_material_extruder')->toggle($have_support_material || $have_skirt);
Expand Down
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ add_library(libslic3r STATIC
${LIBDIR}/libslic3r/LayerHeightSpline.cpp
${LIBDIR}/libslic3r/Line.cpp
${LIBDIR}/libslic3r/Log.cpp
${LIBDIR}/libslic3r/MedialAxis.cpp
${LIBDIR}/libslic3r/Model.cpp
${LIBDIR}/libslic3r/MotionPlanner.cpp
${LIBDIR}/libslic3r/MultiPoint.cpp
Expand Down Expand Up @@ -316,6 +317,7 @@ set(SLIC3R_TEST_SOURCES
${TESTDIR}/libslic3r/test_printobject.cpp
${TESTDIR}/libslic3r/test_skirt_brim.cpp
${TESTDIR}/libslic3r/test_test_data.cpp
${TESTDIR}/libslic3r/test_thin.cpp
${TESTDIR}/libslic3r/test_transformationmatrix.cpp
${TESTDIR}/libslic3r/test_trianglemesh.cpp
${TESTDIR}/libslic3r/test_extrusion_entity.cpp
Expand Down
3 changes: 2 additions & 1 deletion src/GUI/Dialogs/PresetEditor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ class PrintEditor : public PresetEditor {
"adaptive_slicing"s, "adaptive_slicing_quality"s, "match_horizontal_surfaces"s,
"perimeters"s, "spiral_vase"s,
"top_solid_layers"s, "bottom_solid_layers"s,
"extra_perimeters"s, "avoid_crossing_perimeters"s, "thin_walls"s, "overhangs"s,
"extra_perimeters"s, "avoid_crossing_perimeters"s,
"thin_walls"s, "thin_walls_min_width"s, "thin_walls_overlap"s, "overhangs"s,
"seam_position"s, "external_perimeters_first"s,
"fill_density"s, "fill_pattern"s, "top_infill_pattern"s, "bottom_infill_pattern"s, "fill_gaps"s,
"infill_every_layers"s, "infill_only_where_needed"s,
Expand Down
1 change: 1 addition & 0 deletions src/test/libslic3r/test_fill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ bool test_if_solid_surface_filled(const ExPolygon& expolygon, double flow_spacin
Flow flow(flow_spacing, 0.4, flow_spacing);

filler->min_spacing = flow.spacing();
filler->density = density;

Polylines paths {filler->fill_surface(surface)};

Expand Down
16 changes: 8 additions & 8 deletions src/test/libslic3r/test_flow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ SCENARIO(" Bridge flow specifics.", "[!mayfail]") {
SCENARIO("Flow: Flow math for non-bridges", "[!mayfail]") {
GIVEN("Nozzle Diameter of 0.4, a desired width of 1mm and layer height of 0.5") {
auto width {ConfigOptionFloatOrPercent(1.0, false)};
float spacing {0.4};
float nozzle_diameter {0.4};
float bridge_flow {1.0};
float layer_height {0.5};
float spacing {0.4f};
float nozzle_diameter {0.4f};
float bridge_flow {1.0f};
float layer_height {0.5f};

// Spacing for non-bridges is has some overlap
THEN("External perimeter flow has spacing fixed to 1.1*nozzle_diameter") {
Expand All @@ -117,10 +117,10 @@ SCENARIO("Flow: Flow math for non-bridges", "[!mayfail]") {
}
/// Check the min/max
GIVEN("Nozzle Diameter of 0.25") {
float spacing {0.4};
float nozzle_diameter {0.25};
float bridge_flow {0.0};
float layer_height {0.5};
float spacing {0.4f};
float nozzle_diameter {0.25f};
float bridge_flow {0.0f};
float layer_height {0.5f};
WHEN("layer height is set to 0.2") {
layer_height = 0.15f;
THEN("Max width is set.") {
Expand Down
Loading

0 comments on commit ed173b1

Please sign in to comment.