Add the includes clang-tidy's include cleaner asks for on the belt files

The clang-tidy job on #14394 fails on 129 misc-include-cleaner findings:
the belt sources and tests use std::, Eigen, Point/PrintConfig and
BeltBrim symbols without including the header that provides them, which
only compiled because the precompiled header supplied it. Every include
the job names is added, in each file's existing include style ("../" in
the GCode/ and Support/ subdirectories, quoted libslic3r/ paths in the
GUI and tests). No code changes.

Verified with scripts/clang_tidy_diff.py -p build-tidy --base eb5b9a77b9
(SLIC3R_PCH=OFF compile database, clang-tidy 22.1.8): no findings left.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6Kg5igmmMU2YLoK6HrsWV
This commit is contained in:
harrierpigeon
2026-10-05 20:43:18 -05:00
co-authored by Claude Fable 5.1
parent bfd3c32ef7
commit 9dbd0307f8
41 changed files with 123 additions and 0 deletions
+14
View File
@@ -8,8 +8,22 @@
#include "Print.hpp"
#include "ShortestPath.hpp"
#include "Support/BeltFloorContext.hpp"
#include "BoundingBox.hpp"
#include "ExPolygon.hpp"
#include "ExtrusionEntity.hpp"
#include "ExtrusionEntityCollection.hpp"
#include "Point.hpp"
#include "Polyline.hpp"
#include "PrintConfig.hpp"
#include "libslic3r.h"
#include <algorithm>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <utility>
#include <vector>
namespace Slic3r {
+1
View File
@@ -5,6 +5,7 @@
#include "ExtrusionEntityCollection.hpp"
#include "Point.hpp"
#include "Polyline.hpp"
#include "libslic3r.h"
#include <cmath>
#include <vector>
+4
View File
@@ -3,6 +3,10 @@
#include "GCode/BeltKinematics.hpp"
#include "BeltTransform.hpp"
#include "Print.hpp"
#include "Point.hpp"
#include "PrintConfig.hpp"
#include "libslic3r.h"
#include <cstdlib>
namespace Slic3r {
+2
View File
@@ -1,6 +1,8 @@
#pragma once
#include "GCode.hpp"
#include "Point.hpp"
#include "Print.hpp"
namespace Slic3r {
+7
View File
@@ -27,12 +27,19 @@
#include "format.hpp"
#include "LocalesUtils.hpp"
#include "libslic3r.h"
#include "BeltBrim.hpp"
#include "PrintBase.hpp"
#include <algorithm>
#include <cmath>
#include <limits>
#include <boost/log/trivial.hpp>
#include <cassert>
#include <cstddef>
#include <functional>
#include <utility>
#include <vector>
namespace Slic3r {
+4
View File
@@ -1,7 +1,11 @@
#include "BeltSliceStrategy.hpp"
#include "Model.hpp"
#include "BeltTransform.hpp"
#include "Point.hpp"
#include "PrintConfig.hpp"
#include <limits>
#include <algorithm>
namespace Slic3r {
+9
View File
@@ -1,7 +1,16 @@
#include "BeltTransform.hpp"
#include "Model.hpp"
#include "BoundingBox.hpp"
#include "Config.hpp"
#include "Geometry.hpp"
#include "Point.hpp"
#include "PrintConfig.hpp"
#include "libslic3r.h"
#include <limits>
#include <algorithm>
#include <cmath>
#include <cstdlib>
namespace Slic3r {
+1
View File
@@ -5,6 +5,7 @@
#include "BoundingBox.hpp"
#include "PrintConfig.hpp"
#include "Geometry.hpp"
#include "Config.hpp"
#include <cmath>
+4
View File
@@ -1,5 +1,9 @@
#include "FirstLayerPlane.hpp"
#include "BeltTransform.hpp"
#include "BoundingBox.hpp"
#include "Point.hpp"
#include "PrintConfig.hpp"
#include "libslic3r.h"
#include <algorithm>
#include <climits>
+1
View File
@@ -106,6 +106,7 @@
#include <vector>
#include "calib.hpp"
#include "libslic3r_version.h"
#include "GCode/BeltKinematics.hpp"
// Intel redesigned some TBB interface considerably when merging TBB with their oneAPI set of libraries, see GH #7332.
// We are using quite an old TBB 2017 U7. Before we update our build servers, let's use the old API, which is deprecated in up to date TBB.
#if ! defined(TBB_VERSION_MAJOR)
+2
View File
@@ -48,8 +48,10 @@
#include <cfloat>
#include <vector>
#include <utility>
#include <cmath>
#include "BoundingBox.hpp"
#include "Polyline.hpp"
#include "BeltBrim.hpp"
namespace Slic3r { class ExtrusionEntityCollection; }
@@ -1,5 +1,7 @@
#include "BeltBackTransform.hpp"
#include "../BeltTransform.hpp"
#include "../Point.hpp"
#include "../PrintConfig.hpp"
namespace Slic3r {
+2
View File
@@ -2,6 +2,8 @@
#include "../BeltTransform.hpp"
#include "../PrintConfig.hpp"
#include "../GCodeWriter.hpp"
#include "../Point.hpp"
#include <memory>
namespace Slic3r {
+1
View File
@@ -4,6 +4,7 @@
#include "MachineKinematics.hpp"
#include "BeltBackTransform.hpp"
#include "MachineFrameTransform.hpp"
#include "../Point.hpp"
namespace Slic3r {
@@ -1,5 +1,8 @@
#include "MachineFrameTransform.hpp"
#include "../Geometry.hpp"
#include "../Point.hpp"
#include "../PrintConfig.hpp"
#include "../libslic3r.h"
#include <cmath>
@@ -1,4 +1,5 @@
#include "MachineKinematics.hpp"
#include "../Point.hpp"
namespace Slic3r {
+1
View File
@@ -18,6 +18,7 @@
#include "Utils.hpp"
#include "format.hpp"
#include "I18N.hpp"
#include "../BeltBrim.hpp"
#include <boost/log/trivial.hpp>
#include <vector>
+1
View File
@@ -33,6 +33,7 @@
#include <sstream>
#include <stdexcept>
#include <math.h>
#include <memory>
#ifdef __APPLE__
#include <boost/spirit/include/karma.hpp>
+1
View File
@@ -106,6 +106,7 @@
#include "Format/STEP.hpp"
#include "PlaceholderParser.hpp"
#include "SurfaceCollection.hpp"
#include "BeltBrim.hpp"
namespace fs = boost::filesystem;
+1
View File
@@ -83,6 +83,7 @@
#include "Fill/Lightning/Generator.hpp"
#include "SurfaceCollection.hpp"
#include "TriangleMesh.hpp"
#include "BeltBrim.hpp"
namespace Slic3r { enum class EnforcerBlockerType : int8_t; }
@@ -1,7 +1,15 @@
#include "BeltFloorContext.hpp"
#include "../Point.hpp"
#include "../Polygon.hpp"
#include "../PrintConfig.hpp"
#include "../Slicing.hpp"
#include "../libslic3r.h"
#include <cmath>
#include <limits>
#include <cstddef>
#include <functional>
#include <vector>
namespace Slic3r {
@@ -5,6 +5,9 @@
#include "../Polygon.hpp"
#include "../Slicing.hpp"
#include "../PrintConfig.hpp"
#include <cstddef>
#include <functional>
#include <vector>
namespace Slic3r {
+2
View File
@@ -7,6 +7,8 @@
#include "libslic3r/ExtrusionEntity.hpp"
#include "SupportLayer.hpp"
#include "SupportParameters.hpp"
#include "../Point.hpp"
#include "../libslic3r.h"
#include <utility>
#include <algorithm>
#include <vector>
@@ -20,6 +20,7 @@
#include "../Utils.hpp"
#include "../format.hpp"
#include "libslic3r/libslic3r.h"
#include "../PrintConfig.hpp"
#include <cstddef>
#include <algorithm>
+2
View File
@@ -19,6 +19,8 @@
#include <iomanip>
#include <vector>
#include <cstddef>
#include <memory>
#include <utility>
#include "clonable_ptr.hpp"
namespace Slic3r {
+1
View File
@@ -6,6 +6,7 @@
#include <string>
#include <vector>
#include <utility>
#include <memory>
#define calib_pressure_advance_dd
#include "GCodeWriter.hpp"
+2
View File
@@ -39,6 +39,8 @@
#if BOOST_VERSION >= 107800
#include <boost/timer/timer.hpp>
#include <algorithm>
#include <cmath>
#else
#include <boost/timer.hpp>
#endif
+7
View File
@@ -13,6 +13,9 @@
#include "libslic3r/TriangleMesh.hpp"
#include "libslic3r/Geometry.hpp"
#include "libslic3r/BoundingBox.hpp"
#include "libslic3r/Config.hpp"
#include "libslic3r/Point.hpp"
#include "libslic3r/libslic3r.h"
#include <algorithm>
#include <cmath>
@@ -21,6 +24,10 @@
#include <vector>
#include <boost/log/trivial.hpp>
#include <cstddef>
#include <math.h>
#include <string>
#include <utility>
namespace Slic3r {
namespace GUI {
+1
View File
@@ -17,6 +17,7 @@
#include "slic3r/GUI/GUI.hpp"
#include "libslic3r/libslic3r.h"
#include "slic3r/GUI/Field.hpp"
#include "libslic3r/BeltBrim.hpp"
#include <cstdlib>
#include <set>
#include <map>
+1
View File
@@ -89,6 +89,7 @@
#include <algorithm>
#include <cmath>
#include <chrono>
#include <Eigen/Geometry>
#include "libslic3r/AppConfig.hpp"
#include "libslic3r/BoundingBox.hpp"
#include "libslic3r/CutUtils.hpp"
+1
View File
@@ -121,6 +121,7 @@
// This is the only place where we want to allow that, so define an override macro.
#define SLIC3R_ALLOW_LIBSLIC3R_I18N_IN_SLIC3R
#include "libslic3r/I18N.hpp"
#include "libslic3r/Point.hpp"
#undef SLIC3R_ALLOW_LIBSLIC3R_I18N_IN_SLIC3R
#include "slic3r/GUI/I18N.hpp"
+1
View File
@@ -30,6 +30,7 @@
#include "slic3r/GUI/Jobs/UpgradeNetworkJob.hpp"
#include "slic3r/GUI/HttpServer.hpp"
#include "../Utils/PrintHost.hpp"
#include "libslic3r/Point.hpp"
#include <vector>
#include <utility>
+3
View File
@@ -38,7 +38,10 @@
#include "libslic3r/LifecycleEvents.hpp"
#include <optional>
#include "libslic3r/Geometry.hpp"
#include "libslic3r/BoundingBox.hpp"
#include "libslic3r/Config.hpp"
#include <cmath>
#include <string>
#define SAVE_ARRANGE_POLY 0
+1
View File
@@ -267,6 +267,7 @@
#include <libslic3r/CutUtils.hpp>
#include <wx/glcanvas.h> // Needs to be last because reasons :-/
#include <libslic3r/miniz_extension.hpp>
#include <math.h>
#include "WipeTowerDialog.hpp"
#include "MixedFilamentDialog.hpp"
#include "TextureImportDialog.hpp"
+1
View File
@@ -17,6 +17,7 @@
#include <wx/checklst.h>
#include <wx/event.h>
#include <wx/radiobox.h>
#include <wx/sizer.h>
#include "libslic3r/calib.hpp"
namespace Slic3r { namespace GUI {
+3
View File
@@ -8,6 +8,9 @@
#include <fstream>
#include <string>
#include <catch2/catch_test_macros.hpp>
#include <catch2/matchers/catch_matchers.hpp>
#include <catch2/matchers/catch_matchers_floating_point.hpp>
using namespace Slic3r;
using Catch::Matchers::WithinAbs;
+1
View File
@@ -8,6 +8,7 @@
#include "libslic3r/Point.hpp"
#include "libslic3r/Config.hpp"
#include "libslic3r/Extruder.hpp"
#include "libslic3r/Geometry.hpp"
#include "libslic3r/libslic3r.h"
#include <map>
#include <memory>
+2
View File
@@ -23,9 +23,11 @@
#include "libslic3r/GCode/SeamPlacer.hpp"
#include "libslic3r/GCodeReader.hpp"
#include "libslic3r/TriangleMesh.hpp"
#include "libslic3r/ExPolygon.hpp"
#include <cstddef>
#include <string>
#include <string_view>
#include <cstdlib>
using namespace Slic3r;
+7
View File
@@ -30,6 +30,9 @@
#include <map>
#include <set>
#include <sstream>
#include <boost/algorithm/string/predicate.hpp>
#include <initializer_list>
#include <utility>
#include "test_helpers.hpp" // get access to init_print, etc
#include "libslic3r/BoundingBox.hpp"
@@ -38,6 +41,10 @@
#include "libslic3r/ExtrusionEntityCollection.hpp"
#include "libslic3r/ObjectID.hpp"
#include "libslic3r/Print.hpp"
#include "libslic3r/BeltBrim.hpp"
#include "libslic3r/Config.hpp"
#include "libslic3r/ExtrusionEntity.hpp"
#include "libslic3r/TriangleMesh.hpp"
using namespace Slic3r::Test;
using namespace Slic3r;
+1
View File
@@ -14,6 +14,7 @@
#include <catch2/catch_test_macros.hpp>
#include <catch2/matchers/catch_matchers.hpp>
#include <catch2/generators/catch_generators.hpp>
#include <catch2/catch_message.hpp>
#include "libslic3r/Arrange.hpp"
#include "libslic3r/BoundingBox.hpp"
#include "libslic3r/ClipperUtils.hpp"
+12
View File
@@ -1,9 +1,21 @@
#include <catch2/catch_all.hpp>
#include <algorithm>
#include <catch2/catch_test_macros.hpp>
#include <catch2/generators/catch_generators.hpp>
#include <catch2/matchers/catch_matchers.hpp>
#include <catch2/matchers/catch_matchers_floating_point.hpp>
#include <cmath>
#include <cstddef>
#include <cstdlib>
#include <utility>
#include <vector>
#include "libslic3r/BeltBrim.hpp"
#include "libslic3r/BoundingBox.hpp"
#include "libslic3r/ClipperUtils.hpp"
#include "libslic3r/ExPolygon.hpp"
#include "libslic3r/Polygon.hpp"
#include "libslic3r/libslic3r.h"
using namespace Slic3r;