How do I offset points along a curve?

Hey,
So I got points that I generated from “divide length” however I need those points to be offset in the right direction while still in contact with the curve. I tried to use “move” then “vector x” but that didn’t work. Any suggestions will be appreciated.

the offset should be 5 units to the right, or 5 units to the right “measured along the length of your curve” ?

if the first is ok, then you can just create a circle radius 5 units over each point, and take its right intersection point with your original curve

You could use Divide Length again but using a value of ‘length + offset’?

Better get used to posting GH code/geometry with your questions, eh?

P.S. I meant to say Evaluate Length. See below.

as @inno said, you have 2 options
1- non accurate way using Curve parameters, you will get some deviation with non uniform curves
2- using circles to divide, it is better, but requires a slightly complex data manipulation to filter by direction. I did a quick definition for you to take a look at.

Point Slide Along Curve_Circles.gh (15.6 KB)

1 Like

You didn’t internalize your curves. (ReparamCrv)

Definition updated, Thank you @Joseph_Oster

Nice work, Here is a third method using Evaluate Length (white group). Note that the ‘N’ (Normalized) inputs are “inverted”, changing the default ‘True’ (which expects 0 to 1) to ‘False’ (which expects actual length values). The results match yours.


Point Slide Along Curves_2021_Jul5a.gh (22.5 KB)

1 Like

Good work, yours is much simpler and faster to calculate.

It has a flaw, as you can see if you play with the ‘Segment Length’ slider… when the last white offset point is beyond the length of the curve. Not quite sure yet how to fix it?

Actually, the flaw is in your dimension code but it’s caused by the last magenta point being too close to the end of the curve to fit the adjacent white offset point. It happens in your code too.

P.S. This version fixes the ‘Dimensioning’ by ignoring “pairs” with a ‘Null’ point (Prune Tree).


Point Slide Along Curves_2021_Jul5b.gh (20.7 KB)

3 Likes

Okay, this is was so informative for me.
good to refresh my mind with some forgotten tools, “Prune Tree” + “Eval Length”
much appreciated.

1 Like

thanks for the help

thank u!!!

I got another question regarding the same thing, so i created my set of points (both the initial and offset points) and I used that to create vertical lines. As you might have remember from before, I’m doing this to create tabs, but as I used the “curve | curve” component to determine the intersection points between the vertical lines and the horizontal ones, I only get some of the points but not all of them. I’m not sure where I went wrong here. I tried to flatten/graft the inputs of the “curve | curve” or line outputs but it just reversed the points. In the picture, it should have 8 points not 4 points.
tab.3dm (25.2 KB)
tab.gh (27.5 KB)

Your .3dm file is R7 so can’t be opened in R6. Internalized geometry is best, or save an R6 version of the .3dm file. But it apparently is not needed?

You can get your eight intersection points by grafting the ‘A’ input and flattening the ‘B’ input to CCX.

Or you could adapt yesterday’s code like this - see cyan group:


Point Slide Along Curves_2021_Jul6a.gh (21.3 KB)

The reddish ‘Dimensioning’ group can be discarded.

Oh wait, besides the vertical lines from the cyan group, you probably want to shatter the horizontal lines and ignore selected segments? Back to the tabbing thread! Correction:

OK, look, I think this is where you’re going with this? You don’t need CCX to get there because you already have the ‘t’ values from the Evaluate Length points. (orange group)


Point Slide Along Curves_2021_Jul6b.gh (27.7 KB)