Extend curve "to" length

Hi. Is there a way to extend a curve “to” a specified length? The extend command extends curves “by” the specified length. Can it be done with multiple curves instead of picking each one as with the extend command. Thanks

Hello Hayden

One of the methods is to choose the scale 1d option from the transform toolbar,
select one end from which everything and the other end of the line are to be counted,
then enter the specified length and it should work.


You would need a small script for that. Keep in mind that curves have a start and end point, so short of clicking on each curve near the end you want to extend, if you extend all the curves from their start or end point, some may not always go in the direction you think…

that only works on straight curves…

personally, i’ll over extend then SubCrv to length.

(not that i have to do this often… i might seek an alternative solution or script if i needed it a lot)

Something like this…

import rhinoscriptsyntax as rs
curve = rs.GetObject("Pick a curve")
curve_len = rs.CurveLength(curve)

point = rs.GetPointOnCurve(curve, "Point on curve")

from_start = rs.Distance(point,rs.CurveStartPoint(curve))
from_end = rs.Distance(point, rs.CurveEndPoint(curve))

print from_start
print from_end

length = rs.GetReal("New length", 3000)

new_total_len = length - curve_len

if from_start<from_end:
    end = 0
    end = 1

rs.ExtendCurveLength( curve, 1, end, new_total_len )

Thanks guys.

Hi all - I for what it’s worth, I dredged up a curve-re-lengthener I made a while ago…

CurveLengthUtilities.rhp (23 KB)


Unblolock the rhp file in Windows, then drag and drop onto Rhino…