Commit Graph

57 Commits

Author SHA1 Message Date
3f2b57b1d4 Squash merge of lh_brim_rework,
brim separated to Brim.cpp,hpp
Refactored accessors to PrintObjectPtrs, PrintRegionPtrs, LayerPtrs,
SupportLayerPtrs for const correctness.
2021-02-03 15:12:53 +01:00
87b247ea20 Fix of --scale-to-fit not accepting any input as valid (#5772)
Fixed parsing of Point3, fortunately Point3 was used at just a single
command line parameter, thus this was not a big deal.
2021-01-14 12:51:28 +01:00
e0edf3f4cc Configuration layer: Support for vectors of FloatsOrPercents and
FloatsOrPercentsNullable, to support further filament overrides
of Print preset values, namely Avoid Crossing Perimeters.
2020-12-14 15:58:47 +01:00
654bc266fc escape_ampersand function and changed order of printer names and pictures in config wizard 2020-11-11 16:08:27 +01:00
c12f0db22c Merge pull request #4747 from wavexx/monospaced_gcode
Use monospaced fonts in gcode sections
2020-10-10 14:01:48 +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
fbd1ee098b Introduce ConfigOptionDef::is_code to select code_font() 2020-09-13 02:36:50 +02:00
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
18fd7fa45f Fixing build against wxWidgets 3.0
The wxString saga continues. wxWidgets 3.0 don't have the wxString::FromUTF8(const std::string&) overload, we must use the GUI::from_u8 helper
Also wxWidgets 3.0 don't allow to disable wxString->const char* conversion, so calling show_info(wxWindow*, wxString, const char*) was ambiguous
Several includes moved around
2020-03-04 10:34:59 +01:00
08ac87909e Fix of
Opening saved project removes Print Host settings #3655
Octoprint Settings when Opening a .3MF file #3244

When loading a configuration file (from AMF, 3MF, .ini or .gcode),
and if the host settings ("print_host", "printhost_apikey", "printhost_cafile")
in the configuration file is empty, then the config is considered to be anonymized,
and these anonymized keys are loaded from the referenced "derived from" profile,
if it exists in user's PrusaSlicer configuration directory.

We are aware that this is a patch work and a better long term solution
is to separate physical printer settings from logical printer settings,
but this is a good enough solution for PrusaSlicer 2.2.0 release.
2020-02-18 14:13:56 +01:00
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
760c884e0a Fixing some missing throw statements.
Adding noexcept to move constructors / operators.
2020-01-13 17:41:40 +01:00
9f822b0ee4 Some refactoring and const correctness fixes. 2020-01-07 14:35:43 +01:00
8ebf970934 Const correctness improvements:
removed some unnecessary const_casts that remove const.
2020-01-03 16:33:04 +01:00
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
a4c1cc9dd2 Ported test_support_material.cpp from upstream slic3r.
Ported extension of ExtrusionEntityCollection::flatten() to disable
flattening of no_sort() collections.
2019-10-17 19:09:24 +02:00
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
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
6e10e35717 Fix crashing test executable on gcc 4.9 2019-10-02 14:42:28 +02:00
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
32f79f143b Fixed several warnings (Config.hpp and few other files) 2019-09-06 15:55:07 +02:00
1d0b4109cb Some reverts for commit 4cd4d2c8b5 2019-08-14 17:07:30 +02:00
b9a7444b1b Fixed wrong page selection for Printer Setting after application run 2019-08-13 17:09:42 +02:00
d78315aefb Corrected return value of ConfigOptionVector::apply_override to what was intended (this didn't cause any bug though, the return value is currently not used) 2019-08-05 15:24:49 +02:00
1feb4ccdcc Merge remote-tracking branch 'origin/vb_filament_overrides' into ys_overrides 2019-07-28 22:01:48 +02:00
b89866051f Implemented update of the override filaments options from/to config 2019-07-28 22:00:39 +02:00
9e299ad175 Fixed missing return value. 2019-07-25 17:18:51 +02:00
f5e17835d6 Reworked the FFF Print::update() to process the filament retract
override values and to store them into the output G-code.
2019-07-25 14:39:19 +02:00
55dbcce4d0 Fixed is_nil() method on ConfigOptions.
PlaceholderParser was extended to support external config.
The external config has a lowest priority when looking up a variable.
2019-07-24 12:39:01 +02:00
e9dc071982 WIP: Nullable config values. Fixed compare operator for float vectors. 2019-07-23 17:15:34 +02:00
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
fb23d8e6fa Fix of osx builds 2019-07-18 18:19:40 +02:00
1f3b546dbb Simplified the "cereal" includes to not clash with Perl includes 2019-07-04 22:09:14 +02:00
d98aa0f91d Merge remote-tracking branch 'origin/master' into vb_undo_redo 2019-07-04 20:22:15 +02:00
43db83c91d Fix of https://github.com/prusa3d/PrusaSlicer/issues/2516 2019-06-27 09:48:19 +02:00
3d84bd20a3 WIP Undo / Redo: Serialization of the Model / ModelObject / Model instance
using the cereal framework.
2019-06-26 16:29:12 +02:00
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
b4fc2d59b4 Added ConfigDef::get_default_value<>() template,
refactored calling code to use it.
2019-05-03 18:30:58 +02:00
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
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
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
393c72aa8e Implemented ModeSizer with ModeButtons for the mode view changing from the settings tabs and plater 2019-01-10 11:09:31 +01:00
54a6a69cd4 Fixed editing of the extruder's settings (SPE-735) 2019-01-08 10:18:21 +01:00
748e487f44 Fixed constness of Config::env_ 2018-12-10 10:44:30 +01:00
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
96eba71a21 Integrated SLAPrint into background processing.
Fixed couple of compiler warnings.
2018-11-08 20:18:40 +01:00
601b925924 Fixed a compilation issue on OSX 2018-11-08 15:02:47 +01:00
7c008a32ab Fixes to storing and loading configs from AMF/3MF. 2018-11-07 14:57:50 +01:00
ec1bcd62de Fixed loading of old 3mf files. 2018-11-06 19:09:54 +01:00
07feaa3c7d WIP: SL1 profiles, SL1 in wizard, switching between FFF / SLA 2018-10-31 16:22:36 +01:00