Commit Graph

176 Commits

Author SHA1 Message Date
2203ada89c Tech ENABLE_RELOAD_FROM_DISK_FOR_3MF set as default 2021-07-21 14:10:05 +02:00
e2603b1652 Removed unnecessary backward compatibility with old multi-material painted 3MF from the early stage of development. 2021-07-12 13:37:33 +02:00
c5304750d9 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
e4f36339e8 Support / seam / MMU painting serialization / deserialization:
Changed the serialization structure
	std::map<int, std::vector<bool>>
to a significantly more compact
	std::pair<std::vector<std::pair<int, int>>, std::vector<bool>>
Such change shall significantly improve efficiency of Undo / Redo stack.
2021-06-10 09:26:30 +02:00
0ecba516a3 Get rid of Contour3D 2021-06-08 10:28:23 +02:00
4809689dcb Merge remote-tracking branch 'remotes/origin/lh_multi_material_segmentation' into vb_print_regions 2021-05-26 15:23:35 +02:00
17d1a61ef4 Fixed debug build 2021-05-24 12:20:29 +02:00
e2b0623f8e Fixed third batch of locale-dependent calls 2021-05-24 12:20:29 +02:00
183a702be0 Fixed second batch of locale-dependent calls 2021-05-24 12:20:29 +02:00
a48acc5581 Minor code refinements 2021-04-21 16:49:11 +02:00
080f47e64b Write hollow flag to SL1 files if any object is hollowed. 2021-04-21 16:29:12 +02:00
97a85eb487 WIP: MMU segmentation without top and bottom layers 2021-04-19 07:04:50 +02:00
ef8718327b WIP: Duplicated the FDM support gizmo for the MMU segmentation 2021-04-19 07:01:11 +02:00
27c779cc16 Fix issue with importing sl1 files with non-ascii filenames. 2021-04-07 12:41:38 +02:00
2c55aed37c Fix of 589d2be442 2021-03-08 11:29:52 +01:00
1b1785703d Fix of Repair with Netfabb does not work on builds after 2.3.0 release (Windows 10) #6193
This is more a workaround than a fix: Windows 10 3D model fixing API refuses
to load a zip64 encoded 3MF. We need to get in touch with Microsoft on that
issue, for now the 3MFs generated for the Windows 10 3D model fixing API
will be limited to 4GB. Saving a bigger 3MF will fail.
2021-03-08 09:36:21 +01:00
8cf75cf037 Fix of Improve Support material adhesion by base type interface layers
under soluble supports. #5823
Implemented as a pull request #5903 by @spiky2021
and reworked.

commit c7993e619225553a2c4078787907b9ebbd9ac759
Author: spiky2021 <77010315+spiky2021@users.noreply.github.com>
Date:   Thu Feb 11 12:39:25 2021 +0100

    Base type interfaces for soluble interface supports

    At the moment soluble support material adhesion is weak due to sparse support layers under soluble support layers. I reported as issue #5823 with pictures, as well.
    I modified two methods to the SupportMaterial Class including their headers.
    The new methods add two base type interface layers to the support structure, in case the extruders are different and soluble support is choosen.
    Since it is conditionally activated, it in general doesn't need a GUI input. But a GUI option number of base interface layers may enabled users to adapt this feature to their needs.
    This is my second try to provide a pull request on this topic. Reset my fromer repository, because first I merged this and all other changes to my master and couldn't provide separate pull request anymore.
2021-02-15 18:07:44 +01:00
0b07af417e Improving 3MF import: checking for invalid data. 2021-02-12 16:46:49 +01:00
72fcba1202 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
6fc7007f51 Merge pull request #5963 from wavexx/remove_undeeded_includes
Remove unneeded inclusion of boost::nowide
2021-02-10 10:43:56 +01:00
e40485fc8a Fixed some clang warnings 2021-02-09 19:23:58 +01:00
f968cfd2d5 Fixing Clang warnings 3 2021-02-08 17:52:29 +01:00
e44b586442 Removed debug code 2021-02-08 13:23:11 +01:00
831f47f4f8 Fixing some compiler warnings on Linux 2021-02-08 11:58:03 +01:00
6936660d3d Fix of #5888 - Pause Print M117 message not saved after reloading .3mf project 2021-02-05 19:39:28 +01:00
0afcf8bfdf 3MF and AMF error reporting: Use boost::log instead of printf(). 2021-02-05 15:20:23 +01:00
8186736502 Improved AMF/3MF security when parsing invalid meshes. 2021-02-05 14:19:51 +01:00
a5c8dfab7f Remove unneeded inclusion of boost::nowide 2021-02-03 20:41:04 +01:00
517f71e893 #5071 - Reload from disk for 3mf files 2021-02-01 14:33:07 +01:00
256bdc757b 3mf export - Do not export unneeded space 2021-01-27 15:53:44 +01:00
22e6eb58d1 3mf export - Removed export of duplicated line into model config file 2021-01-27 12:26:46 +01:00
0b9a0c82e7 Fixes after merge. 2021-01-27 09:35:39 +01:00
cf3020fc97 Refactoring of 3MF file export to use the new homebrewed miniz
streaming interface. This shall fix high memory consumption and
crashes when exporting extremely large 3MF files.
2021-01-27 09:18:17 +01:00
14b6687537 WIP: Exporting 3MFs through a streaming interface. 2021-01-27 09:18:16 +01:00
1e9ba4b838 Merge pull request #5544 from hzeller/fix-assignment-of-charliteral-to-writable-charptr
Fix assignment of string literals to char*.
2021-01-05 13:11:29 +01:00
7904fddb80 Escape special xml characters when writing metadata into the model file
This should fix #5577
2021-01-04 14:21:24 +01:00
286672558c Fix assignment of string literals to char*.
Fix some char *foo = "string literal" assignments that
really should be assigned to const char*.

(they also happen to be constexpr, but that only prevents
to assign something later to foo, but does not alter
the char* type).

Signed-off-by: Henner Zeller <h.zeller@acm.org>
2020-12-20 13:40:25 -08:00
a8269f914f Fixed buffer overflow in the OBJ parser.
Improved error reporting on OBJ parser.
2020-12-17 09:53:21 +01:00
a923d5da26 Improvements of OBJ parser robustness. 2020-12-17 09:17:07 +01:00
3b6889e3cc Saving "converted from inches" to 3MF and AMF even if the file source
information is empty.
2020-12-16 12:05:29 +01:00
097724307a Fix of #5443 - Assigned input file path for ModelVolume also for AMF archives 2020-12-15 14:18:11 +01:00
3dbb6fa7ad Fixed retrieving of the "saved in inches" flag from 3MF.
Fixed "import STL from Inches" - it should always scale up even if the
object is bigger than 3x3x3mm.
2020-12-12 18:54:34 +01:00
a6cf909405 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
e3afd0082d Added functions to export raw image data to PNG for debugging purposes.
Renamed PNGRead.cpp/hpp to PNGReadWrite.cpp,hpp
EdgeGrid: Resurrected debugging output to PNG.
2020-11-26 09:01:44 +01:00
af0b587f1c Merge of pull request Add support for RepetierServer #4384 by @docbobo
with the following refactorings:

1) Removed the "printhost_slug" config from the Printer config
   and from all the Printer config related spots.
2) "printhost_slug" renamed to "printhost_port". Slug sounds nasty.
3) Improved error reporting of RepetierHost class.
4) Refactored for the new "Physical Printers"

Following refactorings were done independently of the Repetier pull request:
1) Removed PrintHost static print config.
2) Clean-up after conversion of print host configuration
   from Printer config to Physical Printer config.
3) Fixed some issues, where the Printer config was still queried for
   host configuration. Vojtech believes that this should not happen
   after the host configuration is converted to physical printers.

Vojtech still feels that more refactoring is needed in regard to porting
the host configuration from Printer profile to the new Physical Printer
profile.
2020-10-28 09:51:05 +01:00
575da4840f Removed m_ prefix from public member variables. 2020-10-09 13:09:21 +02:00
4e0a0c5c51 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
f58ee46687 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
2e11c4e5b9 Merge branch lm_seam_painter_frontend 2020-09-01 23:03:16 +02:00
58b6d94166 Custom seam: Model integration, backend invalidation, 3MF loading/saving 2020-09-01 22:35:01 +02:00