From f7f2527cfd63e332e604187a945a6e504b819049 Mon Sep 17 00:00:00 2001 From: wawanbreton Date: Thu, 19 Dec 2024 15:42:56 +0000 Subject: [PATCH] Apply clang-format --- include/PathOrderOptimizer.h | 2 +- include/infill.h | 2 +- .../print_operation/InfillFeatureExtrusion.h | 16 ++++++++++--- .../MeshInfillGenerator.cpp | 23 +++---------------- src/feature_generation/MeshSkinGenerator.cpp | 12 ++-------- .../FeatureExtrusionScheduler.cpp | 2 +- .../InfillFeatureExtrusion.cpp | 10 ++++++-- 7 files changed, 29 insertions(+), 38 deletions(-) diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index 59b52e5541..8d74306413 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -16,9 +16,9 @@ #include #include +#include "path_ordering.h" #include "path_planning/CombPath.h" //To calculate the combing distance if we want to use combing. #include "path_planning/LinePolygonsCrossings.h" //To prevent calculating combing distances if we don't cross the combing borders. -#include "path_ordering.h" #include "settings/EnumSettings.h" //To get the seam settings. #include "settings/ZSeamConfig.h" //To read the seam configuration. #include "utils/linearAlg2D.h" //To find the angle of corners to hide seams. diff --git a/include/infill.h b/include/infill.h index 47953a4c1e..c5427202fc 100644 --- a/include/infill.h +++ b/include/infill.h @@ -225,7 +225,7 @@ class Infill const Shape& prevent_small_exposed_to_air = Shape()); void generate( - GeneratedPatterns &patterns, + GeneratedPatterns& patterns, const Settings& settings, int layer_idx, SectionType section_type, diff --git a/include/print_operation/InfillFeatureExtrusion.h b/include/print_operation/InfillFeatureExtrusion.h index 01c7d4b03b..fb23d422ed 100644 --- a/include/print_operation/InfillFeatureExtrusion.h +++ b/include/print_operation/InfillFeatureExtrusion.h @@ -13,9 +13,19 @@ namespace cura class InfillFeatureExtrusion : public MeshFeatureExtrusion { public: - explicit InfillFeatureExtrusion(const PrintFeatureType type, const coord_t nominal_line_width, const std::shared_ptr& mesh, const AngleDegrees &infill_angle); - - static std::shared_ptr makeFrom(const Infill::GeneratedPatterns& patterns, PrintFeatureType type, const coord_t line_width, const std::shared_ptr& mesh,const AngleDegrees& infill_angle, const Velocity &speed); + explicit InfillFeatureExtrusion( + const PrintFeatureType type, + const coord_t nominal_line_width, + const std::shared_ptr& mesh, + const AngleDegrees& infill_angle); + + static std::shared_ptr makeFrom( + const Infill::GeneratedPatterns& patterns, + PrintFeatureType type, + const coord_t line_width, + const std::shared_ptr& mesh, + const AngleDegrees& infill_angle, + const Velocity& speed); const AngleDegrees& GetInfillAngle() const; diff --git a/src/feature_generation/MeshInfillGenerator.cpp b/src/feature_generation/MeshInfillGenerator.cpp index 2da4033158..7a6bfeeb29 100644 --- a/src/feature_generation/MeshInfillGenerator.cpp +++ b/src/feature_generation/MeshInfillGenerator.cpp @@ -13,8 +13,8 @@ #include "print_operation/ContinuousExtruderMoveSequence.h" #include "print_operation/ExtruderPlan.h" -#include "print_operation/LayerPlan.h" #include "print_operation/InfillFeatureExtrusion.h" +#include "print_operation/LayerPlan.h" #include "utils/math.h" @@ -142,29 +142,12 @@ void MeshInfillGenerator::generateFeatures( skip_some_zags, zag_skip_count, pocket_size); - infill_comp.generate( - patterns, - settings, - layer_plan->getLayerIndex(), - SectionType::INFILL, - getMesh()->cross_fill_provider, - lightning_layer, - getMesh().get()); + infill_comp.generate(patterns, settings, layer_plan->getLayerIndex(), SectionType::INFILL, getMesh()->cross_fill_provider, lightning_layer, getMesh().get()); }; if (combine_idx == 0) { - processMultiLayerInfill( - part, - settings, - layer_plan, - last_idx, - infill_pattern, - infill_line_width, - infill_overlap, - zig_zaggify_infill, - generate_infill, - patterns); + processMultiLayerInfill(part, settings, layer_plan, last_idx, infill_pattern, infill_line_width, infill_overlap, zig_zaggify_infill, generate_infill, patterns); } else { diff --git a/src/feature_generation/MeshSkinGenerator.cpp b/src/feature_generation/MeshSkinGenerator.cpp index 910a312dac..62e9a82e21 100644 --- a/src/feature_generation/MeshSkinGenerator.cpp +++ b/src/feature_generation/MeshSkinGenerator.cpp @@ -8,8 +8,8 @@ #include "infill.h" #include "print_operation/ContinuousExtruderMoveSequence.h" #include "print_operation/ExtruderPlan.h" -#include "print_operation/LayerPlan.h" #include "print_operation/InfillFeatureExtrusion.h" +#include "print_operation/LayerPlan.h" #include "settings/EnumSettings.h" #include "settings/PathConfigStorage.h" #include "sliceDataStorage.h" @@ -273,15 +273,7 @@ void MeshSkinGenerator::processSkinPrintFeature( skip_some_zags, zag_skip_count, pocket_size); - infill_comp.generate( - patterns, - settings, - layer_plan->getLayerIndex(), - SectionType::SKIN, - nullptr, - nullptr, - nullptr, - small_areas_on_surface ? Shape() : exposed_to_air); + infill_comp.generate(patterns, settings, layer_plan->getLayerIndex(), SectionType::SKIN, nullptr, nullptr, nullptr, small_areas_on_surface ? Shape() : exposed_to_air); auto feature_extrusion = InfillFeatureExtrusion::makeFrom(patterns, feature_type, config.getLineWidth(), getMesh(), skin_angle, config.getSpeed()); extruder_plan->appendFeatureExtrusion(feature_extrusion); diff --git a/src/operation_transformation/FeatureExtrusionScheduler.cpp b/src/operation_transformation/FeatureExtrusionScheduler.cpp index 53f8563e20..1842b82007 100644 --- a/src/operation_transformation/FeatureExtrusionScheduler.cpp +++ b/src/operation_transformation/FeatureExtrusionScheduler.cpp @@ -142,7 +142,7 @@ FeatureExtrusionScheduler::SequencesConstraintsMap FeatureExtrusionScheduler::ma for (const std::shared_ptr& constraints_generator : moves_constraints_generators) { - constraints_generator->appendConstraints(feature_extrusion, constraints); + constraints_generator->appendConstraints(feature_extrusion, constraints); } return constraints; diff --git a/src/print_operation/InfillFeatureExtrusion.cpp b/src/print_operation/InfillFeatureExtrusion.cpp index 289b79818d..7c9eca24c3 100644 --- a/src/print_operation/InfillFeatureExtrusion.cpp +++ b/src/print_operation/InfillFeatureExtrusion.cpp @@ -3,8 +3,8 @@ #include "print_operation/InfillFeatureExtrusion.h" -#include "print_operation/ContinuousExtruderMoveSequence.h" #include "geometry/OpenPolyline.h" +#include "print_operation/ContinuousExtruderMoveSequence.h" namespace cura { @@ -19,7 +19,13 @@ InfillFeatureExtrusion::InfillFeatureExtrusion( { } -std::shared_ptr InfillFeatureExtrusion::makeFrom(const Infill::GeneratedPatterns& patterns, PrintFeatureType type, const coord_t line_width, const std::shared_ptr& mesh,const AngleDegrees& infill_angle, const Velocity &speed) +std::shared_ptr InfillFeatureExtrusion::makeFrom( + const Infill::GeneratedPatterns& patterns, + PrintFeatureType type, + const coord_t line_width, + const std::shared_ptr& mesh, + const AngleDegrees& infill_angle, + const Velocity& speed) { auto feature_extrusion = std::make_shared(type, line_width, mesh, infill_angle);