Commit Graph

81 Commits

Author SHA1 Message Date
49fdf3da7b follow-up to a86e7107a5:
Make is_converted_from_meters / is_converted_from_inches exclusive-or.
Maybe it would be better to make a single enum from the two booleans,
if they are exclusive-or?
2021-08-05 15:35:44 +02:00
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
fef385cd6b Fixed second batch of locale-dependent calls 2021-05-24 12:20:29 +02:00
e664100bf6 SPE-1103 Added menu items for the conversation of the volumes from/to meters
Related to #4521
2021-02-10 20:34:05 +01:00
c2e956c6d1 3MF and AMF error reporting: Use boost::log instead of printf(). 2021-02-05 15:20:23 +01:00
828271d016 Improved AMF/3MF security when parsing invalid meshes. 2021-02-05 14:19:51 +01:00
2f71af1ee4 Saving "converted from inches" to 3MF and AMF even if the file source
information is empty.
2020-12-16 12:05:29 +01:00
d59f345fbb Fix of #5443 - Assigned input file path for ModelVolume also for AMF archives 2020-12-15 14:18:11 +01:00
5605088aad Follow-up on aaaa85c1f8
Fix of #5007 - "Reload from disk" causes objects converted to inches to revert to mm
1) Storing and reloading the "source_in_inches" source flag from AMF and 3MF
2) When converting objects with mixed "inches" volumes, do the right thing
   and do not convert those that do not need conversion.
2020-12-12 12:06:15 +01:00
54976e29bb New class ModelConfig wrapping DynamicPrintConfig and a timestamp
to help with detecting "not changed" event when taking
Undo/Redo snapshot or synchronizing with the back-end.

Converted layer height profile and supports / seam painted areas
to the same timestamp controlled structure.
2020-09-24 15:34:13 +02:00
067cde85f1 WIP Refactoring of exceptions:
1) All slicer's exceptions are now derived from Slic3r::Exception.
2) New exceptions are defined for slicing errors.
3) Exceptions are propagated to the Plater to show.
It remains to modify the slicing back-end to throw the new SlicingError
exceptions instead of std::runtime_error and to show the other exceptions
by a message dialog instead of a notification.
2020-09-14 18:03:22 +02:00
b101a8e266 Fixes of the offset curves from Voronoi diagram.
The offset curve extractor is already quite usable,
though singular cases are still not covered yet
when the offset curve intersects or nearly intersects
a Voronoi vertex.

Removal of the PRINTF_ZU "%zu" Visual Studio printf compatibility macro.
Fixes of a contours self intersection test for collinear segments.
SVG exporter now exports white background, so that the GNOME Eye viewer is usable.
2020-06-16 13:15:48 +02:00
43cfd44864 Fixed export/import from/to amf and 3mf file. 2020-06-08 12:25:29 +02:00
629584e28f Editing of the custom GCodes like ColorChange and PausePrint 2020-06-07 22:42:54 +02:00
904263d231 ENABLE_CONFIGURABLE_PATHS_EXPORT_TO_3MF_AND_AMF set as default 2020-02-13 11:25:34 +01:00
1ed313ab79 Synchronized mode of color_print data to/from 3mf/amf
+ Code refactoring " CustomGCode extracted to separate namespace and file
2020-01-23 16:11:21 +01:00
cc19e9c48f ENABLE_KEEP_LOADED_VOLUME_TRANSFORM_AS_STAND_ALONE set as default 2020-01-17 12:12:38 +01:00
89fcd7f95a Added "mode" variable for custom_gcode_per_print_z 2020-01-16 16:01:19 +01:00
abd432e7a8 Configurable paths export (fullpath or not) to 3mf and amf 2020-01-08 11:11:38 +01:00
9406b50447 Const correctness improvements:
removed some unnecessary const_casts that remove const.
2020-01-03 16:33:04 +01:00
e9bb3c2450 3mf and amf import: keep loaded volumes transformation as a member of ModelVolume without applying it to the mesh 2019-12-20 12:11:58 +01:00
26b7dbd6f5 Improved accuracy of ModelVolume matrix store / restore
into the 3MF / AMF.
Improved accuracy of ModelVolume's mesh transform back from Object's
coordinate space to its own coordinate space after reloading
from 3MF / AMF.
2019-12-19 12:27:49 +01:00
f8adf99c8d Rolled back version numbers for 3mf and amf files 2019-12-19 09:41:30 +01:00
afcc6bbb08 Code refactoring for Color change implementation 2019-12-17 08:37:50 +01:00
805a6c936c Localization improvements: Text correction 2019-12-06 13:58:23 +01:00
519291394a Save/Load new color print data to/from amf and 3mf files. 2019-11-11 16:01:34 +01:00
28a6bd7c30 #3075 - Fixed Reload from disk command for .amf files 2019-10-21 08:48:38 +02:00
835ee148e5 Fixed conflicts after merging with master 2019-10-09 11:17:48 +02:00
7861fa5086 Whitespace changes to supress misleading indentation warnings
These appear in newer gcc when spaces and tabs are mixed
2019-09-24 16:01:01 +02:00
2dc9949a4c ENABLE_ENHANCED_RELOAD_FROM_DISK set as default 2019-09-23 15:35:49 +02:00
1115e77b38 ENABLE_ENHANCED_RELOAD_FROM_DISK -> Fixed export/import to/from .amf to keep compatibility with 3rd part software. 2019-09-23 13:54:49 +02:00
74747226f7 ENABLE_ENHANCED_RELOAD_FROM_DISK
1) Modified .zip.amf import/export to save/load volume matrices and source data

2) Incremented .zip.amf version to 3
2019-09-19 12:39:59 +02:00
729bd529dc Fixed typo 2019-09-02 13:02:28 +02:00
813a73e614 Attempt to fix non compatible (newer) .3mf and .amf import error handling on Linux and OsX 2019-09-02 09:38:45 +02:00
a53539f9af Fixed import of .3mf and .amf files. Parse contained XML model file by chunch instead that as a whole 2019-08-28 16:03:26 +02:00
b5c57fc134 Follow-up of c7cdb2fd3e -> Fixed localization of error messages for .3mf and .amf version check 2019-08-26 09:35:04 +02:00
c7cdb2fd3e Added version check for .3mf and .amf project files. PrusaSlicer will refuse to import files with newer version numbers. 2019-08-23 13:12:31 +02:00
8a2362587d Save/load printable flag to/from 3mf and amf 2019-08-06 16:27:56 +02:00
004e2719b1 Merge branch 'master' into lm_warnings 2019-07-15 13:26:55 +02:00
b1420283b6 Fixed merge issues. 2019-07-04 20:49:46 +02:00
c7cc760067 Merge remote-tracking branch 'origin/master' into vb_undo_redo 2019-07-04 20:22:15 +02:00
a710e7e7e4 WIP: Undo / Redo stack.
Integration of the "cereal" serialization library.
Serialization / deserialization of the DynamicConfig / DynamicPrintConfig.
DynamicPrintConfig serializes ordinal identifiers instead
of the option key strings to conserve space.
2019-06-26 13:26:49 +02:00
cb916c4dda Fixed warnings in libslic3r 2019-06-25 16:04:29 +02:00
35b3fd3176 Integrated the new layer height spans with configs into the backend.
Fixed some compiler warnings.
2019-06-20 16:15:09 +02:00
0c95d4e0d9 Merge remote-tracking branch 'remotes/origin/ys_new_features' 2019-06-18 10:01:29 +02:00
0bb8ee149e Sharing TriangleMesh objects between the front end (UI) and back end
(background processing)
2019-06-11 17:08:47 +02:00
16c5a87997 Import/export of the Layers information to/from AMF 2019-06-11 09:50:58 +02:00
af5017c46c admesh refactoring: Use Eigen vec3i for indexed triangles. 2019-06-10 21:14:58 +02:00
6defabea53 admesh refactoring: separation of the shared vertices / indices
into an indexed_triangle_set structure
2019-06-10 18:30:54 +02:00
65238a89b1 admesh refactoring: Removed the shared_vertices counter as it is now
contained inside v_shared std::vector
2019-06-10 17:36:15 +02:00