Prepare fe for include optimization.

- Add pragmas to keep necessary headers with symbols not explicitly
stated in the file.
- Use include paths that IWYU understands.
This commit is contained in:
Martin Šach 2024-05-27 14:35:24 +02:00 committed by Lukas Matena
parent 21116995d7
commit 96e3e77fef
64 changed files with 191 additions and 133 deletions

View File

@ -11,7 +11,7 @@
#include "../../BoundingBox.hpp" #include "../../BoundingBox.hpp"
#include "../../ExtrusionEntity.hpp" #include "../../ExtrusionEntity.hpp"
#include "../../Flow.hpp" #include "../../Flow.hpp"
#include "../../../clipper/clipper_z.hpp" #include <clipper/clipper_z.hpp>
namespace Slic3r { namespace Slic3r {
struct ThickPolyline; struct ThickPolyline;

View File

@ -6,10 +6,10 @@
#include "libslic3r/Arrange/Core/NFP/NFPConcave_Tesselate.hpp" #include "libslic3r/Arrange/Core/NFP/NFPConcave_Tesselate.hpp"
#include "libslic3r/Arrange/ArrangeImpl.hpp" #include "libslic3r/Arrange/ArrangeImpl.hpp" // IWYU pragma: keep
#include "libslic3r/Arrange/Tasks/ArrangeTaskImpl.hpp" #include "libslic3r/Arrange/Tasks/ArrangeTaskImpl.hpp" // IWYU pragma: keep
#include "libslic3r/Arrange/Tasks/FillBedTaskImpl.hpp" #include "libslic3r/Arrange/Tasks/FillBedTaskImpl.hpp" // IWYU pragma: keep
#include "libslic3r/Arrange/Tasks/MultiplySelectionTaskImpl.hpp" #include "libslic3r/Arrange/Tasks/MultiplySelectionTaskImpl.hpp" // IWYU pragma: keep
#include "libslic3r/Geometry/ConvexHull.hpp" #include "libslic3r/Geometry/ConvexHull.hpp"

View File

@ -3,10 +3,10 @@
///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher ///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
///|/ ///|/
#include "SimpleArrangeItem.hpp" #include "SimpleArrangeItem.hpp"
#include "libslic3r/Arrange/ArrangeImpl.hpp" #include "libslic3r/Arrange/ArrangeImpl.hpp" // IWYU pragma: keep
#include "libslic3r/Arrange/Tasks/ArrangeTaskImpl.hpp" #include "libslic3r/Arrange/Tasks/ArrangeTaskImpl.hpp" // IWYU pragma: keep
#include "libslic3r/Arrange/Tasks/FillBedTaskImpl.hpp" #include "libslic3r/Arrange/Tasks/FillBedTaskImpl.hpp" // IWYU pragma: keep
#include "libslic3r/Arrange/Tasks/MultiplySelectionTaskImpl.hpp" #include "libslic3r/Arrange/Tasks/MultiplySelectionTaskImpl.hpp" // IWYU pragma: keep
namespace Slic3r { namespace arr2 { namespace Slic3r { namespace arr2 {

View File

@ -7,7 +7,7 @@
#include "libslic3r/Tesselate.hpp" #include "libslic3r/Tesselate.hpp"
#include "libslic3r/SLA/SupportTreeUtils.hpp" #include "libslic3r/SLA/SupportTreeUtils.hpp"
#include <igl/random_points_on_mesh.h> #include <igl/random_points_on_mesh.h> // IWYU pragma: keep
namespace Slic3r { namespace branchingtree { namespace Slic3r { namespace branchingtree {

View File

@ -5,7 +5,7 @@
#include "BuildVolume.hpp" #include "BuildVolume.hpp"
#include "ClipperUtils.hpp" #include "ClipperUtils.hpp"
#include "Geometry/ConvexHull.hpp" #include "Geometry/ConvexHull.hpp"
#include "GCode/GCodeProcessor.hpp" #include "libslic3r/GCode/GCodeProcessor.hpp"
#include "Point.hpp" #include "Point.hpp"
#include <boost/log/trivial.hpp> #include <boost/log/trivial.hpp>

View File

@ -19,7 +19,8 @@
#else /* SLIC3R_USE_CLIPPER2 */ #else /* SLIC3R_USE_CLIPPER2 */
#include "clipper.hpp" #include "libslic3r/clipper.hpp"
// import these wherever we're included // import these wherever we're included
using Slic3r::ClipperLib::jtMiter; using Slic3r::ClipperLib::jtMiter;
using Slic3r::ClipperLib::jtRound; using Slic3r::ClipperLib::jtRound;

View File

@ -1431,7 +1431,7 @@ t_config_option_keys DynamicConfig::equal(const DynamicConfig &other) const
} }
#include <cereal/types/polymorphic.hpp> #include <cereal/types/polymorphic.hpp> // IWYU pragma: keep
CEREAL_REGISTER_TYPE(Slic3r::ConfigOption) CEREAL_REGISTER_TYPE(Slic3r::ConfigOption)
CEREAL_REGISTER_TYPE(Slic3r::ConfigOptionSingle<double>) CEREAL_REGISTER_TYPE(Slic3r::ConfigOptionSingle<double>)
CEREAL_REGISTER_TYPE(Slic3r::ConfigOptionSingle<int>) CEREAL_REGISTER_TYPE(Slic3r::ConfigOptionSingle<int>)

View File

@ -5,7 +5,7 @@
#include "CustomGCode.hpp" #include "CustomGCode.hpp"
#include "Config.hpp" #include "Config.hpp"
#include "GCode.hpp" #include "GCode.hpp"
#include "GCode/GCodeWriter.hpp" #include "libslic3r/GCode/GCodeWriter.hpp"
namespace Slic3r { namespace Slic3r {

View File

@ -8,7 +8,7 @@
///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher ///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
///|/ ///|/
#include "Extruder.hpp" #include "Extruder.hpp"
#include "GCode/GCodeWriter.hpp" #include "libslic3r/GCode/GCodeWriter.hpp"
#include "PrintConfig.hpp" #include "PrintConfig.hpp"
namespace Slic3r { namespace Slic3r {

View File

@ -11,7 +11,7 @@
#include <sstream> #include <sstream>
#include <iostream> #include <iostream>
#include <fstream> #include <fstream> // IWYU pragma: keep
#include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/replace.hpp>
#include <boost/log/trivial.hpp> #include <boost/log/trivial.hpp>

View File

@ -5,7 +5,7 @@
#include <boost/log/trivial.hpp> #include <boost/log/trivial.hpp>
#include <boost/filesystem/path.hpp> #include <boost/filesystem/path.hpp>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <fast_float/fast_float.h> #include <fast_float.h>
#include "libslic3r/Exception.hpp" #include "libslic3r/Exception.hpp"
#include "libslic3r/Model.hpp" #include "libslic3r/Model.hpp"

View File

@ -16,7 +16,7 @@
#include "libslic3r/MTUtils.hpp" #include "libslic3r/MTUtils.hpp"
#include "libslic3r/PrintConfig.hpp" #include "libslic3r/PrintConfig.hpp"
#include "libslic3r/miniz_extension.hpp" #include "libslic3r/miniz_extension.hpp" // IWYU pragma: keep
#include <LocalesUtils.hpp> #include <LocalesUtils.hpp>
#include "libslic3r/GCode/ThumbnailData.hpp" #include "libslic3r/GCode/ThumbnailData.hpp"
#include "libslic3r/Utils/JsonUtils.hpp" #include "libslic3r/Utils/JsonUtils.hpp"

View File

@ -23,18 +23,18 @@
#include "Config.hpp" #include "Config.hpp"
#include "Geometry/Circle.hpp" #include "Geometry/Circle.hpp"
#include "libslic3r.h" #include "libslic3r.h"
#include "GCode/ExtrusionProcessor.hpp" #include "libslic3r/GCode/ExtrusionProcessor.hpp"
#include "I18N.hpp" #include "I18N.hpp"
#include "GCode.hpp" #include "GCode.hpp"
#include "Exception.hpp" #include "Exception.hpp"
#include "ExtrusionEntity.hpp" #include "ExtrusionEntity.hpp"
#include "Geometry/ConvexHull.hpp" #include "Geometry/ConvexHull.hpp"
#include "GCode/LabelObjects.hpp" #include "libslic3r/GCode/LabelObjects.hpp"
#include "GCode/PrintExtents.hpp" #include "libslic3r/GCode/PrintExtents.hpp"
#include "GCode/Thumbnails.hpp" #include "libslic3r/GCode/Thumbnails.hpp"
#include "GCode/WipeTower.hpp" #include "libslic3r/GCode/WipeTower.hpp"
#include "GCode/WipeTowerIntegration.hpp" #include "libslic3r/GCode/WipeTowerIntegration.hpp"
#include "GCode/Travels.hpp" #include "libslic3r/GCode/Travels.hpp"
#include "Point.hpp" #include "Point.hpp"
#include "Polygon.hpp" #include "Polygon.hpp"
#include "PrintConfig.hpp" #include "PrintConfig.hpp"

View File

@ -15,7 +15,7 @@
#ifndef slic3r_GCode_hpp_ #ifndef slic3r_GCode_hpp_
#define slic3r_GCode_hpp_ #define slic3r_GCode_hpp_
#include "GCode/ExtrusionProcessor.hpp" #include "libslic3r/GCode/ExtrusionProcessor.hpp"
#include "JumpPointSearch.hpp" #include "JumpPointSearch.hpp"
#include "libslic3r.h" #include "libslic3r.h"
#include "ExPolygon.hpp" #include "ExPolygon.hpp"
@ -24,22 +24,22 @@
#include "PlaceholderParser.hpp" #include "PlaceholderParser.hpp"
#include "PrintConfig.hpp" #include "PrintConfig.hpp"
#include "Geometry/ArcWelder.hpp" #include "Geometry/ArcWelder.hpp"
#include "GCode/AvoidCrossingPerimeters.hpp" #include "libslic3r/GCode/AvoidCrossingPerimeters.hpp"
#include "GCode/CoolingBuffer.hpp" #include "libslic3r/GCode/CoolingBuffer.hpp"
#include "GCode/FindReplace.hpp" #include "libslic3r/GCode/FindReplace.hpp"
#include "GCode/GCodeWriter.hpp" #include "libslic3r/GCode/GCodeWriter.hpp"
#include "GCode/LabelObjects.hpp" #include "libslic3r/GCode/LabelObjects.hpp"
#include "GCode/PressureEqualizer.hpp" #include "libslic3r/GCode/PressureEqualizer.hpp"
#include "GCode/RetractWhenCrossingPerimeters.hpp" #include "libslic3r/GCode/RetractWhenCrossingPerimeters.hpp"
#include "GCode/SmoothPath.hpp" #include "libslic3r/GCode/SmoothPath.hpp"
#include "GCode/SpiralVase.hpp" #include "libslic3r/GCode/SpiralVase.hpp"
#include "GCode/ToolOrdering.hpp" #include "libslic3r/GCode/ToolOrdering.hpp"
#include "GCode/Wipe.hpp" #include "libslic3r/GCode/Wipe.hpp"
#include "GCode/WipeTowerIntegration.hpp" #include "libslic3r/GCode/WipeTowerIntegration.hpp"
#include "GCode/SeamPlacer.hpp" #include "libslic3r/GCode/SeamPlacer.hpp"
#include "GCode/GCodeProcessor.hpp" #include "libslic3r/GCode/GCodeProcessor.hpp"
#include "GCode/ThumbnailData.hpp" #include "libslic3r/GCode/ThumbnailData.hpp"
#include "GCode/Travels.hpp" #include "libslic3r/GCode/Travels.hpp"
#include "EdgeGrid.hpp" #include "EdgeGrid.hpp"
#include "tcbspan/span.hpp" #include "tcbspan/span.hpp"

View File

@ -3,7 +3,7 @@
///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher ///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
///|/ ///|/
#include "Thumbnails.hpp" #include "Thumbnails.hpp"
#include "../miniz_extension.hpp" #include "libslic3r/miniz_extension.hpp" // IWYU pragma: keep
#include "../format.hpp" #include "../format.hpp"
#include <qoi.h> #include <qoi.h>

View File

@ -9,7 +9,7 @@
#undef PI #undef PI
// Include igl first. It defines "L" macro which then clashes with our localization // Include igl first. It defines "L" macro which then clashes with our localization
#include <igl/copyleft/cgal/mesh_boolean.h> #include <igl/copyleft/cgal/mesh_boolean.h> // IWYU pragma: keep
#undef L #undef L
// CGAL headers // CGAL headers

View File

@ -19,7 +19,7 @@
#include <boost/multiprecision/integer.hpp> #include <boost/multiprecision/integer.hpp>
#endif #endif
#include <libnest2d/backends/libslic3r/geometries.hpp> #include <libnest2d/backends/libslic3r/geometries.hpp> // IWYU pragma: keep
#include <libnest2d/utils/rotcalipers.hpp> #include <libnest2d/utils/rotcalipers.hpp>
namespace Slic3r { namespace Slic3r {

View File

@ -42,7 +42,7 @@
#include "SVG.hpp" #include "SVG.hpp"
#include <Eigen/Dense> #include <Eigen/Dense>
#include "GCode/GCodeWriter.hpp" #include "libslic3r/GCode/GCodeWriter.hpp"
namespace Slic3r { namespace Slic3r {

View File

@ -44,7 +44,7 @@
#include "libslic3r.h" #include "libslic3r.h"
#include "Utils.hpp" #include "Utils.hpp"
#include "PlaceholderParser.hpp" #include "PlaceholderParser.hpp"
#include "GCode/Thumbnails.hpp" #include "libslic3r/GCode/Thumbnails.hpp"
#include "PresetBundle.hpp" #include "PresetBundle.hpp"

View File

@ -32,8 +32,8 @@
#include "ShortestPath.hpp" #include "ShortestPath.hpp"
#include "Thread.hpp" #include "Thread.hpp"
#include "GCode.hpp" #include "GCode.hpp"
#include "GCode/WipeTower.hpp" #include "libslic3r/GCode/WipeTower.hpp"
#include "GCode/ConflictChecker.hpp" #include "libslic3r/GCode/ConflictChecker.hpp"
#include "Utils.hpp" #include "Utils.hpp"
#include "BuildVolume.hpp" #include "BuildVolume.hpp"
#include "format.hpp" #include "format.hpp"

View File

@ -21,8 +21,8 @@
#ifndef slic3r_Print_hpp_ #ifndef slic3r_Print_hpp_
#define slic3r_Print_hpp_ #define slic3r_Print_hpp_
#include "Fill/FillAdaptive.hpp" #include "libslic3r/Fill/FillAdaptive.hpp"
#include "Fill/FillLightning.hpp" #include "libslic3r/Fill/FillLightning.hpp"
#include "PrintBase.hpp" #include "PrintBase.hpp"
#include "BoundingBox.hpp" #include "BoundingBox.hpp"
@ -32,10 +32,10 @@
#include "Slicing.hpp" #include "Slicing.hpp"
#include "SupportSpotsGenerator.hpp" #include "SupportSpotsGenerator.hpp"
#include "TriangleMeshSlicer.hpp" #include "TriangleMeshSlicer.hpp"
#include "GCode/ToolOrdering.hpp" #include "libslic3r/GCode/ToolOrdering.hpp"
#include "GCode/WipeTower.hpp" #include "libslic3r/GCode/WipeTower.hpp"
#include "GCode/ThumbnailData.hpp" #include "libslic3r/GCode/ThumbnailData.hpp"
#include "GCode/GCodeProcessor.hpp" #include "libslic3r/GCode/GCodeProcessor.hpp"
#include "MultiMaterialSegmentation.hpp" #include "MultiMaterialSegmentation.hpp"
#include "libslic3r.h" #include "libslic3r.h"

View File

@ -25,7 +25,7 @@
#include "format.hpp" #include "format.hpp"
#include "SLA/SupportTree.hpp" #include "SLA/SupportTree.hpp"
#include "GCode/Thumbnails.hpp" #include "libslic3r/GCode/Thumbnails.hpp"
#include <set> #include <set>
#include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/replace.hpp>
@ -6114,6 +6114,6 @@ bool is_XL_printer(const PrintConfig &cfg)
} // namespace Slic3r } // namespace Slic3r
#include <cereal/types/polymorphic.hpp> #include <cereal/types/polymorphic.hpp> // IWYU pragma: keep
CEREAL_REGISTER_TYPE(Slic3r::DynamicPrintConfig) CEREAL_REGISTER_TYPE(Slic3r::DynamicPrintConfig)
CEREAL_REGISTER_POLYMORPHIC_RELATION(Slic3r::DynamicConfig, Slic3r::DynamicPrintConfig) CEREAL_REGISTER_POLYMORPHIC_RELATION(Slic3r::DynamicConfig, Slic3r::DynamicPrintConfig)

View File

@ -12,7 +12,7 @@
#include "ExPolygon.hpp" #include "ExPolygon.hpp"
#include "Exception.hpp" #include "Exception.hpp"
#include "Flow.hpp" #include "Flow.hpp"
#include "GCode/ExtrusionProcessor.hpp" #include "libslic3r/GCode/ExtrusionProcessor.hpp"
#include "KDTreeIndirect.hpp" #include "KDTreeIndirect.hpp"
#include "Line.hpp" #include "Line.hpp"
#include "Point.hpp" #include "Point.hpp"
@ -36,8 +36,8 @@
#include "Tesselate.hpp" #include "Tesselate.hpp"
#include "TriangleMeshSlicer.hpp" #include "TriangleMeshSlicer.hpp"
#include "Utils.hpp" #include "Utils.hpp"
#include "Fill/FillAdaptive.hpp" #include "libslic3r/Fill/FillAdaptive.hpp"
#include "Fill/FillLightning.hpp" #include "libslic3r/Fill/FillLightning.hpp"
#include "Format/STL.hpp" #include "Format/STL.hpp"
#include "Support/SupportMaterial.hpp" #include "Support/SupportMaterial.hpp"
#include "SupportSpotsGenerator.hpp" #include "SupportSpotsGenerator.hpp"

View File

@ -6,7 +6,7 @@
#include "boost/geometry/index/rtree.hpp" #include "boost/geometry/index/rtree.hpp"
#include <libslic3r/SLA/SpatIndex.hpp> #include <libslic3r/SLA/SpatIndex.hpp>
#include <libslic3r/BoostAdapter.hpp> #include <libslic3r/BoostAdapter.hpp> // IWYU pragma: keep
namespace Slic3r { namespace sla { namespace Slic3r { namespace sla {

View File

@ -5,7 +5,7 @@
#include "SpatIndex.hpp" #include "SpatIndex.hpp"
// for concave hull merging decisions // for concave hull merging decisions
#include <libslic3r/BoostAdapter.hpp> #include <libslic3r/BoostAdapter.hpp> // IWYU pragma: keep
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(push) #pragma warning(push)

View File

@ -15,7 +15,6 @@
#include "libslic3r/Tesselate.hpp" #include "libslic3r/Tesselate.hpp"
#include "libslic3r/MinAreaBoundingBox.hpp" #include "libslic3r/MinAreaBoundingBox.hpp"
#include "libslic3r/libslic3r.h" #include "libslic3r/libslic3r.h"
#include <iostream> #include <iostream>
#include <random> #include <random>

View File

@ -1,6 +1,6 @@
#include "ZCorrection.hpp" #include "ZCorrection.hpp"
#include "Execution/ExecutionTBB.hpp" #include "libslic3r/Execution/ExecutionTBB.hpp"
#include "libslic3r/ClipperUtils.hpp" #include "libslic3r/ClipperUtils.hpp"

View File

@ -4,7 +4,7 @@
///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher ///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
///|/ ///|/
#include "SLAPrint.hpp" #include "SLAPrint.hpp"
#include "SLAPrintSteps.hpp" #include "SLAPrintSteps.hpp" // IWYU pragma: keep
#include "CSGMesh/CSGMeshCopy.hpp" #include "CSGMesh/CSGMeshCopy.hpp"
#include "CSGMesh/PerformCSGMeshBooleans.hpp" #include "CSGMesh/PerformCSGMeshBooleans.hpp"
#include "format.hpp" #include "format.hpp"

View File

@ -6,22 +6,48 @@
#ifndef slic3r_SLAPrint_hpp_ #ifndef slic3r_SLAPrint_hpp_
#define slic3r_SLAPrint_hpp_ #define slic3r_SLAPrint_hpp_
#include <boost/functional/hash.hpp>
#include <stdlib.h>
#include <cstdint> #include <cstdint>
#include <mutex> #include <mutex>
#include <set> #include <set>
#include <Eigen/Geometry>
#include <algorithm>
#include <array>
#include <cmath>
#include <functional>
#include <iterator>
#include <limits>
#include <memory>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
#include "PrintBase.hpp" #include "PrintBase.hpp"
#include "SLA/SupportTree.hpp" #include "SLA/SupportTree.hpp"
#include "Point.hpp" #include "Point.hpp"
#include "Format/SLAArchiveWriter.hpp" #include "Format/SLAArchiveWriter.hpp"
#include "GCode/ThumbnailData.hpp" #include "libslic3r/GCode/ThumbnailData.hpp"
#include "libslic3r/CSGMesh/CSGMesh.hpp" #include "libslic3r/CSGMesh/CSGMesh.hpp"
#include "libslic3r/MeshBoolean.hpp" #include "libslic3r/MeshBoolean.hpp"
#include "libslic3r/OpenVDBUtils.hpp" #include "libslic3r/OpenVDBUtils.hpp"
#include "admesh/stl.h"
#include <boost/functional/hash.hpp> #include "libslic3r/AnyPtr.hpp"
#include "libslic3r/Config.hpp"
#include "libslic3r/Model.hpp"
#include "libslic3r/ObjectID.hpp"
#include "libslic3r/PrintConfig.hpp"
#include "libslic3r/SLA/Hollowing.hpp"
#include "libslic3r/SLA/Pad.hpp"
#include "libslic3r/SLA/SupportPoint.hpp"
#include "libslic3r/TriangleMesh.hpp"
#include "libslic3r/libslic3r.h"
namespace Slic3r { namespace Slic3r {
namespace sla {
struct JobController;
} // namespace sla
enum SLAPrintStep : unsigned int { enum SLAPrintStep : unsigned int {
slapsMergeSlicesAndEval, slapsMergeSlicesAndEval,

View File

@ -11,7 +11,7 @@
#define slic3r_SVG_hpp_ #define slic3r_SVG_hpp_
#include "libslic3r.h" #include "libslic3r.h"
#include "clipper.hpp" #include "libslic3r/clipper.hpp"
#include "ExPolygon.hpp" #include "ExPolygon.hpp"
#include "Line.hpp" #include "Line.hpp"
#include "TriangleMesh.hpp" #include "TriangleMesh.hpp"

View File

@ -8,7 +8,7 @@
#undef assert #undef assert
#endif #endif
#include "clipper.hpp" #include "libslic3r/clipper.hpp"
#include "ShortestPath.hpp" #include "ShortestPath.hpp"
#include "KDTreeIndirect.hpp" #include "KDTreeIndirect.hpp"
#include "MutablePriorityQueue.hpp" #include "MutablePriorityQueue.hpp"

View File

@ -2,15 +2,15 @@
///|/ ///|/
///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher ///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
///|/ ///|/
#include "../ClipperUtils.hpp" #include "libslic3r/ClipperUtils.hpp"
#include "../ClipperZUtils.hpp" #include "libslic3r/ClipperZUtils.hpp" // IWYU pragma: keep
#include "../ExtrusionEntityCollection.hpp" #include "libslic3r/ExtrusionEntityCollection.hpp"
#include "../Layer.hpp" #include "libslic3r/Layer.hpp"
#include "../Print.hpp" #include "libslic3r/Print.hpp"
#include "../Fill/FillBase.hpp" #include "libslic3r/Fill/FillBase.hpp"
#include "../MutablePolygon.hpp" #include "libslic3r/MutablePolygon.hpp"
#include "../Geometry.hpp" #include "libslic3r/Geometry.hpp"
#include "../Point.hpp" #include "libslic3r/Point.hpp"
#include <cmath> #include <cmath>
#include <boost/container/static_vector.hpp> #include <boost/container/static_vector.hpp>

View File

@ -10,16 +10,16 @@
///|/ ///|/
///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher ///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
///|/ ///|/
#include "../ClipperUtils.hpp" #include "libslic3r/ClipperUtils.hpp"
#include "../ExtrusionEntityCollection.hpp" #include "libslic3r/ExtrusionEntityCollection.hpp"
#include "../Layer.hpp" #include "libslic3r/Layer.hpp"
#include "../Print.hpp" #include "libslic3r/Print.hpp"
#include "../Fill/FillBase.hpp" #include "libslic3r/Fill/FillBase.hpp"
#include "../Geometry.hpp" #include "libslic3r/Geometry.hpp"
#include "../Point.hpp" #include "libslic3r/Point.hpp"
#include "../MutablePolygon.hpp" #include "libslic3r/MutablePolygon.hpp"
#include "../Support/SupportCommon.hpp" #include "libslic3r/Support/SupportCommon.hpp"
#include "SupportMaterial.hpp" #include "SupportMaterial.hpp"
#include <clipper/clipper_z.hpp> #include <clipper/clipper_z.hpp>

View File

@ -9,7 +9,7 @@
#include "ExPolygon.hpp" #include "ExPolygon.hpp"
#include "ExtrusionEntity.hpp" #include "ExtrusionEntity.hpp"
#include "ExtrusionEntityCollection.hpp" #include "ExtrusionEntityCollection.hpp"
#include "GCode/ExtrusionProcessor.hpp" #include "libslic3r/GCode/ExtrusionProcessor.hpp"
#include "Line.hpp" #include "Line.hpp"
#include "Point.hpp" #include "Point.hpp"
#include "Polygon.hpp" #include "Polygon.hpp"

View File

@ -18,6 +18,9 @@
* or copy at http://opensource.org/licenses/MIT) * or copy at http://opensource.org/licenses/MIT)
*/ */
#ifndef libslic3r_clonable_ptr_hpp_
#define libslic3r_clonable_ptr_hpp_
#include "assert.h" #include "assert.h"
namespace Slic3r { namespace Slic3r {
@ -170,3 +173,5 @@ template<class T, class U> inline bool operator>(const clonable_ptr<T>& l, const
} }
} // namespace Slic3r } // namespace Slic3r
#endif // libslic3r_clonable_ptr_hpp_

View File

@ -10,6 +10,10 @@
#include "boost/nowide/cstdio.hpp" #include "boost/nowide/cstdio.hpp"
#endif #endif
#if defined(__linux__)
#include <features.h>
#endif
#include "libslic3r/I18N.hpp" #include "libslic3r/I18N.hpp"
namespace Slic3r { namespace Slic3r {

View File

@ -41,7 +41,7 @@
#include <boost/log/core.hpp> #include <boost/log/core.hpp>
#include <boost/log/trivial.hpp> #include <boost/log/trivial.hpp>
#include <boost/log/expressions.hpp> #include <boost/log/expressions.hpp> // IWYU pragma: keep
#include <boost/locale.hpp> #include <boost/locale.hpp>

View File

@ -18,7 +18,7 @@
#include "MainFrame.hpp" #include "MainFrame.hpp"
#include "format.hpp" #include "format.hpp"
#include <wx/clipbrd.h> #include <wx/clipbrd.h> // IWYU pragma: keep
namespace Slic3r { namespace Slic3r {
namespace GUI { namespace GUI {

View File

@ -3,8 +3,8 @@
///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher ///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
///|/ ///|/
#include "CameraUtils.hpp" #include "CameraUtils.hpp"
#include <igl/project.h> // projecting points #include <igl/project.h> // IWYU pragma: keep
#include <igl/unproject.h> #include <igl/unproject.h> // IWYU pragma: keep
#include "slic3r/GUI/3DScene.hpp" // GLVolume #include "slic3r/GUI/3DScene.hpp" // GLVolume
#include "libslic3r/Geometry/ConvexHull.hpp" #include "libslic3r/Geometry/ConvexHull.hpp"

View File

@ -15,7 +15,7 @@
#include "libslic3r/Platform.hpp" #include "libslic3r/Platform.hpp"
#include "libslic3r/Config.hpp" #include "libslic3r/Config.hpp"
#include <boost/nowide/fstream.hpp> #include <boost/nowide/fstream.hpp> // IWYU pragma: keep
#include <boost/nowide/convert.hpp> #include <boost/nowide/convert.hpp>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/log/trivial.hpp> #include <boost/log/trivial.hpp>

View File

@ -14,7 +14,6 @@
#include <cmath> #include <cmath>
#include "ImGuiWrapper.hpp" #include "ImGuiWrapper.hpp"
#include "imgui/imgui_internal.h"
#ifndef IMGUI_DEFINE_MATH_OPERATORS #ifndef IMGUI_DEFINE_MATH_OPERATORS
#define IMGUI_DEFINE_MATH_OPERATORS #define IMGUI_DEFINE_MATH_OPERATORS

View File

@ -23,6 +23,7 @@
#include "libslic3r/PlaceholderParser.hpp" #include "libslic3r/PlaceholderParser.hpp"
#include "libslic3r/Preset.hpp" #include "libslic3r/Preset.hpp"
#include "libslic3r/PresetBundle.hpp" // IWYU pragma: keep
#include "libslic3r/Print.hpp" #include "libslic3r/Print.hpp"
namespace Slic3r { namespace Slic3r {

View File

@ -19,7 +19,8 @@
#include <regex> #include <regex>
#include <wx/numformatter.h> #include <wx/numformatter.h>
#include <wx/tooltip.h> #include <wx/bookctrl.h> // IWYU pragma: keep
#include <wx/tooltip.h> // IWYU pragma: keep
#include <wx/notebook.h> #include <wx/notebook.h>
#include <wx/listbook.h> #include <wx/listbook.h>
#include <wx/tokenzr.h> #include <wx/tokenzr.h>

View File

@ -11,7 +11,7 @@
#include "libslic3r/libslic3r.h" #include "libslic3r/libslic3r.h"
#include "GLCanvas3D.hpp" #include "GLCanvas3D.hpp"
#include <igl/unproject.h> #include <igl/unproject.h> // IWYU pragma: keep
#include <LocalesUtils.hpp> #include <LocalesUtils.hpp>
#include "libslic3r/BuildVolume.hpp" #include "libslic3r/BuildVolume.hpp"
@ -78,6 +78,9 @@
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>
#ifndef IMGUI_DEFINE_MATH_OPERATORS
#define IMGUI_DEFINE_MATH_OPERATORS
#endif
#include <imgui/imgui_internal.h> #include <imgui/imgui_internal.h>
#include <slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.hpp> #include <slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.hpp>

View File

@ -8,7 +8,7 @@
///|/ ///|/
#include "libslic3r/Technologies.hpp" #include "libslic3r/Technologies.hpp"
#include "GUI_App.hpp" #include "GUI_App.hpp"
#include "GUI_Init.hpp" #include "GUI_Init.hpp" // IWYU pragma: keep
#include "GUI_ObjectList.hpp" #include "GUI_ObjectList.hpp"
#include "GUI_ObjectManipulation.hpp" #include "GUI_ObjectManipulation.hpp"
#include "GUI_Factories.hpp" #include "GUI_Factories.hpp"
@ -83,18 +83,18 @@
#include "slic3r/Config/Snapshot.hpp" #include "slic3r/Config/Snapshot.hpp"
#include "ConfigSnapshotDialog.hpp" #include "ConfigSnapshotDialog.hpp"
#include "FirmwareDialog.hpp" #include "FirmwareDialog.hpp"
#include "Preferences.hpp" #include "slic3r/GUI/Preferences.hpp" // IWYU pragma: keep
#include "Tab.hpp" #include "Tab.hpp"
#include "SysInfoDialog.hpp" #include "SysInfoDialog.hpp"
#include "KBShortcutsDialog.hpp" #include "KBShortcutsDialog.hpp"
#include "UpdateDialogs.hpp" #include "UpdateDialogs.hpp"
#include "Mouse3DController.hpp" #include "Mouse3DController.hpp"
#include "RemovableDriveManager.hpp" #include "RemovableDriveManager.hpp"
#include "InstanceCheck.hpp" #include "InstanceCheck.hpp" // IWYU pragma: keep
#include "NotificationManager.hpp" #include "NotificationManager.hpp"
#include "UnsavedChangesDialog.hpp" #include "UnsavedChangesDialog.hpp"
#include "SavePresetDialog.hpp" #include "SavePresetDialog.hpp"
#include "PrintHostDialogs.hpp" #include "PrintHostDialogs.hpp" // IWYU pragma: keep
#include "DesktopIntegrationDialog.hpp" #include "DesktopIntegrationDialog.hpp"
#include "SendSystemInfoDialog.hpp" #include "SendSystemInfoDialog.hpp"
#include "Downloader.hpp" #include "Downloader.hpp"
@ -102,7 +102,7 @@
#include "WifiConfigDialog.hpp" #include "WifiConfigDialog.hpp"
#include "UserAccount.hpp" #include "UserAccount.hpp"
#include "WebViewDialog.hpp" #include "WebViewDialog.hpp"
#include "LoginDialog.hpp" #include "LoginDialog.hpp" // IWYU pragma: keep
#include "PresetArchiveDatabase.hpp" #include "PresetArchiveDatabase.hpp"
#include "BitmapCache.hpp" #include "BitmapCache.hpp"
@ -1279,8 +1279,7 @@ bool GUI_App::on_init_inner()
// Verify resources path // Verify resources path
const wxString resources_dir = from_u8(Slic3r::resources_dir()); const wxString resources_dir = from_u8(Slic3r::resources_dir());
wxCHECK_MSG(wxDirExists(resources_dir), false, wxCHECK_MSG(wxDirExists(resources_dir), false, wxString::Format("Resources path does not exist or is not a directory: %s", resources_dir));
wxString::Format("Resources path does not exist or is not a directory: %s", resources_dir));
#ifdef __linux__ #ifdef __linux__
if (! check_old_linux_datadir(GetAppName())) { if (! check_old_linux_datadir(GetAppName())) {

View File

@ -7,6 +7,7 @@
#include "libslic3r/libslic3r.h" #include "libslic3r/libslic3r.h"
#include "libslic3r/PresetBundle.hpp" #include "libslic3r/PresetBundle.hpp"
#include "libslic3r/TextConfiguration.hpp" #include "libslic3r/TextConfiguration.hpp"
#include "libslic3r/BuildVolume.hpp" // IWYU pragma: keep
#include "GUI_ObjectList.hpp" #include "GUI_ObjectList.hpp"
#include "GUI_Factories.hpp" #include "GUI_Factories.hpp"
#include "GUI_ObjectManipulation.hpp" #include "GUI_ObjectManipulation.hpp"
@ -35,6 +36,7 @@
#include <wx/progdlg.h> #include <wx/progdlg.h>
#include <wx/listbook.h> #include <wx/listbook.h>
#include <wx/numformatter.h> #include <wx/numformatter.h>
#include <wx/bookctrl.h> // IWYU pragma: keep
#include "slic3r/Utils/FixModelByWin10.hpp" #include "slic3r/Utils/FixModelByWin10.hpp"

View File

@ -27,7 +27,7 @@
#include <wx/listbook.h> #include <wx/listbook.h>
#include <wx/notebook.h> #include <wx/notebook.h>
#include <wx/glcanvas.h> #include <wx/glcanvas.h> // IWYU pragma: keep
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/stattext.h> #include <wx/stattext.h>
#include <wx/choice.h> #include <wx/choice.h>

View File

@ -23,6 +23,9 @@
#include "libslic3r/AppConfig.hpp" #include "libslic3r/AppConfig.hpp"
#include "libslic3r/TriangleMeshSlicer.hpp" #include "libslic3r/TriangleMeshSlicer.hpp"
#ifndef IMGUI_DEFINE_MATH_OPERATORS
#define IMGUI_DEFINE_MATH_OPERATORS
#endif
#include "imgui/imgui_internal.h" #include "imgui/imgui_internal.h"
#include "slic3r/GUI/MsgDialog.hpp" #include "slic3r/GUI/MsgDialog.hpp"

View File

@ -12,6 +12,10 @@
#include "libslic3r/PresetBundle.hpp" #include "libslic3r/PresetBundle.hpp"
#include "libslic3r/MeasureUtils.hpp" #include "libslic3r/MeasureUtils.hpp"
#include <imgui/imgui.h>
#ifndef IMGUI_DEFINE_MATH_OPERATORS
#define IMGUI_DEFINE_MATH_OPERATORS
#endif
#include <imgui/imgui_internal.h> #include <imgui/imgui_internal.h>
#include <numeric> #include <numeric>

View File

@ -32,7 +32,7 @@
#include <chrono> // measure enumeration of fonts #include <chrono> // measure enumeration of fonts
#include <sstream> // save for svg #include <sstream> // save for svg
#include <array> #include <array>
#include <fstream> #include <fstream> // IWYU pragma: keep
using namespace Slic3r; using namespace Slic3r;
using namespace Slic3r::Emboss; using namespace Slic3r::Emboss;

View File

@ -50,6 +50,7 @@
#include "Plater.hpp" #include "Plater.hpp"
#include "../Utils/Process.hpp" #include "../Utils/Process.hpp"
#include "format.hpp" #include "format.hpp"
#include "slic3r/GUI/InstanceCheck.hpp" // IWYU pragma: keep
#include <fstream> #include <fstream>
#include <string_view> #include <string_view>

View File

@ -11,7 +11,7 @@
#include "wxExtensions.hpp" #include "wxExtensions.hpp"
#include "ObjectDataViewModel.hpp" #include "ObjectDataViewModel.hpp"
#include "libslic3r/Config.hpp" #include "libslic3r/Config.hpp"
#include "../Utils/PrintHost.hpp" #include "slic3r/Utils/PrintHost.hpp" // IWYU pragma: keep
#include "libslic3r/Config.hpp" #include "libslic3r/Config.hpp"
#include "format.hpp" #include "format.hpp"

View File

@ -17,10 +17,11 @@
#include "format.hpp" #include "format.hpp"
#include <utility> #include <utility>
#include <wx/bookctrl.h> #include <wx/bookctrl.h> // IWYU pragma: keep
#include <wx/numformatter.h> #include <wx/numformatter.h>
#include <boost/algorithm/string/split.hpp> #include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/classification.hpp> #include <boost/algorithm/string/classification.hpp>
#include "slic3r/GUI/Search.hpp" // IWYU pragma: keep
#include "libslic3r/Exception.hpp" #include "libslic3r/Exception.hpp"
#include "libslic3r/Utils.hpp" #include "libslic3r/Utils.hpp"
#include "libslic3r/AppConfig.hpp" #include "libslic3r/AppConfig.hpp"

View File

@ -30,7 +30,7 @@
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include <boost/nowide/cstdio.hpp> #include <boost/nowide/cstdio.hpp>
#include <boost/optional.hpp> #include <boost/optional.hpp>
#include <boost/filesystem/fstream.hpp> #include <boost/filesystem/fstream.hpp> // IWYU pragma: keep
#include <boost/filesystem/path.hpp> #include <boost/filesystem/path.hpp>
#include <boost/filesystem/operations.hpp> #include <boost/filesystem/operations.hpp>
#include <boost/log/trivial.hpp> #include <boost/log/trivial.hpp>
@ -3975,6 +3975,8 @@ Plater::Plater(wxWindow *parent, MainFrame *main_frame)
// Initialization performed in the private c-tor // Initialization performed in the private c-tor
} }
Plater::~Plater() = default;
bool Plater::is_project_dirty() const { return p->is_project_dirty(); } bool Plater::is_project_dirty() const { return p->is_project_dirty(); }
bool Plater::is_presets_dirty() const { return p->is_presets_dirty(); } bool Plater::is_presets_dirty() const { return p->is_presets_dirty(); }
void Plater::update_project_dirty_from_presets() { p->update_project_dirty_from_presets(); } void Plater::update_project_dirty_from_presets() { p->update_project_dirty_from_presets(); }

View File

@ -75,7 +75,7 @@ public:
Plater(const Plater &) = delete; Plater(const Plater &) = delete;
Plater &operator=(Plater &&) = delete; Plater &operator=(Plater &&) = delete;
Plater &operator=(const Plater &) = delete; Plater &operator=(const Plater &) = delete;
~Plater() = default; ~Plater();
bool is_project_dirty() const; bool is_project_dirty() const;
bool is_presets_dirty() const; bool is_presets_dirty() const;

View File

@ -31,7 +31,7 @@
#include <wx/bmpcbox.h> #include <wx/bmpcbox.h>
#include <wx/statbox.h> #include <wx/statbox.h>
#include <wx/statbmp.h> #include <wx/statbmp.h>
#include <wx/wupdlock.h> #include <wx/wupdlock.h> // IWYU pragma: keep
#include "wx/generic/stattextg.h" #include "wx/generic/stattextg.h"
#ifdef _WIN32 #ifdef _WIN32
#include <wx/richtooltip.h> #include <wx/richtooltip.h>

View File

@ -15,7 +15,7 @@
#include <Eigen/Core> #include <Eigen/Core>
#include <wx/clipbrd.h> #include <wx/clipbrd.h> // IWYU pragma: keep
#include <wx/platinfo.h> #include <wx/platinfo.h>
#include "GUI_App.hpp" #include "GUI_App.hpp"
#include "MainFrame.hpp" #include "MainFrame.hpp"

View File

@ -17,6 +17,7 @@
#include "libslic3r/PrintConfig.hpp" #include "libslic3r/PrintConfig.hpp"
#include "libslic3r/PresetBundle.hpp" #include "libslic3r/PresetBundle.hpp"
#include "libslic3r/Color.hpp" #include "libslic3r/Color.hpp"
#include "slic3r/GUI/Sidebar.hpp" // IWYU pragma: keep
#include "format.hpp" #include "format.hpp"
#include "GUI_App.hpp" #include "GUI_App.hpp"
#include "Plater.hpp" #include "Plater.hpp"

View File

@ -10,6 +10,9 @@
#include "slic3r/GUI/MsgDialog.hpp" #include "slic3r/GUI/MsgDialog.hpp"
#include "slic3r/GUI/Field.hpp" #include "slic3r/GUI/Field.hpp"
#include <libslic3r/PresetBundle.hpp> // IWYU pragma: keep
#include <wx/webview.h> #include <wx/webview.h>
#include <boost/log/trivial.hpp> #include <boost/log/trivial.hpp>

View File

@ -5,6 +5,9 @@
#include "EmbossStyleManager.hpp" #include "EmbossStyleManager.hpp"
#include <optional> #include <optional>
#include <GL/glew.h> // Imgui texture #include <GL/glew.h> // Imgui texture
#ifndef IMGUI_DEFINE_MATH_OPERATORS
#define IMGUI_DEFINE_MATH_OPERATORS
#endif
#include <imgui/imgui_internal.h> // ImTextCharFromUtf8 #include <imgui/imgui_internal.h> // ImTextCharFromUtf8
#include <libslic3r/AppConfig.hpp> #include <libslic3r/AppConfig.hpp>
#include <libslic3r/Utils.hpp> // ScopeGuard #include <libslic3r/Utils.hpp> // ScopeGuard

View File

@ -5,7 +5,7 @@
#include "HexFile.hpp" #include "HexFile.hpp"
#include <sstream> #include <sstream>
#include <boost/filesystem/fstream.hpp> #include <boost/filesystem/fstream.hpp> // IWYU pragma: keep
#include <boost/property_tree/ptree.hpp> #include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/ini_parser.hpp> #include <boost/property_tree/ini_parser.hpp>

View File

@ -12,7 +12,7 @@
#include <deque> #include <deque>
#include <sstream> #include <sstream>
#include <exception> #include <exception>
#include <boost/filesystem/fstream.hpp> #include <boost/filesystem/fstream.hpp> // IWYU pragma: keep
#include <boost/filesystem/path.hpp> #include <boost/filesystem/path.hpp>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/format.hpp> #include <boost/format.hpp>

View File

@ -14,7 +14,7 @@
#include <boost/format.hpp> #include <boost/format.hpp>
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp> #include <boost/filesystem/fstream.hpp> // IWYU pragma: keep
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
#include <boost/log/trivial.hpp> #include <boost/log/trivial.hpp>
#include <curl/curl.h> #include <curl/curl.h>

View File

@ -12,12 +12,12 @@
#include <cassert> #include <cassert>
#include <cstddef> #include <cstddef>
#include <cereal/types/polymorphic.hpp> #include <cereal/types/polymorphic.hpp> // IWYU pragma: keep
#include <cereal/types/map.hpp> #include <cereal/types/map.hpp> // IWYU pragma: keep
#include <cereal/types/string.hpp> #include <cereal/types/string.hpp> // IWYU pragma: keep
#include <cereal/types/utility.hpp> #include <cereal/types/utility.hpp> // IWYU pragma: keep
#include <cereal/types/vector.hpp> #include <cereal/types/vector.hpp> // IWYU pragma: keep
#include <cereal/archives/binary.hpp> #include <cereal/archives/binary.hpp> // IWYU pragma: keep
#define CEREAL_FUTURE_EXPERIMENTAL #define CEREAL_FUTURE_EXPERIMENTAL
#include <cereal/archives/adapters.hpp> #include <cereal/archives/adapters.hpp>
@ -25,7 +25,7 @@
#include <libslic3r/ObjectID.hpp> #include <libslic3r/ObjectID.hpp>
#include <libslic3r/Utils.hpp> #include <libslic3r/Utils.hpp>
#include "slic3r/GUI/3DScene.hpp" #include "slic3r/GUI/3DScene.hpp" // IWYU pragma: keep
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
@ -700,13 +700,13 @@ using OutputArchive = cereal::UserDataAdapter<StackImpl, cereal::BinaryOutputArc
} // namespace UndoRedo } // namespace UndoRedo
class Model; class Model; // IWYU pragma: keep
class ModelObject; class ModelObject; // IWYU pragma: keep
class ModelVolume; class ModelVolume; // IWYU pragma: keep
class ModelInstance; class ModelInstance; // IWYU pragma: keep
class ModelMaterial; class ModelMaterial; // IWYU pragma: keep
class DynamicPrintConfig; class DynamicPrintConfig; // IWYU pragma: keep
class TriangleMesh; class TriangleMesh; // IWYU pragma: keep
} // namespace Slic3r } // namespace Slic3r
@ -800,10 +800,10 @@ namespace cereal
} }
} }
#include <libslic3r/Model.hpp> #include <libslic3r/Model.hpp> // IWYU pragma: keep
#include <libslic3r/TriangleMesh.hpp> #include <libslic3r/TriangleMesh.hpp> // IWYU pragma: keep
#include <slic3r/GUI/Selection.hpp> #include <slic3r/GUI/Selection.hpp> // IWYU pragma: keep
#include <slic3r/GUI/Gizmos/GLGizmosManager.hpp> #include <slic3r/GUI/Gizmos/GLGizmosManager.hpp> // IWYU pragma: keep
namespace Slic3r { namespace Slic3r {
namespace UndoRedo { namespace UndoRedo {