Commit Graph

102 Commits

Author SHA1 Message Date
bubnikv
36d0f8acc8 adaptive elpehant foot compensation, fixing
GH issues #1757 #2085 #2132 #2423 #2502 #2156 #2773 #2828 #2998 #3001
2019-11-01 19:59:09 +01:00
YuSanka
fecd2de762 Fixed a crash with the following repro:
1) Start PrusaSlicer
2) Select printer: Original Prusa i3 MK2.5
3) Load any stl file
4) In Printer Settings turn on "Support stealth mode"
5) Press "Slice now"
-> crash
All the "machine_XXXXX" vectors in the print config contain a single value instead of two leading to a vector subscript out of range
when read into GCode::_do_export()
2019-10-22 12:50:09 +02:00
Lukas Matena
622831bfa6 GCode.cpp: Removed a failing assert that was no longer needed
The situation it checked happens when the wipe tower is lower than the tallest print object.
The function processes that correctly.
2019-10-10 09:54:27 +02:00
bubnikv
d72d96a1fe FDM Print refactoring:
Layer newly remembers bounding boxes of slices,
the bounding boxes are used by G-code generator & newly the support
generator.
Slices are stored as ExPolygons, not ExPolygonCollection.
2019-10-01 17:17:08 +02:00
bubnikv
ce217b6222 Rest of the path chaining has been replaced with the new algorithm.
PolylineCollection.cpp/hpp was removed, use Polylines instead.
Various first_point() / last_point() now return references, not copies.
2019-09-27 18:17:21 +02:00
bubnikv
30f0e9b4d3 Merge branch 'master' of https://github.com/Prusa3d/PrusaSlicer 2019-09-27 09:52:57 +02:00
bubnikv
f5d48d90a7 Fix of G-code path planning: Infill lines were incorrectly ordered
for islands with another islands in their holes.

Improvement of chaining of infill lines for 3D honeycomb, Gyroid and
Honeycomb infill: New TSP chaining algorithm is used.
2019-09-27 09:51:07 +02:00
bubnikv
702c06d4b6 Reworked Traveling Salesman Problem code for simplicity and robustness.
The TSP algorithm is newly used for planning of the printing order
of objects AND their instances.
2019-09-26 16:39:50 +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
6c4e6ccd90 Merge branch 'master' into dev 2019-09-13 16:19:35 +02:00
bubnikv
fac032239b Merge branch 'master' of https://github.com/Prusa3d/PrusaSlicer 2019-09-13 16:17:23 +02:00
Lukas Matena
c4aad781b7 Fixup of 4f89672 + allowing negative support_contact_z 2019-09-13 15:47:00 +02:00
bubnikv
136f6a59f6 Fixed false positives of missing layers due to support layer snapping
to avoid layers thinner than min_layer height, and possibly due to
the fact, that empty support extrusions may get generated
for support layers with non-empty support polygons.

Fix of Empty layers detection added to GCode.cpp (6ab1cec)
2019-09-13 15:18:42 +02:00
bubnikv
7fbbcea1c7 Merge remote-tracking branch 'remotes/origin/lm_brimskirt' 2019-09-12 15:53:20 +02:00
Enrico Turri
25613c80ea Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into dev 2019-09-11 09:15:58 +02:00
Enrico Turri
2f3edd2387 GCodeAnalyzer: Fixed a crash when encountering an invalid toolchange 2019-09-11 08:39:29 +02:00
bubnikv
2e377cdbe2 Merge remote-tracking branch 'remotes/origin/master' into dev 2019-09-09 17:49:07 +02:00
Lukas Matena
1d88be3ec8 Fix of previous commit, tooltip update 2019-09-09 16:02:39 +02:00
Lukas Matena
8dcfb5b3d0 Custom toolchange gcode is searched for tool-changing command
If the custom toolchange gcode switches extruder to the one that is expected, PrusaSlicer does not issue its own T command
Otherwise, this command is inserted just after the custom gcode, even in case it is not empty
This should prevent issues such as #2884 and #2886 from being reported
2019-09-09 13:05:18 +02:00
bubnikv
df396434cf Fixed stack overflows in G-code generator. 2019-09-09 10:18:17 +02:00
Lukas Matena
080792f9ed Fixed some more warnings, moved function to get ExtrusionRole name into ExtrusionEntity.hpp
So it can be called from wherever it may be needed
2019-09-06 15:55:07 +02:00
Enrico Turri
849f72532b Merge branch 'dev' of https://github.com/prusa3d/PrusaSlicer into dev 2019-09-05 09:55:08 +02:00
Enrico Turri
8c76b3888d Improved time estimator post-processing 2019-09-05 09:54:44 +02:00
Lukas Matena
6f0b44da72 Fixed couple of warnings in WipeTower.cpp, ToolOrdering.cpp and GCode.cpp 2019-09-04 14:56:35 +02:00
bubnikv
ea01557635 Make sure the "avoid crossing perimeters" class is resetted
at the start of G-code export.
2019-08-26 09:55:00 +02:00
bubnikv
2084ddb9e1 Refactoring of AvoidCrossingPerimeters::init_external_mp() 2019-08-25 09:01:01 +02:00
Lukas Matena
88c13663ed GCode.cpp: Avoid crossing perimeters performance optimization 2019-08-23 13:06:29 +02:00
Enrico Turri
7b1cb9a5e2 GCodeTimeEstimator uses annotated gcode in place of processing m600 lines to detect color print changes.
WARNING -> After this commit the exported gcode will contain the extra lines used by the time estimator. They will be removed by a future commit when a new post-process method will be implemented.
2019-08-21 14:43:14 +02:00
Enrico Turri
2c82773e2b GCodeAnalyzer uses annotated gcode in place of processing m600 lines to detect color print changes 2019-08-21 14:09:20 +02:00
bubnikv
c6c542b945 Merge branch 'master' of https://github.com/Prusa3d/PrusaSlicer 2019-08-20 16:22:37 +02:00
bubnikv
08d001931b Reworked the rename_file() function on Windows to work reliably and
atomically. The code was taken from the llvm project, it is complex
and hopefully it covers all the Windows file system quirks. Vojtech
has highest hopes, that this will fix the various PrusaSlicer.ini
file corruptions.

Enabled the locales switching and error handling on Linux as well,
where now the missing locales are reported and running the locale-gen
tool is recommended.
2019-08-20 16:19:30 +02:00
Lukas Matena
2257e8c15c GCode.cpp: Fix of temperature change before print
Function set_extruder can be called before moving to the first layer, m_layer_index is then -1. We definitely don't want to set temperature for second layer in that case.
2019-08-20 14:22:31 +02:00
bubnikv
b39e1bb11f Merge remote-tracking branch 'remotes/origin/lm_wipe_tower_linear_advance' 2019-08-20 09:19:22 +02:00
Lukas Matena
5953d7b810 Extended the error message when empty layers are detected 2019-08-19 15:50:49 +02:00
Lukas Matena
73b310a37c WipeTower: linear advance is disabled immediately before ramming, not before moving to the wipe tower
Linear advance is reset by filament start gcode after a toolchange. However, not all moves to the wipe tower
end with a toolchange (brim, empty grid) and it would therefore disable linear advance until the next toolchange
This should solve https://github.com/prusa3d/PrusaSlicer/issues/2770
2019-08-16 00:20:51 +02:00
Lukas Matena
3dcf0d8aa0 Allowed the skirt to intersect brim (https://github.com/prusa3d/PrusaSlicer/issues/724)
Brim lines are split at the intersection so there is no overextrusion.
2019-08-15 12:27:49 +02:00
Lukas Matena
687b2bd1ae Fixed a false positive empty layer report
Reported in https://github.com/prusa3d/PrusaSlicer/issues/2752 and was a result of setting support contact z distance to negative value.
This lowered the maximum allowed print_z of the next layer, even though previous layer had object layers too, so the penalty from the contact z should not have been applied.
Fixed simply by rejecting the negative contact_z.
2019-08-13 11:02:58 +02:00
Lukas Matena
f9e5c31fb8 One more fix on the empty layers detection - support contact z distance is taken into account
If it wasn't, anything with raft would be rejected unless contact z was zero. We do not want that.
2019-08-07 12:02:30 +02:00
Lukas Matena
65e6f07580 GCode.cpp: fixed detection of empty layers so it doesn't give false positives
That could happen on empty support layers which do not necessarily matter, since their spacing is not generally synchronized with the object
The new hopefully correct logic is "if there are extrusions on a layer, check that last layer with extrusions is at most the new layer height below
This is a fixup of changes from 0de6e53 and 6ab1cec
2019-08-07 10:54:36 +02:00
bubnikv
bffa3c125d Merge branch 'master' of https://github.com/Prusa3d/PrusaSlicer 2019-08-05 14:30:42 +02:00
bubnikv
b0fc0cf49f Fixed a regression issue where excessive memory was allocated
for the GLVolumes before sending to the GPU driver. The following commits
were partially reverted:

4269c8b23c Removed GLVolume non-VBO rendering
d15698e21e GLVolume and GLIndexedVertexArray refactored to send data to gpu at the first render call

Namely, the GLVolume buffers are "shrink to size"'d before sending their
content to the OpenGL driver, and the vertex buffers are populated
as quickly as possible from the GLVolume, so that the same buffer is not
kept twice in RAM on systems, where the RAM is shared with the graphics
card.

Also the memory allocation reporting was improved for the GLVolumes.
2019-08-05 14:30:32 +02:00
Lukas Matena
313ad7bf00 Followup of 6ab1cec - empty layers are ok if there are only other empty layers on top of them
Also fixed a possible crash in Print.cpp when preparing the wipe tower layers
2019-08-04 22:57:59 +02:00
Lukas Matena
d0c9c28494 Empty layers detection added to GCode.cpp
Added detection of empty layers so the wipe tower doesn't trip on them (it is not printable anyway).
This should improve wipe tower reliability with supports, objects standing on edges, etc.
I also turned an assert into exception throw to prevent hard crashes and nonsense output.
2019-08-02 16:54:18 +02:00
Enrico Turri
e7234c1002 Added absolute time to estimated time for color print and fixed a bug in showing estimated times for print color for silent mode 2019-08-02 12:05:02 +02:00
bubnikv
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
Lukas Matena
8aad1fd1f1 Wipe tower accounts for extruder offsets
Also, in case of non-single-extruder printer with the wipe tower, first wiping line was printed where the border should have been - fixed
2019-07-19 13:00:10 +02:00
Lukas Matena
c2418d2fbf Process start_filament_gcode in case of usual single extruder printer
Reported in https://github.com/prusa3d/PrusaSlicer/issues/2652
2019-07-19 10:02:52 +02:00
Lukas Matena
b2d67c3e56 Wipe tower fix (do not skip the first toolchange when printing without the wipe tower)
Also, test multi.t updated so it matches new logic of inserting custom gcodes
2019-07-16 13:10:09 +02:00
Lukas Matena
d2c908ef7f Merge branch 'master' into lm_warnings 2019-07-15 13:26:55 +02:00
bubnikv
e8e35579dd Merge remote-tracking branch 'remotes/origin/vb_undo_redo' 2019-07-15 11:34:18 +02:00