Skip to content

Commit

Permalink
Applied clang-format.
Browse files Browse the repository at this point in the history
  • Loading branch information
rburema authored and github-actions[bot] committed Sep 14, 2023
1 parent 1e30c7f commit f6d31c9
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 24 deletions.
38 changes: 25 additions & 13 deletions include/SkeletalTrapezoidationEdge.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,24 @@
#ifndef SKELETAL_TRAPEZOIDATION_EDGE_H
#define SKELETAL_TRAPEZOIDATION_EDGE_H

#include <memory> // smart pointers
#include "utils/ExtrusionJunction.h"

#include <list>
#include <memory> // smart pointers
#include <vector>

#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:
/*!
Expand All @@ -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)
{}
{
}
};

/*!
Expand All @@ -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
Expand All @@ -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
{
Expand Down
25 changes: 14 additions & 11 deletions include/SkeletalTrapezoidationJoint.h
Original file line number Diff line number Diff line change
@@ -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 <memory> // smart pointers

#include "BeadingStrategy/BeadingStrategy.h"
#include "utils/IntPoint.h"

#include <memory> // smart pointers

namespace cura
{

class SkeletalTrapezoidationJoint
{
using Beading = BeadingStrategy::Beading;

public:
struct BeadingPropagation
{
Expand All @@ -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
{
Expand All @@ -53,7 +57,6 @@ class SkeletalTrapezoidationJoint
}

private:

std::weak_ptr<BeadingPropagation> beading;
};

Expand Down

0 comments on commit f6d31c9

Please sign in to comment.