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 15, 2023
1 parent 9b5da0e commit e171220
Show file tree
Hide file tree
Showing 6 changed files with 756 additions and 642 deletions.
7 changes: 6 additions & 1 deletion include/FffGcodeWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,12 @@ class FffGcodeWriter : public NoCopy
* \param mesh_config the line config with which to print a print feature
* \param gcode_layer The initial planning of the gcode of the layer.
*/
void addMeshLayerToGCode(const SliceDataStorage& storage, const std::shared_ptr<SliceMeshStorage>& mesh_ptr, const size_t extruder_nr, const MeshPathConfigs& mesh_config, LayerPlan& gcode_layer) const;
void addMeshLayerToGCode(
const SliceDataStorage& storage,
const std::shared_ptr<SliceMeshStorage>& mesh_ptr,
const size_t extruder_nr,
const MeshPathConfigs& mesh_config,
LayerPlan& gcode_layer) const;

/*!
* Add all features of the given extruder from a single part from a given layer of a mesh-volume to the layer plan \p gcode_layer.
Expand Down
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
2 changes: 1 addition & 1 deletion src/FffPolygonGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ bool FffPolygonGenerator::sliceModel(MeshGroup* meshgroup, TimeKeeper& timeKeepe
Mesh& mesh = scene.current_mesh_group->meshes[meshIdx];

// always make a new SliceMeshStorage, so that they have the same ordering / indexing as meshgroup.meshes
storage.meshes.push_back(std::make_shared<SliceMeshStorage>(& meshgroup->meshes[meshIdx], slicer->layers.size())); // new mesh in storage had settings from the Mesh
storage.meshes.push_back(std::make_shared<SliceMeshStorage>(&meshgroup->meshes[meshIdx], slicer->layers.size())); // new mesh in storage had settings from the Mesh
auto& meshStorage = *storage.meshes.back();

// only create layer parts for normal meshes
Expand Down
Loading

0 comments on commit e171220

Please sign in to comment.