From 9a260010fc7ee309fd6c3fbd1a57c602edcc4e3e Mon Sep 17 00:00:00 2001 From: Ioannis Giannakas <59056762+igiannakas@users.noreply.github.com> Date: Tue, 13 Aug 2024 16:25:49 +0100 Subject: [PATCH 1/7] Improvements in Inner Outer Inner wall ordering logic (#6138) * Improvements in Inner Outer Inner wall ordering logic * Updated to BFS algorithm, made ordering more robust and corrected edge cases * Doc updates * Refinements in perimeter sorting * Removal of touch threshold and code debugging to improve sequencing * Code cleanup * Code refinements on perimeter distance thresholds * Extend perimeter re-ordering to more than inset index 2, to reduce travel moves when printing neighbouring features * Refinements to IOI perimeter re-ordering algorithm to improve travel scenarios where multiple external perimeters are contained in the same island. * Documentation updates * Removed unnecessary code * Removed bespoke to_points function and replaced with ExtrusionLine member already present. Removed squaredDistance and replaced with Eigen library call. * Refactor code to move distancing functions to the multipoint class. Renamed for more clarity on their purpose. --- src/libslic3r/Arachne/utils/ExtrusionLine.hpp | 18 +- src/libslic3r/MultiPoint.cpp | 53 +++++ src/libslic3r/MultiPoint.hpp | 7 + src/libslic3r/PerimeterGenerator.cpp | 215 +++++++++++++++--- 4 files changed, 248 insertions(+), 45 deletions(-) diff --git a/src/libslic3r/Arachne/utils/ExtrusionLine.hpp b/src/libslic3r/Arachne/utils/ExtrusionLine.hpp index ab68eb129b3..ee783fbebad 100644 --- a/src/libslic3r/Arachne/utils/ExtrusionLine.hpp +++ b/src/libslic3r/Arachne/utils/ExtrusionLine.hpp @@ -245,6 +245,15 @@ static inline Polygon to_polygon(const ExtrusionLine &line) return out; } +static Points to_points(const ExtrusionLine &extrusion_line) +{ + Points points; + points.reserve(extrusion_line.junctions.size()); + for (const ExtrusionJunction &junction : extrusion_line.junctions) + points.emplace_back(junction.p); + return points; +} + #if 0 static BoundingBox get_extents(const ExtrusionLine &extrusion_line) { @@ -272,15 +281,6 @@ static BoundingBox get_extents(const std::vector &extrusi return bbox; } -static Points to_points(const ExtrusionLine &extrusion_line) -{ - Points points; - points.reserve(extrusion_line.junctions.size()); - for (const ExtrusionJunction &junction : extrusion_line.junctions) - points.emplace_back(junction.p); - return points; -} - static std::vector to_points(const std::vector &extrusion_lines) { std::vector points; diff --git a/src/libslic3r/MultiPoint.cpp b/src/libslic3r/MultiPoint.cpp index 0076300ea61..3cdae34105f 100644 --- a/src/libslic3r/MultiPoint.cpp +++ b/src/libslic3r/MultiPoint.cpp @@ -370,6 +370,59 @@ Points MultiPoint::concave_hull_2d(const Points& pts, const double tolerence) } +//Orca: Distancing function used by IOI wall ordering algorithm for arachne +/** + * @brief Calculates the squared distance between a point and a line segment defined by two points. + * + * @param p The point. + * @param v The starting point of the line segment. + * @param w The ending point of the line segment. + * @return double The squared distance between the point and the line segment. + */ + double MultiPoint::squaredDistanceToLineSegment(const Point& p, const Point& v, const Point& w) { + // Calculate the squared length of the line segment + double l2 = (v - w).squaredNorm(); + // If the segment is a single point, return the squared distance to that point + if (l2 == 0.0) return (p - v).squaredNorm(); + // Project point p onto the line defined by v and w, and clamp the projection to the segment + double t = std::max(0.0, std::min(1.0, ((p - v).dot(w - v)) / l2)); + // Compute the projection point + Point projection{v.x() + t * (w.x() - v.x()), v.y() + t * (w.y() - v.y())}; + // Return the squared distance between the point and the projection + return (p - projection).squaredNorm(); +} + +//Orca: Distancing function used by IOI wall ordering algorithm for arachne +/** + * @brief Calculates the minimum distance between two lines defined by sets of points. + * + * @param A The first set of points defining a polyline. + * @param B The second set of points defining a polyline. + * @return double The minimum distance between the two polylines. + */ + double MultiPoint::minimumDistanceBetweenLinesDefinedByPoints(const Points& A, const Points& B) { + double min_distance = std::numeric_limits::infinity(); + + // Calculate the minimum distance between segments in A and points in B + for (size_t i = 0; i < A.size() - 1; ++i) { + for (const auto& b : B) { + double distance = squaredDistanceToLineSegment(b, A[i], A[i + 1]); + min_distance = std::min(min_distance, std::sqrt(distance)); + } + } + + // Calculate the minimum distance between segments in B and points in A + for (size_t i = 0; i < B.size() - 1; ++i) { + for (const auto& a : A) { + double distance = squaredDistanceToLineSegment(a, B[i], B[i + 1]); + min_distance = std::min(min_distance, std::sqrt(distance)); + } + } + + return min_distance; +} + + void MultiPoint3::translate(double x, double y) { for (Vec3crd &p : points) { diff --git a/src/libslic3r/MultiPoint.hpp b/src/libslic3r/MultiPoint.hpp index 4c1f9049edb..b6f74e5c88b 100644 --- a/src/libslic3r/MultiPoint.hpp +++ b/src/libslic3r/MultiPoint.hpp @@ -98,6 +98,9 @@ class MultiPoint static Points _douglas_peucker(const Points &points, const double tolerance); static Points visivalingam(const Points& pts, const double tolerance); static Points concave_hull_2d(const Points& pts, const double tolerence); + + //Orca: Distancing function used by IOI wall ordering algorithm for arachne + static double minimumDistanceBetweenLinesDefinedByPoints(const Points& A, const Points& B); inline auto begin() { return points.begin(); } inline auto begin() const { return points.begin(); } @@ -105,6 +108,10 @@ class MultiPoint inline auto end() const { return points.end(); } inline auto cbegin() const { return points.begin(); } inline auto cend() const { return points.end(); } + +private: + //Orca: Distancing function used by IOI wall ordering algorithm for arachne + static double squaredDistanceToLineSegment(const Point& p, const Point& v, const Point& w); }; class MultiPoint3 diff --git a/src/libslic3r/PerimeterGenerator.cpp b/src/libslic3r/PerimeterGenerator.cpp index 439ef578748..d37ff7f1d65 100644 --- a/src/libslic3r/PerimeterGenerator.cpp +++ b/src/libslic3r/PerimeterGenerator.cpp @@ -2442,6 +2442,166 @@ void PerimeterGenerator::process_no_bridge(Surfaces& all_surfaces, coord_t perim } } +// ORCA: +// Inner Outer Inner wall ordering mode perimeter order optimisation functions +/** + * @brief Finds all perimeters touching a given set of reference lines, given as indexes. + * + * @param entities The list of PerimeterGeneratorArachneExtrusion entities. + * @param referenceIndices A set of indices representing the reference points. + * @param threshold_external The distance threshold to consider for proximity for a reference perimeter with inset index 0 + * @param threshold_internal The distance threshold to consider for proximity for a reference perimeter with inset index 1+ + * @param considered_inset_idx What perimeter inset index are we searching for (eg. if we are searching for first internal perimeters proximate to the current reference perimeter, this value should be set to 1 etc). + * @return std::vector A vector of indices representing the touching perimeters. + */ +std::vector findAllTouchingPerimeters(const std::vector& entities, const std::unordered_set& referenceIndices, size_t threshold_external, size_t threshold_internal , size_t considered_inset_idx) { + std::unordered_set touchingIndices; + + for (const int refIdx : referenceIndices) { + const auto& referenceEntity = entities[refIdx]; + Points referencePoints = Arachne::to_points(*referenceEntity.extrusion); + for (size_t i = 0; i < entities.size(); ++i) { + // Skip already considered references and the reference entity + if (referenceIndices.count(i) > 0) continue; + const auto& entity = entities[i]; + if (entity.extrusion->inset_idx == 0) continue; // Ignore inset index 0 (external) perimeters from the re-ordering even if they are touching + + if (entity.extrusion->inset_idx != considered_inset_idx) { // Find Inset index perimeters that match the requested inset index + continue; // skip if they dont match + } + + Points points = Arachne::to_points(*entity.extrusion); + double distance = MultiPoint::minimumDistanceBetweenLinesDefinedByPoints(referencePoints, points); + // Add to touchingIndices if within threshold distance + size_t threshold=0; + if(referenceEntity.extrusion->inset_idx == 0) + threshold = threshold_external; + else + threshold = threshold_internal; + if (distance <= threshold) { + touchingIndices.insert(i); + } + } + } + return std::vector(touchingIndices.begin(), touchingIndices.end()); +} + +/** + * @brief Reorders perimeters based on proximity to the reference perimeter + * + * This approach finds all perimeters touching the external perimeter first and then finds all perimeters touching these new ones until none are left + * It ensures a level-by-level traversal, similar to BFS in graph theory. + * + * @param entities The list of PerimeterGeneratorArachneExtrusion entities. + * @param referenceIndex The index of the reference perimeter. + * @param threshold_external The distance threshold to consider for proximity for a reference perimeter with inset index 0 + * @param threshold_internal The distance threshold to consider for proximity for a reference perimeter with inset index 1+ + * @return std::vector The reordered list of perimeters based on proximity. + */ +std::vector reorderPerimetersByProximity(std::vector entities, size_t threshold_external, size_t threshold_internal) { + std::vector reordered; + std::unordered_set includedIndices; + + // Function to reorder perimeters starting from a given reference index + auto reorderFromReference = [&](int referenceIndex) { + std::unordered_set firstLevelIndices; + firstLevelIndices.insert(referenceIndex); + + // Find first level touching perimeters + std::vector firstLevelTouchingIndices = findAllTouchingPerimeters(entities, firstLevelIndices, threshold_external, threshold_internal, 1); + // Bring the largest first level perimeter to the front + // The longest first neighbour is most likely the dominant proximate perimeter + // hence printing it immediately after the external perimeter should speed things up + if (!firstLevelTouchingIndices.empty()) { + auto maxIt = std::max_element(firstLevelTouchingIndices.begin(), firstLevelTouchingIndices.end(), [&entities](int a, int b) { + return entities[a].extrusion->getLength() < entities[b].extrusion->getLength(); + }); + std::iter_swap(maxIt, firstLevelTouchingIndices.end() - 1); + } + // Insert first level perimeters into reordered list + reordered.push_back(entities[referenceIndex]); + includedIndices.insert(referenceIndex); + + for (int idx : firstLevelTouchingIndices) { + if (includedIndices.count(idx) == 0) { + reordered.push_back(entities[idx]); + includedIndices.insert(idx); + } + } + + // Loop through all inset indices above 1 + size_t currentInsetIndex = 2; + while (true) { + std::unordered_set currentLevelIndices(firstLevelTouchingIndices.begin(), firstLevelTouchingIndices.end()); + std::vector currentLevelTouchingIndices = findAllTouchingPerimeters(entities, currentLevelIndices, threshold_external, threshold_internal, currentInsetIndex); + + // Break if no more touching perimeters are found + if (currentLevelTouchingIndices.empty()) { + break; + } + + // Exclude any already included indices from the current level touching indices + currentLevelTouchingIndices.erase( + std::remove_if(currentLevelTouchingIndices.begin(), currentLevelTouchingIndices.end(), + [&](int idx) { return includedIndices.count(idx) > 0; }), + currentLevelTouchingIndices.end()); + + // Bring the largest current level perimeter to the end + if (!currentLevelTouchingIndices.empty()) { + auto maxIt = std::max_element(currentLevelTouchingIndices.begin(), currentLevelTouchingIndices.end(), [&entities](int a, int b) { + return entities[a].extrusion->getLength() < entities[b].extrusion->getLength(); + }); + std::iter_swap(maxIt, currentLevelTouchingIndices.begin()); + } + + // Insert current level perimeters into reordered list + for (int idx : currentLevelTouchingIndices) { + if (includedIndices.count(idx) == 0) { + reordered.push_back(entities[idx]); + includedIndices.insert(idx); + } + } + + // Prepare for the next level + firstLevelTouchingIndices = currentLevelTouchingIndices; + currentInsetIndex++; + } + }; + + // Loop through all perimeters and reorder starting from each inset index 0 perimeter + for (size_t refIdx = 0; refIdx < entities.size(); ++refIdx) { + if (entities[refIdx].extrusion->inset_idx == 0 && includedIndices.count(refIdx) == 0) { + reorderFromReference(refIdx); + } + } + + // Append any remaining entities that were not included + for (size_t i = 0; i < entities.size(); ++i) { + if (includedIndices.count(i) == 0) { + reordered.push_back(entities[i]); + } + } + + return reordered; +} + +/** + * @brief Reorders the vector to bring external perimeter (i.e. paths with inset index 0) that are also contours (i.e. external facing lines) to the front. + * + * This function uses a stable partition to move all external perimeter contour elements to the front of the vector, + * while maintaining the relative order of non-contour elements. + * + * @param ordered_extrusions The vector of PerimeterGeneratorArachneExtrusion to reorder. + */ +void bringContoursToFront(std::vector& ordered_extrusions) { + std::stable_partition(ordered_extrusions.begin(), ordered_extrusions.end(), [](const PerimeterGeneratorArachneExtrusion& extrusion) { + return (extrusion.extrusion->is_contour() && extrusion.extrusion->inset_idx==0); + }); +} +// ORCA: +// Inner Outer Inner wall ordering mode perimeter order optimisation functions ended + + // Thanks, Cura developers, for implementing an algorithm for generating perimeters with variable width (Arachne) that is based on the paper // "A framework for adaptive width control of dense contour-parallel toolpaths in fused deposition modeling" void PerimeterGenerator::process_arachne() @@ -2744,39 +2904,22 @@ void PerimeterGenerator::process_arachne() int arr_i, arr_j = 0; // indexes to run through the walls in the for loops int outer, first_internal, second_internal, max_internal, current_perimeter; // allocate index values - // Initiate reorder sequence to bring any index 1 (first internal) perimeters ahead of any second internal perimeters - // Leaving these out of order will result in print defects on the external wall as they will be extruded prior to any - // external wall. To do the re-ordering, we are creating two extrusion arrays - reordered_extrusions which will contain - // the reordered extrusions and skipped_extrusions will contain the ones that were skipped in the scan - std::vector reordered_extrusions, skipped_extrusions; - bool found_second_internal = false; // helper variable to indicate the start of a new island + // To address any remaining scenarios where the outer perimeter contour is not first on the list as arachne sometimes reorders the perimeters when clustering + // for OI mode that is used the basis for IOI + bringContoursToFront(ordered_extrusions); + std::vector reordered_extrusions; + + // Get searching thresholds. For an external perimeter we take the middle of the external perimeter width, split it in two, add the spacing to the internal perimeter and add half the internal perimeter width. + // This should get us to the middle of the internal perimeter. We then scale by 10% up for safety margin. + coord_t threshold_external = (this->ext_perimeter_flow.scaled_width()/2+this->ext_perimeter_flow.scaled_spacing()+this->perimeter_flow.scaled_width()/2) * 1.1; + // For the intenal perimeter threshold, the distance is the perimeter width plus the spacing, scaled by 10% for safety margin. + coord_t threshold_internal = (this->perimeter_flow.scaled_width()+this->perimeter_flow.scaled_spacing()) * 1.1; + + // Re-order extrusions based on distance + // Alorithm will aggresively optimise for the appearance of the outermost perimeter + ordered_extrusions = reorderPerimetersByProximity(ordered_extrusions,threshold_external,threshold_internal ); + reordered_extrusions = ordered_extrusions; // copy them into the reordered extrusions vector to allow for IOI operations to be performed below without altering the base ordered extrusions list. - for(auto extrusion_to_reorder : ordered_extrusions){ //scan the perimeters to reorder - switch (extrusion_to_reorder.extrusion->inset_idx) { - case 0: // external perimeter - if(found_second_internal){ //new island - move skipped extrusions to reordered array - for(auto extrusion_skipped : skipped_extrusions) - reordered_extrusions.emplace_back(extrusion_skipped); - skipped_extrusions.clear(); - } - reordered_extrusions.emplace_back(extrusion_to_reorder); - break; - case 1: // first internal perimeter - reordered_extrusions.emplace_back(extrusion_to_reorder); - break; - default: // second internal+ perimeter -> put them in the skipped extrusions array - skipped_extrusions.emplace_back(extrusion_to_reorder); - found_second_internal = true; - break; - } - } - if(ordered_extrusions.size()>reordered_extrusions.size()){ - // we didnt find any more islands, so lets move the remaining skipped perimeters to the reordered extrusions list. - for(auto extrusion_skipped : skipped_extrusions) - reordered_extrusions.emplace_back(extrusion_skipped); - skipped_extrusions.clear(); - } - // Now start the sandwich mode wall re-ordering using the reordered_extrusions as the basis // scan to find the external perimeter, first internal, second internal and last perimeter in the island. // We then advance the position index to move to the second island and continue until there are no more @@ -2806,7 +2949,8 @@ void PerimeterGenerator::process_arachne() } break; } - if(outer >-1 && first_internal>-1 && second_internal>-1 && reordered_extrusions[arr_i].extrusion->inset_idx == 0){ // found a new external perimeter after we've found all three perimeters to re-order -> this means we entered a new island. + if(outer >-1 && first_internal>-1 && reordered_extrusions[arr_i].extrusion->inset_idx == 0){ // found a new external perimeter after we've found at least a first internal perimeter to re-order. + // This means we entered a new island. arr_i=arr_i-1; //step back one perimeter max_internal = arr_i; // new maximum internal perimeter is now this as we have found a new external perimeter, hence a new island. break; // exit the for loop @@ -2814,7 +2958,7 @@ void PerimeterGenerator::process_arachne() } // printf("Layer ID %d, Outer index %d, inner index %d, second inner index %d, maximum internal perimeter %d \n",layer_id,outer,first_internal,second_internal, max_internal); - if (outer > -1 && first_internal > -1 && second_internal > -1) { // found perimeters to re-order? + if (outer > -1 && first_internal > -1 && second_internal > -1) { // found all three perimeters to re-order? If not the perimeters will be processed outside in. std::vector inner_outer_extrusions; // temporary array to hold extrusions for reordering inner_outer_extrusions.reserve(max_internal - position + 1); // reserve array containing the number of perimeters before a new island. Variables are array indexes hence need to add +1 to convert to position allocations // printf("Allocated array size %d, max_internal index %d, start position index %d \n",max_internal-position+1,max_internal,position); @@ -2834,8 +2978,7 @@ void PerimeterGenerator::process_arachne() for(arr_j = position; arr_j <= max_internal; ++arr_j) // replace perimeter array with the new re-ordered array ordered_extrusions[arr_j] = inner_outer_extrusions[arr_j-position]; - } else - break; + } // go to the next perimeter from the current position to continue scanning for external walls in the same island position = arr_i + 1; } From e73638af59d3929c252c9f1b643423b66048e7b4 Mon Sep 17 00:00:00 2001 From: SoftFever Date: Wed, 14 Aug 2024 23:03:05 +0800 Subject: [PATCH 2/7] add prime all used extruder logic in start g-code for tool changer. The prime logic is mainly bollowed from Prusa XL 5T --- resources/profiles/Custom.json | 2 +- resources/profiles/Custom/machine/fdm_toolchanger_common.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/profiles/Custom.json b/resources/profiles/Custom.json index e4dae5bd729..8ef0e84c919 100644 --- a/resources/profiles/Custom.json +++ b/resources/profiles/Custom.json @@ -1,6 +1,6 @@ { "name": "Custom Printer", - "version": "02.01.04.00", + "version": "02.01.05.00", "force_update": "0", "description": "My configurations", "machine_model_list": [ diff --git a/resources/profiles/Custom/machine/fdm_toolchanger_common.json b/resources/profiles/Custom/machine/fdm_toolchanger_common.json index 0d1fe9c1659..e151cf0d4c7 100644 --- a/resources/profiles/Custom/machine/fdm_toolchanger_common.json +++ b/resources/profiles/Custom/machine/fdm_toolchanger_common.json @@ -181,8 +181,8 @@ ], "purge_in_prime_tower": "0", "machine_pause_gcode": "M601", - "machine_start_gcode": "PRINT_START TOOL_TEMP={first_layer_temperature[initial_tool]} {if is_extruder_used[0]}T0_TEMP={first_layer_temperature[0]}{endif} {if is_extruder_used[1]}T1_TEMP={first_layer_temperature[1]}{endif} {if is_extruder_used[2]}T2_TEMP={first_layer_temperature[2]}{endif} {if is_extruder_used[3]}T3_TEMP={first_layer_temperature[3]}{endif} {if is_extruder_used[4]}T4_TEMP={first_layer_temperature[4]}{endif} {if is_extruder_used[5]}T5_TEMP={first_layer_temperature[5]}{endif} BED_TEMP=[first_layer_bed_temperature] TOOL=[initial_tool]\n\n", - "change_filament_gcode": "", + "change_filament_gcode": "", "machine_start_gcode": "PRINT_START TOOL_TEMP={first_layer_temperature[initial_tool]} {if is_extruder_used[0]}T0_TEMP={first_layer_temperature[0]}{endif} {if is_extruder_used[1]}T1_TEMP={first_layer_temperature[1]}{endif} {if is_extruder_used[2]}T2_TEMP={first_layer_temperature[2]}{endif} {if is_extruder_used[3]}T3_TEMP={first_layer_temperature[3]}{endif} {if is_extruder_used[4]}T4_TEMP={first_layer_temperature[4]}{endif} {if is_extruder_used[5]}T5_TEMP={first_layer_temperature[5]}{endif} BED_TEMP=[first_layer_bed_temperature] TOOL=[initial_tool]\n\nM83\n; set extruder temp\n{if first_layer_temperature[0] > 0 and (is_extruder_used[0])}M104 T0 S{first_layer_temperature[0]}{endif}\n{if first_layer_temperature[1] > 0 and (is_extruder_used[1])}M104 T1 S{first_layer_temperature[1]}{endif}\n{if first_layer_temperature[2] > 0 and (is_extruder_used[2])}M104 T2 S{first_layer_temperature[2]}{endif}\n{if first_layer_temperature[3] > 0 and (is_extruder_used[3])}M104 T3 S{first_layer_temperature[3]}{endif}\n{if first_layer_temperature[4] > 0 and (is_extruder_used[4])}M104 T4 S{first_layer_temperature[4]}{endif}\n{if (is_extruder_used[0]) and initial_tool != 0}\n;\n; purge first tool\n;\nG1 F{travel_speed * 60}\nM109 T0 S{first_layer_temperature[0]}\nT0; pick the tool\nG92 E0 ; reset extruder position\n\nG0 X{(0 == 0 ? 0 : (0 == 1 ? 120 : (0 == 2 ? 180 : 300)))} Y{(0 < 4 ? 0 : 3)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge\nG0 E{if filament_multitool_ramming[0]}10{else}30{endif} X40 Z0.2 F{if filament_multitool_ramming[0]}500{else}170{endif} ; purge while moving towards the sheet\nG0 X40 E9 F800 ; continue purging and wipe the nozzle\nG0 X{40 + 3} Z{0.05} F{8000} ; wipe, move close to the bed\nG0 X{40 + 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed\nG1 E{- 1.5 * retract_length[0]} F2400 ; retract\n{e_retracted[0] = 1.5 * retract_length[0]} ; update slicer internal retract variable\nG92 E0 ; reset extruder position\n\nM104 S{(idle_temperature[0] == 0 ? (first_layer_temperature[0] + standby_temperature_delta) : (idle_temperature[0]))} T0\n{endif}\n{if (is_extruder_used[1]) and initial_tool != 1}\n;\n; purge second tool\n;\nG1 F{travel_speed * 60}\nM109 T1 S{first_layer_temperature[1]}\nT1; pick the tool\nG92 E0 ; reset extruder position\n\nG0 X{(1 == 0 ? 0 : (1 == 1 ? 120 : (1 == 2 ? 180 : 300)))} Y{(1 < 4 ? 0 : 3)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge\nG0 E{if filament_multitool_ramming[1]}10{else}30{endif} X120 Z0.2 F{if filament_multitool_ramming[1]}500{else}170{endif} ; purge while moving towards the sheet\nG0 X80 E9 F800 ; continue purging and wipe the nozzle\nG0 X{80 - 3} Z{0.05} F{8000} ; wipe, move close to the bed\nG0 X{80 - 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed\nG1 E{- 1.5 * retract_length[1]} F2400 ; retract\n{e_retracted[1] = 1.5 * retract_length[1]} ; update slicer internal retract variable\nG92 E0 ; reset extruder position\n\nM104 S{(idle_temperature[1] == 0 ? (first_layer_temperature[1] + standby_temperature_delta) : (idle_temperature[1]))} T1\n{endif}\n{if (is_extruder_used[2]) and initial_tool != 2}\n;\n; purge third tool\n;\nG1 F{travel_speed * 60}\nM109 T2 S{first_layer_temperature[2]}\nT2; pick the tool\nG92 E0 ; reset extruder position\n\nG0 X{(2 == 0 ? 0 : (2 == 1 ? 120 : (2 == 2 ? 180 : 300)))} Y{(2 < 4 ? 0 : 3)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge\nG0 E{if filament_multitool_ramming[2]}10{else}30{endif} X220 Z0.2 F{if filament_multitool_ramming[2]}500{else}170{endif} ; purge while moving towards the sheet\nG0 X220 E9 F800 ; continue purging and wipe the nozzle\nG0 X{220 + 3} Z{0.05} F{8000} ; wipe, move close to the bed\nG0 X{220 + 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed\nG1 E{- 1.5 * retract_length[2]} F2400 ; retract\n{e_retracted[2] = 1.5 * retract_length[2]} ; update slicer internal retract variable\nG92 E0 ; reset extruder position\n\nM104 S{(idle_temperature[2] == 0 ? (first_layer_temperature[2] + standby_temperature_delta) : (idle_temperature[2]))} T2\n{endif}\n{if (is_extruder_used[3]) and initial_tool != 3}\n;\n; purge fourth tool\n;\nG1 F{travel_speed * 60}\nM109 T3 S{first_layer_temperature[3]}\nT3; pick the tool\nG92 E0 ; reset extruder position\n\nG0 X{(3 == 0 ? 0 : (3 == 1 ? 120 : (3 == 2 ? 180 : 300)))} Y{(3 < 4 ? 0 : 3)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge\nG0 E{if filament_multitool_ramming[3]}10{else}30{endif} X290 Z0.2 F{if filament_multitool_ramming[3]}500{else}170{endif} ; purge while moving towards the sheet\nG0 X260 E9 F800 ; continue purging and wipe the nozzle\nG0 X{260 - 3} Z{0.05} F{8000} ; wipe, move close to the bed\nG0 X{260 - 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed\nG1 E{- 1.5 * retract_length[3]} F2400 ; retract\n{e_retracted[3] = 1.5 * retract_length[3]} ; update slicer internal retract variable\nG92 E0 ; reset extruder position\n\nM104 S{(idle_temperature[3] == 0 ? (first_layer_temperature[3] + standby_temperature_delta) : (idle_temperature[3]))} T3\n{endif}\n{if (is_extruder_used[4]) and initial_tool != 4}\n;\n; purge fifth tool\n;\nG1 F{travel_speed * 60}\nM109 T4 S{first_layer_temperature[4]}\nT4; pick the tool\nG92 E0 ; reset extruder position\n\nG0 X{(4 == 0 ? 0 : (4 == 1 ? 120 : (4 == 2 ? 180 : 300)))} Y{(4 < 4 ? 0 : 3)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge\nG0 E{if filament_multitool_ramming[4]}10{else}30{endif} X290 Z0.2 F{if filament_multitool_ramming[4]}500{else}170{endif} ; purge while moving towards the sheet\nG0 X260 E9 F800 ; continue purging and wipe the nozzle\nG0 X{260 - 3} Z{0.05} F{8000} ; wipe, move close to the bed\nG0 X{260 - 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed\nG1 E{- 1.5 * retract_length[4]} F2400 ; retract\n{e_retracted[4] = 1.5 * retract_length[4]} ; update slicer internal retract variable\nG92 E0 ; reset extruder position\n\nM104 S{(idle_temperature[4] == 0 ? (first_layer_temperature[4] + standby_temperature_delta) : (idle_temperature[4]))} T4\n{endif}\n;\n; purge initial tool\n;\nG1 F{travel_speed * 60}\nM109 T{initial_tool} S{first_layer_temperature[initial_tool]}\nT{initial_tool}; pick the tool\nG92 E0 ; reset extruder position\n\nG0 X{(initial_tool == 0 ? 0 : (initial_tool == 1 ? 120 : (initial_tool == 2 ? 180 : 300)))} Y{(initial_tool < 4 ? 0 : 3)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge\nG0 E{if filament_multitool_ramming[initial_tool]}10{else}30{endif} X{(initial_tool == 0 ? 0 : (initial_tool == 1 ? 120 : (initial_tool == 2 ? 180 : 300))) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 10)} Z0.2 F{if filament_multitool_ramming[initial_tool]}500{else}170{endif} ; purge while moving towards the sheet\nG0 X{(initial_tool == 0 ? 0 : (initial_tool == 1 ? 120 : (initial_tool == 2 ? 180 : 300))) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 40)} E9 F800 ; continue purging and wipe the nozzle\nG0 X{(initial_tool == 0 ? 0 : (initial_tool == 1 ? 120 : (initial_tool == 2 ? 180 : 300))) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 40) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 3)} Z{0.05} F{8000} ; wipe, move close to the bed\nG0 X{(initial_tool == 0 ? 0 : (initial_tool == 1 ? 120 : (initial_tool == 2 ? 180 : 300))) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 40) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 3 * 2)} Z0.2 F{8000} ; wipe, move quickly away from the bed\nG1 E{- 1.5 * retract_length[initial_tool]} F2400 ; retract\n{e_retracted[initial_tool] = 1.5 * retract_length[initial_tool]}\nG92 E0 ; reset extruder position\n", + "scan_first_layer": "0", "nozzle_type": "undefine", "auxiliary_fan": "0" From 0d886a133fb18beb1ce6f27a6bdb885c900febde Mon Sep 17 00:00:00 2001 From: Ioannis Giannakas <59056762+igiannakas@users.noreply.github.com> Date: Sun, 18 Aug 2024 04:16:14 +0100 Subject: [PATCH 3/7] Update Wiki (#6474) * Update Wiki * Wiki updates --- doc/Home.md | 37 ++++++++- .../quality/quality_settings_layer_height.md | 17 ++++ .../quality/quality_settings_line_width.md | 43 ++++++++++ .../quality/quality_settings_seam.md | 81 +++++++++++++++++++ .../speed/extrusion-rate-smoothing.md} | 0 5 files changed, 174 insertions(+), 4 deletions(-) create mode 100644 doc/print_settings/quality/quality_settings_layer_height.md create mode 100644 doc/print_settings/quality/quality_settings_line_width.md create mode 100644 doc/print_settings/quality/quality_settings_seam.md rename doc/{Extrusion-rate-smoothing.md => print_settings/speed/extrusion-rate-smoothing.md} (100%) diff --git a/doc/Home.md b/doc/Home.md index cdbe12562fe..fce4bc34805 100644 --- a/doc/Home.md +++ b/doc/Home.md @@ -1,8 +1,37 @@ -Welcome to the OrcaSlicer WIKI! +# Welcome to the OrcaSlicer WIKI! -We have divided it roughly into the following pages: +Orca slicer is a powerful open source slicer for FFF (FDM) 3D Printers. This wiki page aims to provide an detailed explanation of the slicer settings, how to get the most out of them as well as how to calibrate and setup your printer. -- [Calibration](./Calibration) -- [Print settings](./Print-settings) +The Wiki is work in progress so bear with us while we get it up and running! + +## Print Settings, Tips and Tricks (Work In Progress) +The below sections provide a detailed settings explanation as well as tips and tricks in setting these for optimal print results. + +### Quality Settings +- [Layer Height Settings](print_settings/quality/quality_settings_layer_height) +- [Line Width Settings](print_settings/quality/quality_settings_line_width) +- [Seam Settings](print_settings/quality/quality_settings_seam) +- [Precise wall](Precise-wall) + +### Speed Settings +- [Extrusion rate smoothing](print_settings/speed/extrusion-rate-smoothing) + +### Multi material +- [Single Extruder Multimaterial](semm) + +### Printer Settings: +- [Air filtration/Exhaust fan handling](air-filtration) +- [Auxiliary fan handling](Auxiliary-fan) +- [Chamber temperature control](chamber-temperature) +- [Adaptive Bed Mesh](adaptive-bed-mesh) +- [Using different bed types in Orca](bed-types) +- [Pellet Printers (pellet flow coefficient)](pellet-flow-coefficient) + +## Printer Calibration +The guide below takes you through the key calibration tests in Orca - flow rate, pressure advance, print temperature, retraction, tolerances and maximum volumetric speed +- [Calibration Guide](./Calibration) + +## Developer Section - [How to build Orca Slicer](./How-to-build) +- [Localization and translation guide](Localization_guide) - [Developer Reference](./developer-reference/Home) diff --git a/doc/print_settings/quality/quality_settings_layer_height.md b/doc/print_settings/quality/quality_settings_layer_height.md new file mode 100644 index 00000000000..350738f379a --- /dev/null +++ b/doc/print_settings/quality/quality_settings_layer_height.md @@ -0,0 +1,17 @@ +# Layer Height + +This setting controls how tall each printed layer will be. Typically, a smaller layer height produces a better-looking part with less jagged edges, especially around curved sections (like the top of a sphere). However, lower layer heights mean more layers to print, proportionally increasing print time. + +### Tips: +1. **The optimal layer height depends on the size of your nozzle**. The set layer height must not be taller than 80% of the diameter of the nozzle, else there is little "squish" between the printed layer and the layer below, leading to weaker parts. + +2. While technically there is no limit to how small a layer height one can use, **typically most printers struggle to print reliably with a layer height that is smaller than 20% of the nozzle diameter**. This is because with smaller layer heights, less material is extruded per mm and, at some point, the tolerances of the extruder system result in variations in the flow to such an extent that visible artifacts occur, especially if printing at high speeds. + +For example, it is not uncommon to see "fish scale" type patterns on external walls when printing with a 0.4 mm nozzle at 0.08 mm layer height at speeds of 200mm/sec+. If you observe that pattern, simply increase your layer height to 30% of your nozzle height and/or slow down the print speed considerably. + +# First Layer Height + +This setting controls how tall the first layer of the print will be. Typically, this is set to 50% of the nozzle width for optimal bed adhesion. + +### Tip: +A thicker first layer is more forgiving to slight variations to the evenness of the build surface, resulting in a more uniform, visually, first layer. Set it to 0.25mm for a 0.4mm nozzle, for example, if your build surface is uneven or your printer has a slightly inconsistent z offset between print runs. However, as a rule of thumb, try not to exceed 65% of the nozzle width so as to not compromise bed adhesion too much. diff --git a/doc/print_settings/quality/quality_settings_line_width.md b/doc/print_settings/quality/quality_settings_line_width.md new file mode 100644 index 00000000000..ae4ae052333 --- /dev/null +++ b/doc/print_settings/quality/quality_settings_line_width.md @@ -0,0 +1,43 @@ +# Line Width + +These settings control how wide the extruded lines are. + +- **Default**: The default line width in mm or as a percentage of the nozzle size. + +- **First Layer**: The line width of the first layer. Typically, this is wider than the rest of the print, to promote better bed adhesion. See tips below for why. + +- **Outer Wall**: The line width in mm or as a percentage of the nozzle size used when printing the model’s external wall perimeters. + +- **Inner Wall**: The line width in mm or as a percentage of the nozzle size used when printing the model’s internal wall perimeters. + +- **Top Surface**: The line width in mm or as a percentage of the nozzle size used when printing the model’s top surface. + +- **Sparse Infill**: The line width in mm or as a percentage of the nozzle size used when printing the model’s sparse infill. + +- **Internal Solid Infill**: The line width in mm or as a percentage of the nozzle size used when printing the model’s internal solid infill. + +- **Support**: The line width in mm or as a percentage of the nozzle size used when printing the model’s support structures. + + +## Tips: +1. **Typically, the line width will be anything from 100% up to 150% of the nozzle width**. Due to the way the slicer’s flow math works, a 100% line width will attempt to extrude slightly “smaller” than the nozzle size and when squished onto the layer below will match the nozzle orifice. You can read more on the flow math here: [Flow Math](https://manual.slic3r.org/advanced/flow-math). + +2. **For most cases, the minimum acceptable recommended line width is 105% of the nozzle diameter**, typically reserved for the outer walls, where greater precision is required. A wider line is less precise than a thinner line. + +3. **Wider lines provide better adhesion to the layer below**, as the material is squished more with the previous layer. For parts that need to be strong, setting this value to 120-150% of the nozzle diameter is recommended and has been experimentally proven to significantly increase part strength. + +4. **Wider lines improve step over and overhang appearance**, i.e., the overlap of the currently printed line to the surface below. So, if you are printing models with overhangs, setting a larger external perimeter line width will improve the overhang’s appearance to an extent. + +5. **For top surfaces, typically a value of ~100%-105% of the nozzle width is recommended** as it provides the most precision, compared to a wider line. + +6. **For external walls, you need to strike a balance between precision and step over and, consequently, overhang appearance.** Typically these values are set to ~105% of nozzle diameter for models with limited overhangs up to ~120% for models with more significant overhangs. + +7. **For internal walls, you typically want to maximize part strength**, so a good starting point is approximately 120% of the nozzle width, which gives a good balance between print speed, accuracy, and material use. However, depending on the model, larger or smaller line widths may make sense in order to reduce gap fill and/or line width variations if you are using Arachne. + +8. **Don’t feel constrained to have wider internal wall lines compared to external ones**. While this is the default for most profiles, for models where significant overhangs are present, printing wider external walls compared to the internal ones may yield better overhang quality without increasing material use! + +9. **For sparse infill, the line width also affects how dense, visually, the sparse infill will be.** The sparse infill aims to extrude a set amount of material based on the percentage infill selected. When increasing the line width, the space between the sparse infill extrusions is larger in order to roughly maintain the same material usage. Typically for sparse infill, a value of 120% of nozzle diameter is a good starting point. + +10. **For supports, using 100% or less line width will make the supports weaker** by reducing their layer adhesion, making them easier to remove. + +11. **If your printer is limited mechanically, try to maintain the material flow as consistent as possible between critical features of your model**, to ease the load on the extruder having to adapt its flow between them. This is especially useful for printers that do not use pressure advance/linear advance and if your extruder is not as capable mechanically. You can do that by adjusting the line widths and speeds to reduce the variation between critical features (e.g., external and internal wall flow). For example, print them at the same speed and the same line width, or print the external perimeter slightly wider and slightly slower than the internal perimeter. Material flow can be visualized in the sliced model – flow drop down. diff --git a/doc/print_settings/quality/quality_settings_seam.md b/doc/print_settings/quality/quality_settings_seam.md new file mode 100644 index 00000000000..7777be8ff66 --- /dev/null +++ b/doc/print_settings/quality/quality_settings_seam.md @@ -0,0 +1,81 @@ +# Seam Section + +Unless printed in spiral vase mode, every layer needs to begin somewhere and end somewhere. That start and end of the extrusion is what results in what visually looks like a seam on the perimeters. This section contains options to control the visual appearance of a seam. + +- **Seam Position**: Controls the placement of the seam. + 1. **Aligned**: Will attempt to align the seam to a hidden internal facet of the model. + 2. **Nearest**: Will place the seam at the nearest starting point compared to where the nozzle stopped printing in the previous layer. + 3. **Back**: Will align the seam in a (mostly) straight line at the rear of the model. + 4. **Random**: Will randomize the placement of the seam between layers. + + Typically, aligned or back work the best, especially in combination with seam painting. However, as seams create weak points and slight surface "bulges" or "divots," random seam placement may be optimal for parts that need higher strength as that weak point is spread to different locations between layers (e.g., a pin meant to fit through a hole). + +- **Staggered Inner Seams**: As the seam location forms a weak point in the print (it's a discontinuity in the extrusion process after all!), staggering the seam on the internal perimeters can help reduce stress points. This setting moves the start of the internal wall's seam around across layers as well as away from the external perimeter seam. This way, the internal and external seams don't all align at the same point and between them across layers, distributing those weak points further away from the seam location, hence making the part stronger. It can also help improve the water tightness of your model. + +- **Seam Gap**: Controls the gap in mm or as a percentage of the nozzle size between the two ends of a loop starting and ending with a seam. A larger gap will reduce the bulging seen at the seam. A smaller gap reduces the visual appearance of a seam. For a well-tuned printer with pressure advance, a value of 0-15% is typically optimal. + +- **Scarf Seam**: Read more here: [Better Seams - An Orca Slicer Guide](https://www.printables.com/model/783313-better-seams-an-orca-slicer-guide-to-using-scarf-s). + +- **Role-Based Wipe Speed**: Controls the speed of a wipe motion, i.e., how fast the nozzle will move over a printed area to "clean" it before traveling to another area of the model. It is recommended to turn this option on, to ensure the nozzle performs the wipe motion with the same speed that the feature was printed with. + +- **Wipe Speed**: If role-based wipe speed is disabled, set this field to the absolute wipe speed or as a percentage over the travel speed. + +- **Wipe on Loops**: When finishing printing a "loop" (i.e., an extrusion that starts and ends at the same point), move the nozzle slightly inwards towards the part. That move aims to reduce seam unevenness by tucking in the end of the seam to the part. It also slightly cleans the nozzle before traveling to the next area of the model, reducing stringing. + +- **Wipe Before External Perimeters**: To minimize the visibility of potential over-extrusion at the start of an external perimeter, the de-retraction move is performed slightly on the inside of the model and, hence, the start of the external perimeter. That way, any potential over-extrusion is hidden from the outside surface. + + This is useful when printing with Outer/Inner or Inner/Outer/Inner wall print order, as in these modes, it is more likely an external perimeter is printed immediately after a de-retraction move, which would cause slight extrusion variance at the start of a seam. + +## Tips: +With seams being inevitable when 3D printing using FFF, there are two distinct approaches on how to deal with them: + +1. **Try and hide the seam as much as possible**: This can be done by enabling scarf seam, which works very well, especially with simple models with limited overhang regions. +2. **Try and make the seam as "clean" and "distinct" as possible**: This can be done by tuning the seam gap and enabling role-based wipe speed, wipe on loops, and wipe before the external loop. + +## Troubleshooting Seam Performance: +The section below will focus on troubleshooting traditional seams. For scarf seam troubleshooting, refer to the guide linked above. + +There are several factors that influence how clean the seam of your model is, with the biggest one being extrusion control after a travel move. As a seam defines the start and end of an extrusion, it is critical that: + +1. **The same amount of material is extruded at the same point across layers** to ensure a consistent visual appearance at the start of a seam. +2. **The printer consistently stops extruding at the same point** across layers. + +However, due to mechanical and material tolerances, as well as the very nature of 3D printing with FFF, that is not always possible. Hopefully with some tuning you'll be able to achieve prints like this! + +![IMG_4059](https://github.com/user-attachments/assets/e60c3d24-9b21-4484-bcbe-614237a2fe09) + + +### Troubleshooting the Start of a Seam: +Imagine the scenario where the toolhead finishes printing a layer line on one side of the bed, retracts, travels the whole distance of the bed to de-retract, and starts printing another part. Compare this to the scenario where the toolhead finishes printing an internal perimeter and only travels a few mm to start printing an external perimeter, without even retracting or de-retracting. + +The first scenario has much more opportunity for the filament to ooze outside the nozzle, resulting in a small blob forming at the start of the seam or, conversely, if too much material has leaked, a gap/under extrusion at the start of the seam. + +The key to a consistent start of a seam is to reduce the opportunity for ooze as much as possible. The good news is that this is mostly tunable by: + +1. **Ensure your pressure advance is calibrated correctly**. A too low pressure advance will result in the nozzle experiencing excess pressure at the end of the previous extrusion, which increases the chance of oozing when traveling. +2. **Make sure your travel speed is as fast as possible within your printer's limits**, and the travel acceleration is as high as practically possible, again within the printer's limits. This reduces the travel time between features, reducing oozing. +3. **Enable wipe before external perimeters** – this setting performs the de-retraction move inside the model, hence reducing the visual appearance of the "blob" if it does appear at the seam. +4. **Increase your travel distance threshold to be such that small travel moves do not trigger a retraction and de-retraction operation**, reducing extrusion variances caused by the extruder tolerances. 2-4mm is a good starting point as, if your PA is tuned correctly and your travel speed and acceleration are high, it is unlikely that the nozzle will ooze in the milliseconds it will take to travel to the new location. +5. **Enable retract on layer change**, to ensure the start of your layer is always performed under the same conditions – a de-pressurized nozzle with retracted filament. + +In addition, some toolhead systems are inherently better at seams compared to others. For example, high-flow nozzles with larger melt zones usually have poorer extrusion control as more of the material is in a molten state inside the nozzle. They tend to string more, ooze easier, and hence have poorer seam performance. Conversely, smaller melt zone nozzles have more of the filament solid in their heat zone, leading to more accurate extrusion control and better seam performance. + +So this is a trade-off between print speed and print quality. From experimental data, volcano-type nozzles tend to perform the worst at seams, followed by CHT-type nozzles, and finally regular flow nozzles. + +In addition, larger nozzle diameters allow for more opportunity for material to leak compared to smaller diameter nozzles. A 0.2/0.25 mm nozzle will have significantly better seam performance than a 0.4, and that will have much better performance than a 0.6mm nozzle and so forth. + +### Troubleshooting the End of a Seam: +The end of a seam is much easier to get right, as the extrusion system is already at a pressure equilibrium while printing. It just needs to stop extruding at the right time and consistently. + +**If you are getting bulges at the seam**, the extruder is not stopping at the right time. The first thing to tune would be **pressure advance** – too low of a PA will result in the nozzle still being pressurized when finishing the print move, hence leaving a wider line at the end as it stops printing. + +And the opposite is true too – **too high PA will result in under extrusion at the end of a print move**, shown as a larger-than-needed gap at the seam. Thankfully, tuning PA is straightforward, so run the calibration tests and pick the optimal value for your material, print speed, and acceleration. + +Furthermore, the printer mechanics have tolerances – the print head may be requested to stop at point XY but practically it cannot stop precisely at that point due to the limits of micro-stepping, belt tension, and toolhead rigidity. Here is where tuning the seam gap comes into effect. **A slightly larger seam gap will allow for more variance to be tolerated at the end of a print move before showing as a seam bulge**. Experiment with this value after you are certain your PA is tuned correctly and your travel speeds and retractions are set appropriately. + +Finally, the techniques of **wiping can help improve the visual continuity and consistency of a seam** (please note, these settings do not make the seam less visible, but rather make them more consistent!). Wiping on loops with a consistent speed helps tuck in the end of the seam, hiding the effects of retraction from view. + +### The Role of Wall Ordering in Seam Appearance: +The order of wall printing plays a significant role in the appearance of a seam. **Starting to print the external perimeter first after a long travel move will always result in more visible artifacts compared to printing the internal perimeters first and traveling just a few mm to print the external perimeter.** + +For optimal seam performance, printing with **inner-outer-inner wall order is typically best, followed by inner-outer**. It reduces the amount of traveling performed prior to printing the external perimeter and ensures the nozzle is having as consistent pressure as possible, compared to printing outer-inner. diff --git a/doc/Extrusion-rate-smoothing.md b/doc/print_settings/speed/extrusion-rate-smoothing.md similarity index 100% rename from doc/Extrusion-rate-smoothing.md rename to doc/print_settings/speed/extrusion-rate-smoothing.md From f136f04cfd314c55b2e050b0d9d5af72e34ba15e Mon Sep 17 00:00:00 2001 From: Noisyfox Date: Sun, 18 Aug 2024 11:33:00 +0800 Subject: [PATCH 4/7] Fix Linux build & some warnings (#6438) * Fix linux deps debug build * Use the same DL_CACHE for release build when building debug version of deps on Linux. This prevents downloading the same source packages twice, and avoid downloading again after deleting the build dir. * Fix debug build * Fix warnings "loop variable creates a copy from type" and "loop variable binds to a temporary constructed from type" --- BuildLinux.sh | 7 +++++-- src/libslic3r/Clipper2Utils.cpp | 2 +- src/libslic3r/Emboss.cpp | 4 ++-- src/libslic3r/Format/bbs_3mf.cpp | 2 +- src/libslic3r/Model.cpp | 2 +- src/libslic3r/Preset.cpp | 2 +- src/libslic3r/Print.cpp | 2 +- src/libslic3r/PrintConfig.cpp | 4 ++-- src/libslic3r/ShortestPath.hpp | 2 +- src/libslic3r/TreeSupport.cpp | 12 ++++++------ src/qhull/CMakeLists.txt | 6 +++++- src/slic3r/GUI/CreatePresetsDialog.cpp | 20 ++++++++++---------- src/slic3r/GUI/Plater.cpp | 6 +++--- src/slic3r/GUI/Search.cpp | 2 +- src/slic3r/GUI/StatusPanel.cpp | 2 +- src/slic3r/GUI/WebGuideDialog.cpp | 2 +- src/slic3r/Utils/CalibUtils.cpp | 6 +++--- 17 files changed, 45 insertions(+), 38 deletions(-) diff --git a/BuildLinux.sh b/BuildLinux.sh index f60e5c5f346..abb81ca737e 100755 --- a/BuildLinux.sh +++ b/BuildLinux.sh @@ -127,8 +127,11 @@ then if [[ -n "${BUILD_DEBUG}" ]] then # have to build deps with debug & release or the cmake won't find everything it needs - mkdir deps/build/release - cmake -S deps -B deps/build/release -G Ninja -DDESTDIR="../destdir" ${BUILD_ARGS} + if [ ! -d "deps/build/release" ] + then + mkdir deps/build/release + fi + cmake -S deps -B deps/build/release -G Ninja -DDESTDIR="${PWD}/deps/build/destdir" -DDEP_DOWNLOAD_DIR="${PWD}/deps/DL_CACHE" ${BUILD_ARGS} cmake --build deps/build/release BUILD_ARGS="${BUILD_ARGS} -DCMAKE_BUILD_TYPE=Debug" fi diff --git a/src/libslic3r/Clipper2Utils.cpp b/src/libslic3r/Clipper2Utils.cpp index 92acd5e385d..5793900a5b1 100644 --- a/src/libslic3r/Clipper2Utils.cpp +++ b/src/libslic3r/Clipper2Utils.cpp @@ -23,7 +23,7 @@ Clipper2Lib::Paths64 Slic3rPoints_to_Paths64(const std::vector& in) { Clipper2Lib::Paths64 out; out.reserve(in.size()); - for (const T item: in) { + for (const T& item: in) { Clipper2Lib::Path64 path; path.reserve(item.size()); for (const Slic3r::Point& point : item.points) diff --git a/src/libslic3r/Emboss.cpp b/src/libslic3r/Emboss.cpp index 13d494d949f..82015c4827b 100644 --- a/src/libslic3r/Emboss.cpp +++ b/src/libslic3r/Emboss.cpp @@ -334,8 +334,8 @@ bool Emboss::divide_segments_for_close_point(ExPolygons &expolygons, double dist const Points &poly_pts = poly.points; const Point &line_a = poly_pts[id.point_index]; const Point &line_b = (!ids.is_last_point(id)) ? poly_pts[id.point_index + 1] : poly_pts.front(); - assert(line_a == lines[index].a.cast()); - assert(line_b == lines[index].b.cast()); + assert(line_a == lines[index].a.cast()); + assert(line_b == lines[index].b.cast()); if (p == line_a || p == line_b) continue; divs.emplace_back(p, index); diff --git a/src/libslic3r/Format/bbs_3mf.cpp b/src/libslic3r/Format/bbs_3mf.cpp index 7df4fbca493..90f4536b953 100644 --- a/src/libslic3r/Format/bbs_3mf.cpp +++ b/src/libslic3r/Format/bbs_3mf.cpp @@ -4622,7 +4622,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result) its.vertices.assign(sub_object->geometry.vertices.begin(), sub_object->geometry.vertices.end()); // BBS - for (const std::string prop_str : sub_object->geometry.face_properties) { + for (const std::string& prop_str : sub_object->geometry.face_properties) { FaceProperty face_prop; face_prop.from_string(prop_str); its.properties.push_back(face_prop); diff --git a/src/libslic3r/Model.cpp b/src/libslic3r/Model.cpp index 534777b6c1d..63be317b6d8 100644 --- a/src/libslic3r/Model.cpp +++ b/src/libslic3r/Model.cpp @@ -3538,7 +3538,7 @@ void check_model_ids_validity(const Model &model) for (const ModelInstance *model_instance : model_object->instances) check(model_instance->id()); } - for (const auto mm : model.materials) { + for (const auto& mm : model.materials) { check(mm.second->id()); check(mm.second->config.id()); } diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 98a3a61155c..cbab85b88a7 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -340,7 +340,7 @@ void Preset::normalize(DynamicPrintConfig &config) static_cast(opt)->resize(n, defaults.option(key)); } // The following keys are mandatory for the UI, but they are not part of FullPrintConfig, therefore they are handled separately. - for (const std::string &key : { "filament_settings_id" }) { + for (const std::string key : { "filament_settings_id" }) { auto *opt = config.option(key, false); assert(opt == nullptr || opt->type() == coStrings); if (opt != nullptr && opt->type() == coStrings) diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index dfec7089dc2..03f76fe3a39 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -2925,7 +2925,7 @@ DynamicConfig PrintStatistics::config() const DynamicConfig PrintStatistics::placeholders() { DynamicConfig config; - for (const std::string &key : { + for (const std::string key : { "print_time", "normal_print_time", "silent_print_time", "used_filament", "extruded_volume", "total_cost", "total_weight", "initial_tool", "total_toolchanges", "total_wipe_tower_cost", "total_wipe_tower_filament"}) diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 0d2ba956922..4814c8f518b 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -5329,11 +5329,11 @@ void PrintConfigDef::init_extruder_option_keys() "retraction_length", "retraction_minimum_travel", "retraction_speed", + "travel_slope", "wipe", "wipe_distance", "z_hop", - "z_hop_types", - "travel_slope" + "z_hop_types" }; assert(std::is_sorted(m_extruder_retract_keys.begin(), m_extruder_retract_keys.end())); } diff --git a/src/libslic3r/ShortestPath.hpp b/src/libslic3r/ShortestPath.hpp index 5a34ef23c12..158608f3641 100644 --- a/src/libslic3r/ShortestPath.hpp +++ b/src/libslic3r/ShortestPath.hpp @@ -29,7 +29,7 @@ template inline void reorder_by_shortest_traverse(std::vector &po { Points start_point; start_point.reserve(polylines_out.size()); - for (const T contour : polylines_out) start_point.push_back(contour.points.front()); + for (const T& contour : polylines_out) start_point.push_back(contour.points.front()); std::vector order = chain_points(start_point); diff --git a/src/libslic3r/TreeSupport.cpp b/src/libslic3r/TreeSupport.cpp index c588409ac1d..dc4f9998ff0 100644 --- a/src/libslic3r/TreeSupport.cpp +++ b/src/libslic3r/TreeSupport.cpp @@ -482,7 +482,7 @@ static bool move_inside_expolys(const ExPolygons& polygons, Point& from, double // because we compare with vsize2_with_unscale here (no division by zero), we also need to compare by vsize2_with_unscale inside the loop // to avoid integer rounding edge cases bool projected_p_beyond_prev_segment = dot_with_unscale(p1 - p0, from - p0) >= vsize2_with_unscale(p1 - p0); - for(const Point p2 : poly.contour.points) + for(const Point& p2 : poly.contour.points) { // X = A + Normal(B-A) * (((B-A) dot_with_unscale (P-A)) / VSize(B-A)); // = A + (B-A) * ((B-A) dot_with_unscale (P-A)) / VSize2(B-A); @@ -1437,11 +1437,11 @@ void TreeSupport::generate_toolpaths() if (m_object->support_layer_count() > m_raft_layers) { const SupportLayer *ts_layer = m_object->get_support_layer(m_raft_layers); - for (const ExPolygon expoly : ts_layer->floor_areas) + for (const ExPolygon& expoly : ts_layer->floor_areas) raft_areas.push_back(expoly); - for (const ExPolygon expoly : ts_layer->roof_areas) + for (const ExPolygon& expoly : ts_layer->roof_areas) raft_areas.push_back(expoly); - for (const ExPolygon expoly : ts_layer->base_areas) + for (const ExPolygon& expoly : ts_layer->base_areas) raft_areas.push_back(expoly); } @@ -3628,7 +3628,7 @@ const ExPolygons& TreeSupportData::get_avoidance(coordf_t radius, size_t layer_n Polygons TreeSupportData::get_contours(size_t layer_nr) const { Polygons contours; - for (const ExPolygon expoly : m_layer_outlines[layer_nr]) { + for (const ExPolygon& expoly : m_layer_outlines[layer_nr]) { contours.push_back(expoly.contour); } @@ -3638,7 +3638,7 @@ Polygons TreeSupportData::get_contours(size_t layer_nr) const Polygons TreeSupportData::get_contours_with_holes(size_t layer_nr) const { Polygons contours; - for (const ExPolygon expoly : m_layer_outlines[layer_nr]) { + for (const ExPolygon& expoly : m_layer_outlines[layer_nr]) { for(int i=0;i &vendor : vendors) { + for (const auto& vendor : vendors) { if (vendor.second.models.empty() || vendor.second.id.empty()) continue; choices.Add(vendor.first); } @@ -658,11 +658,11 @@ void CreateFilamentPresetDialog::on_dpi_changed(const wxRect &suggested_rect) { bool CreateFilamentPresetDialog::is_check_box_selected() { - for (const std::pair<::CheckBox *, std::pair> &checkbox_preset : m_filament_preset) { + for (const auto& checkbox_preset : m_filament_preset) { if (checkbox_preset.first->GetValue()) { return true; } } - for (const std::pair<::CheckBox *, std::pair> &checkbox_preset : m_machint_filament_preset) { + for (const auto& checkbox_preset : m_machint_filament_preset) { if (checkbox_preset.first->GetValue()) { return true; } } @@ -693,7 +693,7 @@ wxBoxSizer *CreateFilamentPresetDialog::create_vendor_item() horizontal_sizer->Add(optionSizer, 0, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, FromDIP(5)); wxArrayString choices; - for (const wxString &vendor : filament_vendors) { + for (const wxString vendor : filament_vendors) { choices.push_back(vendor); } choices.Sort(); @@ -775,7 +775,7 @@ wxBoxSizer *CreateFilamentPresetDialog::create_type_item() horizontal_sizer->Add(optionSizer, 0, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, FromDIP(5)); wxArrayString filament_type; - for (const wxString &filament : m_system_filament_types_set) { + for (const wxString filament : m_system_filament_types_set) { filament_type.Add(filament); } filament_type.Sort(); @@ -1050,7 +1050,7 @@ wxBoxSizer *CreateFilamentPresetDialog::create_button_item() if (curr_create_type == m_create_type.base_filament) { BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ":clone filament create type filament "; - for (const std::pair<::CheckBox *, std::pair> &checkbox_preset : m_filament_preset) { + for (const auto& checkbox_preset : m_filament_preset) { if (checkbox_preset.first->GetValue()) { std::string compatible_printer_name = checkbox_preset.second.first; std::vector failures; @@ -1077,7 +1077,7 @@ wxBoxSizer *CreateFilamentPresetDialog::create_button_item() } } else if (curr_create_type == m_create_type.base_filament_preset) { BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ":clone filament presets create type filament preset"; - for (const std::pair<::CheckBox *, std::pair> &checkbox_preset : m_machint_filament_preset) { + for (const auto& checkbox_preset : m_machint_filament_preset) { if (checkbox_preset.first->GetValue()) { std::string compatible_printer_name = checkbox_preset.second.first; std::vector failures; @@ -1155,7 +1155,7 @@ wxArrayString CreateFilamentPresetDialog::get_filament_preset_choices() } int suffix = 0; - for (const pair> &preset : m_filament_choice_map) { + for (const auto& preset : m_filament_choice_map) { if (preset.second.empty()) continue; std::set preset_name_set; for (Preset* filament_preset : preset.second) { @@ -1752,7 +1752,7 @@ wxBoxSizer *CreatePrinterPresetDialog::create_nozzle_diameter_item(wxWindow *par wxBoxSizer *comboBoxSizer = new wxBoxSizer(wxVERTICAL); m_nozzle_diameter = new ComboBox(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, OPTION_SIZE, 0, nullptr, wxCB_READONLY); wxArrayString nozzle_diameters; - for (const std::string nozzle : nozzle_diameter_vec) { + for (const std::string& nozzle : nozzle_diameter_vec) { nozzle_diameters.Add(nozzle + " mm"); } m_nozzle_diameter->Set(nozzle_diameters); @@ -3899,7 +3899,7 @@ ExportConfigsDialog::ExportCase ExportConfigsDialog::archive_filament_bundle_to_ BOOST_LOG_TRIVIAL(info) << "Filament preset json add successful: " << filament_preset->name; } - for (const std::pair& vendor_name_to_json : vendor_structure) { + for (const auto& vendor_name_to_json : vendor_structure) { json j; std::string printer_vendor = vendor_name_to_json.first; j["vendor"] = printer_vendor; diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 80f61932817..7950f9a6694 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -9466,21 +9466,21 @@ void Plater::_calib_pa_pattern(const Calib_Params& params) print_config.set_key_value( "travel_jerk", new ConfigOptionFloat(jerk)); } - for (const auto opt : SuggestedConfigCalibPAPattern().float_pairs) { + for (const auto& opt : SuggestedConfigCalibPAPattern().float_pairs) { print_config.set_key_value( opt.first, new ConfigOptionFloat(opt.second) ); } - for (const auto opt : SuggestedConfigCalibPAPattern().nozzle_ratio_pairs) { + for (const auto& opt : SuggestedConfigCalibPAPattern().nozzle_ratio_pairs) { print_config.set_key_value( opt.first, new ConfigOptionFloatOrPercent(nozzle_diameter * opt.second / 100, false) ); } - for (const auto opt : SuggestedConfigCalibPAPattern().int_pairs) { + for (const auto& opt : SuggestedConfigCalibPAPattern().int_pairs) { print_config.set_key_value( opt.first, new ConfigOptionInt(opt.second) diff --git a/src/slic3r/GUI/Search.cpp b/src/slic3r/GUI/Search.cpp index 186124a2c13..c8a661769fa 100644 --- a/src/slic3r/GUI/Search.cpp +++ b/src/slic3r/GUI/Search.cpp @@ -866,7 +866,7 @@ void SearchDialog::msw_rescale() SearchListModel::SearchListModel(wxWindow *parent) : wxDataViewVirtualListModel(0) { int icon_id = 0; - for (const std::string &icon : {"cog", "printer", "printer", "spool", "blank_16"}) m_icon[icon_id++] = ScalableBitmap(parent, icon); + for (const std::string icon : {"cog", "printer", "printer", "spool", "blank_16"}) m_icon[icon_id++] = ScalableBitmap(parent, icon); } void SearchListModel::Clear() diff --git a/src/slic3r/GUI/StatusPanel.cpp b/src/slic3r/GUI/StatusPanel.cpp index 2a7ff21b767..dfef462a7eb 100644 --- a/src/slic3r/GUI/StatusPanel.cpp +++ b/src/slic3r/GUI/StatusPanel.cpp @@ -4846,7 +4846,7 @@ wxBoxSizer *ScoreDialog::get_photo_btn_sizer() { it = m_selected_image_list.erase(it); } m_image_url_paths.clear(); - for (const std::pair &bitmap : m_image) { + for (const auto& bitmap : m_image) { if (bitmap.second.is_uploaded) { if (!bitmap.second.img_url_paths.empty()) { m_image_url_paths.push_back(bitmap.second.img_url_paths); diff --git a/src/slic3r/GUI/WebGuideDialog.cpp b/src/slic3r/GUI/WebGuideDialog.cpp index 201e2a8db9a..342a8958d83 100644 --- a/src/slic3r/GUI/WebGuideDialog.cpp +++ b/src/slic3r/GUI/WebGuideDialog.cpp @@ -858,7 +858,7 @@ bool GuideFrame::apply_config(AppConfig *app_config, PresetBundle *preset_bundle const std::map>& model_maps = config->second; //for (const auto& vendor_profile : preset_bundle->vendors) { - for (const auto model_it: model_maps) { + for (const auto& model_it: model_maps) { if (model_it.second.size() > 0) { variant = *model_it.second.begin(); const auto config_old = old_enabled_vendors.find(bundle_name); diff --git a/src/slic3r/Utils/CalibUtils.cpp b/src/slic3r/Utils/CalibUtils.cpp index b5f9aaf0edd..e68969acbf7 100644 --- a/src/slic3r/Utils/CalibUtils.cpp +++ b/src/slic3r/Utils/CalibUtils.cpp @@ -618,7 +618,7 @@ void CalibUtils::calib_pa_pattern(const CalibInfo &calib_info, Model& model) float nozzle_diameter = printer_config.option("nozzle_diameter")->get_at(0); - for (const auto opt : SuggestedConfigCalibPAPattern().float_pairs) { + for (const auto& opt : SuggestedConfigCalibPAPattern().float_pairs) { print_config.set_key_value(opt.first, new ConfigOptionFloat(opt.second)); } @@ -627,11 +627,11 @@ void CalibUtils::calib_pa_pattern(const CalibInfo &calib_info, Model& model) full_config, print_config.get_abs_value("line_width"), print_config.get_abs_value("layer_height"), 0))); - for (const auto opt : SuggestedConfigCalibPAPattern().nozzle_ratio_pairs) { + for (const auto& opt : SuggestedConfigCalibPAPattern().nozzle_ratio_pairs) { print_config.set_key_value(opt.first, new ConfigOptionFloat(nozzle_diameter * opt.second / 100)); } - for (const auto opt : SuggestedConfigCalibPAPattern().int_pairs) { + for (const auto& opt : SuggestedConfigCalibPAPattern().int_pairs) { print_config.set_key_value(opt.first, new ConfigOptionInt(opt.second)); } From bf956dfbe328047299da2417078c8fb9d755e5e0 Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Sun, 18 Aug 2024 05:34:15 +0200 Subject: [PATCH 5/7] Fix build with CGAL 5.6 (again) (#6439) * Fix build with CGAL 5.6 Surface_mesh iterators no longer return references, so it's necessary to use const references or copies when iterating. This was previously merged in #3045 but isn't references in the current main branch anymore. No idea where why it is gone, but the issue still persists thus the patch should still be added. --- src/libslic3r/MeshBoolean.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/MeshBoolean.cpp b/src/libslic3r/MeshBoolean.cpp index c412553a223..779d5a042b9 100644 --- a/src/libslic3r/MeshBoolean.cpp +++ b/src/libslic3r/MeshBoolean.cpp @@ -201,12 +201,12 @@ indexed_triangle_set cgal_to_indexed_triangle_set(const _Mesh &cgalmesh) const auto &vertices = cgalmesh.vertices(); int vsize = int(vertices.size()); - for (auto &vi : vertices) { + for (const auto &vi : vertices) { auto &v = cgalmesh.point(vi); // Don't ask... its.vertices.emplace_back(to_vec3f(v)); } - for (auto &face : faces) { + for (const auto &face : faces) { auto vtc = cgalmesh.vertices_around_face(cgalmesh.halfedge(face)); int i = 0; From 364d91bd56f9bd08360ce838dc60c6dddf47b5da Mon Sep 17 00:00:00 2001 From: artillery3dlab Date: Sun, 18 Aug 2024 11:37:11 +0800 Subject: [PATCH 6/7] Artillery proflies update (#6457) * Artillery proflies update --- .../Artillery/filament/Artillery ABS.json | 19 +++++++++---- .../Artillery/filament/Artillery PETG.json | 27 ++++++++++++------- .../filament/Artillery PLA Basic.json | 2 +- .../filament/Artillery PLA Matte.json | 2 +- .../filament/Artillery PLA Silk.json | 2 +- .../filament/Artillery PLA Tough.json | 12 ++++++--- .../Artillery/filament/Artillery TPU.json | 18 ++++++++----- ...tillery Sidewinder X3 Plus 0.4 nozzle.json | 4 +-- ...rtillery Sidewinder X3 Pro 0.4 nozzle.json | 4 +-- ...tillery Sidewinder X4 Plus 0.4 nozzle.json | 4 +-- ...rtillery Sidewinder X4 Pro 0.4 nozzle.json | 4 +-- ...Standard @Artillery X3Plus 0.4 nozzle.json | 10 ++++--- ... Standard @Artillery X3Pro 0.4 nozzle.json | 10 ++++--- ...Standard @Artillery X4Plus 0.4 nozzle.json | 10 ++++--- ... Standard @Artillery X4Pro 0.4 nozzle.json | 10 ++++--- 15 files changed, 88 insertions(+), 50 deletions(-) diff --git a/resources/profiles/Artillery/filament/Artillery ABS.json b/resources/profiles/Artillery/filament/Artillery ABS.json index f16424112ea..977451b6c2f 100644 --- a/resources/profiles/Artillery/filament/Artillery ABS.json +++ b/resources/profiles/Artillery/filament/Artillery ABS.json @@ -49,22 +49,31 @@ "240" ], "fan_max_speed": [ - "80" + "20" ], "fan_min_speed": [ - "60" + "10" ], "fan_cooling_layer_time": [ - "80" + "30" ], "slow_down_layer_time": [ - "8" + "3" ], "filament_max_volumetric_speed": [ - "18" + "16" ], "temperature_vitrification": [ "220" + ], + "overhang_fan_threshold": [ + "25%" + ], + "overhang_fan_speed": [ + "80" + ], + "close_fan_the_first_x_layers": [ + "3" ], "version": "2.0.2.0" } diff --git a/resources/profiles/Artillery/filament/Artillery PETG.json b/resources/profiles/Artillery/filament/Artillery PETG.json index c199304ca54..5e5a6bef536 100644 --- a/resources/profiles/Artillery/filament/Artillery PETG.json +++ b/resources/profiles/Artillery/filament/Artillery PETG.json @@ -29,10 +29,10 @@ "0.4" ], "hot_plate_temp": [ - "90" + "70" ], "hot_plate_temp_initial_layer": [ - "90" + "70" ], "inherits": "Artillery Generic PLA", "name": "Artillery PETG", @@ -43,28 +43,37 @@ "250" ], "nozzle_temperature_range_high": [ - "250" + "270" ], "nozzle_temperature_range_low": [ - "220" + "230" ], "fan_max_speed": [ - "80" + "40" ], "fan_min_speed": [ - "60" + "10" ], "fan_cooling_layer_time": [ - "80" + "30" ], "slow_down_layer_time": [ - "8" + "12" ], "filament_max_volumetric_speed": [ - "18" + "9" ], "temperature_vitrification": [ "220" + ], + "close_fan_the_first_x_layers": [ + "3" + ], + "overhang_fan_threshold": [ + "10%" + ], + "overhang_fan_speed": [ + "90" ], "version": "2.0.2.0" } diff --git a/resources/profiles/Artillery/filament/Artillery PLA Basic.json b/resources/profiles/Artillery/filament/Artillery PLA Basic.json index 028520bdeb9..f0953d71fc7 100644 --- a/resources/profiles/Artillery/filament/Artillery PLA Basic.json +++ b/resources/profiles/Artillery/filament/Artillery PLA Basic.json @@ -49,7 +49,7 @@ "8" ], "filament_max_volumetric_speed": [ - "18" + "21" ], "temperature_vitrification": [ "190" diff --git a/resources/profiles/Artillery/filament/Artillery PLA Matte.json b/resources/profiles/Artillery/filament/Artillery PLA Matte.json index 8028bae90c6..ca2811a6cf6 100644 --- a/resources/profiles/Artillery/filament/Artillery PLA Matte.json +++ b/resources/profiles/Artillery/filament/Artillery PLA Matte.json @@ -49,7 +49,7 @@ "8" ], "filament_max_volumetric_speed": [ - "18" + "22" ], "temperature_vitrification": [ "190" diff --git a/resources/profiles/Artillery/filament/Artillery PLA Silk.json b/resources/profiles/Artillery/filament/Artillery PLA Silk.json index a67d23e4fea..8b6521d783f 100644 --- a/resources/profiles/Artillery/filament/Artillery PLA Silk.json +++ b/resources/profiles/Artillery/filament/Artillery PLA Silk.json @@ -49,7 +49,7 @@ "8" ], "filament_max_volumetric_speed": [ - "18" + "12" ], "temperature_vitrification": [ "190" diff --git a/resources/profiles/Artillery/filament/Artillery PLA Tough.json b/resources/profiles/Artillery/filament/Artillery PLA Tough.json index a5a73e4d40a..3b41976c919 100644 --- a/resources/profiles/Artillery/filament/Artillery PLA Tough.json +++ b/resources/profiles/Artillery/filament/Artillery PLA Tough.json @@ -31,10 +31,10 @@ "inherits": "Artillery Generic PLA", "name": "Artillery PLA Tough", "nozzle_temperature": [ - "210" + "220" ], "nozzle_temperature_initial_layer": [ - "210" + "220" ], "fan_max_speed": [ "80" @@ -49,10 +49,16 @@ "8" ], "filament_max_volumetric_speed": [ - "18" + "21" ], "temperature_vitrification": [ "190" + ], + "hot_plate_temp": [ + "65" + ], + "hot_plate_temp_initial_layer": [ + "65" ], "version": "2.0.2.0" } diff --git a/resources/profiles/Artillery/filament/Artillery TPU.json b/resources/profiles/Artillery/filament/Artillery TPU.json index ddab3533477..7f149cfd8e7 100644 --- a/resources/profiles/Artillery/filament/Artillery TPU.json +++ b/resources/profiles/Artillery/filament/Artillery TPU.json @@ -29,10 +29,10 @@ "0.4" ], "hot_plate_temp": [ - "70" + "45" ], "hot_plate_temp_initial_layer": [ - "70" + "45" ], "inherits": "Artillery Generic PLA", "name": "Artillery TPU", @@ -49,22 +49,28 @@ "200" ], "fan_max_speed": [ - "80" + "100" ], "fan_min_speed": [ - "60" + "100" ], "fan_cooling_layer_time": [ - "80" + "100" ], "slow_down_layer_time": [ "8" ], "filament_max_volumetric_speed": [ - "18" + "3.6" ], "temperature_vitrification": [ "190" + ], + "filament_density": [ + "1.22" + ], + "overhang_fan_threshold": [ + "95%" ], "version": "2.0.2.0" } diff --git a/resources/profiles/Artillery/machine/Artillery Sidewinder X3 Plus 0.4 nozzle.json b/resources/profiles/Artillery/machine/Artillery Sidewinder X3 Plus 0.4 nozzle.json index a0bb01efd11..12353f4fdc8 100644 --- a/resources/profiles/Artillery/machine/Artillery Sidewinder X3 Plus 0.4 nozzle.json +++ b/resources/profiles/Artillery/machine/Artillery Sidewinder X3 Plus 0.4 nozzle.json @@ -123,8 +123,8 @@ "0", "0" ], - "machine_pause_gcode": "M0", - "machine_start_gcode": "M140 S60\nM104 S160\nM190 S[first_layer_bed_temperature]\nM109 S{temperature_vitrification[0]}\nM211 S0\nG1 Z-0.2 F1000\nG1 X285 F3600\nG1 X260 F3600\nG1 X285 F3600\nG1 X260 F3600\nG1 X230 F3600\nG1 X260 F3600\nG1 X230 F3600\nG1 X260 F3600\nG92 E0\nG1 Z1.0 F3000 ; move z up little to prevent scratching of surface\nG1 X180 Y303 Z0.1 F6000.0 ; move to start-line position\nG1 X70 Y303 Z0.1 F1000.0 E15.0 ; draw 1st line\nG1 X70 Y303 Z0.2 F1000.0 ; move to side a little\nG1 X180 Y303 Z0.2 F1000.0 E30.0 ; draw 2st line\nG92 E0 ; reset extruder\nG1 E-2 Z5 F1800 ; move z up little to prevent scratching of surface\nG92 E0\nG1 Y300 F1800\nM211 S1\nM140 S[first_layer_bed_temperature];\nM104 S[first_layer_temperature];", + "machine_pause_gcode": "M600", + "machine_start_gcode": "M140 S60\nM104 S140\nM190 S[first_layer_bed_temperature]\nM109 S{temperature_vitrification[0]}\nG28;\nNOZZLE_WIPE\nM140 S[first_layer_bed_temperature];\nM104 S[first_layer_temperature];\nDRAW_LINE_ONLY", "machine_unload_filament_time": "0", "manual_filament_change": "0", "max_layer_height": [ diff --git a/resources/profiles/Artillery/machine/Artillery Sidewinder X3 Pro 0.4 nozzle.json b/resources/profiles/Artillery/machine/Artillery Sidewinder X3 Pro 0.4 nozzle.json index 1159c5fa8f9..a58df16c221 100644 --- a/resources/profiles/Artillery/machine/Artillery Sidewinder X3 Pro 0.4 nozzle.json +++ b/resources/profiles/Artillery/machine/Artillery Sidewinder X3 Pro 0.4 nozzle.json @@ -126,8 +126,8 @@ "0", "0" ], - "machine_pause_gcode": "M0", - "machine_start_gcode": "M140 S60\nM104 S160\nM190 S[first_layer_bed_temperature]\nM109 S{temperature_vitrification[0]}\nM211 S0\nG1 Z-0.2 F1000\nG1 X225 F3600\nG1 X200 F3600\nG1 X225 F3600\nG1 X200 F3600\nG1 X160 F3600\nG1 X200 F3600\nG1 X160 F3600\nG1 X200 F3600\nG92 E0\nG1 Z1.0 F3000 ; move z up little to prevent scratching of surface\nG1 X180 Y243 Z0.1 F6000.0 ; move to start-line position\nG1 X70 Y243 Z0.1 F1000.0 E15.0 ; draw 1st line\nG1 X70 Y243 Z0.2 F1000.0 ; move to side a little\nG1 X180 Y243 Z0.2 F1000.0 E30.0 ; draw 2st line\nG92 E0 ; reset extruder\nG1 E-2 Z5 F1800 ; move z up little to prevent scratching of surface\nG92 E0\nG1 Y240 F1800\nM211 S1\nM140 S[first_layer_bed_temperature];\nM104 S[first_layer_temperature];", + "machine_pause_gcode": "M600", + "machine_start_gcode": "M140 S60\nM104 S140\nM190 S[first_layer_bed_temperature]\nM109 S{temperature_vitrification[0]}\nG28;\nNOZZLE_WIPE\nM140 S[first_layer_bed_temperature];\nM104 S[first_layer_temperature];\nDRAW_LINE_ONLY", "machine_unload_filament_time": "0", "manual_filament_change": "0", "max_layer_height": [ diff --git a/resources/profiles/Artillery/machine/Artillery Sidewinder X4 Plus 0.4 nozzle.json b/resources/profiles/Artillery/machine/Artillery Sidewinder X4 Plus 0.4 nozzle.json index cb4cc5cd00f..b4ffad9ee57 100644 --- a/resources/profiles/Artillery/machine/Artillery Sidewinder X4 Plus 0.4 nozzle.json +++ b/resources/profiles/Artillery/machine/Artillery Sidewinder X4 Plus 0.4 nozzle.json @@ -126,8 +126,8 @@ "0", "0" ], - "machine_pause_gcode": "", - "machine_start_gcode": "M140 S60\nM104 S140\nM190 S60\nM109 S{temperature_vitrification[0]}\nG28;\nDRAW_LINE\nM140 S[first_layer_bed_temperature];\nM104 S[first_layer_temperature];", + "machine_pause_gcode": "M600", + "machine_start_gcode": "M140 S60\nM104 S140\nM190 S[first_layer_bed_temperature]\nM109 S{temperature_vitrification[0]}\nG28;\nNOZZLE_WIPE\nM140 S[first_layer_bed_temperature];\nM104 S[first_layer_temperature];\nDRAW_LINE_ONLY", "machine_unload_filament_time": "0", "manual_filament_change": "0", "max_layer_height": [ diff --git a/resources/profiles/Artillery/machine/Artillery Sidewinder X4 Pro 0.4 nozzle.json b/resources/profiles/Artillery/machine/Artillery Sidewinder X4 Pro 0.4 nozzle.json index 9802de101b1..151ac268f94 100644 --- a/resources/profiles/Artillery/machine/Artillery Sidewinder X4 Pro 0.4 nozzle.json +++ b/resources/profiles/Artillery/machine/Artillery Sidewinder X4 Pro 0.4 nozzle.json @@ -126,8 +126,8 @@ "0", "0" ], - "machine_pause_gcode": "", - "machine_start_gcode": "M140 S60\nM104 S140\nM190 S60\nM109 S{temperature_vitrification[0]}\nG28;\nDRAW_LINE\nM140 S[first_layer_bed_temperature];\nM104 S[first_layer_temperature];", + "machine_pause_gcode": "M600", + "machine_start_gcode": "M140 S60\nM104 S140\nM190 S[first_layer_bed_temperature]\nM109 S{temperature_vitrification[0]}\nG28;\nNOZZLE_WIPE\nM140 S[first_layer_bed_temperature];\nM104 S[first_layer_temperature];\nDRAW_LINE_ONLY", "machine_unload_filament_time": "0", "manual_filament_change": "0", "max_layer_height": [ diff --git a/resources/profiles/Artillery/process/0.20mm Standard @Artillery X3Plus 0.4 nozzle.json b/resources/profiles/Artillery/process/0.20mm Standard @Artillery X3Plus 0.4 nozzle.json index cd1de6b7e42..9212dec2adf 100644 --- a/resources/profiles/Artillery/process/0.20mm Standard @Artillery X3Plus 0.4 nozzle.json +++ b/resources/profiles/Artillery/process/0.20mm Standard @Artillery X3Plus 0.4 nozzle.json @@ -1,6 +1,7 @@ { "from": "system", "instantiation": "true", + "inherits": "fdm_process_common", "accel_to_decel_enable": "1", "accel_to_decel_factor": "50%", "alternate_extra_wall": "0", @@ -66,12 +67,12 @@ "infill_jerk": "9", "infill_wall_overlap": "15%", "initial_layer_acceleration": "500", - "initial_layer_infill_speed": "45", + "initial_layer_infill_speed": "30", "initial_layer_jerk": "9", "initial_layer_line_width": "0.5", "initial_layer_min_bead_width": "85%", "initial_layer_print_height": "0.25", - "initial_layer_speed": "45", + "initial_layer_speed": "30", "initial_layer_travel_speed": "100%", "inner_wall_acceleration": "0", "inner_wall_jerk": "9", @@ -156,7 +157,7 @@ "seam_slope_start_height": "0", "seam_slope_steps": "10", "seam_slope_type": "none", - "single_extruder_multi_material_priming": "0", + "single_extruder_multi_material_priming": "1", "skirt_distance": "2", "skirt_height": "1", "skirt_loops": "0", @@ -279,5 +280,6 @@ "70" ], "xy_contour_compensation": "0", - "xy_hole_compensation": "0" + "xy_hole_compensation": "0", + "top_bottom_infill_wall_overlap":"15%" } diff --git a/resources/profiles/Artillery/process/0.20mm Standard @Artillery X3Pro 0.4 nozzle.json b/resources/profiles/Artillery/process/0.20mm Standard @Artillery X3Pro 0.4 nozzle.json index bab2091fdd2..7f9ce95a63c 100644 --- a/resources/profiles/Artillery/process/0.20mm Standard @Artillery X3Pro 0.4 nozzle.json +++ b/resources/profiles/Artillery/process/0.20mm Standard @Artillery X3Pro 0.4 nozzle.json @@ -1,6 +1,7 @@ { "from": "system", "instantiation": "true", + "inherits": "fdm_process_common", "accel_to_decel_enable": "1", "accel_to_decel_factor": "50%", "alternate_extra_wall": "0", @@ -66,12 +67,12 @@ "infill_jerk": "9", "infill_wall_overlap": "15%", "initial_layer_acceleration": "500", - "initial_layer_infill_speed": "35", + "initial_layer_infill_speed": "30", "initial_layer_jerk": "9", "initial_layer_line_width": "0.5", "initial_layer_min_bead_width": "85%", "initial_layer_print_height": "0.25", - "initial_layer_speed": "45", + "initial_layer_speed": "30", "initial_layer_travel_speed": "100%", "inner_wall_acceleration": "3000", "inner_wall_jerk": "9", @@ -156,7 +157,7 @@ "seam_slope_start_height": "0", "seam_slope_steps": "10", "seam_slope_type": "none", - "single_extruder_multi_material_priming": "0", + "single_extruder_multi_material_priming": "1", "skirt_distance": "2", "skirt_height": "1", "skirt_loops": "0", @@ -279,5 +280,6 @@ "70" ], "xy_contour_compensation": "0", - "xy_hole_compensation": "0" + "xy_hole_compensation": "0", + "top_bottom_infill_wall_overlap":"15%" } diff --git a/resources/profiles/Artillery/process/0.20mm Standard @Artillery X4Plus 0.4 nozzle.json b/resources/profiles/Artillery/process/0.20mm Standard @Artillery X4Plus 0.4 nozzle.json index e72063a41ca..8fc299a1ad3 100644 --- a/resources/profiles/Artillery/process/0.20mm Standard @Artillery X4Plus 0.4 nozzle.json +++ b/resources/profiles/Artillery/process/0.20mm Standard @Artillery X4Plus 0.4 nozzle.json @@ -1,6 +1,7 @@ { "from": "system", "instantiation": "true", + "inherits": "fdm_process_common", "accel_to_decel_enable": "1", "accel_to_decel_factor": "50%", "alternate_extra_wall": "0", @@ -66,12 +67,12 @@ "infill_jerk": "9", "infill_wall_overlap": "15%", "initial_layer_acceleration": "0", - "initial_layer_infill_speed": "50", + "initial_layer_infill_speed": "30", "initial_layer_jerk": "9", "initial_layer_line_width": "0.5", "initial_layer_min_bead_width": "85%", "initial_layer_print_height": "0.2", - "initial_layer_speed": "50", + "initial_layer_speed": "30", "initial_layer_travel_speed": "100%", "inner_wall_acceleration": "0", "inner_wall_jerk": "9", @@ -156,7 +157,7 @@ "seam_slope_start_height": "0", "seam_slope_steps": "10", "seam_slope_type": "none", - "single_extruder_multi_material_priming": "0", + "single_extruder_multi_material_priming": "1", "skirt_distance": "2", "skirt_height": "1", "skirt_loops": "0", @@ -279,5 +280,6 @@ "70" ], "xy_contour_compensation": "0", - "xy_hole_compensation": "0" + "xy_hole_compensation": "0", + "top_bottom_infill_wall_overlap":"15%" } \ No newline at end of file diff --git a/resources/profiles/Artillery/process/0.20mm Standard @Artillery X4Pro 0.4 nozzle.json b/resources/profiles/Artillery/process/0.20mm Standard @Artillery X4Pro 0.4 nozzle.json index 59b4db5f67b..532b5b551d9 100644 --- a/resources/profiles/Artillery/process/0.20mm Standard @Artillery X4Pro 0.4 nozzle.json +++ b/resources/profiles/Artillery/process/0.20mm Standard @Artillery X4Pro 0.4 nozzle.json @@ -1,6 +1,7 @@ { "from": "system", "instantiation": "true", + "inherits": "fdm_process_common", "accel_to_decel_enable": "1", "accel_to_decel_factor": "50%", "alternate_extra_wall": "0", @@ -66,12 +67,12 @@ "infill_jerk": "9", "infill_wall_overlap": "15%", "initial_layer_acceleration": "0", - "initial_layer_infill_speed": "50", + "initial_layer_infill_speed": "30", "initial_layer_jerk": "9", "initial_layer_line_width": "0.5", "initial_layer_min_bead_width": "85%", "initial_layer_print_height": "0.2", - "initial_layer_speed": "50", + "initial_layer_speed": "30", "initial_layer_travel_speed": "100%", "inner_wall_acceleration": "0", "inner_wall_jerk": "9", @@ -156,7 +157,7 @@ "seam_slope_start_height": "0", "seam_slope_steps": "10", "seam_slope_type": "none", - "single_extruder_multi_material_priming": "0", + "single_extruder_multi_material_priming": "1", "skirt_distance": "2", "skirt_height": "1", "skirt_loops": "0", @@ -279,6 +280,7 @@ "70" ], "xy_contour_compensation": "0", - "xy_hole_compensation": "0" + "xy_hole_compensation": "0", + "top_bottom_infill_wall_overlap":"15%" } From 01b16814ad9816349a9835b1774394fe97d13885 Mon Sep 17 00:00:00 2001 From: Ioannis Giannakas <59056762+igiannakas@users.noreply.github.com> Date: Sun, 18 Aug 2024 04:38:46 +0100 Subject: [PATCH 7/7] Gap fill tool tip clarification & filter_out_gap_fill setting visibility (#6468) * Gap fill tool tip clarification * Gap fill text and parameter visibility update --- src/libslic3r/PrintConfig.cpp | 21 ++++++++++++++++----- src/slic3r/GUI/ConfigManipulation.cpp | 5 ----- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 4814c8f518b..232ff029ebe 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -817,12 +817,22 @@ void PrintConfigDef::init_fff_params() def = this->add("gap_fill_target", coEnum); def->label = L("Apply gap fill"); def->category = L("Strength"); - def->tooltip = L("Enables gap fill for the selected surfaces. The minimum gap length that will be filled can be controlled " + def->tooltip = L("Enables gap fill for the selected solid surfaces. The minimum gap length that will be filled can be controlled " "from the filter out tiny gaps option below.\n\n" "Options:\n" - "1. Everywhere: Applies gap fill to top, bottom and internal solid surfaces\n" - "2. Top and Bottom surfaces: Applies gap fill to top and bottom surfaces only\n" - "3. Nowhere: Disables gap fill\n"); + "1. Everywhere: Applies gap fill to top, bottom and internal solid surfaces for maximum strength\n" + "2. Top and Bottom surfaces: Applies gap fill to top and bottom surfaces only, balancing print speed, " + "reducing potential over extrusion in the solid infill and making sure the top and bottom surfaces have " + "no pin hole gaps\n" + "3. Nowhere: Disables gap fill for all solid infill areas. \n\n" + "Note that if using the classic perimeter generator, gap fill may also be generated between perimeters, " + "if a full width line cannot fit between them. That perimeter gap fill is not controlled by this setting. \n\n" + "If you would like all gap fill, including the classic perimeter generated one, removed, " + "set the filter out tiny gaps value to a large number, like 999999. \n\n" + "However this is not advised, as gap fill between perimeters is contributing to the model's strength. " + "For models where excessive gap fill is generated between perimeters, a better option would be to " + "switch to the arachne wall generator and use this option to control whether the cosmetic top and " + "bottom surface gap fill is generated"); def->enum_keys_map = &ConfigOptionEnum::get_enum_values(); def->enum_values.push_back("everywhere"); def->enum_values.push_back("topbottom"); @@ -2539,7 +2549,8 @@ void PrintConfigDef::init_fff_params() def = this->add("filter_out_gap_fill", coFloat); def->label = L("Filter out tiny gaps"); def->category = L("Layers and Perimeters"); - def->tooltip = L("Filter out gaps smaller than the threshold specified"); + def->tooltip = L("Don't print gap fill with a length is smaller than the threshold specified (in mm). This setting applies to top, " + "bottom and solid infill and, if using the classic perimeter generator, to wall gap fill. "); def->sidetext = L("mm"); def->mode = comAdvanced; def->set_default_value(new ConfigOptionFloat(0)); diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index a9fd41f8b8a..02c82e06bb8 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -515,11 +515,6 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co apply(config, &new_conf); } - // Orca: Hide the filter out tiny gaps field when gap fill target is nowhere as no gap fill will be applied. - bool have_gap_fill = config->opt_enum("gap_fill_target") != gftNowhere; - toggle_line("filter_out_gap_fill", have_gap_fill); - - bool have_perimeters = config->opt_int("wall_loops") > 0; for (auto el : { "extra_perimeters_on_overhangs", "ensure_vertical_shell_thickness", "detect_thin_wall", "detect_overhang_wall", "seam_position", "staggered_inner_seams", "wall_sequence", "outer_wall_line_width",