Linking two points

Hi,
I state that it is my first GH script and i am a beginner. I have to connect two points with a line passing through n-points; furthermore the points must be able to be modified at any time in the XZ plane and the line must adapt to their change. See the photo below

Thanks for help

1 Like


Sinewave_re.gh (13.7 KB)
Would like to use it as a plate of nuts… :slightly_smiling_face:

3 Likes

here’s another variant


random.gh (15.8 KB)

1 Like

Check this as well , you need Heteroptera plugin

pts.gh (13.9 KB)

one more idea
wave_sine_move_pts.gh (13.7 KB)

Wow, thanks all, really; i’ll try every script, especially to understand how it works.

Sorry i have another question: but is not possible to create a simply polyline like in normal rhino interface and using the control points of the polyline to modify the profile of the curve?

Isn’t that exactly what @anon39580149 showed you using Heteroptera?

LineAB->Rebuild->ControlPolygon->Pointdeform

Hi,
yes i’m back, i’m not pretty good in GH, i’m so sorry for this. I have a question (i hope the last): i need to sweeping the 3 profiles i have created but when i conncet the last wire the result is totally wrong, beacause the profiles flows along wrong directions and i can’t understand where i’m doing a mistake.
I attach the script and the screen

script.gh (47.3 KB)

You should try to combine parts of your script. I have tried to do that for you.

  • the first part (2 circles and connecting line): this is the base for the rest. There is no need to create this 3 times
  • the 3 base curves for the sections (this could be optimized further); grasshopper creates a branch for each section.
  • then orienting the sections along the base geometry and then the resulting.

script_vase

script_ME.gh (26.4 KB)

Edit: I further reduced the number of components in the 2nd version: script_ME_v2.gh (24.1 KB)

1 Like

I hope not, the best way to move forward is to keep asking questions :slight_smile:

2 Likes

To answer your actual question: there is a mismatch in the number of planes that is necessary to orient the geometry (the sections) along the circle.
You were creating six base planes, while you need only one, because the base plane of the sections is initially the same.


Attached: your ‘repaired’ grasshopper file: script_V0.gh (36.6 KB)

1 Like

But, with this method, i can’t change the height and radius of the two circles (alias the rails of the sections). I need the sections of the sweep changing when i edit the 2 rails.

You should be able to change all the parameters. But I can’t check it myself right now.

These have all been created with the script_ME_V2

THANKS, i will spend some time to try to understand every step of your script, i take a quick look but i have no idea how some GH component works and i’ll try to learn it. Thanks again at all.