3dSynth

Tutorials / Custom G-code

Open in the interactive tutorials reader

---
title: Tutorial 18 Spiral Vase Mode by Hand
description: Continuous Z-movement for seam-free printing.
---

Tutorial 18 Spiral Vase Mode by Hand

1. Lesson Header

2. Concept Introduction

The Z-Scar Problem.

In standard printing (Lesson 6), the printer finishes a layer, stops, moves Z up, and starts the next layer. This stop-and-start creates a vertical seam or "zipper" on the object.
Vase Mode (or Spiralize Outer Contour) solves this by identifying a continuous path and gradually increasing Z while moving X and Y.

It turns the print into one single, infinitely long line of code.

3. Machine State Explanation

Interpolated Z.
Instead of Z being a "Step" function (0.2 -> 0.2 -> 0.4), it becomes a "Ramp" function.
If we print a circle with circumference 100mm, and we want a 0.2mm layer height:
- At start of circle: Z = 0.0
- Halfway around: Z = 0.1
- End of circle: Z = 0.2 (which is the start of the next circle!)

4. Command Breakdown

3-Axis Moves (G1 X... Y... Z...)
We are used to G1 X10 Y10.
Now we use G1 X10 Y10 Z0.25.
The firmware automatically synchronizes all three motors so they arrive at the destination at the exact same moment.

5. Minimal Working Example

The Spiral Square.
Imagine a square perimeter (40mm total). We want to rise 0.2mm over that perimeter.
Each side is 10mm (25% of the path).
So Z must rise 0.05mm per side.

; Start at Z=0
G1 X0 Y0 Z0
; Side 1 (Rise 0.05)
G1 X10 Y0 Z0.05 E1
; Side 2 (Rise 0.05 -> Total 0.10)
G1 X10 Y10 Z0.10 E1
; Side 3 (Rise 0.05 -> Total 0.15)
G1 X0 Y10 Z0.15 E1
; Side 4 (Rise 0.05 -> Total 0.20)
G1 X0 Y0 Z0.20 E1

6. Visual Representation

Interactive preview is available in the interactive reader.

7. Build Exercise

Task: Create a Spiral Cylinder.
- Radius: 20mm. (Approximated as a Hexagon for simplicity, or use G2/G3 arcs if your firmware supports helical arcs).
- Let's use Helical Arcs (G2/G3 with Z) because it's the cleanest way.

The Helical Arc:
G2 I20 Z0.2
This tells the printer: "Do a full circle (implied or split) while lifting Z to 0.2".
Note: Most firmwares require splitting full circles into quadrants.

Plan:
1. Move to Start (X20 Y0).
2. Q1: Arc to X0 Y20. Lift Z by 0.05.
3. Q2: Arc to X-20 Y0. Lift Z by 0.05.
4. Q3: Arc to X0 Y-20. Lift Z by 0.05.
5. Q4: Arc to X20 Y0. Lift Z by 0.05.
6. Repeat.

Solution:

; Setup
G28
G1 Z0 ; Start at bottom
G1 X20 Y0 ; Start point (Radius 20)

; --- Loop 1 (Z 0 to 0.2) ---
G3 X0 Y20 Z0.05 I-20 J0 E1   ; Q1
G3 X-20 Y0 Z0.10 I0 J-20 E1  ; Q2
G3 X0 Y-20 Z0.15 I20 J0 E1   ; Q3
G3 X20 Y0 Z0.20 I0 J20 E1    ; Q4

; --- Loop 2 (Z 0.2 to 0.4) ---
G3 X0 Y20 Z0.25 I-20 J0 E1
G3 X-20 Y0 Z0.30 I0 J-20 E1
G3 X0 Y-20 Z0.35 I20 J0 E1
G3 X20 Y0 Z0.40 I0 J20 E1

8. Deep Insight Section

Relative Z is King here.
Calculating Z0.05, Z0.10, Z0.15... manually is tedious.
Use G91 (Relative) for Z moves!
Then the code for every quadrant is identical.

G91 ; Relative Mode
; Q1
G3 X-20 Y20 Z0.05 I-20 J0 E1 ; (Note: X/Y also relative in G91)

Warning: Using G91 for Arcs can be tricky because X/Y target becomes relative too. It's often safer to keep X/Y absolute (G90) and only make Z relative, but standard G-code doesn't allow mixing modes easily per axis.
Hybrid Approach: Calculate absolute X/Y, but use a variable for Z (if using macros) or just copy-paste carefully.

9. Common Failure Modes

  1. The "Teardrop" Error: If your Z-lift isn't perfectly synchronized with the layer height, the object will either stretch (too fast) or squash (too slow).
  2. Minimum Layer Time: Spiral mode is fast. If you print a small object, the plastic might not have time to cool before the nozzle comes around again. The object will melt into a blob. (Solution: M106 S255 Fan, or slow down F).

10. Real-World Application

Bottle Printing.
This technique is used to print lightweight bottles, lamp shades, and airplane wings (RC planes). It is the strongest way to print a single wall because there are no layer start/stop stress concentrators.

11. Final Clean Version

Save this as lesson18.gcode.

; Lesson 18 - The Spiral Cylinder
G21
G90 ; Absolute X/Y/Z
M83 ; Relative E
G28
G0 Z0 ; Start on bed

; Move to Start
G1 X120 Y100 ; Center is 100,100. Radius 20. Start at Right edge.

; --- BASE LAYER (Flat) ---
; We print one flat layer first to stick to the bed.
G3 X100 Y120 I-20 J0 E1
G3 X80 Y100 I0 J-20 E1
G3 X100 Y80 I20 J0 E1
G3 X120 Y100 I0 J20 E1

; --- SPIRAL START ---
; We will lift 0.2mm per circle.
; That is 0.05mm per quadrant.
; Current Z is 0.

; Loop 1 (Z -> 0.2)
G3 X100 Y120 Z0.05 I-20 J0 E1
G3 X80 Y100 Z0.10 I0 J-20 E1
G3 X100 Y80 Z0.15 I20 J0 E1
G3 X120 Y100 Z0.20 I0 J20 E1

; Loop 2 (Z -> 0.4)
G3 X100 Y120 Z0.25 I-20 J0 E1
G3 X80 Y100 Z0.30 I0 J-20 E1
G3 X100 Y80 Z0.35 I20 J0 E1
G3 X120 Y100 Z0.40 I0 J20 E1

; Loop 3 (Z -> 0.6)
G3 X100 Y120 Z0.45 I-20 J0 E1
G3 X80 Y100 Z0.50 I0 J-20 E1
G3 X100 Y80 Z0.55 I20 J0 E1
G3 X120 Y100 Z0.60 I0 J20 E1

G28 X0 Y0

12. Stretch Challenge

Challenge: Write a "Cone" spiral.
Decrease the Radius by 0.5mm every loop while spiraling up.
Hint: You will need to change the Target X/Y and the I/J offsets slightly for every quadrant.

Answer Key:
(Conceptual)
Start R=20.
Q1 Target: R=19.875.
Q2 Target: R=19.75.
...
This requires recalculating every coordinate. This is why we write programs (Python/JS) to generate G-code!