Commit Graph

14 Commits

Author SHA1 Message Date
Vojtech Bubnik
0f3cabb5d9 Support for forward compatibility of configurations, user and system
config bundles, project files (3MFs, AMFs). When loading these files,
the caller may decide whether to substitute some of the configuration
values the current PrusaSlicer version does not understand with
some reasonable default value, and whether to report it. If substitution
is disabled, an exception is being thrown as before this commit.
If substitution is enabled, list of substitutions is returned by the
API to be presented to the user. This allows us to introduce for example
new firmware flavor key in PrusaSlicer 2.4 while letting PrusaSlicer
2.3.2 to fall back to some default and to report it to the user.

When slicing from command line, substutions are performed by default
and reported into the console, however substitutions may be either
disabled or made silent with the new "config-compatibility" command
line option.

Substitute enums and bools only.  Allow booleans to be parsed as
    true: "1", "enabled", "on" case insensitive
    false: "0", "disabled", "off" case insensitive
This will allow us in the future for example to switch the draft_shield
boolean to an enum with the following values: "disabled" / "enabled" / "limited".

Added "enum_bitmask.hpp" - support for type safe sets of options.
See for example PresetBundle::load_configbundle(...
LoadConfigBundleAttributes flags) for an example of intended usage.

WIP: GUI for reporting the list of config substitutions needs to be
implemented by @YuSanka.
2021-06-27 16:57:05 +02:00
Vojtech Bubnik
542d95a593 Fixing unit tests 2021-04-21 15:31:06 +02:00
Vojtech Bubnik
adcbe4347c Fixed unit tests. 2021-03-15 09:55:56 +01:00
Vojtech Bubnik
8e27e355c2 Fixing unit tests. 2021-03-15 09:55:56 +01:00
Vojtech Bubnik
ceea9de8b8 WIP: Refactored bridging flow from normal flow, new config value
'thick_bridges' to switch between the Slic3r vs. S3D/Cura/Ideamaker
way of printing 1st object layer over supports.
Simplified the PresetHints.
2021-03-15 09:55:56 +01:00
bubnikv
5e8572a196 New functions for variable offsets of polygons / expolygons.
Test cases for the above.
Improvements of older test cases.
2019-10-25 13:34:37 +02:00
bubnikv
d1a86e513c Fixing some GCodeExport and Flow unit tests. 2019-10-18 15:44:13 +02:00
bubnikv
e04e2b3636 Slight improvements of unit tests, fix of perl bindings. 2019-10-18 12:05:37 +02:00
bubnikv
98a71a557b Ported test_support_material.cpp from upstream slic3r.
Ported extension of ExtrusionEntityCollection::flatten() to disable
flattening of no_sort() collections.
2019-10-17 19:09:24 +02:00
bubnikv
c228a49fe0 Ported test_support_material from upstream Slic3r.
Reworked the FFF testing framework & ConfigBase::set_deserialize()
for more compact tests: set_deserialize() now accepts list
of key / value pairs.

Fixed an incorrect assert in LayerRegion.
2019-10-17 17:09:15 +02:00
bubnikv
69c8b1cd21 new cheaper constructor for DynamicPrintConfig from FullPrintConfig:
DynamicPrintConfig::full_print_config()
new cheaper constructors of DynamicConfig / DynamicPrintConfig from ConfigBase
Unit tests: ported test_model from upstream Slic3r, thanks @lordofhyphens
Unit tests refactored to use less autos and initializer lists for readibility,
DynamicPrintConfig is handled by value, not by shared pointer.
2019-10-16 11:16:50 +02:00
bubnikv
21837ceb85 Trying to fix compilation issues of the test cases on OSX. 2019-10-15 19:04:02 +02:00
bubnikv
72e99cf35f Fixing some compilation issues of the C++ test cases on OSX. 2019-10-15 18:38:40 +02:00
bubnikv
67e1eba8e6 Ported test_data.cpp/hpp & test_flow.cpp from upstream slic3r,
thanks @lordofhyphens
2019-10-15 11:28:20 +02:00