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

Thin wall improvements (v3) #4790

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
6ba61fe
Thin wall improvements
Aug 10, 2018
2841809
thin wall : medial axis:
Sep 25, 2018
e4484c4
forgot medial_axis.hpp/cpp files
Oct 1, 2018
418c770
Merge remote-tracking branch 'remotes/origin/master' into alexrj_thin…
Dec 3, 2018
2235c87
correct error with Polygon / ExPolygon
Dec 3, 2018
97c226a
Correct thin_wall bugs discovered with disc.stl from lordofhyphens
Dec 3, 2018
1c1451c
some modifs for a small bug (a hole that appeared between thin zone a…
Dec 4, 2018
155a68b
change the all 'medial axis segments of a semicircumference have the …
Dec 4, 2018
b6edcc4
rename variable "near" as appveyor seems to not like it.
Dec 4, 2018
d0f5bd7
one more test, reworked the thin semi-circle test.
Dec 5, 2018
32e9d9d
bugfix polylines & try to avoid many periemter splits.
Dec 5, 2018
90df3a5
debug test, relax min area for medial_axis
Dec 6, 2018
ca9f3f7
edge-case bugfix (a perimeter inside a thin_wall area)
Dec 6, 2018
6643d78
stop_at_min_width : do not extends the thin wall if it's over the min…
Dec 7, 2018
137c99c
bugfix, remove \t, #4640
Dec 10, 2018
4534c5e
Review corrections
Dec 11, 2018
767fc86
Medial axis: avoid duplication + bugfix
Dec 17, 2018
44e7ec8
bugfix ensure_not_overextrude
Dec 18, 2018
fff41c2
thin_walls_min_width & min size of thin wall is the nozzle diameter
Jan 4, 2019
69aea31
taper ends of thin walls lines
Jan 4, 2019
8555930
Merge remote-tracking branch 'remotes/origin/master' into alexrj_thin…
Jan 4, 2019
e34e75a
typo
Jan 4, 2019
fc46316
Thin_wall / medial axis:
Feb 7, 2019
f6ae12f
bugfix thin wall / gapfill width
Feb 8, 2019
f06491c
medial axis: debug
Feb 18, 2019
1687c5c
little bugfix for thinwall : concatenate_polylines_with_crossing
Apr 6, 2019
1c45045
Add sanity check for gapfill's min width.
Apr 7, 2019
8e652f1
Merge remote-tracking branch 'remotes/origin/master' into alexrj_thin…
Apr 18, 2019
d1a5fe2
medial axis: fixes
Apr 9, 2019
45a5630
Cleaning pull request
Apr 18, 2019
6273f0d
bugfix to test_fill
Jun 27, 2019
7770f70
Merge remote-tracking branch 'remotes/origin/master' into merill_thin…
Oct 22, 2019
d7357cc
some bugfix for medial axis
Oct 22, 2019
79db85d
fix for edge-cases
Feb 24, 2020
a10cf71
Merge branch 'master' into merill_thinwall
lordofhyphens Aug 23, 2020
da90a83
Change merge to prefer @supermerill implementation
lordofhyphens Aug 23, 2020
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
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