Place point along curve at desired distance?


#1

i’ll often need to place a point along a curve at a certain distance… the way i’ve been doing it is with Divide->Length then deleting all the points except the first one…

i have some downtime now so i figure i’ll find out if there’s a better way of doing this.
thanks

(note- i’m on mac so if the solution is via script then it has to be mac-able)


Insert point at distance from curve start/end?
Point on curve at distance from end
Scripting Sub Curve
#2

Hi Jeff,

You can try out the attached… Seems to work OK on both Mac and PC. Only thing I didn’t do is allow the user to pick surface edges in addition to just curves… Do you need/want that?

Cheers,
–Mitch

PlacePointAlongCrv.py (993 Bytes)


#3

hey mitch… thanks! that works great… (i like that i can just pick which end of the curve to measure from as opposed to using _Divide where sometimes the curve is drawn in the direction i need and other times requires me to reverse the arrows).

anyway, if it’s not too much trouble, the ability to pick surface edges would be great as that’s generally the type of situation i need this for.


#4

Here is a version which accepts either a curve or a Brep (surface or polysurface) edge as input. Let me know how it works…

–Mitch

PlacePointAlongCrvOrEdge.py (1.8 KB)


#5

I think this would be a good feature to include in the One Shot Persistent On Crv Onsnap. To be able to specify either a parameter t or a (normalized) Length value would be great. You get prompted for location and as it’s constrained to the curve a typed value leaves no ambiguity.


#6

Or Divide>ByLength could have a command-line switch for one division only…

–Mitch


#7

yep. it works perfectly for the scenarios i need it for… thanks so much!
i’ll definitely make use of it.

right… it almost seems as if someone simply forgot to add the option in there :wink: …i’m surprised this hasn’t been requested already (or maybe it has?)


(Margaret Becker) #8

Added to the list: http://mcneel.myjetbrains.com/youtrack/issue/RH-25520


#9

A ‘from point’ option would also be Nice To Have, so that you don’t have to be at the end of a curve to be able to use it.


#10

The attached script from my library is in vb (so no Mac compatible version right now), it offsets a series of points along a curve from a start point at a user-entered value for each offset. You can stop after placing just one point, so it does more or less what you want. It doesn’t work on surface edges.

I might be able to add a “From first point” option to the python script posted above, I’ll look into it.

–Mitch

OffsetPointsAlongCrv.rvb (1.8 KB)


#11

I can muddle through with my current approach for now (just split the curve, copy/paste/undo). But if Margaret is adding wishes to the V6 list, I thought now would be a good time to mention it.

Thanks for the script anyway Mitch. I’ll have a play!
Matt


#12

from point is obviously a good one… another one i personally would use is divide between points

i’ll upload an example a little later of a section from my last project in which i need to divide surfaces up according to my material dimension prior to splitting/smashing…

it’s all possible to do currently in rhino but yeah, there’s a lot of dup_ing/splitting/subCrv_ing/copying/pasting/undoing etc… it would be nice if there was a specific command (i.e.- not sure if i should all be tied into _Divide?) which has multiple ways to measure along a curve… the one in the original post was ,to me, the one which was most obviously missing but yeah, there are operations i have to do further down the line after placing that first point and it would be nice to be able to continue placing points/laying out a surface without needing to start cutting up the surface and/or edges.