← All ideas
  • Published 27 Mar 2019

Curve Length Feature

Issue

It's hard to get curve length in blender. I recently ran into a scenario where I needed to get it, and looked at forums only to find there were many instances of people asking how to do this, and a variety of ways to obtain it. Some of them seem more like "hacks", some are more legitimate using python and some math. It is possible of course, but I feel this is one of those things that should have a feature to just obtain it with no fuss.

Feature Suggestion

I think we should add an "analysis" or "measure" portion to the overlay section for curves. You can tick a box that says "curve length and it will display it when a curve is selected, much like edge length for meshes. Likewise, in the properties panel, in edit mode, where we already get things like mean tilt, mean radius etc, we might want to have length there as well.

Bonus

Maybe we might take the opportunity as well to add more than just curve length? Perhaps tangent for the points on the curve, angles. Who knows?

Question.png

100%

Development Status: Open

Upvote 44 Downvote 0
daniellapalme
27 Mar 2019

14 Comments

marcusjackson

This would be absolutely fantastic if we could have this feature. And maybe for more than just calculations.

This could be used for drivers where the distance from the first handle of a curve to the last handle could be set from a range of 0-1 using an equation which divides the distance by the max distance of the curve in a driver. Then this value could be used to increment rotation, scale or location depending on the value from 0-1 along a curve's distance.

Or even more... I'm sure others can think of more amazing things this could be used for. It would be open opportunities in terms of non-destructive mesh modelling.

2
ammusionist

Happy to up-vote this! Meshes already have edge lengths, this seems like a natural extension - and to make it a plug in instead could cause confusion as you would have to look for "Edge Length" in two different places.

1
daniellapalme Author

* @ammusionist * Agreed. Thanks for highlighting it being an natural extension of the edge length for meshes!

jason

* @ammusionist * To be fair, on a well-written add-on, you wouldn't have to look in two different places. You can pretty easily append UI elements to any panel or menu that already exists.

darrin.brunner

I'm just adding a comment to say this would be very helpful for me, as well.

Josephbburg

Almost a duplicate of my proposal

daniellapalme Author

* @Josephbburg * So it is. Sorry I missed your post! Good to see people wanting the same feature though.

1
Josephbburg

* @daniellapalme * Mine is a rather arcane way of presenting it. I didn't suggest any UI changes, because I was content to use Python.

I have found a few ways of measuring curves, but nothing so far that's really good enough for rigging.

Maya has a "curve info" node that reports a few stats about the curve (this might be a good research topic for a UI mockup).

Josephbburg

* @Josephbburg * I actually have found a really simple way of measuring curves, now- create a spline IK chain and make a driver that compares the length of the bone in pose space to the rest length. Works just fine, and gets more accurate with more bones in the spline IK. I've also written some really great Python tools for doing theses sorts of things since then. I'd be happy to share them.

1
jason

For what it's worth, each segment of a bezier curve has a function built-in called calc_length() where you can get the length of that segment. Seems like that'd be ripe for an add-on.

daniellapalme Author

* @Jason van Gumster * Yes, from my research it looks like you can just add those up, using the python console. So the architecture seems to be there for the most part. But you don't think it should be built in? I suppose an add one would work just as well, but I could easily see it in the overlays.

jason

* @daniellapalme * It could be built-in. I'm just saying that since this is relatively small, it may be deprioritized... so if you wanted the feature quickly, an add-on might be the best way. At the very least, it could serve as a proof of concept to show what the built-in should look like.

daniellapalme Author

* @Jason van Gumster * Oh yes, agreed, it is a very small feature. I could pitch it to people for an add on for a faster result, but sometimes that makes people content with just the add-on and not as a feature. I'm in no rush for this particular guy, rather I just feel somehow it should be a feature rather than an add on. Length of curves is helpful in a lot of ways. CAD work, animating along a path and drivers to name a few. We do have an animation node called "Get Spline Length" as well. When you plug it into the viewer node you can get your length, but it's troublesome to open up animation nodes just for that.

Josephbburg

* @daniellapalme * No, it doesn't work. calc_length gives you the length BEFORE deformation.