# Sliding a point along a curve for x distance

I am trying to do a 25mm long curve (circle segment.) how can I move a point along a certain distance to cut it to size?

One way is to use Divide>Length, set the length to 25. This will create points at 25mm intervals along the circle, you can use just the first point created and the circle start/end point to split the circle.

Another way is to use SubCrv, Mode=Shorten, select the circle, pick the start point, enter the length (25) and then pick the side you want to keep.

I guess I should also note in passing that you can draw an arc that has a given length/radius directly. Start the Arc command, pick the center, type in the radius and click to fix the start point, then hit the â€śLengthâ€ť option in the command line and type in your lengthâ€¦

2 Likes

Thank you, I found the arc length option,

Hereâ€™s a script I have tucked into a Button that I find useful. Not sure who made the script, tho, apologies to whoever that is!

``````! _NoEcho -_Runscript (

Private prevDistValue
If IsEmpty(prevDistValue) Then prevDistValue = 1.0

Call PointDistFromCrvEnd()
Sub PointDistFromCrvEnd()

Dim arrCrv,crv,crvLen,len,tol

arrCrv = Rhino.GetObjectEx("Pick curve near end to place point", 4, False)
If Not IsArray(arrCrv) Then Exit Sub
crv = arrCrv(0)
crvLen = Rhino.CurveLength(crv)

tol = Rhino.UnitAbsoluteTolerance
len = Rhino.GetReal("Distance from end?", prevDistValue, tol, crvLen)
If IsNull(len) Then Exit Sub
prevDistValue = len

Dim param,mParam,revCrv,pts

param = Rhino.CurveClosestPoint(crv, arrCrv(3))
mParam = Rhino.CurveClosestPoint(crv, Rhino.CurveMidPoint(crv))

revCrv = False
If param > mParam Then
'pickpoint is closer to curve end, add point from curve end
revCrv = True
Call Rhino.ReverseCurve(crv)
End If

pts = Rhino.DivideCurveLength(crv, len, False, True)
If revCrv Then Call Rhino.ReverseCurve(crv)