Place point along curve at desired distance?

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)

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)

1 Like

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.

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)

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.

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

–Mitch

1 Like

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?)

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

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.

1 Like

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)

2 Likes

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

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.

Hi guys, is there a command for this in R6 now - not having to divide the curve but just placing points at desired distances? I can’t seem to open the links for the scripts in the chain.

Thanks

Hello - you can use the SubCrv command with Mode=MarkEnds . Just make sure to snap to an end of the curve as the start point.

-Pascal

4 Likes

Here’s a plugin that does exactly this.

https://www.food4rhino.com/app/points-along-curve

Does it work for polylines?

I believe so yes. As of now i think it’s still under review by rhino to publish but it works great for me.

Brilliant. Thanks!

Do you know if that Plugin runs in Rhino 6?

it does.

1 Like