Octolapse icon indicating copy to clipboard operation
Octolapse copied to clipboard

Octolapse: Snaphots before and after completed print

Open PaWi20 opened this issue 1 year ago • 6 comments

If this is a feature request describe it here

Most of the time, I use the "Smart - compatibility" or "Smart - Snap to Print" Triggers. Unfortunately, they don't take a snapshot before the print (empty print plate) and after the print, with all layers finished. I've seen timelapses where the last snapshot was taken after printing the shell surface of the print. As far as I understood, its also possible to use G-Code commands (@OCTOLAPSE TAKE-SNAPSHOT) to trigger snapshot and stabilization. For this I have to adjust my G-code with the trigger commands before/after the print as well at layer changes. But I also must use the "Gcode" Trigger.

It would be great to have the Smart triggers mentioned above in combination with the G-code command. In this case I only need to edit my start/end G-Code and can use all the smart triggers, that I really like.

Or maybe did I miss a setting that solves my problem to take snapshots before and after the print?

Version of Octolapse

Octolapse Version: 0.4.1

Version of OctoPrint

OctoPrint Version: 1.8.7

PaWi20 avatar Mar 22 '23 08:03 PaWi20

YES, I have thought about this. I may even add the ability to take 'before' and 'after' print snapshots in addition to allowing @Octolapse commands to be used in any of the triggers.

FormerLurker avatar Apr 02 '23 18:04 FormerLurker

I believe I have it working. Try installing within the plugin manager using this link (get more->...from URL-> paste link -> click install button): https://github.com/FormerLurker/Octolapse/archive/refs/heads/devel.zip

Now you should find a new option within the 'smart trigger' settings (it will be set to 'enabled' by default):

image

Now, just put the @OCTOLAPSE TAKE-SNAPSHOT command wherever you want (start and end of print)!

Please let me know how it works.

FormerLurker avatar Apr 03 '23 22:04 FormerLurker

Hey there. Thank you very much for your great work, especially for this complete plugin! I'm going on vacation in two days and I'll have to see if I can find the time to test. I'll come back to you!

PaWi20 avatar Apr 04 '23 05:04 PaWi20

I finally had time to test the new function we had discussed. It works pretty well and does exactly what I needed. Many thanks for that.

However, I had to rearrange my start G-code a bit to get a snapshot of the empty heat bed. At least in my case, I had the problem that I couldn't place the snapshot command anywhere in the start G-code. It was only recognized when an extrusion was made below the priming line. I didn’t want to deactivate this priming height (set it to zero), because in this case the first layer (e.g.: 0.2 mm) and its snapshot was not recognized. My solution works with the initial priming height of 0.3 mm and extrudes two more priming lines with a lower layer height:

  • one as a trigger for this first snapshot command
  • another priming line to wipe off oozing filament after the snapshot

Please see my start (and end) g-code below. I wanted to share this information in case anyone else is looking for a suitable solution.

Start G-Code ; Ender 3 S1 Start G-code M220 S100 ;Reset Feedrate (optional) ; M221 S100 ;Reset Flowrate (optional, is adjusted in printer settings)

G92 E0 ; Reset Extruder G28 ; Home all axes M420 S1 Z2; Use Level Mesh up to 2mm (if not active; bed level must be activated in printer settings) G1 Z10.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed G1 X0 Y0

M117 Set Flow ; LCD message to set the flowrate M300 P1000 ; beep sound M117 ; reset LCD

; Script based on an original created by tjjfvi (https://github.com/tjjfvi) ; An up-to-date version of the tjjfvi's original script can be found ; here: https://csi.t6.fyi/ ; Note - This script will only work in Cura V4.2 and above! ; --- Global Settings ; layer_height = {layer_height} ; smooth_spiralized_contours = {smooth_spiralized_contours} ; magic_mesh_surface_mode = {magic_mesh_surface_mode} ; machine_extruder_count = {machine_extruder_count} ; --- Single Extruder Settings ; speed_z_hop = {speed_z_hop} ; retraction_amount = {retraction_amount} ; retraction_hop = {retraction_hop} ; retraction_hop_enabled = {retraction_hop_enabled} ; retraction_enable = {retraction_enable} ; retraction_speed = {retraction_speed} ; retraction_retract_speed = {retraction_retract_speed} ; retraction_prime_speed = {retraction_prime_speed} ; speed_travel = {speed_travel}

M104 S{material_print_temperature_layer_0} M190 S{material_bed_temperature_layer_0} M109 S{material_print_temperature_layer_0}

G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line ; Additional priming line -> code can detect the pre-snapshot command G1 X1.5 Y20 Z0.12 F5000.0 ; Move to start position G1 X1.5 Y30.0 Z0.12 F1500.0 E30.5 ; Draw the first line G1 X1.7 Y30.0 Z0.12 F5000.0 ; Move to side a little G1 X1.7 Y20 Z0.12 F1500.0 E31 ; Draw the second line G1 Z1.0 ; Lift z-axis to prevent scratching

M400 ; wait for all moves to finish @OCTOLAPSE TAKE-SNAPSHOT ; trigger a snapshot

; Additional priming line -> wipe off oozing out filament G1 X1.9 Y20 Z0.12 F5000.0 ; Move to second start position G1 X1.9 Y30.0 Z0.12 F1500.0 E31.5 ; Draw the first line G1 X2.1 Y30.0 Z0.12 F5000.0 ; Move to side a little G1 X2.1 Y20 Z0.12 F1500.0 E32 ; Draw the second line

G92 E0 ; Reset Extruder G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed G1 X5 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish

End G-Code G91 ;Relative positioning G1 E-2 F2700 ;Retract a bit G1 E-2 Z0.2 F2400 ;Retract and raise Z G1 X5 Y5 F3000 ;Wipe out G90 ;Absolute positioning

M400 ; wait for all moves to finish @OCTOLAPSE TAKE-SNAPSHOT ; trigger a snapshot

G91 ;Relative positioning G1 Z10 ;Raise Z more G90 ;Absolute positioning

G1 X0 Y{machine_depth} ;Present print M106 S0 ;Turn-off fan M104 S0 ;Turn-off hotend M140 S0 ;Turn-off bed

M84 X Y E ;Disable all steppers but Z

PaWi20 avatar Jul 26 '23 13:07 PaWi20

Not sure if you've had feed back from a prusa slicer user, but I cannot get this new option to work.

Octopi 1.0 octoprint 1.9.3 new camera stack. Verbose Gcode selected. Added custom command @OCTOPRINT TAKE-SNAPSHOT within start Gcode before priming line

Selecting the option for smart triggers - compatibility and tick the Allow snapshot command option.

The first snapshot happens roughly half way through the first layer.

Switching to the classic Gcode trigger works with the command in the start GCode.

3dflea avatar Oct 17 '23 18:10 3dflea

No, I didn't. But I tested a timelapse with the new camera stack yesterday and it worked as expected (Cura).

PaWi20 avatar Oct 21 '23 10:10 PaWi20