From f6d31c92215251099ee948a5cb6fc8facc138abd Mon Sep 17 00:00:00 2001 From: rburema Date: Thu, 14 Sep 2023 19:40:36 +0000 Subject: [PATCH] Applied clang-format. --- include/SkeletalTrapezoidationEdge.h | 38 ++++++++++++++++++--------- include/SkeletalTrapezoidationJoint.h | 25 ++++++++++-------- 2 files changed, 39 insertions(+), 24 deletions(-) diff --git a/include/SkeletalTrapezoidationEdge.h b/include/SkeletalTrapezoidationEdge.h index 4c0bfb365c..60f464deb5 100644 --- a/include/SkeletalTrapezoidationEdge.h +++ b/include/SkeletalTrapezoidationEdge.h @@ -4,19 +4,24 @@ #ifndef SKELETAL_TRAPEZOIDATION_EDGE_H #define SKELETAL_TRAPEZOIDATION_EDGE_H -#include // smart pointers +#include "utils/ExtrusionJunction.h" + #include +#include // smart pointers #include -#include "utils/ExtrusionJunction.h" - namespace cura { class SkeletalTrapezoidationEdge { private: - enum class Central : int { UNKNOWN = -1, NO = 0, YES = 1}; + enum class Central : int + { + UNKNOWN = -1, + NO = 0, + YES = 1 + }; public: /*! @@ -28,9 +33,11 @@ class SkeletalTrapezoidationEdge int lower_bead_count; coord_t feature_radius; // The feature radius at which this transition is placed TransitionMiddle(coord_t pos, int lower_bead_count, coord_t feature_radius) - : pos(pos), lower_bead_count(lower_bead_count) + : pos(pos) + , lower_bead_count(lower_bead_count) , feature_radius(feature_radius) - {} + { + } }; /*! @@ -42,8 +49,11 @@ class SkeletalTrapezoidationEdge int lower_bead_count; bool is_lower_end; // Whether this is the ed of the transition with lower bead count TransitionEnd(coord_t pos, int lower_bead_count, bool is_lower_end) - : pos(pos), lower_bead_count(lower_bead_count), is_lower_end(is_lower_end) - {} + : pos(pos) + , lower_bead_count(lower_bead_count) + , is_lower_end(is_lower_end) + { + } }; enum class EdgeType : int @@ -55,12 +65,14 @@ class SkeletalTrapezoidationEdge EdgeType type; SkeletalTrapezoidationEdge() - : SkeletalTrapezoidationEdge(EdgeType::NORMAL) - {} + : SkeletalTrapezoidationEdge(EdgeType::NORMAL) + { + } SkeletalTrapezoidationEdge(const EdgeType& type) - : type(type) - , is_central(Central::UNKNOWN) - {} + : type(type) + , is_central(Central::UNKNOWN) + { + } bool isCentral() const { diff --git a/include/SkeletalTrapezoidationJoint.h b/include/SkeletalTrapezoidationJoint.h index 7c7575a07b..e8c5ad42a7 100644 --- a/include/SkeletalTrapezoidationJoint.h +++ b/include/SkeletalTrapezoidationJoint.h @@ -1,20 +1,21 @@ -//Copyright (c) 2020 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2020 Ultimaker B.V. +// CuraEngine is released under the terms of the AGPLv3 or higher. #ifndef SKELETAL_TRAPEZOIDATION_JOINT_H #define SKELETAL_TRAPEZOIDATION_JOINT_H -#include // smart pointers - #include "BeadingStrategy/BeadingStrategy.h" #include "utils/IntPoint.h" +#include // smart pointers + namespace cura { class SkeletalTrapezoidationJoint { using Beading = BeadingStrategy::Beading; + public: struct BeadingPropagation { @@ -27,17 +28,20 @@ class SkeletalTrapezoidationJoint , dist_to_bottom_source(0) , dist_from_top_source(0) , is_upward_propagated_only(false) - {} + { + } }; coord_t distance_to_boundary; coord_t bead_count; - float transition_ratio; //! The distance near the skeleton to leave free because this joint is in the middle of a transition, as a fraction of the inner bead width of the bead at the higher transition. + float transition_ratio; //! The distance near the skeleton to leave free because this joint is in the middle of a transition, as a fraction of the inner bead width of the bead + //! at the higher transition. SkeletalTrapezoidationJoint() - : distance_to_boundary(-1) - , bead_count(-1) - , transition_ratio(0) - {} + : distance_to_boundary(-1) + , bead_count(-1) + , transition_ratio(0) + { + } bool hasBeading() const { @@ -53,7 +57,6 @@ class SkeletalTrapezoidationJoint } private: - std::weak_ptr beading; };