# how to bend geometry with geometry nodes

I want to create array on curve with geometry nodes, but I am unable to merge the instances so I get a continuous mesh, like a rail.

I tried to use the weld modifier but it does not work with geometry nodes and it won't weld loose parts.

Is it possible to merge vertices of the instances on a curve in geometry nodes, like the array modifier merge by distance function?

• maybe you could provide a sketch or a screenshot of what you want to have? Dec 7, 2021 at 10:45
• Weld modifier works but you need to add a Realize Instances node just before the geometry output Dec 7, 2021 at 10:58
• that seems to weld the vertices of the instance, tried to define a vertex group for t what I want to weld, but it still ruins the topology Dec 7, 2021 at 12:40
• .. I think you would need to deform the realised mesh along the curve.. Dec 7, 2021 at 17:17
• How do I do that with geometry nodes? curve deform node is scheduled for 3.1 from what I see Dec 7, 2021 at 22:54

In order to have the vertices at the ends of your array-elements coincide closely enough to be welded, the array will have to be deformed to the curve.

This GN Group will create an array of your elements along the element X-axis:

This GN Group will deform geometry to a given curve, with its X-axis along it; a limited version of the Curve modifier:

It works by collapsing the mesh in Y and Z onto a curve, with its X stretched along it by the original length of the mesh, starting from length Offset along the curve. It then 're-inflates' the mesh, mapping the original Y and Z coordinates of the vertices on to the curve's Normal and (Normal x Tangent) vectors, at the relevant X.

These groups can be combined into an 'Array along Curve' group:

The result is similar to the use of Array and Curve modifiers, but giving you more access under the bonnet, should you need it.

(Blender 3.0)

• amazing, thank you! Dec 13, 2021 at 7:02
• @Nathan Here you go ... Not super-chuffed with it yet. 1. Sample Curve doesn't give you Radius. 2. You can't transfer attributes from a curve-target. So the only way I could think of, so far, is to resample the curve as points, and transfer from the new points. But I really want to sample the radius exactly at the collapsed mesh-points, so no sampling error. Just up the street of your ingenuity, surely? ; ) ... Jan 26 at 20:03
• @Nathan Ahhhh.. I've got a way, I think.. but it's a lot more nodes, and too late here, today. Jan 26 at 20:12
• Thanks for looking-- I'll just ask a new question, with how far I've gotten so far. Seems like there should be something more elegant, not sure why radius isn't handled the same as tilt.... Jan 26 at 23:37
• Hi @Nathan ! I had to be away today.. have had a look at the whole problem since.. the only solution I can find is over-sampling the curve on a 'transfer radius' target branch, so the 'Nearest' error is as small as possible. Very frustrating. I think the best I can do as an answer to your other Q is to explain why I'm stuck.. If only Sample Curve returned the radius along with everything else.. then no problem. If Transfer Attribute could interpolate over other domains than faces, no problem either. (Once a curve is in GN, only linear interpolation is available, it loses settings)... :( Jan 27 at 21:52