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)
	Call Rhino.AddPoint(pts(1))
End Sub

)

Looks like that’s one of mine from around 2015… I don’t have an exact Python equivalent looks like, here is one that does multiple offset points (and can probably use some more work).

OffsetPointsAlongCrv.py (3.7 KB)

Ah, of course it’s yours. I think 80% of the scripts I have are yours!
Thanks, as always. Will check out this new one. Sounds super useful!