32 Commits

Author SHA1 Message Date
Martin Šach
61e015fc38 Fix layer change handling 2024-07-10 15:18:52 +02:00
Martin Šach
17dc776109 Separate extrusions ordering and extrusions exporting into two for loops 2024-07-10 15:18:52 +02:00
Martin Šach
919740fb3e Apply fix includes. 2024-07-08 15:37:02 +02:00
Martin Šach
21116995d7 Refactor CMake and improve #includes.
* 1. Remove all global include_directories.
* 2. Move 3d party dependencies from src to budled deps if possible.
* Unify and enforce one way of including headers:
    e.g. #include "libslic3r/GCode.hpp" vs #include "GCode.hpp"
    (always use the "libslic3r/GCode.hpp" option).
* Make all dependencies (also header only) a cmake target.
2024-07-08 15:36:46 +02:00
Martin Šach
fa23ab8285 Make sure that after wipe tower toolchange the G1 Z is always emitted.
Even if the G1 Z would be redundant, it is still emitted.
Fixes: #12361
2024-03-25 10:48:20 +01:00
Martin Šach
cdcd4da809 Add offset to the finalize wipe tower move 2024-03-22 15:20:25 +01:00
Martin Šach
ea9dfa9a8d Use path generation even on layer change 2024-03-20 14:42:27 +01:00
Martin Šach
0894ac6d72 Evaluate maybe change instance lazily 2024-03-14 15:42:52 +01:00
Martin Šach
8119bb2925 Implement cancel object for toolchanges.
Toolchages (wipe tower/no wipe tower) are always kept and if there are
any toolchanges, the objects are split at the begining of each instance,
while the first travel is always part of the "next" instance.
2024-03-14 15:42:52 +01:00
Martin Šach
fdbe119658 Make LabelObjects hold state.
* This enables setting the object flags anywhere in gcode.
* The flags are then set in such a way that cancel object behaves as expected.
2024-03-14 15:42:52 +01:00
Lukas Matena
29ce2faa4a Merge tag 'version_2.7.2' into master_27x
version_2.7.2
2024-02-29 21:05:49 +01:00
Martin Šach
41175b960b Fix priming layer z 2024-02-28 16:02:54 +01:00
Lukas Matena
8e9251f2f0 Wipe tower: separate acceleration control (related to #10854) 2024-02-28 15:48:01 +01:00
Martin Šach
1e1bf5ae86 Fix: Update position after toolchange. 2024-02-28 14:10:47 +01:00
Martin Šach
3fdd02fff5 Use proper z for no sparse layers travel start - this z is used to calculate lift of the travel (#12330, SPE-2176) 2024-02-26 16:12:40 +01:00
Martin Šach
4481525169 Fix wipe tower deretraction string.
Return the previous behaviour for non priming toolchanges and
handle priming toolchanges separately.
2024-01-29 09:52:20 +01:00
Martin Šach
7f423083b4 Fix: Use toolchange z instead of writer z to restore z on wipe tower.
Writer z can be set in custom toolchange gcode and than the restoration
is invalid.
2024-01-23 09:30:40 +01:00
Martin Šach
812c40e887 Unify GCodeGenerator travel to first layer position.
* Fixes SPE-2116. The reason for this bug was forgotten change in
  WipeTowerIntegration after change in gcode.cpp.
* Prevents future similar bugs by unifing the functionality to a method.
2024-01-23 09:00:58 +01:00
Martin Šach
f9283728d6 During first layer change, do not actually move z.
This enables the user to set his own z in start gcode. Fixes #11843.
2024-01-17 12:22:22 +01:00
SachCZ
ff30d7aad3 Replace last_pos and helpers with optional in GCode.cpp 2024-01-17 12:22:22 +01:00
SachCZ
7f397cd7b3 Implement ramping layer change using a tag in gcode
During layer change, instead of generating the gcode, generate a placeholder tag. Then at the end of layer processing replace this tag with a ramping travel move.
This solves the issue, that one does not know the starting point of the current layer where the layer change gcode would be originally generate.
The ramping layer changes uses smoothing of the ramping travel. Also it is adjusted in such a way that it increases the ramp angle when the travel is too short, to always reach the next layer.
2024-01-17 12:22:19 +01:00
Kristian Nielsen
c7d31f980a Fix missing braces around multi-line if ()
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2024-01-04 10:21:24 +01:00
Lukas Matena
80c9f53167 Fixed issues in wipe tower brim (SPE-2049, #11708) 2023-11-21 13:24:42 +01:00
Martin Šach
91e79af261 Fix wipe tower integration wiht regard to "no_sparse_layers".
Wipe tower with "no_sparse_layers" enabled was completely broken.
This commit introduces necessary changes to WipeTowerIntegration.cpp
for it to work properly.
2023-11-10 12:19:39 +01:00
Martin Šach
cfb6526732 Bugfix: Uninitialized value in wipe tower integration.
Just a small fix to avoid c++ undefined behaviour.
2023-11-10 12:19:39 +01:00
Martin Šach
49455cf427 Replace GCode.cpp travel_to with more general z-hop strategy.
The new travel has an initial flat part, sloped part and
once the travel height reaches maxima a flat part again.
Also, the notion of extruder lift is removed. It is used no more.
Consequently the retract_lift parameter lost its original meaning.
2023-11-10 12:19:39 +01:00
Lukas Matena
cde4d16f4a Fix of #11089: nozzle digging into the print when 'wipe_tower_no_sparse_layers' was enabled 2023-11-03 10:37:21 +01:00
Lukas Matena
aa0bc7489f Fixed wipe tower generation when non-zero extruder offset is used (SPE-2002, broken in c669293) 2023-11-02 10:39:03 +01:00
Lukas Matena
c66929387e Custom G-code editor: removed internal parsing of wipe tower gcode 2023-09-13 10:14:11 +02:00
Vojtech Bubnik
2970ee39d8 Cherry-pick of 1f510bcc00f935de3657984c329e57b77dcb4c7a 2023-08-31 17:17:22 +02:00
Vojtech Bubnik
3cfe2f4a3a Merge branch 'vb_arc_welder' into master_262 2023-08-28 15:50:00 +02:00
Vojtech Bubnik
19062b4d5f ArcWelder path interpolation based on the work by Brad Hochgesang @FormerLurker.
WIP GCode/SmoothPath.cpp,hpp cache for interpolating extrusion path with arches.
Removed Perl test t/geometry.t, replaced with C++ tests.
Refactored ExtrusionEntity and derived classes to hold extrusion attributes in new ExtrusionFlow/ExtrusionAttributes classes.
Reworked path ordering in G-code export to never copy polylines, but to work with a new "flipped" attribute.
Reworked G-code export to interpolate extrusion paths with smooth paths and to extrude those smooth paths.
New parameters: arc_fitting, arc_fitting_tolerance
Renamed GCode class to GCodeGenerator
Moved GCodeWriter.cpp/hpp to GCode/
Moved Wipe from from GCode.cpp,hpp to GCode/Wipe.cpp,hpp
Moved WipeTowerIntegration from GCode.cpp,hpp to GCode/WipeTowerIntegration.cpp,hpp
New variant of douglas_peucker() to simplify range of iterators in place.
Refactored wipe in general and wipe on perimeters / hiding seams.

WIP: Convert estimate_speed_from_extrusion_quality() and its application to smooth paths.
WIP: Cooling buffer to process G2G3, disable arc fitting for filters that cannot process it.
2023-07-13 11:54:42 +02:00