Hello, I have a curve divided by 1 meter intervals of points (Curve Points), and 3 Attractors points. Is there a way to attract the Curve Points along the Z direction to the 3 Attractor points but in a Soft and gradual way? As shown in the image below. Also as an additional rule, can the closest point of each Attractor points be pulled to the same Z value as it’s attractor?
Here is a solution, the idea is to replace points on curve near the attractor by the attractor itself. This is depending upon the distance. And at the end using Cull Duplicates to suppress the attractors and let only one of each and then Interpolate
Great solution by Laurent!
Because I recently had to solve a similar problem I want to contribute the Gaussian way of doing that. Not perfect because only 1 attractor is affected yet but it offers some more possibilities for the shape af the curve. (I have to study Laurents list-sorting, maybe there is a way to get all 3 points managed.)
Hello @ferry59
here a more general solution with 4 different kernels,
All the kernels I use have max value of 1, because I want the curve passing on (near indeed) the attractor point.
Kernel windows is depending on the distance of the attractor point, it could easily changed if needed.
Wow thank you so much Laurent, this problem has been bugging me a bit for a while. I’ll try to learn this technique. You see I’m trying to create a 3d Road script and this is good for the intersections problems. I’m happy I can now apply this elegant solution. Thank you so much!!
You are welcome. I’ll add another kernel, the half circle one. But you’ll probably see some “bugs” if attractors points are too close. A blending could become necessary.
Thanks again Laurent, I’ll update you if I see some problems, I’m planning to share the script in the forum so that it could be dissected by experts like you. I think it could help or at least give a starting point on how to make a Civil 3d-esque and Autodesk Infraworks - esque functionality. Thanks again so much
That could be a good idea. This one is simple if I stick to points for the output. But could be useful if it was PolyCurve.
I forgot this one, in my folders all gh files with a name containing legacy contains some C# and I have quite a number of them !
The big thing with attractors (notably in pull mode) is: never overpass the given point no matter what values are used. See attached (not the real thing … but indicative enough). Attractors_Help_EventHorizonPoint_V1.gh (263.3 KB)