Skip to content

Commit

Permalink
#304 disable minimum resolution.
Browse files Browse the repository at this point in the history
It can go lower than 0.0125 for the perimeters.
It's kept at a minimum of 0.0125 for infill & thinwalls/gapfaill for performance reasons
and to avoid too much artifacts / corners case.
  • Loading branch information
supermerill committed Dec 8, 2020
1 parent fd584f1 commit 880eb59
Show file tree
Hide file tree
Showing 22 changed files with 57 additions and 50 deletions.
1 change: 1 addition & 0 deletions resources/profiles/Anycubic.idx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
min_slic3r_version = 2.3.0-beta2
0.0.5-susi remove resolution to use default
0.0.5 Updated end g-code.
min_slic3r_version = 2.3.0-alpha2
0.0.4 Fixed predator output filaname format, infill overlap.
Expand Down
5 changes: 1 addition & 4 deletions resources/profiles/Anycubic.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name = Anycubic
# Configuration version of this file. Config file will only be installed, if the config_version differs.
# This means, the server may force the PrusaSlicer configuration to be downgraded.
config_version = 0.0.5
config_version = 0.0.5-susi
# Where to get the updates from?
config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/Anycubic/
# changelog_url = https://files.prusa3d.com/?latest=slicer-profiles&lng=%1%
Expand Down Expand Up @@ -120,7 +120,6 @@ perimeter_speed = 45
post_process =
print_settings_id =
raft_layers = 0
resolution = 0
seam_position = nearest
single_extruder_multi_material_priming = 0
skirts = 2
Expand Down Expand Up @@ -502,7 +501,6 @@ perimeter_extrusion_width = 0.45
post_process =
print_settings_id =
raft_layers = 0
resolution = 0
seam_position = nearest
single_extruder_multi_material_priming = 1
skirts = 2
Expand Down Expand Up @@ -1170,7 +1168,6 @@ wipe_tower_rotation_angle = 0
wipe_tower_bridging = 10
interface_shells = 0
bridge_flow_ratio = 0.8
resolution = 0
xy_size_compensation = 0
elefant_foot_compensation = 0.2
clip_multipart_objects = 1
Expand Down
7 changes: 3 additions & 4 deletions resources/profiles/BIBO.idx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
min_slic3r_version = 2.3.0-beta2
0.0.3 Removed obsolete host keys.
min_slic3r_version = 2.2.0-alpha3

0.0.5 General print quality improvements (??)0.0.4 superslicer: remove top_fan_speed
0.0.5-susi remove resolution to use default
0.0.5 General print quality improvements (??)
0.0.4 superslicer: remove top_fan_speed
0.0.3 slic3r++ adaptation: overlapping & top pattern.
0.0.2 changed flow ratio from float to %
0.0.1 Multiple Print models were unified into a single one.
Expand Down
3 changes: 1 addition & 2 deletions resources/profiles/BIBO.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name = BIBO
# Configuration version of this file. Config file will only be installed, if the config_version differs.
# This means, the server may force the PrusaSlicer configuration to be downgraded.
config_version = 0.0.5
config_version = 0.0.5-susi
# Where to get the updates from?
config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/BIBO/

Expand Down Expand Up @@ -79,7 +79,6 @@ perimeter_extrusion_width = 0.45
post_process =
print_settings_id =
raft_layers = 0
resolution = 0
seam_position = aligned
single_extruder_multi_material_priming = 0
skirts = 3
Expand Down
3 changes: 1 addition & 2 deletions resources/profiles/Basic.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name = Custom
# Configuration version of this file. Config file will only be installed, if the config_version differs.
# This means, the server may force the Slic3r configuration to be downgraded.
config_version = 0.1.3
config_version = 0.1.4
# Where to get the updates from?
config_update_url =

Expand Down Expand Up @@ -287,7 +287,6 @@ perimeter_extruder = 1
post_process =
print_settings_id =
raft_layers = 0
resolution = 0
seam_position = hidden
skirts = 0
skirt_distance = 3
Expand Down
1 change: 1 addition & 0 deletions resources/profiles/Creality.idx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
min_slic3r_version = 2.3.0-beta2
0.1.8-susi remove resolution to use default
0.0.8 Slight end g-code improvements and spool weights.
min_slic3r_version = 2.3.0-alpha2
0.1.8 Fix G92 that mess up not-relative printer.
Expand Down
3 changes: 1 addition & 2 deletions resources/profiles/Creality.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name = Creality
# Configuration version of this file. Config file will only be installed, if the config_version differs.
# This means, the server may force the PrusaSlicer configuration to be downgraded.
config_version = 0.1.8
config_version = 0.1.8-susi
# Where to get the updates from?
config_update_url =
# https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/Creality/
Expand Down Expand Up @@ -219,7 +219,6 @@ perimeter_speed = 40
post_process =
print_settings_id =
raft_layers = 0
resolution = 0
seam_position = near
seam_travel_cost = 20%
single_extruder_multi_material_priming = 1
Expand Down
1 change: 1 addition & 0 deletions resources/profiles/LulzBot.idx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
min_slic3r_version = 2.1.0
0.0.3-susi remove resolution to use default
0.0.3 slic3r++ adaptation: overlapping & top pattern.
0.0.2 changed flow ratio from float to %
0.0.1 Initial version
5 changes: 2 additions & 3 deletions resources/profiles/LulzBot.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[vendor]
# Vendor name will be shown by the Config Wizard.
name = LulzBot
config_version = 0.0.3
config_version = 0.0.3-susi
config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/LulzBot/

[printer_model:MINI_AERO]
Expand Down Expand Up @@ -81,7 +81,6 @@ perimeter_speed = 60
perimeters = 3
post_process =
raft_layers = 0
resolution = 0
seam_position = hidden
single_extruder_multi_material_priming = 1
skirt_distance = 3
Expand Down Expand Up @@ -118,7 +117,7 @@ support_material_synchronize_layers = 0
support_material_threshold = 0
support_material_with_sheath = 1
support_material_xy_spacing = 50%
thin_perimeters = 0
thin_perimeters = 1
thin_walls = 1
thin_walls_min_width = 50%
thin_walls_overlap = 50%
Expand Down
1 change: 1 addition & 0 deletions resources/profiles/PrusaResearch.idx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
min_slic3r_version = 2.3.0-beta2
1.2.0-susi remove resolution to use default
1.2.0-beta1 Updated end g-code. Added full_fan_speed_layer values.
min_slic3r_version = 2.3.0-beta0
1.2.1-beta0 remove G92 in layer change, as it's not understand by the slicer.
Expand Down
3 changes: 1 addition & 2 deletions resources/profiles/PrusaResearch.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ technologies = FFF; SLA

# Configuration version of this file. Config file will only be installed, if the config_version differs.
# This means, the server may force the PrusaSlicer configuration to be downgraded.
config_version = 1.2.0-beta1
config_version = 1.2.0-susi
# Where to get the updates from?
config_update_url =
changelog_url =
Expand Down Expand Up @@ -191,7 +191,6 @@ perimeter_extrusion_width = 0.45
post_process =
print_settings_id =
raft_layers = 0
resolution = 0
seam_position = near
seam_travel_cost = 20%
single_extruder_multi_material_priming = 1
Expand Down
2 changes: 1 addition & 1 deletion resources/profiles/TriLAB.idx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
min_slic3r_version = 2.3.0-alpha3

0.0.5-susi remove resolution to use default
0.0.5 Removed obsolete host keys.0.0.4-1 remove g92
0.0.4 Added PLA, PETG profiles for 0.8 nozzle, update print materials
0.0.3 Added DeltiQ 2, DeltiQ 2 Plus printers, 0.10mm, 0.20mm FLEX print profiles, updated print materials, flexprint extension support
Expand Down
3 changes: 1 addition & 2 deletions resources/profiles/TriLAB.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
name = TriLAB
# Configuration version of this file. Config file will only be installed, if the config_version differs.
# This means, the server may force the PrusaSlicer configuration to be downgraded.
config_version = 0.0.5
config_version = 0.0.5-susi
# Where to get the updates from?
config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/TriLAB/
# changelog_url = https://files.prusa3d.com/?latest=slicer-profiles&lng=%1%
Expand Down Expand Up @@ -160,7 +160,6 @@ perimeters = 2
post_process =
print_settings_id =
raft_layers = 0
resolution = 0
seam_position = nearest
single_extruder_multi_material_priming = 0
skirt_distance = 3
Expand Down
1 change: 1 addition & 0 deletions resources/profiles/Voron.idx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
min_slic3r_version = 2.2.0
0.0.5 remove resolution to use default, disable fan_mover
0.0.4 2.3 adaptation (seam, thumbanils, ...)
0.0.3 superslicer: remove top_fan_speed
0.0.2 Update from DocJeeves settings, adding afterburner / mobius difference
Expand Down
6 changes: 2 additions & 4 deletions resources/profiles/Voron.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name = Voron
# Configuration version of this file. Config file will only be installed, if the config_version differs.
# This means, the server may force the PrusaSlicer configuration to be downgraded.
config_version = 0.0.4
config_version = 0.0.5
# Where to get the updates from?
config_update_url =

Expand Down Expand Up @@ -152,7 +152,6 @@ end_gcode = print_end ;end script from macro
extruder_colour = #FFE3CA
extruder_offset = 0x0
gcode_flavor = klipper
fan_speedup_time = 0
layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z]
machine_max_acceleration_e = 10000
machine_max_acceleration_extruding = 1500
Expand Down Expand Up @@ -579,7 +578,6 @@ perimeter_speed = 100
post_process =
print_settings_id =
raft_layers = 0
resolution = 0
seam_position = near
seam_travel_cost = 20%
single_extruder_multi_material_priming = 1
Expand Down Expand Up @@ -614,7 +612,7 @@ support_material_synchronize_layers = 0
support_material_threshold = 30
support_material_with_sheath = 0
support_material_xy_spacing = 0.6
thin_perimeters = 0
thin_perimeters = 1
thin_walls = 1
thin_walls_min_width = 50%
thin_walls_overlap = 50%
Expand Down
9 changes: 6 additions & 3 deletions src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3151,7 +3151,7 @@ std::string GCode::extrude_loop(const ExtrusionLoop &original_loop, const std::s
// extrude along the path
std::string gcode;
for (ExtrusionPaths::iterator path = paths.begin(); path != paths.end(); ++path) {
path->simplify(SCALED_RESOLUTION);
//path->simplify(SCALED_RESOLUTION); //should already be simplified
gcode += this->_extrude(*path, description, speed);
}

Expand Down Expand Up @@ -3246,7 +3246,7 @@ std::string GCode::extrude_multi_path(const ExtrusionMultiPath &multipath, const
// extrude along the path
std::string gcode;
for (ExtrusionPath path : multipath.paths) {
path.simplify(SCALED_RESOLUTION);
//path.simplify(SCALED_RESOLUTION); //should already be simplified
gcode += this->_extrude(path, description, speed);
}
if (m_wipe.enable) {
Expand Down Expand Up @@ -3332,7 +3332,10 @@ std::string GCode::extrude_path(const ExtrusionPath &path, const std::string &de
}
m_last_too_small.polyline.points.clear();
}
simplifed_path.simplify(this->config().min_length.value != 0 ? scale_(this->config().min_length) : SCALED_RESOLUTION);
if (this->config().min_length.value > 0) {
simplifed_path.simplify(scale_(this->config().min_length));
}
//else simplifed_path.simplify(SCALED_RESOLUTION); //should already be simplified
if (this->config().min_length.value != 0 && simplifed_path.length() < scale_(this->config().min_length)) {
m_last_too_small = simplifed_path;
return "";
Expand Down
12 changes: 8 additions & 4 deletions src/libslic3r/Milling/MillingPostProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,16 @@ namespace Slic3r {
for (const Surface& surf : slices->surfaces) {
ExPolygons surf_milling = offset_ex(surf.expolygon, milling_diameter/2, ClipperLib::jtRound);
for (const ExPolygon& expoly : surf_milling)
expoly.simplify(SCALED_RESOLUTION, &milling_lines);
// expoly.simplify(SCALED_RESOLUTION, &milling_lines); // should already be done
milling_lines.push_back(expoly);
}
milling_lines = union_ex(milling_lines);

ExPolygons secured_points = offset_ex(milling_lines, milling_diameter / 3);
ExPolygons entrypoints;
for (const ExPolygon& expoly : secured_points)
expoly.simplify(SCALED_RESOLUTION, &entrypoints);
// expoly.simplify(SCALED_RESOLUTION, &entrypoints); // should already be done
entrypoints.push_back(expoly);
entrypoints = union_ex(entrypoints);
Polygons entrypoints_poly;
for (const ExPolygon& expoly : secured_points)
Expand Down Expand Up @@ -150,7 +152,8 @@ namespace Slic3r {
for (const Surface& surf : slices->surfaces) {
ExPolygons surf_milling = offset_ex(surf.expolygon, milling_radius, ClipperLib::jtRound);
for (const ExPolygon& expoly : surf_milling)
expoly.simplify(SCALED_RESOLUTION, &milling_lines);
// expoly.simplify(SCALED_RESOLUTION, &milling_lines); // should already be done
milling_lines.push_back(expoly);
surfaces.push_back(surf.expolygon);
}
union_ex(milling_lines, true);
Expand All @@ -166,7 +169,8 @@ namespace Slic3r {
ExPolygons safe_umillable = diff_ex(offset_ex(exact_unmillable_area, safety_offset), surfaces, true);
ExPolygons safe_umillable_simplified;
for (const ExPolygon& expoly : safe_umillable)
expoly.simplify(SCALED_RESOLUTION, &safe_umillable_simplified);
// expoly.simplify(SCALED_RESOLUTION, &safe_umillable_simplified); // should already be done
safe_umillable_simplified.push_back(expoly);
return union_ex(safe_umillable_simplified, true);
}

Expand Down
4 changes: 3 additions & 1 deletion src/libslic3r/PerimeterGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,9 @@ void PerimeterGenerator::process()
//this var store infill surface removed from last to not add any more perimeters to it.
ExPolygons top_fills;
ExPolygons fill_clip;
ExPolygons last = union_ex(surface.expolygon.simplify_p(SCALED_RESOLUTION));
// simplification already done at slicing
//ExPolygons last = union_ex(surface.expolygon.simplify_p(SCALED_RESOLUTION));
ExPolygons last = union_ex(surface.expolygon);

if (loop_number >= 0) {

Expand Down
9 changes: 5 additions & 4 deletions src/libslic3r/PrintConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2642,13 +2642,13 @@ void PrintConfigDef::init_fff_params()
def->label = L("'As bridge' speed threshold");
def->full_label = L("Overhang bridge speed threshold");
def->category = OptionCategory::perimeter;
def->tooltip = L("Minimum unsupported width for an extrusion to apply the bridge speed & fan to this overhang."
def->tooltip = L("Minimum unsupported width for an extrusion to apply the bridge fan & overhang speed to this overhang."
" Can be in mm or in a % of the nozzle diameter."
" Set to 0 to deactivate.");
def->ratio_over = "nozzle_diameter";
def->min = 0;
def->mode = comExpert;
def->set_default_value(new ConfigOptionFloatOrPercent(50,true));
def->set_default_value(new ConfigOptionFloatOrPercent(55,true));

def = this->add("overhangs_width", coFloatOrPercent);
def->label = L("'As bridge' flow threshold");
Expand Down Expand Up @@ -2860,11 +2860,12 @@ void PrintConfigDef::init_fff_params()
"the slicing job and reducing memory usage. High-resolution models often carry "
"more detail than printers can render. Set to zero to disable any simplification "
"and use full resolution from input. "
"\nNote: slic3r simplify the geometry with a treshold of 0.0125mm and has an internal resolution of 0.0001mm.");
"\nNote: SuperSlicer has an internal resolution of 0.000001mm."
"\nInfill & Thin areas are simplified up to 0.0125mm.");
def->sidetext = L("mm");
def->min = 0;
def->mode = comExpert;
def->set_default_value(new ConfigOptionFloat(0));
def->set_default_value(new ConfigOptionFloat(0.0125));

def = this->add("retract_before_travel", coFloats);
def->label = L("Minimum travel after retraction");
Expand Down
10 changes: 5 additions & 5 deletions src/libslic3r/PrintObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ void PrintObject::slice()
if (! warning.empty())
BOOST_LOG_TRIVIAL(info) << warning;
// Simplify slices if required.
if (m_print->config().resolution)
this->simplify_slices(scale_(this->print()->config().resolution));
if (m_print->config().resolution.value > 0)
this->simplify_slices(scale_(this->print()->config().resolution.value));

//create polyholes
this->_transform_hole_to_polyholes();
Expand Down Expand Up @@ -2455,7 +2455,7 @@ void PrintObject::_slice(const std::vector<coordf_t> &layer_height_profile)
BOOST_LOG_TRIVIAL(debug) << "Slicing modifier volumes - stealing " << region_id << " end";
}
}

BOOST_LOG_TRIVIAL(debug) << "Slicing objects - removing top empty layers";
while (! m_layers.empty()) {
const Layer *layer = m_layers.back();
Expand Down Expand Up @@ -2771,15 +2771,15 @@ ExPolygons PrintObject::_smooth_curves(const ExPolygons & input, const PrintRegi
ExPolygons new_polys;
for (const ExPolygon &ex_poly : input) {
ExPolygon new_ex_poly(ex_poly);
new_ex_poly.contour.remove_collinear(SCALED_RESOLUTION);
new_ex_poly.contour.remove_collinear(SCALED_EPSILON * 10);
new_ex_poly.contour = _smooth_curve(new_ex_poly.contour, PI,
conf.curve_smoothing_angle_convex.value*PI / 180.0,
conf.curve_smoothing_angle_concave.value*PI / 180.0,
scale_(conf.curve_smoothing_cutoff_dist.value),
scale_(conf.curve_smoothing_precision.value));
for (Polygon &phole : new_ex_poly.holes){
phole.reverse(); // make_counter_clockwise();
phole.remove_collinear(SCALED_RESOLUTION);
phole.remove_collinear(SCALED_EPSILON * 10);
phole = _smooth_curve(phole, PI,
conf.curve_smoothing_angle_convex.value*PI / 180.0,
conf.curve_smoothing_angle_concave.value*PI / 180.0,
Expand Down
2 changes: 1 addition & 1 deletion src/libslic3r/TriangleMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1767,7 +1767,7 @@ void TriangleMeshSlicer::make_expolygons(const Polygons &loops, ExPolygons* slic
// p_slices = diff(p_slices, *loop);
//}

//remove point in the same plane (have to do that before the safety offset to avoid workgin on a distored polygon)
//remove point in the same plane (have to do that before the safety offset to avoid working on a distored polygon)
Polygons filered_polys = loops;
if (this->model_precision > 0){
for (Polygon &hole : filered_polys){
Expand Down
Loading

0 comments on commit 880eb59

Please sign in to comment.