1177 Commits

Author SHA1 Message Date
Martin Šach
61291d9219 SPE-2495: Do not put scarft seam start on overhangs and blockers
Update the function offset_along_lines to offset along
perimeters and add a stop condition.
2025-02-14 12:02:29 +01:00
Martin Šach
b037828aef SPE 2549: Use 'bridge' annotation in seam placement
Add 'bridge' annotated points to the perimeter used for
seam placement.
2025-02-14 12:02:29 +01:00
Martin Šach
eb31b815b1 Fix SPE-2640: Fix overriden extrusions crash
Overriden extrusions must be inserted even if they are empty
because the resulting vector must be the same length as
instances_to_print
2025-02-14 11:59:29 +01:00
jalapenopuzzle
419d857a4b #13420 GCodeWriter Correct Z speed too high and add unit tests
#13402 test_gcodewriter.cpp add travel_speed_z tests

These tests fail with the legacy implementation of GCodeWriter::travel_to_xyz_force() because it does not decompose the speed into it's components according to the movement unit vector.

#13420 Correct Z speed too high
2025-02-12 17:05:19 +01:00
jalapnopuzzle
462758153b const prevents calling GCodeGenerator::travel_to functions which change the m_pos internal state.
These methods allow travel moves to be made without checking the distance against XYZ_EPSILON, which may prevent the move from being emitted. This is useful when we want an important comment to be emitted, like a layer change.

get_travel_to_gcode() functions don't maintain m_pos, which later causes incorrect speed calculations as the movement vector is measured incorrectly.

Ensure that client code can't make moves without maintaining m_pos.
2025-02-12 17:05:19 +01:00
jalapnopuzzle
c83f164ed5 #13420 GCodeWriter separate XYZ_EPSILON consistent with XYZF_EXPORT_DIGITS and add unit tests
#13420 test_gcodewriter.cpp add tests for XYZF_EXPORT_DIGITS

Check that movement GCodes are emitted / not emitted according to XYZF_EXPORT_DIGITS.
The new tests demonstrate that XYZF_EXPORT_DIGITS is NOT respected.

#13420 GCodeWriter separate XYZ_EPSILON consistent with XYZF_EXPORT_DIGITS

The value of EPSILON=1e-4 (0.0001) in libslicer3r.h is inconsistent with XYZF_EXPORT_DIGITS=3 (0.001).
This change addresses the inconsistency by introducing XYZ_EPSILON which is computed from XYZ_EXPORT_DIGITS, and changing all relevant GCodeWriter functions which used EPSILON to use XYZ_EPSILON instead.
2025-02-12 17:05:19 +01:00
Martin Šach
6494a3badd Fix #13870: Prefer a corner if there is one clearly rearest corner to be picked when placing rear seam 2025-02-04 11:01:09 +01:00
Martin Šach
6176dcc540 SPE-2639: Fix invalid scarf seam direction leading to whole perimeter scarfs 2025-02-04 11:01:09 +01:00
Martin Šach
ceb9950e35 SPE-2635: Fix picking the rear seam line 2025-02-04 11:01:09 +01:00
Martin Šach
02779e211f SPE-2639: Ensure no scarf seam is generated when a point fail to project to the perimeter 2025-02-04 11:01:09 +01:00
Lukáš Hejl
d5a6a4457a SPE-2505: Fix collision detection between a single object and wipe tower. (#13444) 2025-01-28 01:00:46 +01:00
Lukáš Hejl
21e549fc9a SPE-2499: Ensure that the first layer of the wipe tower is always entirely filled. 2025-01-21 14:41:54 +01:00
Enrico Turri
5938fdb495 SPE-2647 - Fixed wrong Z offset in preview 2025-01-16 14:27:08 +01:00
Martin Šach
5338ee2b43 Fix SPE-2621: Add fallback if no first isntance is found, while the instances are not empty 2024-12-18 09:38:41 +01:00
Lukáš Hejl
c4a7134eb6 SPE-2604: Switch off filament monitoring during ramming (wipe tower) also for XL. 2024-12-13 14:02:06 +01:00
Lukas Matena
7345da2fa7 SPE-2513: Trim object names for label object so no limits are violated (#13314) 2024-12-13 10:27:59 +01:00
enricoturri1966
a62f846e0b SPE-2574 - Fixed emission of lines M73 C/D to gcode 2024-12-02 12:18:14 +01:00
enricoturri1966
47bba48b34 SPE-2577 - Fixed processing of gcodes when using absolute values for E (#13623) 2024-12-02 12:12:01 +01:00
Martin Šach
2229fc1954 Fix iterator invalidation 2024-11-27 14:57:14 +01:00
Lukas Matena
fae06e0773 Vectorization of the wipe tower 2024-11-20 16:04:15 +01:00
Lukas Matena
da13a0a80e Vectorization of customgcode 2024-11-20 16:04:15 +01:00
Martin Šach
90c1a5df99 Fix current z when moving to wipe tower 2024-11-20 07:53:58 +01:00
Martin Šach
a59ca08e0b Round down interpolated z speed (SPE-2493) 2024-11-20 07:47:35 +01:00
Martin Šach
7d7813243b Use writter m_pos to determine previous position for xyz travel 2024-11-20 07:47:32 +01:00
Martin Šach
6cc7ff754c Add fallback to rear seam picker chosing the point with biggest y 2024-11-11 10:59:20 +01:00
Martin Šach
26b96c5ad2 Add max boundary to the scarf_start_height 2024-11-11 10:59:20 +01:00
Martin Šach
00010de0ee Fine tune the seam smooth/sharp angle arm length 2024-11-11 10:59:20 +01:00
Lukáš Hejl
225d52b084 Generalize the implementation of the Douglas Peucker algorithm to allow using a custom predicate to decide if points between the anchor and the floater should be removed. 2024-11-08 10:13:34 +01:00
enricoturri1966
ec8efbd444 SPE-2275: Fixed export of M73 CXX lines to gcode 2024-11-05 13:53:10 +01:00
Martin Šach
9634f2e02f Fix invalid const struct member 2024-11-01 17:11:27 +01:00
Lukas Matena
b4ae892bae Follow-up to previous commit 2024-10-18 16:12:22 +02:00
Lukas Matena
e57ef80f85 Fixed compiler warnings 2024-10-18 16:00:57 +02:00
Lukas Matena
c41290bc07 Use ModelWipeTower instead of config for wipe tower pos and rot (backend part) - SPE-2520 2024-10-16 12:40:49 +02:00
Martin Šach
101f9838dd Enable seam 'jumping' if it is already on a sharp edge, but there is a better one (SPE-2305) 2024-10-07 15:33:29 +02:00
Lukáš Hejl
c41e0c22ce SPE-2437: Avoid unnecessary emitting of the Z axis by the pressure equalizer when it doesn't change and isn't provided. 2024-09-26 14:45:56 +02:00
Lukáš Hejl
e8b1d0ad75 SPE-2437: Separate update of positions inside the pressure equalizer into functions. 2024-09-26 14:45:56 +02:00
Lukáš Hejl
913e49c235 SPE-2437: Avoid unnecessary splitting of extrusions by the pressure equalizer. 2024-09-26 14:45:56 +02:00
Martin Šach
601e59516b Fix scarft seam 0 length issue and external perimeters first issue 2024-09-26 14:43:09 +02:00
Martin Šach
5033d18824 Fix implementation of inner seam offsetting. 2024-09-26 14:43:09 +02:00
Martin Šach
0d9b079e4b Use boost::variant instead of std variant 2024-09-26 14:43:09 +02:00
Martin Šach
bc34b60ac3 Update seam visualization to support scarf seams - WIP 2024-09-26 14:43:09 +02:00
Martin Šach
aa6132ebb6 Scarf seam implementation. 2024-09-26 14:43:09 +02:00
Martin Šach
33bafd28e3 Fix layer change travel if no sparse layers is enabled 2024-09-17 11:27:12 +02:00
Martin Šach
2cac8c2c37 Fix includes 2024-09-17 11:21:29 +02:00
Lukáš Hejl
016103dd95 SPE-2455: Fix extrusions with the zero feedrate after passing through CoolingBuffer. 2024-09-03 12:37:09 +02:00
Lukáš Hejl
c5982f4019 Accumulate the total estimated print in doubles instead of floats.
Because total print time is typically a big floating point number and the time of trapezoid is typically a small number, summing those numbers leads to a loss in precision. Switching to doubles reduces the loss of precision.
2024-09-03 12:31:19 +02:00
Lukáš Hejl
90073dce70 SPE-2441: Fix discontinuity between the processed blocks' exit speed and the new first block's entry speed.
This discontinuity affected both time estimation and actual speed visualization.
2024-09-03 12:31:19 +02:00
Martin Šach
820972dca7 Use converting to geometry instead of projecting for random seams only 2024-08-16 14:02:46 +02:00
Martin Šach
a56bd7e21d Fix invalid extrusion expand value in SeamGeometry 2024-08-16 14:02:46 +02:00
Martin Šach
ef2a64032a Perfrom seam placing on geometry only for SeamAligned, otherwise use extrusions 2024-08-16 14:02:46 +02:00