Nodes/MKRShift_Nodes/G-code Spiral Vase
ComfyUI Node

G-code Spiral Vase

A parametric vase that generates its own G-code — slicer optional

By criskb·Created 7 months ago·Updated 5 months ago· 0
G-code Spiral Vase
  • profile
  • plan
  • preview
  • plan_info_json
  • summary
settings_json{"height_mm":120.0,"base_radius_mm":28.0,"top_radius_mm":24.0,"bottom_layers":3,"layer_height_mm":0.2,"line_width_mm":0.45,"segments_per_turn":72,"wave_amplitude_mm":0.0,"wave_frequency":0.0,"twist_deg":0.0,"phase_deg":0.0,"ovality":0.0,"print_speed_mm_s":24.0,"travel_speed_mm_s":120.0,"use_profile_defaults":false}

Here's a workflow you've never seen in a ComfyUI tutorial: type a height and two radii into a JSON box, and the graph hands you the G-code for a complete spiral vase, no slicer in sight. MKRGCodeSpiralVase is a procedural toolpath generator - it computes every move itself, from a parametric description of a vase, and emits the same MKR_GCODE_PLAN type the rest of the G-code lane runs on.

What it generates

The vase is a single continuous spiral wall - the classic "vase mode" shape: no infill, no perimeters, just one helical extrusion that climbs the silhouette. The defaults give you a 120 mm tall vessel, 28 mm radius at the base, tapering to 24 mm at the top, printed at 0.2 mm layers with 72 segments per turn for a smooth curve. Because it's one wall, it prints fast and uses almost no filament. It's also structurally fragile and watertight only if you trust your extrusion multiplier - that's vase mode for you.

The settings_json input covers:

  • height_mm, base_radius_mm, top_radius_mm - the silhouette. A cone if they differ, a cylinder if they match.
  • bottom_layers - solid spiral base-disc layers before the wall rises. Skip it at 0 and the vase starts as a thin open tube.
  • layer_height_mm, line_width_mm, segments_per_turn - path geometry and smoothness.
  • The fun ones: wave_amplitude_mm and wave_frequency modulate the radius as it climbs (ribbed/undulating vases), twist_deg rotates the profile over the height, ovality squashes the cross-section, and phase_deg shifts where the spiral starts. Zero everywhere and it's a plain vase; a little wave_amplitude and it starts looking sculptural.

There's an optional profile input, and use_profile_defaults switches line width, layer height, and speeds over to your MKR_GCODE_PROFILE instead of the standalone values.

How it computes the path

For each layer it walks the spiral in angular steps, converting the current height's radius (interpolated between base and top, plus any wave/twist/ovality) into XY points, and extrudes as it goes. The base is drawn as a widening spiral first when bottom_layers is set. Every move lands in the plan as an extruding or travel segment with a role and a layer tag - which is what lets MKRGCodePlanAnalyzer estimate time/cost and MKRGCodeExport turn it into actual .gcode with proper start/end sequences.

Outputs

  • plan (MKR_GCODE_PLAN) - wire it into MKRGCodePreview to see the path, then MKRGCodeExport to print.
  • preview (IMAGE) - a top-view render of the vase's toolpath.
  • plan_info_json, summary - stats and a one-liner.

Installing it

Part of the pack:

# ComfyUI Manager: search "MKRShift Nodes", install, restart.
# or:
cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes
# restart ComfyUI

No dependencies beyond what ComfyUI ships, no model files, no slicer required.

The honest read

The pack's docs admit this is a ComfyUI-native reimplementation of an earlier "G-code Studio" procedural experiment. It's a genuinely neat parametric generator and a great way to learn what a toolpath actually is - you can preview it, tweak a radius, and immediately see the path change. But keep expectations realistic: it makes spiral vases and nothing else. For any real part you're still loading a mesh into MKRGCodeLoadMeshModel and slicing with MKRGCodeExternalSlicer. This node is the "wow, I generated G-code from a number" demo that happens to print beautifully. Run the plan through MKRGCodePlanAnalyzer before you commit filament - a 120 mm tall, 0.45 mm wide wall is a quick print, but a surprise in the bed-fit warning is cheaper to catch in the graph than on the plate.

CategoryMKRShift Nodes/G-code/Generate

Inputs (2)

NameTypeDefaultDescription
settings_jsonSTRING{"height_mm":120.0,"base_radius_mm":28.0,"top_radius_mm":24.0,"bottom_layers":3,"layer_height_mm":0.2,"line_width_mm":0.45,"segments_per_turn":72,"wave_amplitude_mm":0.0,"wave_frequency":0.0,"twist_deg":0.0,"phase_deg":0.0,"ovality":0.0,"print_speed_mm_s":24.0,"travel_speed_mm_s":120.0,"use_profile_defaults":false}
profileoptMKR_GCODE_PROFILE

Outputs (4)

NameTypeDescription
planMKR_GCODE_PLAN
previewIMAGE
plan_info_jsonSTRING
summarySTRING