# Geometry Nodes Curve / Spline length simple math

I finally figured out, after searching for a while, how to make my Curve extend the way I want it to. But now I have the problem that I do not know how long the curve is. The goal is to multiply the curve length from 0 to one. Where 0 means that the curve is not extended at all and 1 means that the curve is fully extended. But it doesn't seem to work somehow. Can someone help me to find out the curve length used by the trim curve node?

Attention: Spline Length does not bring my searched result! Then it really behaves as I want with the multiplication, but the splines extend completely differently, namely not as nicely together as they do when nothing is inserted in the Trim Curve Node.

• Wouldn't the factor option fo the trim curve node do that? Though, I am surprised you got the thing you got there working at all, since I don't think there is such a thing as proper branching curves in blender. So the problem is probably at least related to that. Commented Jun 14, 2022 at 20:44
• If I extend the curve using Factor, I get the same result as if I use the Spline Length as input for the end in the Length mode of the Trim Curve node. Unfortunately, the splines do not extend synchronously. So no, unfortunately this does not work.
– Andi
Commented Jun 15, 2022 at 6:35
• Would you be so kind and share your blend file with us so we can use the same starting point to answer your question? Commented Jun 15, 2022 at 13:03
• I have attached the Blender file.
– Andi
Commented Jun 16, 2022 at 6:26
• I have found the solution and will answer the question myself as soon as I have time. Using bpy.context.object.data.splines.active.calc_length() you can get the length of the curve.
– Andi
Commented Jun 16, 2022 at 8:53

The node Attribute Statistics gives you the length of the longest spline, without having to rely on Python.
bpy.context.object.data.splines.active.calc_length()