Commit Graph

92 Commits

Author SHA1 Message Date
Lukas Matena
3371e2f484 Follow-up of bc81c22e (renamed the new CLI option --dont-ensure-on-bed to avoid double negatives) 2021-08-04 15:44:35 +02:00
Lukas Matena
47bfe5ab3e CLI: Ensure that objects are on bed by default, new CLI config option:
'dont-ensure-on-bed' (which allows to override). This was the original
behaviour in Slic3r and Sli3rPE, probably broken long ago when CLI
was ported from  Perl.
Also, --scale-to-fit should now work again (#5772)
2021-08-04 12:15:37 +02:00
Vojtech Bubnik
b21cadc1c4 WIN32 specific Blacklisted libraries check:
1) Polished up wording of the error messages.
2) Made some messages in the SysInfo dialog localized.
3) Renamed LibraryCheck.cpp/hpp to BlacklistedLibraryCheck.cpp/hpp
4) CPPized the BlacklistedLibraryCheck WIN32 C code.
2021-07-30 15:52:52 +02:00
YuSanka
14e1293ade GalleryDialog: Changes the paths to the system and custom galleries 2021-07-14 17:41:37 +02:00
Oleksandra Yushchenko
080807eda5 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
05ccafeeb5 As an example of using the enum_bitmask infrastructure for type safe
sets of optional boolean parameters, the cut function "keep upper",
"keep lower" and "flip lower" boolean parameters were converted into
a single type safe enum_bitmask. Such a coding style is certainly
wordier than the original code, but much safer and more readable
than the error prone "boolean, boolean, boolean" function call
parameter list.
2021-06-27 17:36:25 +02:00
Vojtech Bubnik
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
Vojtech Bubnik
993a0ba213 call detect_platform() after SLIC3R_LOGLEVEL env variable is read 2021-03-15 17:00:49 +01:00
Vojtech Bubnik
aa0216af39 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
Boleslaw Ciesielski
9b3e81b3e4 Fixes issue #5979 - NULL pointer crash in ModelObject::split()
ModelObject::split() expects a non-NULL new_objects vector where it adds pointers to the new models resulting from the split.
But in the CLI case the caller does not care about this and passes NULL which causes a crash. To fix the crash we could pass
a dummy vector but it turns out that we actually have a use for the results because we should assign a unique name to each
new model the same way as the GUI does. These names show up as comments in the gcode so this change makes the gcode produced
by the GUI and the CLI more similar and diffable.

@lukasmatena has amended the original commit by @combolek (pull request #5991) in order to avoid code duplication
2021-02-10 12:30:06 +01:00
David Kocik
bbbfedb600 Check loading of blacklisted dlls and show warning dialog at startup. Also show these dlls in sysinfo dialog. 2021-01-27 10:40:38 +01:00
Vojtech Bubnik
6bb74b972c Follow-up to 2bc6679a62
Set the printer_technology field.
2021-01-19 15:35:27 +01:00
Vojtech Bubnik
78ae64f2b9 Partial revert of 1bffc2b99b
(deriving the printer technology from the merged configs).
2021-01-19 15:18:03 +01:00
Lukas Matena
201a66f198 Bugfix: CLI slicer should slice in FDM mode when no printer_technology is provided.
This was broken between 2.2.0 and 2.3.0 (1bffc2b) and changed the CLI behaviour.
Also related to 5029.
2021-01-19 10:29:35 +01:00
Vojtech Bubnik
48ac3c9ded Fix of Invoking prusa-slicer from $PATH environment variable crashes #5542
Also it likely fixes Crashes when started from symbolic link #5751
2021-01-13 09:22:13 +01:00
Vojtech Bubnik
05f6215f54 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
Vojtech Bubnik
a2e45b159e Fix of Command line slicing bad gcode #5029
SL1 file was exported with a .gcode suffix if the user did not provide
output file name for SLA command line slicing.
2020-12-07 18:39:33 +01:00
Vojtech Bubnik
447ea55987 Fix of [BUG]Post-Processing Scripts not called while slicing from command line #4903 2020-12-07 15:21:36 +01:00
enricoturri1966
c393ace3a8 ENABLE_GCODE_VIEWER set as default in fff_print test and PrusaSlicer.cpp 2020-11-12 15:01:59 +01:00
Vojtech Bubnik
b0f276fd3c GUI initialization extracted from PrusaSlicer.cpp to GUI_Init.cpp/hpp.
Implemented try/catch blocks for Slic3r exceptions and std::exceptions
with GUI error reporting. This is extremely important to report
corruption of PrusaSlicer.ini.
2020-10-22 16:28:55 +02:00
enricoturri1966
14bc2c1a1c Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer 2020-10-22 13:54:45 +02:00
enricoturri1966
7c177717ca Fixed crash on Windows when dragging and dropping a non gcode file into gcode viewer exe file 2020-10-22 13:54:31 +02:00
Vojtech Bubnik
d5e4bce750 Support for naming slicer own threads for debugging.
The following threads are named with this commit:
slic3r_main, slic3r_BackgroundSlicingProcess,
slic3r_tbbpool_xx_yy where xx is a one based index of the TTB thread
and yy is the platform thread ID.
2020-10-22 13:54:15 +02:00
Vojtech Bubnik
e3d21b1a71 Fix of the "dock" menu on OSX to start a new instance of PrusaSlicer
in case a single instance is disabled.
Make the "single_instance" enabled by default on OSX initially
to match the platform.
2020-10-17 09:23:05 +02:00
enricoturri1966
e0e10eec47 Fixed build when tech ENABLE_GCODE_VIEWER is disabled 2020-10-16 14:08:24 +02:00
Vojtech Bubnik
bbc7dffe5e Fix of Cmd line output does not always show correct output file name #4872 2020-10-15 07:54:01 +02:00
Vojtech Bubnik
1fb9e1f70c wxEVT_CREATE and wxEVT_ACTIVATE is not being called on the main frame
on application start-up, at least not on Windows.
wxEVT_CREATE was called for some control deep in the Plater, however
the event was delivered to the main frame and only for slicer, not
for G-code viewer. Thus the callbacks for 3D Mouse were not registered
for and the 3D mouse did not work on Windows.

Fixed by calling the callback registration from the first execution
of the Idle function.
2020-10-14 12:55:07 +02:00
David Kocik
cc7b1b773a switching from slicer to gcode viewer - unlocking lock file 2020-10-14 08:48:38 +02:00
enricoturri1966
1318c67b39 Tech ENABLE_GCODE_DRAG_AND_DROP_GCODE_FILES set as default 2020-10-12 13:09:04 +02:00
Vojtech Bubnik
00e27f430c Fix of previous commit 2020-10-07 13:01:48 +02:00
Vojtech Bubnik
eb5511308f Support symlinks to prusaslicer binary on OSX and Linux. 2020-10-07 12:54:56 +02:00
David Kocik
acc79d5fa4 instance check: do not perform for gcode viewer 2020-10-05 14:55:31 +02:00
YuSanka
5f60e6e1fe Merge remote-tracking branch 'origin/ys_splashscreen_on_mac' 2020-10-03 03:18:01 +02:00
YuSanka
b2fb9064f5 A part of code related to loads after App::OnInit() call is moved from PrusaSlicer.cpp to GUI_App.cpp
Splash Screen under OSX requires a call of wxYeild() for update.
But wxYield() furthers a case, when CallAfter() in CLI::run() was called at the wrong time, before some of the GUI was created.
So, there is workaround:
Parameters needed for later loads are encapsulated to GUI_App::AFTER_INIT_LOADS structure
and are used in GUI_App::AFTER_INIT_LOADS::on_loads which is called just ones after wxEVT_IDLE
2020-10-02 22:27:20 +02:00
enricoturri1966
4d09c999e0 Start PrusaSlicer in gcode viewer mode when dragging and dropping a .gcode file on the application icon 2020-10-02 11:40:21 +02:00
Vojtech Bubnik
175cb54df9 DynamicPrintConfig::normalize() renamed to normalize_fdm(),
optimization of Print::apply()
2020-09-24 19:03:33 +02:00
charlie
3d6a2741c3 fix build on arch linux 2020-09-14 08:57:23 +02:00
enricoturri1966
77787e36ad Tech ENABLE_GCODE_VIEWER_AS_STANDALONE_APPLICATION set as default 2020-09-10 08:49:50 +02:00
enricoturri1966
4add81eb28 Completed implementation of 'File->GCode preview...' command 2020-09-09 15:03:51 +02:00
enricoturri1966
eea5e306a2 Fixed conflicts after merge with master 2020-09-08 15:38:35 +02:00
Vojtech Bubnik
651be5ad73 WIP Standalone G-code viewer 2020-09-08 13:33:43 +02:00
enricoturri1966
0b88b32141 GCode viewer using the proper layout when started as a standalone application 2020-09-08 11:40:06 +02:00
bubnikv
9112f6a207 WIP: prusa-gcodeviewer command line wrapper to start the PrusaSlicer
in standalone G-code viewer mode.
Linux and OSX stuff will follow.
2020-09-01 16:56:12 +02:00
enricoturri1966
02f159fa99 Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_gcode_viewer 2020-08-10 14:22:46 +02:00
YuSanka
ceaeb26da8 Code refactoring: AppConfig.cpp(hpp) are removed from the GUI to libslic3r 2020-08-08 17:03:20 +02:00
enricoturri1966
5bbc804744 Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_gcode_viewer 2020-05-27 14:29:54 +02:00
Lukas Matena
edcaab8b0a Includes cleanup:
GUI_App.hpp      (should not include) MainFrame.hpp
MainFrame.hpp    Plater.hpp
ModelArrange.hpp Model.hpp
Slicing.hpp      PrintConfig.hpp
FillBase.hpp     PrintConfig.hpp
GUI_App.hpp      PrintConfig.hpp
OptionsGroup.hpp GUI_App.hpp
2020-05-27 14:01:47 +02:00
enricoturri1966
e0d42d723c Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_gcode_viewer 2020-05-15 12:26:18 +02:00
David Kocik
c3f0ef7a84 single instance check
processing paths with whitespaces
unified lock for all systems - wxInstanceChecker
checking a messaging only for same binaries
2020-05-15 09:34:53 +02:00
enricoturri1966
71f98f2857 Fixed conflicts after merge with master 2020-05-06 12:48:00 +02:00