Commit Graph

11 Commits

Author SHA1 Message Date
Vojtech Bubnik
ee626eb65a WIP: Layers split into islands, islands overlapping in Z interconnected
into a graph with links to the layer above / below.

In addition:
Members of LayerRegion were made private, public interface const only.
this->m_xxx replaced with just m_xxx
SurfacesPtr was made a vector of const pointers.
2022-10-26 18:41:39 +02:00
Vojtech Bubnik
2ced762948 Integrating a C++20 like span library
https://github.com/tcbrindle/span

Replacing a homebrew const pointer wrapper const correctness helper
with the C++20 like span library.

One day when we switch to C++20 we will just use the C++20 spans instead.
2022-10-19 16:27:15 +02:00
Vojtech Bubnik
e687db9eb0 Ported custom_gcode and print unit tests from Perl to C++. 2022-05-06 18:30:18 +02:00
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
adcbe4347c Fixed unit tests. 2021-03-15 09:55:56 +01:00
Lukas Matena
3e855d36dc Fixed unit tests after previous include manipulations 2020-05-26 15:33:44 +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
fee4dc3fc0 Fixes of unit tests on OSX. The old clang does not like the way
@lordofhyphens uses the initializer lists together with autos.
2019-10-16 17:55:41 +02:00
bubnikv
a5eb4a4ce1 Ported test_print/test_printobject/test_3mf from upstream Slic3r, thanks @lordofhyphens 2019-10-16 13:20:09 +02:00