diff --git a/include/InsetOrderOptimizer.h b/include/InsetOrderOptimizer.h index 47cd832fcb..f23aae04bb 100644 --- a/include/InsetOrderOptimizer.h +++ b/include/InsetOrderOptimizer.h @@ -56,7 +56,7 @@ class InsetOrderOptimizer const size_t wall_x_extruder_nr, const ZSeamConfig& z_seam_config, const std::vector& paths, - const Polygons& disallowed_areas = {}); + const Polygons& disallowed_areas_for_seams = {}); /*! * Adds the insets to the given layer plan. @@ -107,7 +107,7 @@ class InsetOrderOptimizer const ZSeamConfig& z_seam_config_; const std::vector& paths_; const LayerIndex layer_nr_; - Polygons disallowed_areas_; + Polygons disallowed_areas_for_seams_; std::vector> inset_polys_; // vector of vectors holding the inset polygons Polygons retraction_region_; // After printing an outer wall, move into this region so that retractions do not leave visible blobs. Calculated lazily if needed (see diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index a709e22a2d..1a8c174cc7 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -62,7 +62,7 @@ class PathOrderOptimizer public: using OrderablePath = PathOrdering; /* Areas defined here are not allowed to have the start the prints */ - Polygons disallowed_area; + Polygons disallowed_area_for_seams; /*! * After optimizing, this contains the paths that need to be printed in the * correct order. @@ -113,7 +113,7 @@ class PathOrderOptimizer const bool reverse_direction = false, const std::unordered_multimap& order_requirements = no_order_requirements_, const bool group_outer_walls = false, - const Polygons& disallowed_areas = {}) + const Polygons& disallowed_areas_for_seams = {}) : start_point_(start_point) , seam_config_(seam_config) , combing_boundary_((combing_boundary != nullptr && ! combing_boundary->empty()) ? combing_boundary : nullptr) @@ -121,7 +121,7 @@ class PathOrderOptimizer , reverse_direction_(reverse_direction) , _group_outer_walls(group_outer_walls) , order_requirements_(&order_requirements) - , disallowed_area{ disallowed_areas } + , disallowed_area_for_seams{ disallowed_areas_for_seams } { } @@ -634,10 +634,10 @@ class PathOrderOptimizer size_t path_size = path.converted_->size(); if (path_size > number_of_paths_analysed) { - if (! disallowed_area.empty()) + if (! disallowed_area_for_seams.empty()) { Point2LL current_candidate = (path.converted_)->at(best_pos); - if (disallowed_area.inside(current_candidate, true)) + if (disallowed_area_for_seams.inside(current_candidate, true)) { size_t next_best_position = (path_size > best_pos + 1) ? best_pos + 1 : 0; number_of_paths_analysed += 1; @@ -792,7 +792,7 @@ class PathOrderOptimizer } } - if (! disallowed_area.empty()) + if (! disallowed_area_for_seams.empty()) { best_i = pathIfZseamIsInDisallowedArea(best_i, path, 0); } diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 9063efa2f1..bbfdaf47eb 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -3459,7 +3459,7 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer constexpr coord_t wipe_dist = 0; ZSeamConfig z_seam_config = ZSeamConfig(EZSeamType::SHORTEST, gcode_layer.getLastPlannedPositionOrStartingPosition(), EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE, false); - Polygons disallowed_area{}; + Polygons disallowed_area_for_seams{}; if (infill_extruder.settings_.get("support_z_seam_away_from_model")) { for (std::shared_ptr mesh_ptr : storage.meshes) @@ -3467,13 +3467,13 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer auto& mesh = *mesh_ptr; for (auto& part : mesh.layers[gcode_layer.getLayerNr()].parts) { - disallowed_area.add(part.print_outline); + disallowed_area_for_seams.add(part.print_outline); } } - if (! disallowed_area.empty()) + if (! disallowed_area_for_seams.empty()) { coord_t min_distance = infill_extruder.settings_.get("support_z_seam_min_distance"); - disallowed_area = disallowed_area.offset(min_distance, ClipperLib::jtRound); + disallowed_area_for_seams = disallowed_area_for_seams.offset(min_distance, ClipperLib::jtRound); } } @@ -3496,7 +3496,7 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer extruder_nr, z_seam_config, wall_toolpaths, - disallowed_area); + disallowed_area_for_seams); added_something |= wall_orderer.addToLayer(); } diff --git a/src/InsetOrderOptimizer.cpp b/src/InsetOrderOptimizer.cpp index 81febedcfa..03ad5434cb 100644 --- a/src/InsetOrderOptimizer.cpp +++ b/src/InsetOrderOptimizer.cpp @@ -51,7 +51,7 @@ InsetOrderOptimizer::InsetOrderOptimizer( const size_t wall_x_extruder_nr, const ZSeamConfig& z_seam_config, const std::vector& paths, - const Polygons& disallowed_areas) + const Polygons& disallowed_areas_for_seams) : gcode_writer_(gcode_writer) , storage_(storage) , gcode_layer_(gcode_layer) @@ -71,7 +71,7 @@ InsetOrderOptimizer::InsetOrderOptimizer( , z_seam_config_(z_seam_config) , paths_(paths) , layer_nr_(gcode_layer.getLayerNr()) - , disallowed_areas_{ disallowed_areas } + , disallowed_areas_for_seams_{ disallowed_areas_for_seams } { } @@ -108,7 +108,7 @@ bool InsetOrderOptimizer::addToLayer() reverse, order, group_outer_walls, - disallowed_areas_); + disallowed_areas_for_seams_); for (const auto& line : walls_to_be_added) {