Skip to content

Commit

Permalink
Applied clang-format.
Browse files Browse the repository at this point in the history
  • Loading branch information
wawanbreton authored and github-actions[bot] committed Nov 22, 2023
1 parent c74f4bb commit 1c37545
Show file tree
Hide file tree
Showing 23 changed files with 211 additions and 207 deletions.
48 changes: 25 additions & 23 deletions include/SkeletalTrapezoidationGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,29 @@ class STHalfEdge : public HalfEdge<SkeletalTrapezoidationJoint, SkeletalTrapezoi
{
using edge_t = STHalfEdge;
using node_t = STHalfEdgeNode;

public:
STHalfEdge(SkeletalTrapezoidationEdge data);

/*!
* Check (recursively) whether there is any upward edge from the distance_to_boundary of the from of the \param edge
*
* \param strict Whether equidistant edges can count as a local maximum
*/
* Check (recursively) whether there is any upward edge from the distance_to_boundary of the from of the \param edge
*
* \param strict Whether equidistant edges can count as a local maximum
*/
bool canGoUp(bool strict = false) const;

/*!
* Check whether the edge goes from a lower to a higher distance_to_boundary.
* Effectively deals with equidistant edges by looking beyond this edge.
*/
* Check whether the edge goes from a lower to a higher distance_to_boundary.
* Effectively deals with equidistant edges by looking beyond this edge.
*/
bool isUpward() const;

/*!
* Calculate the traversed distance until we meet an upward edge.
* Useful for calling on edges between equidistant points.
*
* If we can go up then the distance includes the length of the \param edge
*/
* Calculate the traversed distance until we meet an upward edge.
* Useful for calling on edges between equidistant points.
*
* If we can go up then the distance includes the length of the \param edge
*/
std::optional<cura::coord_t> distToGoUp() const;

STHalfEdge* getNextUnconnected();
Expand All @@ -50,6 +51,7 @@ class STHalfEdgeNode : public HalfEdgeNode<SkeletalTrapezoidationJoint, Skeletal
{
using edge_t = STHalfEdge;
using node_t = STHalfEdgeNode;

public:
STHalfEdgeNode(SkeletalTrapezoidationJoint data, Point2LL p);

Expand All @@ -58,24 +60,24 @@ class STHalfEdgeNode : public HalfEdgeNode<SkeletalTrapezoidationJoint, Skeletal
bool isCentral() const;

/*!
* Check whether this node has a locally maximal distance_to_boundary
*
* \param strict Whether equidistant edges can count as a local maximum
*/
* Check whether this node has a locally maximal distance_to_boundary
*
* \param strict Whether equidistant edges can count as a local maximum
*/
bool isLocalMaximum(bool strict = false) const;
};

class SkeletalTrapezoidationGraph: public HalfEdgeGraph<SkeletalTrapezoidationJoint, SkeletalTrapezoidationEdge, STHalfEdgeNode, STHalfEdge>
class SkeletalTrapezoidationGraph : public HalfEdgeGraph<SkeletalTrapezoidationJoint, SkeletalTrapezoidationEdge, STHalfEdgeNode, STHalfEdge>
{
using edge_t = STHalfEdge;
using node_t = STHalfEdgeNode;
public:

public:
/*!
* If an edge is too small, collapse it and its twin and fix the surrounding edges to ensure a consistent graph.
*
*
* Don't collapse support edges, unless we can collapse the whole quad.
*
*
* o-,
* | "-o
* | | > Don't collapse this edge only.
Expand All @@ -87,7 +89,7 @@ class SkeletalTrapezoidationGraph: public HalfEdgeGraph<SkeletalTrapezoidationJo

/*!
* Insert a node into the graph and connect it to the input polygon using ribs
*
*
* \return the last edge which replaced [edge], which points to the same [to] node
*/
edge_t* insertNode(edge_t* edge, Point2LL mid, coord_t mide_node_bead_count);
Expand All @@ -101,5 +103,5 @@ class SkeletalTrapezoidationGraph: public HalfEdgeGraph<SkeletalTrapezoidationJo
std::pair<Point2LL, Point2LL> getSource(const edge_t& edge);
};

}
#endif
} // namespace cura
#endif
4 changes: 2 additions & 2 deletions include/gcodeExport.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include "sliceDataStorage.h"
#include "timeEstimate.h"
#include "utils/AABB3D.h" //To track the used build volume for the Griffin header.
#include "utils/Point2LL.h"
#include "utils/NoCopy.h"
#include "utils/Point2LL.h"

namespace cura
{
Expand Down Expand Up @@ -128,7 +128,7 @@ class GCodeExport : public NoCopy
double extrusion_offset_factor_; //!< default 1

Point3LL current_position_; //!< The last build plate coordinates written to gcode (which might be different from actually written gcode coordinates when the extruder offset is
//!< encoded in the gcode)
//!< encoded in the gcode)
Velocity current_speed_; //!< The current speed (F values / 60) in mm/s
Acceleration current_print_acceleration_; //!< The current acceleration (in mm/s^2) used for print moves (and also for travel moves if the gcode flavor doesn't have separate
//!< travel acceleration)
Expand Down
8 changes: 4 additions & 4 deletions include/infill/LightningLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
#ifndef LIGHTNING_LAYER_H
#define LIGHTNING_LAYER_H

#include "../utils/SquareGrid.h"
#include "../utils/polygonUtils.h"
#include "infill/LightningTreeNode.h"

#include <list>
#include <memory>
#include <unordered_map>
#include <vector>

#include "../utils/SquareGrid.h"
#include "../utils/polygonUtils.h"
#include "infill/LightningTreeNode.h"

namespace cura
{
using LightningTreeNodeSPtr = std::shared_ptr<LightningTreeNode>;
Expand Down
14 changes: 9 additions & 5 deletions include/infill/NoZigZagConnectorProcessor.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//Copyright (c) 2018 Ultimaker B.V.
//CuraEngine is released under the terms of the AGPLv3 or higher.
// Copyright (c) 2018 Ultimaker B.V.
// CuraEngine is released under the terms of the AGPLv3 or higher.

#ifndef INFILL_NO_ZIGZAG_CONNECTOR_PROCESSOR_H
#define INFILL_NO_ZIGZAG_CONNECTOR_PROCESSOR_H
Expand All @@ -18,9 +18,13 @@ class NoZigZagConnectorProcessor : public ZigzagConnectorProcessor
{
public:
NoZigZagConnectorProcessor(const PointMatrix& rotation_matrix, Polygons& result)
: ZigzagConnectorProcessor(rotation_matrix, result,
false, false, // settings for zig-zag end pieces, no use here
false, 0) // settings for skipping some zags, no use here
: ZigzagConnectorProcessor(
rotation_matrix,
result,
false,
false, // settings for zig-zag end pieces, no use here
false,
0) // settings for skipping some zags, no use here
{
}

Expand Down
10 changes: 5 additions & 5 deletions include/pathPlanning/CombPath.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//Copyright (c) 2018 Ultimaker B.V.
//CuraEngine is released under the terms of the AGPLv3 or higher.
// Copyright (c) 2018 Ultimaker B.V.
// CuraEngine is released under the terms of the AGPLv3 or higher.

#ifndef PATH_PLANNING_COMB_PATH_H
#define PATH_PLANNING_COMB_PATH_H
Expand All @@ -9,12 +9,12 @@
namespace cura
{

class CombPath : public std::vector<Point2LL> //!< A single path either inside or outise the parts
class CombPath : public std::vector<Point2LL> //!< A single path either inside or outise the parts
{
public:
bool cross_boundary = false; //!< Whether the path crosses a boundary.
};

}//namespace cura
} // namespace cura

#endif//PATH_PLANNING_COMB_PATH_H
#endif // PATH_PLANNING_COMB_PATH_H
4 changes: 2 additions & 2 deletions include/pathPlanning/LinePolygonsCrossings.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ class LinePolygonsCrossings

PointMatrix transformation_matrix_; //!< The transformation which rotates everything such that the scanline is aligned with the x-axis.
Point2LL transformed_start_point_; //!< The LinePolygonsCrossings::startPoint as transformed by Comb::transformation_matrix such that it has (roughly) the same Y as
//!< transformed_endPoint
//!< transformed_endPoint
Point2LL transformed_end_point_; //!< The LinePolygonsCrossings::endPoint as transformed by Comb::transformation_matrix such that it has (roughly) the same Y as
//!< transformed_startPoint
//!< transformed_startPoint


/*!
Expand Down
10 changes: 5 additions & 5 deletions include/plugins/slots.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
#ifndef PLUGINS_SLOTS_H
#define PLUGINS_SLOTS_H

#include <exception>
#include <memory>
#include <tuple>
#include <utility>

#include "WallToolPaths.h"
#include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h"
#include "cura/plugins/slots/gcode_paths/v0/modify.grpc.pb.h"
Expand All @@ -21,11 +26,6 @@
#include "utils/polygon.h"
#include "utils/types/char_range_literal.h"

#include <exception>
#include <memory>
#include <tuple>
#include <utility>

namespace cura
{
namespace plugins
Expand Down
12 changes: 6 additions & 6 deletions include/plugins/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
#ifndef PLUGINS_TYPES_H
#define PLUGINS_TYPES_H

#include "cura/plugins/v0/slot_id.pb.h"
#include "utils/Point2LL.h"
#include "utils/polygon.h"

#include <fmt/format.h>

#include <grpcpp/support/string_ref.h>
#include <memory>
#include <tuple>

#include <fmt/format.h>

#include "cura/plugins/v0/slot_id.pb.h"
#include "utils/Point2LL.h"
#include "utils/polygon.h"

namespace fmt
{
// Custom formatter for humanreadable slot_id's
Expand Down
2 changes: 1 addition & 1 deletion include/sliceDataStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#include "settings/types/LayerIndex.h"
#include "utils/AABB.h"
#include "utils/AABB3D.h"
#include "utils/Point2LL.h"
#include "utils/NoCopy.h"
#include "utils/Point2LL.h"
#include "utils/polygon.h"

// libArachne
Expand Down
13 changes: 7 additions & 6 deletions include/utils/MinimumSpanningTree.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//Copyright (c) 2018 Ultimaker B.V.
//CuraEngine is released under the terms of the AGPLv3 or higher.
// Copyright (c) 2018 Ultimaker B.V.
// CuraEngine is released under the terms of the AGPLv3 or higher.

#ifndef MINIMUMSPANNINGTREE_H
#define MINIMUMSPANNINGTREE_H

#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <vector>

#include "Point2LL.h"

Expand All @@ -26,7 +26,8 @@ class MinimumSpanningTree
* While edges are meant to be undirected, these do have a start and end
* point.
*/
struct Edge {
struct Edge
{
/**
* The point at which this edge starts.
*/
Expand All @@ -37,6 +38,7 @@ class MinimumSpanningTree
*/
const Point2LL end;
};

public:
MinimumSpanningTree() = default;
/*!
Expand Down Expand Up @@ -76,7 +78,6 @@ class MinimumSpanningTree
AdjacencyGraph_t prim(std::vector<Point2LL> vertices) const;
};

}
} // namespace cura

#endif /* MINIMUMSPANNINGTREE_H */

8 changes: 4 additions & 4 deletions include/utils/PolygonsSegmentIndex.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//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 UTILS_POLYGONS_SEGMENT_INDEX_H
#define UTILS_POLYGONS_SEGMENT_INDEX_H
Expand All @@ -8,7 +8,7 @@

#include "PolygonsPointIndex.h"

namespace cura
namespace cura
{

/*!
Expand All @@ -29,4 +29,4 @@ class PolygonsSegmentIndex : public PolygonsPointIndex
} // namespace cura


#endif//UTILS_POLYGONS_SEGMENT_INDEX_H
#endif // UTILS_POLYGONS_SEGMENT_INDEX_H
2 changes: 1 addition & 1 deletion include/utils/SVG.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#include "AABB.h"
#include "ExtrusionLine.h" //To accept variable-width paths.
#include "Point2LL.h"
#include "NoCopy.h"
#include "Point2LL.h"

namespace cura
{
Expand Down
Loading

0 comments on commit 1c37545

Please sign in to comment.