Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FormerLurker/ArcWelderLib.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFormerLurker <hochgebe@gmail.com>2021-11-13 22:37:28 +0300
committerFormerLurker <hochgebe@gmail.com>2021-11-13 22:37:28 +0300
commit4c193828056771381f7bfc6f04133bd1a45447ac (patch)
tree02cbbdbe89bfb4e7f886212fd70494912d4b0a00 /ArcWelder
parent32708379fe8fe91e4e21b6928d6384162abcd091 (diff)
Encode more points when moving to/from extruding/retracting/travel.
Diffstat (limited to 'ArcWelder')
-rw-r--r--ArcWelder/arc_welder.cpp8
-rw-r--r--ArcWelder/segmented_arc.cpp8
2 files changed, 10 insertions, 6 deletions
diff --git a/ArcWelder/arc_welder.cpp b/ArcWelder/arc_welder.cpp
index fe129b4..ab2f6ef 100644
--- a/ArcWelder/arc_welder.cpp
+++ b/ArcWelder/arc_welder.cpp
@@ -582,11 +582,13 @@ int arc_welder::process_gcode(parsed_command cmd, bool is_end, bool is_reprocess
(
!waiting_for_arc_ ||
extruder_current.is_extruding ||
+ extruder_current.is_retracting ||
// Test for travel conversion
- (allow_travel_arcs_ && p_cur_pos->is_travel()) ||
- //(previous_extruder.is_extruding && extruder_current.is_extruding) || // Test to see if
+ (allow_travel_arcs_ && p_cur_pos->is_travel())
+ //|| (previous_extruder.is_extruding && extruder_current.is_extruding) // Test to see if
+ // we can get more arcs.
+ // || (previous_extruder.is_retracting && extruder_current.is_retracting) // Test to see if
// we can get more arcs.
- (previous_extruder.is_retracting && extruder_current.is_retracting)
) &&
p_cur_pos->is_extruder_relative == is_previous_extruder_relative &&
(!waiting_for_arc_ || p_pre_pos->f == p_cur_pos->f) && // might need to skip the waiting for arc check...
diff --git a/ArcWelder/segmented_arc.cpp b/ArcWelder/segmented_arc.cpp
index 527ad3a..f6cfff1 100644
--- a/ArcWelder/segmented_arc.cpp
+++ b/ArcWelder/segmented_arc.cpp
@@ -155,13 +155,15 @@ bool segmented_arc::try_add_point(printer_point p)
return false;
}
- // Need to separate travel moves from moves with extrusion
- if (points_.count() > 1)
+ // If we have more than 2 points, we need to make sure the current and previous moves are all of the same type.
+ if (points_.count() > 2)
{
+ // TODO: Do we need this?
// We already have at least an initial point and a second point. Make cure the current point and the previous are either both
// travel moves, or both extrusion
if (!(
- (p1.e_relative != 0 && p.e_relative != 0) // Extrusions
+ (p1.e_relative > 0 && p.e_relative > 0) // Extrusions
+ || (p1.e_relative < 0 && p.e_relative < 0) // Retractions
|| (p1.e_relative == 0 && p.e_relative == 0) // Travel
)
)