Commit Graph

63 Commits

Author SHA1 Message Date
Vojtech Bubnik
be60775077 get_wraped_wxString(): Adapted to work with UTF8 2022-01-31 16:25:20 +01:00
David Kocik
3f14484eca Moved Odaki's implemetation of searching for end of utf8 sequence to separate function.
+ Fix of 0xC0 in trailer bytes 
followup on fff862a5ae
2022-01-05 14:45:56 +01:00
Vojtech Bubnik
23e4ecdf0f Follow-up to c772d28070
Support for oneTBB from oneAPI, where Intel reworked and deprecated
some interfaces.
Implements some of TBB universal fix (2020/2021 fixes) #7332
This one adds TBB_HAS_GLOBAL_CONTROL for the up to date oneTBB.
2021-12-12 14:14:43 +01:00
Vojtech Bubnik
ac7674b85a Fixed visualization of G-code lines in G-code viewer (3D view).
Improved speed of parsing external G-code.
2021-09-21 15:30:37 +02: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
Justin Schuh
5c9bc26ed5
Replace OpenProcess with GetCurrentProcess where appropriate (#6914)
GetCurrentProcess is more correct and resolves spurious AV warnings.
2021-09-07 09:45:10 +02:00
Lukas Matena
2844bee60b Added missing include (gcc 8.4) 2021-08-27 14:01:29 +02:00
Vojtech Bubnik
ae8e0311d7 debugging function debug_output_path() moved to utils.cpp/hpp
and it now prints to console the default path when called for the first time.
Fixed compilation of debugging output in SupportMaterial.
2021-08-27 11:25:50 +02:00
YuSanka
1e60acde12 Substitutions : Implemented InfoDialog 2021-08-13 13:30:50 +02:00
YuSanka
e8e3279511 Shapes Gallery :
- Suppress to create a PNG-files for system shapes
 - Allow to load the OBJ files
2021-08-02 15:00:41 +02:00
YuSanka
e79bcee739 Fixed update of the default menu after changing of the mode.
+ Added check for the output directory for the G-code extport.
2021-07-26 14:41:38 +02:00
YuSanka
232309a879 Don't save shapes directory to the "last_dir" 2021-07-21 16:13:40 +02:00
YuSanka
4257ffddde GalleryDialog: Changes the paths to the system and custom galleries 2021-07-14 17:41:37 +02:00
Oleksandra Yushchenko
d6fdf2d5c2
Modifiers Gallery (#6703)
* Added GalleryDialog

* GalleryDialog improvements:
* Added DnD functionality
* Added "Delete custom shapes" function
2021-07-12 15:20:50 +02:00
Vojtech Bubnik
211110ce53 Fixing some compiler warnings. 2021-06-27 17:45:41 +02:00
Vojtech Bubnik
3a5a0575ef Fixed after removing TBB deprecated APIs 2021-06-23 15:24:05 +02:00
Roman Beránek
e13535f822
drop deprecated TBB components (#6590)
Quite some time ago, many of the TBB components were deprecated in favor
of their near-equivalents in the STL or, in the case of task_scheduler_init,
were broken up and reconstituted under a less ad-hoc logic. Every time a header
file marked deprecated gets included, a rather loud warning is emitted, which
leads to a complete TBB's domination over the stderr stream during build time,
making it harder to notice _legitimate_ warnings.

Instead of merely muting the output with TBB_SUPPRESS_DEPRECATED_MESSAGES,
perform a genuine migration away from the deprecated components with the added
benefit of achieving a source compatibility with oneTBB, the successor to TBB
which has dropped the deprecated API for good.

What got replaced for what?

| Deprecated				| Replacement					|
| ------------------------------------- | --------------------------------------------- |
| `tbb::atomic`				| `std::atomic`					|
| `tbb::mutex`				| `std::mutex`					|
| `tbb::mutex::scoped_lock`		| `std::scoped_lock<std::mutex>`		|
| `tbb::mutex::scoped_lock` (empty)	| `std::unique_lock<std::mutex>` (deferred)	|
| `tbb::task_scheduler_init`		| `tbb::global_control`				|
| `tbb::this_thread`			| `std::this_thread`				|

Signed-off-by: Roman Beranek <roman.beranek@prusa3d.com>
2021-06-23 11:48:48 +02:00
Vojtech Bubnik
2f8190e6d0 Workaround of boost::filesystem::copy_file() incompatibility
on some file systems (eCrypt ...)
Should fix #4716 #6588
2021-06-14 12:19:13 +02:00
Vojtech Bubnik
01406fd521 Worked around some quirky Linux file system issues. Namely
the Chromebooks share their file system to Linux using the 9p file
system, which does not support setting file ownership. Newly PrusaSlicer
will detect platform and it will not panick if copy_file() cannot set
file ownership after copying. It just logs the incident, and on
chromebooks the loglevel for that incident is "Info", not "Error".

Adjusted the full screen mode to contain menu bar.
Moved Platform.cpp/hpp to libslic3r
2021-03-15 16:19:22 +01:00
Vojtech Bubnik
7d751753bc Replaced __linux macro with __linux__ 2021-01-11 13:31:30 +01:00
Vojtech Bubnik
fb29325b14 Fix of G-code Viewer not loading .gco files #5536
".gcode", ".gco", ".g" and ".ngc" were considered to be G-code file
extensions by the G-code import / export file dialogs, but not by
various other functions. Now the G-code extension is tested by
a single function is_gcode_file(string).
2021-01-05 12:26:11 +01:00
David Kocik
994b69f19b cleanup 2020-12-01 12:06:10 +01:00
David Kocik
247f3a7dbe Set boost to use utf8 for system messages (in cmake). Fix of #5180. 2020-12-01 12:06:10 +01:00
David Kocik
cbe0b4f0f1 Change log level of boost::filesystem::permisions error code message. Now it shouldnt bother like in #5254 2020-11-26 17:15:26 +01:00
enricoturri1966
f1d10f3c90 ENABLE_GCODE_VIEWER set as default in libslic3r 2020-11-12 14:03:58 +01:00
David Kocik
3ca3a544a8 New Export Finished notification showing path and opening containing folder. Fix of #4917. Fixed wrongly grayed eject button in File menu. Hopefully fix of ctrl shortcut of tooltips at sidebar. 2020-11-04 09:29:08 +01:00
David Kocik
64f6499db5 Fix of empty error string. No testing errors for boost::filesystem::permission. 2020-10-23 18:35:32 +02:00
David Kocik
8b647ab41b fix of copy_file_inner 2020-10-23 15:36:32 +02:00
David Kocik
115cbd4650 aditional information to FAIL_COPY_FILE error message and changed bools controlling Export finished notification 2020-10-23 10:18:14 +02:00
enricoturri1966
f04d9c1806 Tech ENABLE_GCODE_APP_CONFIG as default 2020-10-12 12:38:34 +02:00
enricoturri1966
c94fb13369 AppConfig modified to generate a separate config file for the standalone gcodeviewer 2020-10-05 15:42:35 +02:00
David Kocik
26c89300f3 copy file result enum 2020-02-27 10:44:25 +01:00
David Kocik
746a5c1788 bug fix at check_copy() while exporting to sd/usb 2020-02-20 10:35:53 +01:00
tamasmeszaros
ad3e3be3bc optimize string_printf 2020-02-03 17:11:24 +01:00
tamasmeszaros
0c4797e92e use vsnprintf instead of snprintf in string_printf function
Also, revert to old location: Utils.hpp and utils.cpp
2020-02-03 16:00:53 +01:00
tamasmeszaros
992a0c3d7a remove duplicate string_printf
#3594, #3592
2020-02-03 11:19:11 +01:00
David Kocik
93f9fc1049 Throwing exceptions with text after copy file check failure and renaming from .tmp failure 2020-01-21 13:39:27 +01:00
bubnikv
9406b50447 Const correctness improvements:
removed some unnecessary const_casts that remove const.
2020-01-03 16:33:04 +01:00
bubnikv
0808c8fa3c Refactoring and documentation of check_copy() and copy_file() 2019-12-22 11:11:48 +01:00
Lukas Matena
13f1bb2e43 An attempt to fix missing renaming from .gcode.tmp to .gcode
Added a missing include
2019-12-21 12:31:32 +01:00
David Kocik
31b134bfcc copy file into .tmp and then rename if correct 2019-12-19 15:36:00 +01:00
David Kocik
ef250ad539 copy check only if path is on removable device 2019-12-18 14:09:16 +01:00
David Kocik
a68ede6f2d check_copy function 2019-12-18 13:13:40 +01:00
Vojtech Kral
d729315de3 Fix g-code export to permissionless filesystems
Fix #2521
Fix #3102
2019-11-01 10:54:55 +01:00
tamasmeszaros
d5dcba00b1 Time conversion functions with tests.
Fixes issue with incorrect characters in time strings on UI.
Fix platform dependency


Fix return value with incorrect strings.


Just use strptime and strftime on all platforms.

Emulate strptime on msvc... because they don't have it and their get_time is buggy.
2019-10-02 14:44:11 +02:00
tamasmeszaros
c37ec7463f Add new config values to SL1 zip file config.ini
All requested config values are written into SL1 ini file inside the zip

* TIme.hpp and Time.cpp is now part of libslic3r instead of libslic3r_gui
* Updated time manipulation function: separate timestamp_local_str and timestamp_utc_str
* timestamp_utc_str is used in header_slic3r_generated(). Gcode now contains UTC timestamps
2019-09-11 13:10:23 +02:00
bubnikv
fd3fe75d1c Reworked the rename_file() function on Windows to work reliably and
atomically. The code was taken from the llvm project, it is complex
and hopefully it covers all the Windows file system quirks. Vojtech
has highest hopes, that this will fix the various PrusaSlicer.ini
file corruptions.

Enabled the locales switching and error handling on Linux as well,
where now the missing locales are reported and running the locale-gen
tool is recommended.
2019-08-20 16:19:30 +02:00
bubnikv
bcfb445d0c Partial revert of f474978db5
to fix Perl driven unit tests.
2019-08-08 15:24:23 +02:00
bubnikv
f474978db5 Clean up the mess required for the legacy Perl bindings, which are now
used for Perl unit / integration tests only. With this commit,
the code will be cleaner, but likely the unit tests will not run
on Windows, if installed in a localized path.
2019-08-08 12:59:55 +02:00
Lukas Matena
b0d4cb6e06 Memory usage is now shown in SysInfoDialog on all three platforms 2019-08-05 20:17:29 +02:00