Move curve away from point

Hello, I try to make the curve move away from the points by a specific distance.
Anyone with an idea how to do it?

What boundary conditions do you have/ what are your requirements for the new curve?
For example do want to use a function of a certain degree?

the curve should move away from the points and be smooth. Or what exactly do you mean?

Hmm a simple approach would be

  • discretize your curve
  • calculate vectors between points coordinates and the discretized points
  • apply function with vector and its length as input that calculates the displacement vector (small distance -> high displacement, large distance -> small displacement)
  • add displacement vectors to points and calculate new splines with the result

there are for sure better ways to do this
i hope this helps

ok seems difficult. Im very new and don’t really know which commands I should use to du this

I would do this with python / the ghpython component, but there must be simpler ways where no code is needed

oh man :confused: but thank you either

Maybe “point attractors” could help, something like Double attraction

maybe I could give you the grasshopper data :confused: if you want to?

but they have a field of lines and I have one curve I want to reconstruct.

Yes. Without a GH file from you though, I won’t touch this. Eleven posts so far and still no file? :man_facepalming:

Sorry, here we go:
Pfad.gh (24.9 KB) Pfad_Rhino6.3dm (2.8 MB)

This is remarkably complicated. Do I understand correctly that of the 47 points in your Pt param, you want to use only four of them? And ignore the rest of them?

Yet somehow you end up with 15 circles? Struggling to make sense of this but not inclined to struggle very hard. Was this code copied from another model?

Yes, I want to just all the red points (15). because they are to near to the curve, so here the curve must move.
And yes the code on the bottom is copied, I don’t understand it too.

Have a try pufferfish plugin’s Pinch’n Spread Points.


Pfad_re.gh (33.4 KB)

1 Like

omg thank you so so much this is better than anything I expected. :smiley:

I threw away the parts I didn’t understand, which was most of it. From too complex to too simple…


Pfad_2021Jan18a.gh (19.2 KB)

Apparently I didn’t understand it at all.

It seems you are already using the field components, and of course in this case they should also work…
But somewhat hard to control many points…

Though I apparently missed the point completely, it’s amusing to see the effect of:

  • reducing the ‘V’ count of SDivide from 61 to 10 and
  • using Nurbs instead of IntCrv curves


Pfad_2021Jan18b.gh (18.2 KB)

1 Like

Me again your idea is very good but I works not very well for more than 5 points. I wanted to try another way and want the solution looking like the green line:

the red circles should be boundaries for the line and the line should move around them but very smooth
Here are the current datas:
Pfad_Rhino6.3dm (2.8 MB) Path.gh (31.6 KB)