# How can the Screw modifier be implemented using Geometry Nodes?

The Screw modifier allows one to revolve a profile curve around an axis to generate geometry. However, there is no such Geometry Node type. Instead, Curve to Mesh is supposed to be a more general solution, accepting generic profile and curve inputs.

A ticket on the blender dev-site even rejects the idea of a "screw node" as something that can be accomplished using existing geometry node types. However, it seems that neither curve-to-mesh, nor any existing geometry node type, can accomplish the axial extrusion that screw accomplishes. Am I missing something?

Specifically, the issue is that curve-to-mesh takes a curve as input, but to emulate the screw function, one would need that curve to be a zero-radius circle, or a zero-length line with non-zero twist. Obviously, this can be worked around by using an extremely small radius (1e-9 seems to work fine) or applying a negative offset to the profile equal to the radius of the curve, but these both feel like hacks and introduce edge cases for certain geometries.

When I try using an actual zero-radius curve, arc, or spiral node, the geometry disappears, with the output vertices having all zeros for one or more axes.

Is that are you looking for? I think it is easy to rotate points depending on curve factor:

Here is an (almost) complete replica of the Screw modifier as a node group:

The instructions for this can actually be taken, by and large, from the Blender documentation.

The only differences to the original modifier are:

• Only curves are processed and no meshes!
• The axis can be chosen arbitrarily and is not exactly limited to X, Y or Z.
• The option Stretch UVs has not been implemented (yet).
• The option Merge works here along the whole axis, even if the value for Screw is greater than $$0$$ (Is this possibly a bug of the original modifier, because it doesn't work like that there?).
• Additionally there is the option Fill Caps to close the ends of the extruded profile with a mesh as well (cyclic profile).

Otherwise the thing should work exactly like the original.

The basis of this technique is Curve to Mesh. However, I use this node only to get the mesh.

The individual points of the mesh are then manually rotated around a certain axis and center point and shifted in height (if Screw is greater than $$0$$).

Here is the test file where I transferred the settings of the one object with Drivers to the Geometry Nodes:

(Blender 3.2)

Making geometry with Curve to Mesh is a different thing than what screw modifier does. If you make a curve with a profile, the geometry is extruded along the curve, while screw extrudes geometry and then rotates and transforms the extruded bit. With screw modifier geometry can intersect itself in different way:

So, I am no expert in GN, but you probably need to extrude geometry. It might look something like this:

There is no way of looping in geometry nodes yet as far as I know and you need many iterations for screw modifier so the only way I can think of is making a group and duplicating it... Not elegant at all:

Let's hope they add some sort of looping functionality in the future.

My recommendation would be to use the screw modifier outside geometry nodes and use it's result.

One of the advantages of the Screw modifier is that, with adjustment, it can give nice clean topology on a helix, with parallel subdivisions along the twist-axis, and relatively clean quads.

Here's a GN version of Screw, aimed at that advantage:

In this state, it modifies a profile mesh, radius along X, height along Y. It will generate a screw up Z, around the profile's object origin. The orientations could be made more intuitive, but that would mean a few more nodes.

• It extrudes the profile along a convenient length, tau (2*pi) per turn.
• The extrusion is subdivided by 'Segments' per turn
• The X and Y of the extrusion are converted to polar coordinates, to wrap it round a circle.
• It sets the height per requested turn of the helix to that of the profile, so the whole lot welds cleanly.

It's an (ahem) 'exercise for the reader' to wrangle the interface to taste.