Skip to content

Commit

Permalink
Add numbers library
Browse files Browse the repository at this point in the history
Updated the copyright year to 2024 across all files and included the 'numbers' library for use in various files. Also, made certain changes such as replacing 'stdio.h' with 'cstdio' and 'assert.h' with 'cassert' for better compatibility.

Contribute to CURA-9830
  • Loading branch information
jellespijker committed May 2, 2024
1 parent b05d0fd commit 76d32b8
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 14 deletions.
1 change: 1 addition & 0 deletions src/FffGcodeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <limits> // numeric_limits
#include <list>
#include <memory>
#include <numbers>
#include <numeric>
#include <optional>
#include <unordered_set>
Expand Down
2 changes: 2 additions & 0 deletions src/Mold.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include "sliceDataStorage.h"
#include "slicer.h"

#include <numbers>

namespace cura
{

Expand Down
1 change: 1 addition & 0 deletions src/PrimeTower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <algorithm>
#include <limits>
#include <numbers>

#include <spdlog/spdlog.h>

Expand Down
1 change: 1 addition & 0 deletions src/SkeletalTrapezoidation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <sstream>
#include <stack>
#include <unordered_set>
#include <numbers>

#include <scripta/logger.h>
#include <spdlog/spdlog.h>
Expand Down
1 change: 1 addition & 0 deletions src/TreeSupportTipGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <fstream>
#include <stdio.h>
#include <string>
#include <numbers>

#include <range/v3/view/drop_last.hpp>
#include <range/v3/view/enumerate.hpp>
Expand Down
7 changes: 4 additions & 3 deletions src/gcodeExport.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// Copyright (c) 2023 UltiMaker
// Copyright (c) 2024 UltiMaker
// CuraEngine is released under the terms of the AGPLv3 or higher

#include "gcodeExport.h"

#include <assert.h>
#include <cassert>
#include <cmath>
#include <cstdarg>
#include <iomanip>
#include <stdarg.h>
#include <numbers>

#include <spdlog/spdlog.h>

Expand Down
1 change: 1 addition & 0 deletions src/infill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <algorithm> //For std::sort.
#include <functional>
#include <numbers>
#include <unordered_set>

#include <scripta/logger.h>
Expand Down
4 changes: 3 additions & 1 deletion src/infill/GyroidInfill.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// Copyright (c) 2022 Ultimaker B.V.
// Copyright (c) 2024 UltiMaker
// CuraEngine is released under the terms of the AGPLv3 or higher.

#include "infill/GyroidInfill.h"

#include <numbers>

#include "geometry/OpenPolyline.h"
#include "geometry/Polygon.h"
#include "geometry/Shape.h"
Expand Down
2 changes: 2 additions & 0 deletions src/mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#include "mesh.h"

#include <numbers>

#include <spdlog/spdlog.h>

#include "utils/Point3D.h"
Expand Down
3 changes: 2 additions & 1 deletion src/settings/AdaptiveLayerHeights.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Copyright (c) 2022 Ultimaker B.V.
// Copyright (c) 2024 UltiMaker
// CuraEngine is released under the terms of the AGPLv3 or higher

#include "settings/AdaptiveLayerHeights.h"

#include <algorithm>
#include <cmath>
#include <limits>
#include <numbers>

#include "Application.h"
#include "Slice.h"
Expand Down
5 changes: 3 additions & 2 deletions src/settings/Settings.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
// Copyright (c) 2023 UltiMaker
// Copyright (c) 2024 UltiMaker
// CuraEngine is released under the terms of the AGPLv3 or higher

#include "settings/Settings.h"

#include <cctype>
#include <cstdio>
#include <fstream>
#include <numbers>
#include <regex> // regex parsing for temp flow graph
#include <sstream> // ostringstream
#include <stdio.h>
#include <string> //Parsing strings (stod, stoul).

#include <range/v3/range/conversion.hpp>
Expand Down
5 changes: 3 additions & 2 deletions src/sliceDataStorage.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// Copyright (c) 2023 UltiMaker
// Copyright (c) 2024 UltiMaker
// CuraEngine is released under the terms of the AGPLv3 or higher

#include "sliceDataStorage.h"

#include <numbers>

#include <spdlog/spdlog.h>

#include "Application.h" //To get settings.
Expand All @@ -17,7 +19,6 @@
#include "raft.h"
#include "utils/math.h" //For PI.


namespace cura
{

Expand Down
4 changes: 2 additions & 2 deletions src/slicer.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright (c) 2023 UltiMaker
// Copyright (c) 2024 UltiMaker
// CuraEngine is released under the terms of the AGPLv3 or higher

#include "slicer.h"

#include <algorithm> // remove_if
#include <numbers>
#include <stdio.h>
#include <cstdio>

#include <scripta/logger.h>
#include <spdlog/spdlog.h>
Expand Down
4 changes: 3 additions & 1 deletion src/utils/ExtrusionSegment.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// Copyright (c) 2022 Ultimaker B.V.
// Copyright (c) 2024 UltiMaker
// CuraEngine is released under the terms of the AGPLv3 or higher

#include "utils/ExtrusionSegment.h"

#include <numbers>

#include <spdlog/spdlog.h>

#include "utils/macros.h"
Expand Down
3 changes: 2 additions & 1 deletion tests/PathOrderMonotonicTest.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// Copyright (c) 2023 UltiMaker
// Copyright (c) 2024 UltiMaker
// CuraEngine is released under the terms of the AGPLv3 or higher

#include "PathOrderMonotonic.h"

#include <filesystem>
#include <numbers>
#include <polyclipping/clipper.hpp>
#include <string>

Expand Down
3 changes: 2 additions & 1 deletion tests/arcus/ArcusCommunicationTest.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Copyright (c) 2022 Ultimaker B.V.
// Copyright (c) 2024 UltiMaker
// CuraEngine is released under the terms of the AGPLv3 or higher.

#include <google/protobuf/message.h>
#include <memory>
#include <numbers>

#include <gtest/gtest.h>

Expand Down

0 comments on commit 76d32b8

Please sign in to comment.