Skip to content

Commit

Permalink
Update Search, Insert and TimeLapse
Browse files Browse the repository at this point in the history
Added code to accomadate relative extrusion.
  • Loading branch information
GregValiant committed Jul 1, 2023
1 parent 0e8b20e commit 74dba5d
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions plugins/PostProcessingPlugin/scripts/TimeLapse.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,22 @@ def execute(self, data):
last_y = self.getValue(line, "Y", last_y)
last_z = self.getValue(line, "Z", last_z)
#Track the E location so that if there is already a retraction we don't double dip.
if " E" in line:
last_e = line.split("E")[1]
if float(last_e) < float(prev_e):
is_retracted = True
else:
is_retracted = False
prev_e = last_e
if rel_cmd == 82:
if " E" in line:
last_e = line.split("E")[1]
if float(last_e) < float(prev_e):
is_retracted = True
else:
is_retracted = False
prev_e = last_e
elif rel_cmd == 83:
if " E" in line:
last_e = line.split("E")[1]
if float(last_e) < 0:
is_retracted = True
else:
is_retracted = False
prev_e = last_e
lines = layer.split("\n")
# Insert the code----------------------------------------------------
for line in lines:
Expand Down

0 comments on commit 74dba5d

Please sign in to comment.