# Geometry node spacing along curve

Is there a way to have the bolts instanced along a curve in geometry nodes with proper spacing between one another on each side of the pipe? I want each segment of pipe to have the same amount of bolts on each side.

The Curve to Points node is really useful for this. If you need even spacing instead of even amounts, change the mode from Count to Length.

This would work on any curve (or multiple curves at once):

The same curves but with mode changed to Length:

Update

What you really need to do to make this work correctly is to create two offset curves based on the original base curve (I'm assuming that your pipe is based on a curve) and then use the Curve to Points node to spread out the instances evenly:

• Sorry this is not what I need, I want the bolts along the curve to be evenly spaced not the ones on the connecting peice Commented Jun 3, 2022 at 6:01
• @MasonHeilman Just saw your edit, doesn't the Curve to Points node with Count set to 11 solve your problem? The curve circle is just a representation of your curve, it could be whatever shape. Otherwise, you need to clarify what you're trying to achieve. Commented Jun 3, 2022 at 6:09
• I am talking about the bolts along the length of the tube not the flange, they are closer together on the inner bend Commented Jun 3, 2022 at 6:24
• You can set the Curve-to-Points node to "Length" mode to get even spacing between the points, instead of a fixed count over the whole curve. It will change the total amount based on how long the curve is. This may or may not be what the OP needs, it's hard to tell without more detail.
– user436
Commented Jun 3, 2022 at 7:29
• @TobiasEinarsson Thank you for another update, this solves my problem. Sorry for all the confusion Commented Jun 3, 2022 at 15:40

This is a near-repeat of @Tobias Einarrson 's answer since he's edited it (.. the main point being to sample a curve by length). This adds a workflow option, though, so maybe it's worth posting.

Starting after you've made your mesh, somehow, inside or outside a GN tree.

• You can select edge-loops of the mesh to carry the bolts, weighted 1, and add them to a vertex-group.
• Feed that group as an input to an 'Add Bolts' GN modifier

In this example, the vertex-group input as 'Linear':

• First of all, the Normal of the underlying mesh is captured.. (curves can twist undesirably)
• Then the vertices with enough weight in the group are separated from the mesh. (Edges are preserved)
• The separated edge-segments are converted to a multi-spline curve.
• The curve is sampled by length, and the bolts instanced on it.
• The bolt-instances are rotated to align with the mesh-surface Normal.

When you sample a curve by length in GN, the endpoints are always included, and the rest are 'best fit'. Which, in this case, IMO, is quite helpful.

The method would work just as well for stitches in upholstery or clothing, ornamental beading.. etc.

you can use this node setup, to achieve the effect:

The resample curve node with "length" gives you even spaces.

result:

by adding scene time, some map range nodes, you can even animate the bolts: