Nodes/Avatar Graph/Mesh Screw
ComfyUI Node

Mesh Screw

Spin a profile into a spiral, lathe-style

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Mesh Screw
  • BPY_OBJ
  • center
  • axis
  • BPY_OBJ
steps9
turns1

Think of a lathe: feed it a 2D profile and spin it around an axis, and you get a solid of revolution - a vase, a bottle, a spring. Blender's Screw tool does exactly that to a mesh selection, sweeping it around an axis while also stepping it along that axis a little on each turn, which is what turns a simple loop into an actual screw-thread or spiral shape instead of a flat ring. This node is Blender's real bpy.ops.mesh.screw operator, exposed as a ComfyUI node inside Avatar Graph, the pack that runs real Blender (via the bpy Python package) inside ComfyUI's process to build interactive 2D-to-3D avatars - auto-generating a node for every mesh operator Blender has, this one included even though spiral geometry has nothing obviously to do with rigging a talking face.

How it works

Given an edge selection (typically an open profile, like a half-circle or a zigzag), it sweeps that profile around a specified axis, generating new geometry at each step and connecting it to the last, building up a continuous helix or radial surface as it goes. Feed it a straight edge and turn it a full 360° and you get something close to a lathe-revolved surface; feed it more turns and it spirals outward or upward like an actual screw thread.

Inputs and outputs

  • BPY_OBJ - the mesh coming in, with the profile edges to sweep already selected upstream.
  • steps (default 9) - how many segments make up each full turn. Higher gives a smoother spiral at the cost of more geometry.
  • turns (default 1) - how many full revolutions the sweep makes.
  • center and axis - vector fields defining the point and direction the sweep spins around. Get these wrong relative to your profile's actual position and you'll get a lopsided or self-intersecting result rather than a clean spiral, since the sweep pivots exactly around what you specify here, not around the profile's own center by default.

Output is a single BPY_OBJ - the same object, now carrying the newly generated swept geometry.

Installing it

ComfyUI Manager: search "avatar-graph-comfyui", install, restart. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/avatechai/avatar-graph-comfyui, then cd avatar-graph-comfyui && python -m pip install -r requirements.txt, then restart.

Python 3.10.x is the requirement to get right first - the bpy package this pack is built on requires that exact minor version, and the README pushes macOS/Linux users toward a dedicated conda environment (conda create --name comfyui python=3.10) rather than hoping an existing Python install lines up. Windows gets a prebuilt ComfyUI + Python 3.10 zip linked directly in the README, unzipped over an existing install, with the pack itself added afterward through Manager. Restart with --enable-cors-header (macOS also wants --force-fp16) for the live 3D preview to work - without it, the graph still runs fine, you just save the model out manually via the pack's Avatar Main Output node instead.

Common issues

Rule out the Python version first if nodes from this pack aren't loading - anything but 3.10.x leaves bpy without a working build. On Screw specifically, a self-intersecting or wildly distorted result is almost always the center/axis combination being wrong relative to where your selected profile actually sits, not a bug - double-check those against your profile's real position before assuming the operator is broken. It also needs an actual edge selection to sweep; run it on a mesh with nothing meaningfully selected and there's nothing for it to generate. As with every mesh node in this pack, passing it something other than a real mesh BPY_OBJ from earlier in the same graph surfaces as a Blender-side error - these are chain-only tools by design.

Categoryblender

Inputs (5)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
stepsoptINT91–100000
turnsoptINT11–100000
centeroptB_VECTOR3
axisoptB_VECTOR3

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ