# How resample curve in geometry nodes with same length between vertices?

How resample curve in geometry nodes with same length between vertices.

• It may sound simple, but the solution is not quite so simple (and as far as I know, there is currently no node that can do this). The problem lies in the fact that the resampling of a curve takes place along the curve, which can inevitably lead to different distances between the resulting vertices. Here is a similar question, with the same problem: blender.stackexchange.com/questions/278223/… Commented Apr 15 at 16:48
• Do you want to set a specific length or should it only be the same between each of the vertices, but no particular length? Commented Apr 15 at 20:26
• @GordonBrinkmann Any of the options.
– user185939
Commented Apr 16 at 6:39
• @quellenform Thank you.
– user185939
Commented Apr 16 at 8:44
• @RobinBetts Thank you.
– user185939
Commented Apr 16 at 12:05

The simple and dissatisfying answer is: you will most likely not get equidistant vertices. So I am very sorry, this is less of an answer, more an explanation what is happening there.

When resampling a curve, you have three options, but basically only two if you want (more or less) equidistant vertices: Count or Length (the Evaluated option only uses the resolution and distribution given by the original curve's properties).

Theoretically Count means you give a number of points and they are distributed evenly along the curve. So apparently Length means, you get as many points as needed to place them along the curve with the given distance.

But that is not true. First of all, the start and end point of a curve will always stay in the original position and Blender will try to follow the original curve shape as close as possible.

On a straight curve you will get equidistant points, however with the Length option it is already a bit tricky: let's say you have a straight curve with a length of 70m and you want to resample it with a length of 11m distance between points.

The manual says, Length is "the approximate length between the control points of the new splines."

70m/11m is rounded 6.4, so now the problem is, if you had 7 segments at 11m, the curve would be too long (as I said, start and end point stay the same). So the number of segments will be rounded down. 6 segments with 11m are too short, so the length of each segment will be 70m/6 ≈ 11.667m.

That is first of all the reason why the length of a segment is not necessary the Length given in the Resample Curve node. But just like when using count, on a straight curve these segment will still have the same length.

The problem now are bending curves. Blender will try to keep the shape close to the original and the points as close as possible lying on the original curve. But this means, since a resampled curve has straight edges between control points, that it cannot always keep an exact distance while mostly maintaining the shape as much as possible (of course, the lesser the number of points, the more inaccurate the curve might become).

So basically the only chance to get closer to equidistant points is having a high Count or a very short Length. The shorter the individual segments are, the easier to match them to the original curve and the closer to equidistant they become.

I tried calculating and positioning points on my own, by taking the Factor of a Spline Parameter node or the Spline Length for example and divide it into equal distances etc. The problem is always, dividing the length of the spline always results in positions on the curve which take bends into account. The straight connections between the new points are often shorter. Changing one segments to make it longer or shorter results in the adjacent ones being changed as well. Or you might have to move the points off the original curve and then the question would be, how much diversion from the curve is acceptable?

So as I said, the dissatisfying answer is: you will probably not get completely equidistant points, at least not with the "usual" nodes. You would have to make your own calculations, probably with repeating changes between segments until they are all unified.

• Thank you. Ok I try.
– user185939
Commented Apr 16 at 8:46