Commit Graph

548 Commits

Author SHA1 Message Date
bubnikv
91c7bc43d3 Added new files missing from the previous commit. 2018-01-23 11:37:45 +01:00
bubnikv
09c9f6bdc3 Added TabIface C++ wrapper for GUI::Tab C++ class,
exported the TabIface to Perl.
2018-01-23 11:37:19 +01:00
bubnikv
1d10a2293a Example implementation of C++ to Perl callbacks using wxWidgets command events. 2018-01-21 23:35:00 +01:00
YuSanka
8e0cd35c23 Merge remote-tracking branch 'origin/master' into gui_translate_to_cpp 2018-01-14 21:58:21 +01:00
bubnikv
696d420dc8 New feature: Recommended object thin wall thickness hint. 2018-01-04 15:38:06 +01:00
YuSanka
f8a48f5c13 Start adding functions to work with presets 2018-01-03 10:12:42 +01:00
bubnikv
02256e900f Merged the branch time_estimate 2018-01-02 10:57:30 +01:00
YuSanka
61247fe8d3 Filling the Filament's and Printer's Tabs. Finished. It's need to adding functions to work with presets 2017-12-26 18:12:05 +01:00
bubnikv
48ba7e5f73 Removed dependency on Perl Encode::encode_utf8. 2017-12-21 20:11:19 +01:00
bubnikv
f5160b7a72 Fixed "Slic3r crashes when sending STLs with special characters to the printer"
https://github.com/prusa3d/Slic3r/issues/597
The "Send to OctoPrint" function will now send the file name encoded
in UTF-8, so the file name will not get mangled.

The C++ Slic3r::encode_path() function was returning a string to Perl,
which was marked as UTF-8. This has been fixed, now encode_path() returns
a plain Perl string.

Added path_to_filename, path_to_stem, path_to_extension, path_to_parent_path
Perl wrappers to boost::filesystem::path splitting functionality
to be able to split UTF-8 encoded files on Windows correctly.
2017-12-21 16:56:33 +01:00
bubnikv
558a0753c1 Improved loading of the config wizard results.
Fixed some updates of the "compatible with printer" flags
at the print and filament presets.
2017-12-20 11:28:16 +01:00
bubnikv
0b6bd3cbde Implemented a "Reset user profile" on the first page of the configuration
wizard if the wizard is opened from the menu. This allows one
to reinstall the bundled printer profile cleanly.

Fixed a bug when loading a config bundle as a config: The config bundle
should not be unpacked into the user profile directory.
2017-12-19 19:51:22 +01:00
bubnikv
6b81f43206 First implementation of the "compatible_printers_condition"
for the print and filament profiles.
Added documentation for building the boost library for Slic3r on Linux.
2017-12-18 15:07:38 +01:00
bubnikv
bb61de8379 Fixed a regression error: The "current_extruder" identifier was not set
at the placeholder parser.
Implemented a new PlaceholderParser::evaluate_boolean_expression()
functionality to evaluate just a boolean expression using the full
expressive power of the macro processing syntax. This function
will now be used for deciding, which print or filament preset
is compatible with which printer preset.
2017-12-18 12:14:09 +01:00
Enrico Turri
0fe855cd6d Time estimate shown in GUI as formatted string / Write to file made by class GCode's private methods 2017-12-14 09:18:28 +01:00
bubnikv
21b4e62e6e Fixed handling of print and filament presets incompatible
with the newly selected print profile,
fixed loading of print and filament tab pages after the print or filament
preset has been changed to be compatible with a newly selected printer.
2017-12-13 14:00:14 +01:00
bubnikv
61e6f23ed2 Fix of
"Multimaterial printer switches filament at the wrong time during a print"
https://github.com/prusa3d/Slic3r/issues/607

There was a single layer between the raft top and the object first layer
missing on the wipe tower, and after this missing layer all the tool
changes were shifted by one layer, meaning two color print had the colors
switched.
2017-12-11 17:19:55 +01:00
Enrico Turri
50a45949d1 merge with master 2017-12-11 12:01:30 +01:00
Enrico Turri
bea9628be0 time estimation shown in GUI after gcode export 2017-12-11 11:11:54 +01:00
bubnikv
679aa2822c Moved the Slic3rPE/print,filament,printer folders to
Slic3rPE/presets/print,filament,printer
to separate the presets from further data stored into the Slic3rPE
directory.
2017-12-10 22:11:00 +01:00
bubnikv
657f2734f1 Extended the Config Wizard to offer a selection of config bundles
bundled with Slic3r installation, and install it into user's Slic3r profile.
These bundled config bundles will be contained in the Slic3r source
tree under Slic3r/resources/profiles.

Breaking change! The Slic3r user directory has been renamed to Slic3rPE
for the Prusa Edition. Also it is likely, that the Slic3rPE directory
will be reorganized before the final 1.38 release to reserve space
for temporary profiles downloaded from the Internet.
2017-12-10 13:19:44 +01:00
bubnikv
8746f84fa2 Improved error reporting of the PlaceholderParser.
The PlaceholderParser is currently used by the GCode.cpp
and by Printer.cpp to generate a new name for the exported G-code or SVG file.
The PlaceholderParser::process() will throw a runtime_error with
a comprehensive error message.
The G-code export will include these error messages into the G-code text
with !!!!!! separators, and the GUI will inform the user, that the G-code
export failed.
2017-12-05 15:54:24 +01:00
bubnikv
8af329e660 Added Perl to C++ interfaces for creating the preset editor pages
from C++ and to add debugging menus from C++. These lightweigth
interfaces should help new team members to hack the UI without
a Perl knowledge.
2017-12-04 10:48:40 +01:00
bubnikv
ca0626b168 Fixed regression bugs regarding print validation,
fixed crashes when loading a config.ini with "compatible_printers"
disabled export of "compatible_printers" into gcode and config.ini

Enabled compatibility of printing multiple objects with support / no support
with a wipe tower.
2017-12-01 18:55:57 +01:00
bubnikv
3c0cd3cbc8 Improve error handling of loading Slic3r profiles. 2017-11-28 10:08:01 +01:00
bubnikv
47f193fe2d The PlaceholderParser has been rewritten to use
a real boost::spirit::qi parser, accessing the DynamicConfig repository
directly. This is a first step towards a full fledged expression
interpreter.
2017-11-17 11:15:46 +01:00
bubnikv
bfce6dba9b Integrated the "compatible printers" idea by @alexrj with Vojtech's twist:
The incompatible presets are hidden in the tabs if show_incompatible_presets
is false. If show_incompatible_presets is true, there is a button to
show / hide the incompatible presets from the tab selector.
2017-11-10 17:27:05 +01:00
bubnikv
b23b9ea1d2 Implemented volumetric flow rate hints,
removed some C++11 conditioned compilation. Slic3r now requires C++11.
2017-11-09 15:10:20 +01:00
bubnikv
9a0100d6de Initial definition of PresetHints C++ class and Perl binding, ported the cooling logic hints to C++.
Removed Perl Flow::new_from_spacing bindings.
Some Fill C++11 beautification.
Fix of a support_material_1st_layer_flow, brim_flow and skirt_flow logic to use the extrusion_width if both first_layer_extrusion_width and support_material_extrusion_width are undefined.
Documented the extrusion width logic in the config tooltips, including the default values.
2017-11-09 10:48:06 +01:00
bubnikv
b11d9708ed Updated Controller after the presets C++ port. 2017-11-02 21:51:06 +01:00
bubnikv
e8b6d92d4d Looks like the reworked C++ preferences start to work again. 2017-11-02 16:21:34 +01:00
bubnikv
95c284c764 Next step of Perl to C++ configuration layer conversion. 2017-11-01 19:30:05 +01:00
bubnikv
d564fc95df Split Preset.cpp,hpp to Preset.cpp,hpp and PresetBundle.cpp,hpp 2017-10-30 18:41:50 +01:00
bubnikv
1fee3633a0 New C++ class AppConfig for maintaining the config.ini
New helper function for generating a unified "generated by slic3r" header.
2017-10-30 18:15:41 +01:00
bubnikv
21633bc0ba throw std::invalid_argument instead of std::exception 2017-10-27 21:28:39 +02:00
bubnikv
2455aee97c Further reduction of Perl Config.pm methods. 2017-10-27 18:52:35 +02:00
bubnikv
3bc79e80d5 Fixed configuration & validate C++ ports. 2017-10-27 16:11:06 +02:00
bubnikv
5a99e694ce Another step towards the C++ presets. 2017-10-26 17:17:39 +02:00
bubnikv
ee645007f2 Another step towards C++ presets. 2017-10-25 12:53:31 +02:00
bubnikv
d9d6d996e9 Utility functions to pass wxWidgets pointers from Perl to C++ code.
C++ var_dir / set_var_dir() interface to access the UI resources
from the C++ code.
2017-10-17 20:00:15 +02:00
bubnikv
b9d57483d8 perglue.cpp - use static_cast instead of dynamic_cast if possible,
use switch instead of plenty of ifs,
export clone<DynamicPrintConfig> to Perl XS.
2017-10-17 19:19:41 +02:00
bubnikv
746afbd790 Yet another compilation fix? 2017-10-17 18:49:07 +02:00
bubnikv
9a7d1bb566 Another compilation fix. 2017-10-17 18:41:54 +02:00
bubnikv
3731820c48 Optimization of the configuration layer:
The values of StaticPrintConfig derived objects were searched by a name
walking through a huge chained if.
Now they are being mapped with a std::map.
Also initialization of StaticPrintConfig classes from their ConfigOptionDef
defaults is done by maintaining a single global definition of each
StaticPrintConfig derived class, and a new instance is initialized
from this static copy.

Also the ConfigOption instances are casted using static_cast
wherever possible, and their types are verified by a virtual type() method.
This approach avoids insiginificant performance penalty of a dynamic_cast.

Also the compare and clone methods were added to ConfigOption,
and the cloning & compare work on binary values, not by serialization.
2017-10-17 16:01:18 +02:00
bubnikv
84d4bf8fdb Load presets into the new C++ class. 2017-10-02 17:35:00 +02:00
bubnikv
b1e3b0cdf9 Further fixes of the previous commit. 2017-09-20 10:16:00 +02:00
bubnikv
473233019c Initial partial implementation of presets in C++. 2017-09-19 13:55:48 +02:00
bubnikv
cd084a33c6 Fixed a regression bug, which was made during the porting of
discover_horizontal_shells() fron Perl to C++, where
the already calculated bridge direction was being lost.

Improved constness of the debug methods
    void export_region_slices_to_svg(const char *path) const;
    void export_region_fill_surfaces_to_svg(const char *path) const;
2017-09-14 13:15:32 +02:00
bubnikv
247070cd82 Fixed a regression bug of Slic3r::encode() / decode() 2017-08-30 14:57:13 +02:00
bubnikv
ba1c0b0137 CMake build process - fixes of the previous check-ins to build
cleanly on Windows & Linux. There is still a work on OSX:
The XS module has to be linked without perl.lib and with
the following parameters to produce a bundle: -bundle -undefined dynamic_lookup
2017-08-18 21:09:53 +02:00