Commit Graph

349 Commits

Author SHA1 Message Date
Lukas Matena
7852ba061c Slightly reworded the 'Empty layers detected' warning,
it mentions the layers between which the problem occurs,
not just the upper one (which may be unclear).
2021-08-27 12:13:15 +02:00
Vojtech Bubnik
e947a29fc8 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
Vojtech Bubnik
9f9cbb46f9 Suppor of "No extrusion" firmware flavor by not emitting the E axis.
Fix of https://github.com/prusa3d/PrusaSlicer/issues/6023
The fix is partial: No extrusions are shown by the final G-code preview.
2021-08-09 17:37:35 +02:00
enricoturri1966
8ebb2e2a29 Fixed import of color print view from gcode files into GCodeViewer 2021-07-23 11:27:07 +02:00
enricoturri1966
7817105abe Tech ENABLE_GCODE_WINDOW set as default 2021-07-22 09:37:02 +02:00
enricoturri1966
5faac3c105 Tech ENABLE_VALIDATE_CUSTOM_GCODE set as default 2021-07-22 09:13:12 +02:00
Lukas Matena
3fa78b52b2 Slightly improved 'no first layer extrusions' error message 2021-07-02 17:05:31 +02:00
Lukas Matena
d2874f2e34 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
Lukas Matena
580dc890b8 Wipe tower: use normal retraction when moving to the tower, not toolchange retraction
This does not make sense, there is always an unretraction when the head arrives at the tower.
2021-05-31 21:23:03 +02:00
Lukas Matena
0d721bfb07 Slightly reworded 'missing layers' warning, to reflect that it is no longer considered an error 2021-05-31 11:16:28 +02:00
Lukas Matena
9ee2fc8275 Fixed first batch of locale-dependent calls 2021-05-24 12:20:29 +02:00
enricoturri1966
62ad1904e2 Fixed warnings into DoExport 2021-05-07 14:46:10 +02:00
YuSanka
b9910669e8 Fix of #2825 - Add the length of each filament used 2021-05-07 12:48:34 +02:00
Vojtech Bubnik
0ca6b12da1 Print/PrintObject/PrintRegion refactoring:
Newly the PrintObjects own PrintRegions and Print contains references
to PrintRegions owned by PrintObjects, so that a PrintRegion of the same
content is referenced by Print only once.

The refactoring is a WIP to support multi-material painting.
2021-05-06 13:01:09 +02:00
Vojtech Bubnik
ee15f00574 FDM backend refactoring: Return PrintRegion by reference, not by pointer.
Added PrintRegion hashing.
2021-05-05 18:13:58 +02:00
Vojtech Bubnik
714149dab2 WIP: Moving ownership of PrintRegions to PrintObjects. 2021-05-05 16:21:55 +02:00
Vojtech Bubnik
1aef86f650 Implemented generic mechanism for executing tasks on UI thread synchronously
from the background slicing thread, that supports cancellation.
The generic mechanism is used for generating thumbnails into G-code and
Fixes Fix deadlock when canceling the slicing while gcode is creating thumbnails #6476
Thanks @supermerill for pointing out the issue.
2021-05-04 16:07:32 +02:00
Vojtech Bubnik
0c1953a929 Further fixes of the first_layer_height refactoring. 2021-04-21 14:34:49 +02:00
Vojtech Bubnik
d9ed9149ae 1) Moved first_layer_heigth frrom PrintObjectConfig to PrintConfig.
Thus the first_layer_height is no more object specific. That makes
   a lot of sense due to the brim calculation being performed over
   all layers at once and due to future merging of supports of
   different objects at first layer.
2) Because now first_layer_height is print specific, the relative
   first layer height derived from the object layer height was partially
   disabled: First the relative first layer height is converted to
   an absolute value when importing config, second the side text
   was changed from "mm or %" to "mm". Still the UI allows entering %.

Both changes may be controversial, let's wait for user feedback.
2021-04-21 12:09:43 +02:00
Vojtech Bubnik
48a93e40fb After issuing the color change custom G-code, which is most likely
just M600, reset the internal retract counter, so that a retract
will happen after the firmware returns from M600 to the initial position.

Fixes "Blobs on print after manual color change #6362"
2021-04-15 16:29:30 +02:00
Lukas Matena
8c89bf748b Implemented new acceleration control behaviour for the new Marlin firmware flavor:
- show extra travel acceleration settings in 'Machine limits' page in Printer Settings
    when the new firmware flavor is selected

- updated tooltips on the config values (they were basically wrong even in the current version)

- 'Marlin (legacy)' firmware flavor behaviour should not change: it exports M204 Pa Rb Ta
    (where a, b are the values from machine limits) at the beginning of gcode and it uses
    M204 S... for feature type dependent acceleration settings (legacy variant of M204 P.. T..)

- new Marlin Firmware exports M204 Pa Rb Tc (where a,b,c are the values from machine limits).
    Feature type dependent acceleration is set using M204 P..., not overriding the travel acceleration.
2021-04-06 15:45:49 +02:00
Lukas Matena
f0e9ad46ec 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
Lukas Matena
151a76ee92 Duplicated Marlin firmware flavor to 'Marlin (legacy)' and 'Marlin Firmware'
The two flavors should be identical after this commit, except that GCodeProcessor.cpp was not updated. This shall be done in a later step.
2021-04-06 15:45:49 +02:00
Lukas Matena
a6ddab856b Wipe tower: refactoring of brim and solid infill on first layer 2021-04-05 23:39:27 +02:00
enricoturri1966
db71a6308d Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_gcode_window 2021-03-15 11:27:43 +01:00
Vojtech Bubnik
f3f10ff002 Follow up on https://github.com/prusa3d/PrusaSlicer/pull/5219#issuecomment-794515454
Initializing random generator in PlacholderParser from system clock.
2021-03-15 09:55:56 +01:00
Vojtech Bubnik
adcbe4347c Fixed unit tests. 2021-03-15 09:55:56 +01:00
Vojtech Bubnik
ceea9de8b8 WIP: Refactored bridging flow from normal flow, new config value
'thick_bridges' to switch between the Slic3r vs. S3D/Cura/Ideamaker
way of printing 1st object layer over supports.
Simplified the PresetHints.
2021-03-15 09:55:56 +01:00
enricoturri1966
8027c94a41 Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_gcode_window 2021-03-08 08:35:49 +01:00
Lukas Matena
c25c435d52 Added a new placeholder for custom toolchange gcode (toolchange_z)
This always contains the actual print_z of the toolchange, while layer_z contains the print_z
of the print. The two differ in case that wipe tower without sparse layers is used.

Related to #3834.
2021-03-05 13:58:45 +01:00
enricoturri1966
da7d7ae11b Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_gcode_window 2021-03-03 09:07:28 +01:00
enricoturri1966
2c8f385c7f 1st installment of g-code window in preview 2021-03-02 10:01:06 +01:00
Vojtech Bubnik
224f3e506c Fix of Custom G-code for color change does not process macro #5782
Added macro processing of color_change_gcode, pause_print_gcode
and template_custom_gcode custom G-codes when emitting them into
the output G-code.
2021-03-01 12:52:40 +01:00
Lukáš Hejl
a53de51b22 Fix of 8f293f0cb5
When was set use_external_mp_once to true then after first calling the avoid crossing perimeters this flag was reset which cases that on the second call of the avoid crossing perimeters the travel move didn't process as external.
2021-02-25 23:30:22 +01:00
Vojtech Bubnik
43c05d35ea Fix of crash when using raft with modified Shape-Box with height 0.5mm #5652
Reworked skirt generator to only generate skirt at non-empty layers
(layers that actually extruder object or support) and to respect minimum
layer height. Skirt generator stops at the first layer where those both
conditions cannot be met.
2021-02-25 12:18:11 +01:00
enricoturri1966
1e33b95ed7 Follow-up of 33aa6be7b7 -> Validation of custom g-code added using vertical slider in preview at gcode generation level 2021-02-25 08:23:45 +01:00
Vojtech Bubnik
fcb714cd24 Added a single perimeter to the first layer of support or raft.
Fixes [Request] Add optional perimeter to raft #756
Fixes First support layer does not stick to bed #2101

New parameters raft_first_layer_density and raft_first_layer_expansion
to influence the 1st layer of raft or support.
Fixes Allow to disable raft under support structures. #3772
Fixes raft is larger than necessary #2568
Fixes Supports on the build plate should have a solid bottom interface for better adhesion #1165

Changed the 1st layer infill to rectilinear even for soluble materials.
Fixes first layer of support for multi filament support oddly spaced #1445
Fixes Full Soluble Materials interfacing into Models + Soluble material noise on Bed #684
2021-02-24 08:48:40 +01:00
Vojtech Bubnik
d2c46025c7 Fix of Enforce support for first N layers has no effect #470 2021-02-23 15:31:21 +01:00
enricoturri1966
d3daea2df8 Follow-up of 86d7e1fb90 - Fixed build warning on OsX 2021-02-18 15:35:38 +01:00
Lukáš Hejl
8f293f0cb5 Fixed unnecessary travels after calling the avoid crossing perimeters when the wipe is enabled.
When the avoid crossing perimeters was enabled, and the wipe was enabled, there were unnecessary travels in the opposite direction than the wipe travel.
2021-02-18 14:41:56 +01:00
enricoturri1966
86d7e1fb90 #5538 - Validation of custom g-code against gcode processor reserved keywords 2021-02-18 14:34:40 +01:00
enricoturri1966
50c6fc1719 Tech ENABLE_TOOLPATHS_WIDTH_HEIGHT_FROM_GCODE set as default 2021-02-17 11:23:17 +01:00
Vojtech Bubnik
6ea5781709 Fix of Supports printed too slowly. #984
Processing of CoolingBuffer is newly staggered for support layers
until the 1st object layer above supports is received by CoolingBuffer.
2021-02-16 11:30:57 +01:00
Vojtech Bubnik
5e9a8ea700 Fixed some clang warnings 2021-02-09 19:23:58 +01:00
Lukas Matena
1834ebe981 Fixing Clang warnings 3 2021-02-08 17:52:29 +01:00
Vojtech Bubnik
73c9f939e0 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
Vojtech Bubnik
c506c15ed4 Manual merge of 4e586b8edabde1146c4013ca2437469a448315e2 from upsteam Slic3r,
fixing "percent first layer speed was not applied over autospeed." GH upstream Slic3r #2945
our GH issue First Layer Speed Percentage not applying (#5829)
2021-01-19 16:50:24 +01:00
Vojtech Bubnik
67256d6bb0 Added a FIXME comment for
Sequential tool path ordering of multiple parts within the same object, aka. perimeter tracking (#5511)
2021-01-06 12:19:08 +01:00
Lukas Matena
30c8592b10 Do not use ironing extrusions for autospeed calculations (#5082) 2021-01-04 14:21:24 +01:00
Lukas Matena
837070a246 Hotfix of a crash with raft and one-layer object (#5652)
The problem is that PrintObject support generator is only run when m_layers.size() > 1, so one-layer object will skip it.
It apparently never worked, after recent refactoring (probably 8bfc986) it started to crash in GCode generator.
This commit fixes the crash, but not the problem. The raft is still not generated (like in all versions since 2.0.0 at least).
2021-01-04 14:21:24 +01:00