diff --git a/src/libslic3r/TreeModelVolumes.cpp b/src/libslic3r/TreeModelVolumes.cpp index 0537e93db6..07917ff931 100644 --- a/src/libslic3r/TreeModelVolumes.cpp +++ b/src/libslic3r/TreeModelVolumes.cpp @@ -6,13 +6,10 @@ // Copyright (c) 2021 Ultimaker B.V. // CuraEngine is released under the terms of the AGPLv3 or higher. -#include "TreeModelVolumes.h" -#include "TreeSupport.h" -#include "progress/Progress.h" -#include "sliceDataStorage.h" -#include "utils/algorithm.h" -#include "utils/logoutput.h" -namespace cura +#include "TreeModelVolumes.hpp" +#include "TreeSupport.hpp" + +namespace Slic3r { TreeModelVolumes::TreeModelVolumes(const SliceDataStorage& storage, const coord_t max_move, const coord_t max_move_slow, size_t current_mesh_idx, double progress_multiplier, double progress_offset, const std::vector& additional_excluded_areas) : max_move_{ std::max(max_move - 2, coord_t(0)) }, max_move_slow_{ std::max(max_move_slow - 2, coord_t(0)) }, progress_multiplier{ progress_multiplier }, progress_offset{ progress_offset }, machine_border_{ calculateMachineBorderCollision(storage.getMachineBorder()) } // -2 to avoid rounding errors diff --git a/src/libslic3r/TreeModelVolumes.hpp b/src/libslic3r/TreeModelVolumes.hpp index e027e0c26f..44edf6941a 100644 --- a/src/libslic3r/TreeModelVolumes.hpp +++ b/src/libslic3r/TreeModelVolumes.hpp @@ -6,20 +6,14 @@ // Copyright (c) 2021 Ultimaker B.V. // CuraEngine is released under the terms of the AGPLv3 or higher. -#ifndef TREEMODELVOLUMES_H -#define TREEMODELVOLUMES_H +#ifndef slic3r_TreeModelVolumes_hpp +#define slic3r_TreeModelVolumes_hpp -#include #include #include #include -#include "settings/EnumSettings.h" //To store whether X/Y or Z distance gets priority. -#include "settings/types/LayerIndex.h" //Part of the RadiusLayerPair. -#include "sliceDataStorage.h" -#include "utils/polygon.h" //For polygon parameters. - -namespace cura +namespace Slic3r { class TreeModelVolumes @@ -432,4 +426,4 @@ class TreeModelVolumes } -#endif //TREEMODELVOLUMES_H \ No newline at end of file +#endif //slic3r_TreeModelVolumes_hpp \ No newline at end of file diff --git a/src/libslic3r/TreeSupport.cpp b/src/libslic3r/TreeSupport.cpp index 3325ca379d..b8b3a97608 100644 --- a/src/libslic3r/TreeSupport.cpp +++ b/src/libslic3r/TreeSupport.cpp @@ -6,26 +6,16 @@ // Copyright (c) 2021 Ultimaker B.V. // CuraEngine is released under the terms of the AGPLv3 or higher. -#include "TreeSupport.h" -#include "Application.h" //To get settings. -#include "infill.h" -#include "infill/SierpinskiFillProvider.h" -#include "progress/Progress.h" -#include "settings/EnumSettings.h" -#include "support.h" //For precomputeCrossInfillTree -#include "utils/logoutput.h" -#include "utils/math.h" //For round_up_divide and PI. -#include "utils/polygonUtils.h" //For moveInside. +#include "TreeSupport.hpp" + #include #include #include #include #include -#include -#include #include //todo Remove! ONLY FOR PUBLIC BETA!! -namespace cura +namespace Slic3r { TreeSupport::TreeSupport(const SliceDataStorage& storage) @@ -2279,7 +2269,7 @@ void TreeSupport::smoothBranchAreas(std::vector data_pair : update_next) + for (std::pair data_pair : update_next) { if (data_pair.first != nullptr) { @@ -2486,4 +2476,4 @@ void TreeSupport::drawAreas(std::vector>& move_bounds, -} // namespace cura +} // namespace Slic3r diff --git a/src/libslic3r/TreeSupport.hpp b/src/libslic3r/TreeSupport.hpp index 9fad42e148..697fbe8f7e 100644 --- a/src/libslic3r/TreeSupport.hpp +++ b/src/libslic3r/TreeSupport.hpp @@ -6,15 +6,11 @@ // Copyright (c) 2021 Ultimaker B.V. // CuraEngine is released under the terms of the AGPLv3 or higher. -#ifndef TREESUPPORT_H -#define TREESUPPORT_H +#ifndef slic3r_TreeSupport_hpp +#define slic3r_TreeSupport_hpp -#include "TreeModelVolumes.h" -#include "boost/functional/hash.hpp" // For combining hashes -#include "polyclipping/clipper.hpp" -#include "settings/EnumSettings.h" -#include "sliceDataStorage.h" -#include "utils/polygon.h" +#include "TreeModelVolumes.hpp" +#include // For combining hashes #define SUPPORT_TREE_CIRCLE_RESOLUTION 25 // The number of vertices in each circle. @@ -42,7 +38,7 @@ #define SUPPORT_TREE_MAX_DEVIATION 0 -namespace cura +namespace Slic3r { @@ -1015,20 +1011,20 @@ class TreeSupport }; -} // namespace cura +} // namespace Slic3r namespace std { template <> -struct hash +struct hash { - size_t operator()(const cura::TreeSupport::SupportElement& node) const + size_t operator()(const Slic3r::TreeSupport::SupportElement& node) const { - size_t hash_node = hash()(node.target_position); + size_t hash_node = hash()(node.target_position); boost::hash_combine(hash_node, size_t(node.target_height)); return hash_node; } }; } // namespace std -#endif /* TREESUPPORT_H */ +#endif /* slic3r_TreeSupport_hpp */