From 8c6d99eb821f6194cf17150b657cbe5c5ea8ad7f Mon Sep 17 00:00:00 2001 From: saumyaj3 Date: Fri, 19 Apr 2024 14:55:53 +0000 Subject: [PATCH] Applied clang-format. --- include/PathOrderOptimizer.h | 12 ++++++------ src/FffGcodeWriter.cpp | 7 ++----- src/InsetOrderOptimizer.cpp | 8 ++++---- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index e049816620..684128a5f9 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -122,7 +122,7 @@ class PathOrderOptimizer , reverse_direction_(reverse_direction) , _group_outer_walls(group_outer_walls) , order_requirements_(&order_requirements) - , mesh_paths_ {} + , mesh_paths_{} { } @@ -211,7 +211,8 @@ class PathOrderOptimizer // For some Z seam types the start position can be pre-computed. // This is faster since we don't need to re-compute the start position at each step then. - precompute_start &= seam_config_.type_ == EZSeamType::SUPPORT || seam_config_.type_ == EZSeamType::RANDOM || seam_config_.type_ == EZSeamType::USER_SPECIFIED || seam_config_.type_ == EZSeamType::SHARPEST_CORNER; + precompute_start &= seam_config_.type_ == EZSeamType::SUPPORT || seam_config_.type_ == EZSeamType::RANDOM || seam_config_.type_ == EZSeamType::USER_SPECIFIED + || seam_config_.type_ == EZSeamType::SHARPEST_CORNER; if (precompute_start) { for (auto& path : paths_) @@ -575,7 +576,7 @@ class PathOrderOptimizer bool isVertexCloseToPolygonPath(Point2LL point) { - for( const auto& points : ranges::front(mesh_paths_)) + for (const auto& points : ranges::front(mesh_paths_)) { for (const auto& polygon_point : points) { @@ -637,12 +638,12 @@ class PathOrderOptimizer size_t pathIfzeamSupportIsCloseToModel(size_t best_pos, const OrderablePath& path) { - if (!mesh_paths_.empty()) + if (! mesh_paths_.empty()) { Point2LL current_candidate = (*path.converted_)[best_pos]; if (isVertexCloseToPolygonPath(current_candidate)) { - best_pos = pathIfzeamSupportIsCloseToModel(best_pos+1, path); + best_pos = pathIfzeamSupportIsCloseToModel(best_pos + 1, path); } } return best_pos; @@ -789,7 +790,6 @@ class PathOrderOptimizer if (seam_config_.type_ == EZSeamType::SUPPORT) { best_i = pathIfzeamSupportIsCloseToModel(best_i, path); - } return best_i; } diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 982c9dd7aa..da17d2c13c 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -33,9 +33,9 @@ #include "utils/Simplify.h" //Removing micro-segments created by offsetting. #include "utils/ThreadPool.h" #include "utils/linearAlg2D.h" -#include "utils/polygonUtils.h" #include "utils/math.h" #include "utils/orderOptimizer.h" +#include "utils/polygonUtils.h" namespace cura { @@ -3456,10 +3456,7 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer Point2LL start_pos; start_pos = gcode_layer.getLastPlannedPositionOrStartingPosition(); - z_seam_config = ZSeamConfig(EZSeamType::SUPPORT, - start_pos, - EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE, - false); + z_seam_config = ZSeamConfig(EZSeamType::SUPPORT, start_pos, EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE, false); InsetOrderOptimizer wall_orderer( diff --git a/src/InsetOrderOptimizer.cpp b/src/InsetOrderOptimizer.cpp index 7b732d31c0..409900584d 100644 --- a/src/InsetOrderOptimizer.cpp +++ b/src/InsetOrderOptimizer.cpp @@ -113,19 +113,19 @@ bool InsetOrderOptimizer::addToLayer() order_optimizer.addPolyline(&line); } } - if (z_seam_config_.type_== EZSeamType::SUPPORT) + if (z_seam_config_.type_ == EZSeamType::SUPPORT) { for (std::shared_ptr mesh_ptr : storage_.meshes) { auto& mesh = *mesh_ptr; - for (auto &part : mesh.layers[layer_nr_].parts) + for (auto& part : mesh.layers[layer_nr_].parts) { mesh_paths_.push_back(part.print_outline.paths); } } - if (!mesh_paths_.empty()) + if (! mesh_paths_.empty()) { - order_optimizer.addMeshPathsinfo(mesh_paths_,settings_.get("support_z_seam_min_distance")); + order_optimizer.addMeshPathsinfo(mesh_paths_, settings_.get("support_z_seam_min_distance")); } }