Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortamasmeszaros <meszaros.q@gmail.com>2020-06-19 10:49:50 +0300
committertamasmeszaros <meszaros.q@gmail.com>2020-08-03 20:05:30 +0300
commit645fbed88bb94d3addf32691e08f0e9453978120 (patch)
tree057a190305792c1a99fdb176fc3875c17194c38f
parentf19b3a2344cb499d962b9665a97028b053d98cbc (diff)
Make compile time support tree conf params constexpr
-rw-r--r--src/libslic3r/SLA/SupportTree.cpp14
-rw-r--r--src/libslic3r/SLA/SupportTree.hpp14
2 files changed, 7 insertions, 21 deletions
diff --git a/src/libslic3r/SLA/SupportTree.cpp b/src/libslic3r/SLA/SupportTree.cpp
index eec819e22..1bb4cfab7 100644
--- a/src/libslic3r/SLA/SupportTree.cpp
+++ b/src/libslic3r/SLA/SupportTree.cpp
@@ -28,20 +28,6 @@
namespace Slic3r {
namespace sla {
-// Compile time configuration value definitions:
-
-// The max Z angle for a normal at which it will get completely ignored.
-const double SupportConfig::normal_cutoff_angle = 150.0 * M_PI / 180.0;
-
-// The shortest distance of any support structure from the model surface
-const double SupportConfig::safety_distance_mm = 0.5;
-
-const double SupportConfig::max_solo_pillar_height_mm = 15.0;
-const double SupportConfig::max_dual_pillar_height_mm = 35.0;
-const double SupportConfig::optimizer_rel_score_diff = 1e-6;
-const unsigned SupportConfig::optimizer_max_iterations = 1000;
-const unsigned SupportConfig::pillar_cascade_neighbors = 3;
-
void SupportTree::retrieve_full_mesh(TriangleMesh &outmesh) const {
outmesh.merge(retrieve_mesh(MeshType::Support));
outmesh.merge(retrieve_mesh(MeshType::Pad));
diff --git a/src/libslic3r/SLA/SupportTree.hpp b/src/libslic3r/SLA/SupportTree.hpp
index 3b9f603fd..1415ab8fe 100644
--- a/src/libslic3r/SLA/SupportTree.hpp
+++ b/src/libslic3r/SLA/SupportTree.hpp
@@ -94,16 +94,16 @@ struct SupportConfig
// /////////////////////////////////////////////////////////////////////////
// The max Z angle for a normal at which it will get completely ignored.
- static const double normal_cutoff_angle;
+ static const double constexpr normal_cutoff_angle = 150.0 * M_PI / 180.0;
// The shortest distance of any support structure from the model surface
- static const double safety_distance_mm;
+ static const double constexpr safety_distance_mm = 0.5;
- static const double max_solo_pillar_height_mm;
- static const double max_dual_pillar_height_mm;
- static const double optimizer_rel_score_diff;
- static const unsigned optimizer_max_iterations;
- static const unsigned pillar_cascade_neighbors;
+ static const double constexpr max_solo_pillar_height_mm = 15.0;
+ static const double constexpr max_dual_pillar_height_mm = 35.0;
+ static const double constexpr optimizer_rel_score_diff = 1e-6;
+ static const unsigned constexpr optimizer_max_iterations = 1000;
+ static const unsigned constexpr pillar_cascade_neighbors = 3;
};