mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-15 17:42:14 +00:00
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.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user