Skip to content

Instantly share code, notes, and snippets.

@stratomancer
Created November 1, 2025 21:48
Show Gist options
  • Select an option

  • Save stratomancer/b29ac817dd910086769738c3d8385943 to your computer and use it in GitHub Desktop.

Select an option

Save stratomancer/b29ac817dd910086769738c3d8385943 to your computer and use it in GitHub Desktop.
Cura - Ender-3 v2 with BLTouch and FYSETC direct drive mod
;
; ========== Cura Start ==========
;
; ---------- Standards and safety ----------
G21 ; Units in mm
G90 ; Absolute positioning
M82 ; Absolute extrusion mode, matches Cura default
M107 ; Fan off
G92 E0 ; Reset extruder
; ---------- Heat strategy ----------
M140 S{material_bed_temperature_layer_0} ; Start heating bed
M104 S150 ; Preheat nozzle to 150 C to reduce ooze during probing
M190 S{material_bed_temperature_layer_0} ; Wait for bed
; Optional soak to reduce thermal drift on mesh
G4 S10 ; 10 second bed soak
; ---------- Homing and leveling ----------
G28 ; Home all axes
; If you keep a stored mesh and want faster starts, use the next 2 lines instead of G29:
; M420 S1 ; Enable saved mesh from EEPROM
; M420 Z{0.2} ; Apply z fade height, adjust to taste
G28
G29 ; Live mesh with BLTouch
G92 E0 ; Reset extruder again after probing travel
; ---------- Final nozzle heat ----------
M104 S{material_print_temperature_layer_0} ; Bring nozzle to print temp
; Move near prime location while heating
G1 X2.0 Y10 Z5.0 F6000
M109 S{material_print_temperature_layer_0} ; Wait for nozzle
; ---------- Prime lines, sized to bed ----------
; Use relative extrusion for priming so we can reason in mm of filament
M83 ; Relative extrusion
G1 Z0.3 F3000
G1 X2.0 Y20 F5000
G1 X2.0 Y{machine_depth - 10} F1500 E15 ; First long prime line
G1 X4.5 Y{machine_depth - 10} F5000 ; Shift over
G1 X4.5 Y20 F1500 E15 ; Second line back
G92 E0 ; Zero extruder after prime
M82 ; Return to absolute extrusion for print moves
G1 Z2.0 F3000 ; Lift to avoid scuffing
; Optional wipe move toward skirt start
; G1 X{skirt_brim_minimal_length} Y20 F5000
; ---------- Optional per material tuning ----------
; M204 P{machine_acceleration} T{machine_travel_speed} ; Use if you manage accel per material
; M205 X10 Y10 Z0.4 E5 ; Jerk and junction settings, Marlin specific
; M900 K{material_linear_advance_factor} ; Linear advance if enabled in firmware
; Hand off to slicer generated G-code
;
; ========== Cura End ==========
;
; ---------- Finish buffered moves ----------
M400 ; Ensure all moves are done
; ---------- Controlled retract and lift ----------
G91 ; Relative positioning
M83 ; Relative extrusion for the retraction
G1 E-1.5 F3000 ; Small direct drive retract to relieve pressure
G1 Z10 F3000 ; Lift Z to clear the print
G1 X5 Y5 F6000 ; Short wipe away from the part
M82 ; Back to absolute extrusion mode
G90 ; Absolute positioning
; ---------- Park and present ----------
G1 X0 Y{machine_depth} F9000 ; Park at front for easy removal
M106 S0 ; Fan off
; ---------- Cooldown ----------
M104 S0 ; Hotend off
M140 S0 ; Bed off
; ---------- Steppers ----------
M84 X Y E ; Disable X, Y, E, keep Z energized to avoid drop
; M84 ; If your Z cannot drop, use this to disable all axes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment