Commit Graph

16 Commits

Author SHA1 Message Date
Vojtech Bubnik
d6bb8eead9 Fixed 3mf unit tests to pass on ARM 64bit 2021-12-06 14:20:52 +01:00
Vojtech Bubnik
8a2a9dba2f Eradicated admesh from TriangleMesh:
TriangleMesh newly only holds indexed_triangle_set and
TriangleMeshStats. TriangleMeshStats contains an excerpt of stl_stats.
TriangleMeshStats are updated when initializing with indexed_triangle_set.

Admesh triangle mesh fixing is newly only used when loading an STL.
AMF / 3MF / OBJ file formats are already indexed triangle sets, thus
they are no more converted to admesh stl_file format, nor fixed
through admesh repair machinery. When importing AMF / 3MF / OBJ files,
volume is calculated and if negative, all faces are flipped. Also
a bounding box and number of open edges is calculated.

Implemented its_number_of_patches(), its_num_open_edges()
Optimized its_split(), its_is_splittable() using a visitor pattern.

Reworked QHull integration into TriangleMesh:
    1) Face normals were not right.
    2) Indexed triangle set is newly emitted instead of duplicating
       vertices for each face.

Fixed cut_mesh(): Orient the triangulated faces correctly.
2021-09-20 17:12:22 +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
enricoturri1966
9da87d8e0f Code cleanup 2021-05-24 10:03:48 +02:00
enricoturri1966
ca9fad002c 3rd attempt to fix unit test for 2D convex hull of sinking object on RasperryPi 2021-05-24 08:54:08 +02:00
enricoturri1966
dfa85c2c37 Another attempt to fix unit test for 2D convex hull of sinking object on RasperryPi 2021-05-21 15:37:25 +02:00
enricoturri1966
49f29e8353 Added debug output to help fixing unit test for 2D convex hull of sinking object on RasperryPi 2021-05-21 11:56:10 +02:00
enricoturri1966
90be278d98 Attempt to fix unit test for 2D convex hull of sinking object on RasperryPi 2021-05-21 10:14:13 +02:00
enricoturri1966
f0ef5e409d Added unit test for calculation of 2D convex hull of sinking object 2021-05-20 12:53:47 +02:00
Enrico Turri
904263d231 ENABLE_CONFIGURABLE_PATHS_EXPORT_TO_3MF_AND_AMF set as default 2020-02-13 11:25:34 +01:00
tamasmeszaros
858e936e52 Fix incorrect filename case in test_3mf 2020-01-21 11:10:34 +01:00
Enrico Turri
abd432e7a8 Configurable paths export (fullpath or not) to 3mf and amf 2020-01-08 11:11:38 +01:00
Enrico Turri
8fd753ab27 Follow-up of c790e2ff7c -> Fixed include 2020-01-06 12:31:35 +01:00
Enrico Turri
c790e2ff7c Added unit test for checking geometry after save+load to 3mf cycle 2020-01-06 12:10:57 +01:00
bubnikv
070070edba Initial tests for import of ASCII STLs with varying line endings. 2019-10-18 13:05:22 +02:00
bubnikv
a5eb4a4ce1 Ported test_print/test_printobject/test_3mf from upstream Slic3r, thanks @lordofhyphens 2019-10-16 13:20:09 +02:00