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:
authorVojtech Bubnik <bubnikv@gmail.com>2021-06-27 18:36:25 +0300
committerVojtech Bubnik <bubnikv@gmail.com>2021-06-27 18:36:25 +0300
commite4e8c5df129b1f90cca148c03e10d8a4e2126da8 (patch)
tree9e2afc82c1a6fd9ddd111f4b4962858b1d12d5fa /src/PrusaSlicer.cpp
parent0f3cabb5d9c62649c9055798566be1c00533279f (diff)
As an example of using the enum_bitmask infrastructure for type safe
sets of optional boolean parameters, the cut function "keep upper", "keep lower" and "flip lower" boolean parameters were converted into a single type safe enum_bitmask. Such a coding style is certainly wordier than the original code, but much safer and more readable than the error prone "boolean, boolean, boolean" function call parameter list.
Diffstat (limited to 'src/PrusaSlicer.cpp')
-rw-r--r--src/PrusaSlicer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/PrusaSlicer.cpp b/src/PrusaSlicer.cpp
index 5212d66c8..3f43c3ebd 100644
--- a/src/PrusaSlicer.cpp
+++ b/src/PrusaSlicer.cpp
@@ -376,7 +376,7 @@ int CLI::run(int argc, char **argv)
o->cut(Z, m_config.opt_float("cut"), &out);
}
#else
- model.objects.front()->cut(0, m_config.opt_float("cut"), true, true, true);
+ model.objects.front()->cut(0, m_config.opt_float("cut"), ModelObjectCutAttribute::KeepLower | ModelObjectCutAttribute::KeepUpper | ModelObjectCutAttribute::FlipLower);
#endif
model.delete_object(size_t(0));
}