Commit Graph

136 Commits

Author SHA1 Message Date
b5c8e2629c Removed debug code 2021-08-19 09:47:01 +02:00
0e6b9aa65b Added retract acceleration member variable to GCodeProcessor and modified GCodeProcessor::process_M204() method 2021-08-19 09:38:51 +02:00
94c05f1dd9 Follow-up to 7c01ddf996
1) Starting with this commit, configuration block exported into G-code
   is delimited by "; prusaslicer_config = begin" and "; prusaslicer_config = end".
   These delimiters look like any other key / value configuration pairs
   on purpose to be compatible with older PrusaSlicer config parsing from G-code.
2) Config parser from G-code newly searches for "; generated by ..."
   comment over the complete G-code, thus it is compatible with various
   post processing scripts extending the G-code at the start.
3) Config parser from G-code parses PrusaSlicer version from
   the "; generated by PrusaSlicer ...." header and if the G-code was
   generated by PrusaSlicer 2.4.0-alpha0 and newer, it expects that
   the G-code already contains the "; prusaslicer_config = begin / end"
   tags and it relies on these tags to extract configuration.
4) A new simple and robust parser was written for reading project configuration
   from 3MF / AMF, while a heuristic parser to read config from G-code located
   at the end of the G-code file was used before.
2021-08-12 15:27:46 +02:00
5dabae7d0d Fixed import of color print view from gcode files into GCodeViewer 2021-07-23 11:27:07 +02:00
63ae8756bb Tech ENABLE_SEAMS_VISUALIZATION set as default 2021-07-22 12:58:33 +02:00
3dcf5f1156 Tech ENABLE_START_GCODE_VISUALIZATION set as default 2021-07-22 12:32:08 +02:00
58f3fa37b1 Tech ENABLE_EXTENDED_M73_LINES set as default 2021-07-22 09:55:39 +02:00
4537263265 Tech ENABLE_GCODE_WINDOW set as default 2021-07-22 09:37:02 +02:00
cef1a00d86 Tech ENABLE_VALIDATE_CUSTOM_GCODE set as default 2021-07-22 09:13:12 +02:00
cb873bd88c Tech ENABLE_GCODE_LINES_ID_IN_H_SLIDER set as default 2021-07-22 08:35:21 +02:00
22c7f22268 GCodeViewer -> Fixed loading of machine limits data from config contained into gcode files 2021-07-20 09:38:35 +02:00
e80ef16a5b Added a missing locale switch needed for custom gcode validation when switching tabs 2021-07-12 09:38:32 +02:00
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
3cb502c954 GCode Viewer -> Fixed used filament for gcode files produced by other slicers 2021-06-15 09:39:33 +02:00
03c6bdfe9a Fixed a memory leak during locales switching on macOS and
removed frequent locales switching during gcode processing
2021-06-05 07:09:23 +02:00
1ae72e2a33 Fixed calculation of used filament for gcode viewer (take data from gcode file) 2021-05-27 12:25:59 +02:00
183a702be0 Fixed second batch of locale-dependent calls 2021-05-24 12:20:29 +02:00
1cb432a4ae Fixed first batch of locale-dependent calls 2021-05-24 12:20:29 +02:00
2372f3b029 Fix of #2825 - Add the length of each filament used 2021-05-07 12:48:34 +02:00
1552641824 Follow-up of 15c32d636d -> Small refactoring 2021-05-04 13:31:07 +02:00
0b01436982 Seams detection for gcode saved with other slicers 2021-05-04 12:45:51 +02:00
868c1ecd41 Fixed conflicts after merge with master 2021-04-30 14:54:58 +02:00
3fe61c2887 Tech ENABLE_SEAMS_VISUALIZATION -> Added threshold to place seams 2021-04-27 15:12:45 +02:00
9516470b2f Tech ENABLE_SEAMS_VISUALIZATION -> Fixed build on Mac 2021-04-27 11:11:21 +02:00
343eb6006b Tech ENABLE_SEAMS_VISUALIZATION -> 1st installment of seams visualization in preview 2021-04-27 09:45:15 +02:00
f9ddb38f04 Extrusions in custom start g-code forced to be at first layer height level 2021-04-22 15:15:19 +02:00
25df2fb8f2 Do not convert custom gcode extrusion to travel 2021-04-09 12:52:11 +02:00
ecf048ad84 An attempt to fix time estimates for 'Marlin (legacy)' flavor
Old M204 S sets both printing and travel accelerations, which must be
accounted for now when the latter was separated.
2021-04-06 15:45:49 +02:00
6deb8338f3 GCodeProcessor added travel acceleration 2021-04-06 15:45:49 +02:00
311a5a3e01 GCodeProcessor use new flavor gcfMarlinFirmware 2021-04-06 15:45:49 +02:00
76de47ffca Renamed the gcfMarlin enum value to gcfMarlinLegacy so we never mistake it for the new one
There should be no functional change.
2021-04-06 15:45:49 +02:00
82c7e8e929 Follow-up of 3fce8398f0 - Fixed build warnings 2021-03-31 08:54:58 +02:00
c45ed01e75 Follow-up of 6ffa51da58 - Modified export of final M73 lines for remaining time to next printer stop accordingly to firmware specifications 2021-03-30 09:59:10 +02:00
24b45c3139 Extract bed size from gcode produced with Simplify3d 2021-03-25 09:23:14 +01:00
857751663a Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_extended_m73 2021-03-24 12:05:36 +01:00
1a1b61141b Fixed parsing of g-code files generated by newer versions of Simplify3D 2021-03-24 11:36:16 +01:00
9babcb55f8 Preview and G-code viewer - Fixed synchronization between markers for pause print, color changes, custom g-code, retractions, deretractions and current line shown in g-code window 2021-03-23 12:46:04 +01:00
b3f425b5c8 1st installment of export to gcode of M73 lines for remaining time to next printer stop 2021-03-23 09:05:52 +01:00
84c3833247 Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_gcode_window 2021-03-04 13:24:08 +01:00
e9f24ec861 Follow-up of 6a46b71dc1 - Fix build on non-Windows platforms 2021-03-03 15:17:45 +01:00
85b66176fb #5843 - GCodeProcessor: added processing of lines G28 2021-03-03 13:53:37 +01:00
1f562c13fb Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_gcode_window 2021-03-03 09:07:28 +01:00
33126a0717 1st installment of g-code window in preview 2021-03-02 10:01:06 +01:00
bc2186a8a6 GCodeProcessor -> use boost::starts_with() 2021-02-26 16:00:32 +01:00
f81ca55d41 #4402 - Review and merge of #6106 Temperature visualization in preview and G-code Viewer by combolek 2021-02-26 14:17:53 +01:00
8185c05b86 Tech ENABLE_VOLUMETRIC_EXTRUSION_PROCESSING set as default 2021-02-25 16:29:18 +01:00
8e7c3c6851 #6117 - Allow import of gcode files processed by ArcWelder 2021-02-24 09:46:42 +01:00
ef00d416b0 Follow-up of 9afaebac75 -> Fixed wrong gcode line numbers shown on preview horizontal slider when time estimation for silent mode is active 2021-02-19 14:12:49 +01:00
d8a1dfa6be #5538 - Validation of custom g-code against gcode processor reserved keywords 2021-02-18 14:34:40 +01:00
354070d9b2 Tech ENABLE_TOOLPATHS_WIDTH_HEIGHT_FROM_GCODE set as default 2021-02-17 11:23:17 +01:00