Commit Graph

32 Commits

Author SHA1 Message Date
bubnikv
6da3c1646e Slic3r::format(), Slic3r::GUI::format_wxstr():
wrappers around boost::format using C++17 variadic templates,
replacing the ugly and verbose
	(boost::format("template") % arg1 % arg2).str()
syntax.
The wrappers also implictely convert input parameters including the template
from wxString to UTF8.

The new format wrapper has been applied at multiple places as a start,
also some double macros _(L()) with new single macro _L().
2020-04-01 09:49:04 +02:00
bubnikv
464ad65de2 Imported error reporting when loading presets with option keys
or option values that our poor software does not understand.
This applies to configs added by some forks of slic3r, for example
slic3r++
PrusaSlicer has encountered an error: Failed loading the preset file: #3909
2020-03-25 16:04:11 +01:00
bubnikv
b4d3cd44cd Implemented handling of complex ConfigOptionFloatOrPercent chains
by the PlaceholderParser.

Namely, all the options with the "ratio_over" reference are now handled
correctly by the PlaceholderParser with the exception
of the "first_layer_extrusion_width", which overrides speed of extrusions
by their respective extrusion type.

Also the various extrusion widths (extrusion_width, first_layer_extrusion_width,
external_perimeter_extrusion_width etc.) produce the same numbers
as if ran through the back-end, with the assumption of not overriding
layer height by the variable layer height editing tool or layer height
modifiers.
2020-02-04 15:27:38 +01:00
bubnikv
8ebf970934 Const correctness improvements:
removed some unnecessary const_casts that remove const.
2020-01-03 16:33:04 +01:00
bubnikv
abb689c877 Fixed C++17 incompatibility. 2019-12-18 18:14:06 +01:00
bubnikv
4b16dd3e27 Ported test_config.cpp from upstream Slic3r.
Extended ConfigBase with set() functions similar to the upstream Slic3r.
ConfigBase::set_deserialize() newly throws if the operation fails.
Extrusion width parameters are newly tested for negative values.
2019-10-18 11:53:19 +02:00
bubnikv
c045ea62dc Ported test_support_material from upstream Slic3r.
Reworked the FFF testing framework & ConfigBase::set_deserialize()
for more compact tests: set_deserialize() now accepts list
of key / value pairs.

Fixed an incorrect assert in LayerRegion.
2019-10-17 17:09:15 +02:00
bubnikv
1d6cea5bb5 new cheaper constructor for DynamicPrintConfig from FullPrintConfig:
DynamicPrintConfig::full_print_config()
new cheaper constructors of DynamicConfig / DynamicPrintConfig from ConfigBase
Unit tests: ported test_model from upstream Slic3r, thanks @lordofhyphens
Unit tests refactored to use less autos and initializer lists for readibility,
DynamicPrintConfig is handled by value, not by shared pointer.
2019-10-16 11:16:50 +02:00
tamasmeszaros
6e10e35717 Fix crashing test executable on gcc 4.9 2019-10-02 14:42:28 +02:00
Lukas Matena
a34a1341c5 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
bubnikv
2c590e9dad WIP: Nullable configuration value concept, implemented for
ConfigOptionFloatsNullable, ConfigOptionIntsNullable,
ConfigOptionPercentsNullable, ConfigOptionBoolsNullable.

retract override values were added to the Filament profile:
vector of floats: "retract_length", "retract_lift", "retract_lift_above",
	"retract_lift_below", "retract_speed", "deretract_speed",
	"retract_restart_extra", "retract_before_travel",
vector of bools: "retract_layer_change", "wipe"
vector of percents: "retract_before_wipe"
2019-07-23 14:15:42 +02:00
bubnikv
1f3b546dbb Simplified the "cereal" includes to not clash with Perl includes 2019-07-04 22:09:14 +02:00
bubnikv
3ff7dd2b4f Trying to fix some template resolution on Linux 2019-07-04 21:02:08 +02:00
bubnikv
d98aa0f91d Merge remote-tracking branch 'origin/master' into vb_undo_redo 2019-07-04 20:22:15 +02:00
bubnikv
43db83c91d Fix of https://github.com/prusa3d/PrusaSlicer/issues/2516 2019-06-27 09:48:19 +02:00
bubnikv
490e09b0ac 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
bubnikv
243e398cd6 Fix of "PrusaSlicer 2.0.0.-rc+ g-code error when importing #2304" 2019-05-21 09:41:46 +02:00
bubnikv
6ae851ff90 Implemented the "Support for support enforcers only" quick selection.
Reduced some memory leaks due to the ConfigDef::default_value pointer.
2019-05-03 18:01:39 +02:00
bubnikv
f12593a0c3 Fixed missing include on OSX 2019-03-17 15:04:34 +01:00
bubnikv
1d4cdb016f Command line - improved error handling 2019-03-17 14:35:54 +01:00
bubnikv
9bc8ef9771 Help for the FFF / SLA command line parameters.
Removed the cli parameter from most options as it is derived
from the option key. Options without CLI parameter are now marked
with cli = nocli.
2019-03-13 19:17:26 +01:00
bubnikv
322d2a1fab Reworked the command line interface based on the current state
of the upstream.
Thanks @alexrj, @lordofhyphens for the original code of slic3r.cpp
2019-03-13 15:44:50 +01:00
bubnikv
865576c2d8 Ignore the extra "Process Serial Number" parameter generated by the OSX finder
https://stackoverflow.com/questions/10242115/os-x-strange-psn-command-line-parameter-when-launched-from-finder
2019-01-09 14:09:08 +01:00
bubnikv
e57172a7bf Fixed a bug in the Win32 start wrapper (wrong number of parameters was passed for the GUI slic3r.exe).
Reworked command line processing for the GUI slic3r. Now the config is loaded first, then the model files (also the configs from AMF/3MF are applied), and lastly the free standing parameters are applied.
Fixed unescaping for command line parameters. The string parameters are now not unescaped, string vector parameters are unescaped only if enquoted.
Tab::load_current_preset() - disabled CallAfter for predictability. With CallAfter, it was difficult to call the method in sequence with other methods.
Fixed some missing ->Destroy() calls on dialogs created from MainFrame
Fixed some compiler warnings.
2019-01-09 10:43:17 +01:00
bubnikv
fae0b19b40 Replaced all wxString.ToStdString() with wxString.ToUTF8().data()
to be sure that the strings are correctly converted to UTF8.
2019-01-03 14:34:53 +01:00
bubnikv
eb89a67a60 Fix of SPE-691 Slicer crash after extruder change
Added synchronization of GCodePreviewData between the front end / back end
(GCodePreview data is only used if PrintStep psGCodeExport is finished).
Added reset of GCodePreviewData on Print::apply() to conserve RAM.
2018-12-19 14:47:16 +01:00
bubnikv
748e487f44 Fixed constness of Config::env_ 2018-12-10 10:44:30 +01:00
bubnikv
0e573ebf10 Implemented compatible_printer / compatible_printer_condition
for filaments and SLA materials.

Fixed compatible_printers / compatible_prints dialog to show
system profiles as well.
2018-12-04 17:56:49 +01:00
Vojtech Kral
eebd782eda Fix rendering performance on macOS 2018-11-08 15:31:29 +01:00
bubnikv
7c008a32ab Fixes to storing and loading configs from AMF/3MF. 2018-11-07 14:57:50 +01:00
bubnikv
4541afbbc8 Added C++ command line processing, thanks @alexrj and @loh 2018-09-20 16:48:13 +02:00
bubnikv
1260b8deb3 WIP: Moved sources int src/, separated most of the source code from Perl.
The XS was left only for the unit / integration tests, and it links
libslic3r only. No wxWidgets are allowed to be used from Perl starting
from now.
2018-09-19 11:02:24 +02:00