Skip to content

Commit ed173b1

Browse files
authored
Merge a10cf71 into 28d5e87
2 parents 28d5e87 + a10cf71 commit ed173b1

28 files changed

+2621
-491
lines changed

lib/Slic3r/GUI/PresetEditor.pm

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,8 @@ sub options {
439439
adaptive_slicing adaptive_slicing_quality match_horizontal_surfaces
440440
perimeters spiral_vase
441441
top_solid_layers min_shell_thickness min_top_bottom_shell_thickness bottom_solid_layers
442-
extra_perimeters avoid_crossing_perimeters thin_walls overhangs
442+
extra_perimeters avoid_crossing_perimeters
443+
thin_walls thin_walls_min_width thin_walls_overlap overhangs
443444
seam_position external_perimeters_first
444445
fill_density fill_pattern top_infill_pattern bottom_infill_pattern fill_gaps
445446
infill_every_layers infill_only_where_needed
@@ -540,7 +541,13 @@ sub build {
540541
my $optgroup = $page->new_optgroup('Quality (slower slicing)');
541542
$optgroup->append_single_option_line('extra_perimeters');
542543
$optgroup->append_single_option_line('avoid_crossing_perimeters');
543-
$optgroup->append_single_option_line('thin_walls');
544+
my $line = Slic3r::GUI::OptionsGroup::Line->new(
545+
label => 'Detect thin walls',
546+
);
547+
$line->append_option($optgroup->get_option('thin_walls'));
548+
$line->append_option($optgroup->get_option('thin_walls_min_width'));
549+
$line->append_option($optgroup->get_option('thin_walls_overlap'));
550+
$optgroup->append_line($line);
544551
$optgroup->append_single_option_line('overhangs');
545552
}
546553
{
@@ -888,8 +895,9 @@ sub _update {
888895
my $have_perimeters = ($config->perimeters > 0) || ($config->min_shell_thickness > 0);
889896
if (any { /$opt_key/ } qw(all_keys perimeters)) {
890897
$self->get_field($_)->toggle($have_perimeters)
891-
for qw(extra_perimeters thin_walls overhangs seam_position external_perimeters_first
892-
external_perimeter_extrusion_width
898+
for qw(extra_perimeters thin_walls thin_walls_min_width thin_walls_overlap
899+
overhangs seam_position
900+
external_perimeters_first external_perimeter_extrusion_width
893901
perimeter_speed small_perimeter_speed external_perimeter_speed);
894902
}
895903

@@ -975,6 +983,10 @@ sub _update {
975983
$self->get_field($_)->toggle($have_support_material && $have_support_interface)
976984
for qw(support_material_interface_spacing support_material_interface_extruder
977985
support_material_interface_speed);
986+
987+
# thin walls settigns only when thins walls is activated
988+
$self->get_field($_)->toggle($config->thin_walls)
989+
for qw(thin_walls_min_width thin_walls_overlap);
978990

979991
$self->get_field('perimeter_extrusion_width')->toggle($have_perimeters || $have_skirt || $have_brim);
980992
$self->get_field('support_material_extruder')->toggle($have_support_material || $have_skirt);

src/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ add_library(libslic3r STATIC
204204
${LIBDIR}/libslic3r/LayerHeightSpline.cpp
205205
${LIBDIR}/libslic3r/Line.cpp
206206
${LIBDIR}/libslic3r/Log.cpp
207+
${LIBDIR}/libslic3r/MedialAxis.cpp
207208
${LIBDIR}/libslic3r/Model.cpp
208209
${LIBDIR}/libslic3r/MotionPlanner.cpp
209210
${LIBDIR}/libslic3r/MultiPoint.cpp
@@ -316,6 +317,7 @@ set(SLIC3R_TEST_SOURCES
316317
${TESTDIR}/libslic3r/test_printobject.cpp
317318
${TESTDIR}/libslic3r/test_skirt_brim.cpp
318319
${TESTDIR}/libslic3r/test_test_data.cpp
320+
${TESTDIR}/libslic3r/test_thin.cpp
319321
${TESTDIR}/libslic3r/test_transformationmatrix.cpp
320322
${TESTDIR}/libslic3r/test_trianglemesh.cpp
321323
${TESTDIR}/libslic3r/test_extrusion_entity.cpp

src/GUI/Dialogs/PresetEditor.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ class PrintEditor : public PresetEditor {
143143
"adaptive_slicing"s, "adaptive_slicing_quality"s, "match_horizontal_surfaces"s,
144144
"perimeters"s, "spiral_vase"s,
145145
"top_solid_layers"s, "bottom_solid_layers"s,
146-
"extra_perimeters"s, "avoid_crossing_perimeters"s, "thin_walls"s, "overhangs"s,
146+
"extra_perimeters"s, "avoid_crossing_perimeters"s,
147+
"thin_walls"s, "thin_walls_min_width"s, "thin_walls_overlap"s, "overhangs"s,
147148
"seam_position"s, "external_perimeters_first"s,
148149
"fill_density"s, "fill_pattern"s, "top_infill_pattern"s, "bottom_infill_pattern"s, "fill_gaps"s,
149150
"infill_every_layers"s, "infill_only_where_needed"s,

src/test/libslic3r/test_fill.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ bool test_if_solid_surface_filled(const ExPolygon& expolygon, double flow_spacin
421421
Flow flow(flow_spacing, 0.4, flow_spacing);
422422

423423
filler->min_spacing = flow.spacing();
424+
filler->density = density;
424425

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

src/test/libslic3r/test_flow.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ SCENARIO(" Bridge flow specifics.", "[!mayfail]") {
9393
SCENARIO("Flow: Flow math for non-bridges", "[!mayfail]") {
9494
GIVEN("Nozzle Diameter of 0.4, a desired width of 1mm and layer height of 0.5") {
9595
auto width {ConfigOptionFloatOrPercent(1.0, false)};
96-
float spacing {0.4};
97-
float nozzle_diameter {0.4};
98-
float bridge_flow {1.0};
99-
float layer_height {0.5};
96+
float spacing {0.4f};
97+
float nozzle_diameter {0.4f};
98+
float bridge_flow {1.0f};
99+
float layer_height {0.5f};
100100

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

0 commit comments

Comments
 (0)