From 80b59ef769ea93a4006e077ded2f31b1ff2014bf Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Tue, 23 May 2023 16:35:50 +0200 Subject: [PATCH] Organic supports: Little polishing of includes --- src/libslic3r/Support/OrganicSupport.cpp | 17 ++++++------ src/libslic3r/Support/SupportLayer.hpp | 4 +-- src/libslic3r/Support/TreeModelVolumes.cpp | 2 +- src/libslic3r/Support/TreeModelVolumes.hpp | 5 ++++ src/libslic3r/Support/TreeSupport.cpp | 31 ++++++++++------------ src/libslic3r/Support/TreeSupport.hpp | 5 ---- 6 files changed, 30 insertions(+), 34 deletions(-) diff --git a/src/libslic3r/Support/OrganicSupport.cpp b/src/libslic3r/Support/OrganicSupport.cpp index 01c1a4f9c..b26a3c730 100644 --- a/src/libslic3r/Support/OrganicSupport.cpp +++ b/src/libslic3r/Support/OrganicSupport.cpp @@ -1,13 +1,12 @@ #include "OrganicSupport.hpp" +#include "SupportCommon.hpp" -#include "AABBTreeLines.hpp" -#include "ClipperUtils.hpp" -#include "Polygon.hpp" -#include "Polyline.hpp" -#include "MutablePolygon.hpp" -#include "TriangleMeshSlicer.hpp" - -#include "Support/SupportCommon.hpp" +#include "../AABBTreeLines.hpp" +#include "../ClipperUtils.hpp" +#include "../Polygon.hpp" +#include "../Polyline.hpp" +#include "../MutablePolygon.hpp" +#include "../TriangleMeshSlicer.hpp" #include @@ -17,7 +16,7 @@ #ifndef TREE_SUPPORT_ORGANIC_NUDGE_NEW // Old version using OpenVDB, works but it is extremely slow for complex meshes. - #include "OpenVDBUtilsLegacy.hpp" + #include "../OpenVDBUtilsLegacy.hpp" #include #endif // TREE_SUPPORT_ORGANIC_NUDGE_NEW diff --git a/src/libslic3r/Support/SupportLayer.hpp b/src/libslic3r/Support/SupportLayer.hpp index 155de70ce..a3c60b9fd 100644 --- a/src/libslic3r/Support/SupportLayer.hpp +++ b/src/libslic3r/Support/SupportLayer.hpp @@ -5,8 +5,8 @@ #include // for Slic3r::deque #include "../libslic3r.h" -#include "ClipperUtils.hpp" -#include "Polygon.hpp" +#include "../ClipperUtils.hpp" +#include "../Polygon.hpp" namespace Slic3r::FFFSupport { diff --git a/src/libslic3r/Support/TreeModelVolumes.cpp b/src/libslic3r/Support/TreeModelVolumes.cpp index e54406057..d77400309 100644 --- a/src/libslic3r/Support/TreeModelVolumes.cpp +++ b/src/libslic3r/Support/TreeModelVolumes.cpp @@ -7,7 +7,7 @@ // CuraEngine is released under the terms of the AGPLv3 or higher. #include "TreeModelVolumes.hpp" -#include "TreeSupport.hpp" +#include "TreeSupportCommon.hpp" #include "../BuildVolume.hpp" #include "../ClipperUtils.hpp" diff --git a/src/libslic3r/Support/TreeModelVolumes.hpp b/src/libslic3r/Support/TreeModelVolumes.hpp index b23817c9a..81fbdaa2b 100644 --- a/src/libslic3r/Support/TreeModelVolumes.hpp +++ b/src/libslic3r/Support/TreeModelVolumes.hpp @@ -29,6 +29,11 @@ class PrintObject; namespace FFFTreeSupport { +static constexpr const double SUPPORT_TREE_EXPONENTIAL_FACTOR = 1.5; +static constexpr const coord_t SUPPORT_TREE_EXPONENTIAL_THRESHOLD = scaled(1. * SUPPORT_TREE_EXPONENTIAL_FACTOR); +static constexpr const coord_t SUPPORT_TREE_COLLISION_RESOLUTION = scaled(0.5); +static constexpr const bool SUPPORT_TREE_AVOID_SUPPORT_BLOCKER = true; + class TreeModelVolumes { public: diff --git a/src/libslic3r/Support/TreeSupport.cpp b/src/libslic3r/Support/TreeSupport.cpp index 16f453726..914c4a5cf 100644 --- a/src/libslic3r/Support/TreeSupport.cpp +++ b/src/libslic3r/Support/TreeSupport.cpp @@ -7,23 +7,21 @@ // CuraEngine is released under the terms of the AGPLv3 or higher. #include "TreeSupport.hpp" -#include "AABBTreeIndirect.hpp" -#include "AABBTreeLines.hpp" -#include "BuildVolume.hpp" -#include "ClipperUtils.hpp" -#include "EdgeGrid.hpp" -#include "Fill/Fill.hpp" -#include "Layer.hpp" -#include "Print.hpp" -#include "MultiPoint.hpp" -#include "Polygon.hpp" -#include "Polyline.hpp" -#include "MutablePolygon.hpp" -#include "TriangleMeshSlicer.hpp" +#include "TreeSupportCommon.hpp" +#include "SupportCommon.hpp" +#include "OrganicSupport.hpp" -#include "Support/SupportCommon.hpp" -#include "Support/TreeSupportCommon.hpp" -#include "Support/OrganicSupport.hpp" +#include "../AABBTreeIndirect.hpp" +#include "../BuildVolume.hpp" +#include "../ClipperUtils.hpp" +#include "../EdgeGrid.hpp" +#include "../Fill/Fill.hpp" +#include "../Layer.hpp" +#include "../Print.hpp" +#include "../MultiPoint.hpp" +#include "../Polygon.hpp" +#include "../Polyline.hpp" +#include "../MutablePolygon.hpp" #include #include @@ -35,7 +33,6 @@ #include -#include #include // #define TREESUPPORT_DEBUG_SVG diff --git a/src/libslic3r/Support/TreeSupport.hpp b/src/libslic3r/Support/TreeSupport.hpp index 1ca2ce57a..c79f1d4a3 100644 --- a/src/libslic3r/Support/TreeSupport.hpp +++ b/src/libslic3r/Support/TreeSupport.hpp @@ -47,13 +47,8 @@ struct SlicingParameters; namespace FFFTreeSupport { -static constexpr const double SUPPORT_TREE_EXPONENTIAL_FACTOR = 1.5; -static constexpr const coord_t SUPPORT_TREE_EXPONENTIAL_THRESHOLD = scaled(1. * SUPPORT_TREE_EXPONENTIAL_FACTOR); -static constexpr const coord_t SUPPORT_TREE_COLLISION_RESOLUTION = scaled(0.5); - // The number of vertices in each circle. static constexpr const size_t SUPPORT_TREE_CIRCLE_RESOLUTION = 25; -static constexpr const bool SUPPORT_TREE_AVOID_SUPPORT_BLOCKER = true; struct AreaIncreaseSettings {