Grasshopper

algorithmic modeling for Rhino

draw helix trough several point, and loop problem

Hi alls !

End of the week end !! No solution , I give up  and post on the forum ! Thanks for advance !!

Here my problem: ( please found attached 3DM file and GH definition).

I have  one curve and one point ( called reference point).

I draw a Z axis helix passing through the reference point.

I divide the curve by a number i of division.

I would like to draw similar ( same nb of turn , same pitch, same axis Z) only radius, Zoffset and 'offset in turn' need to change.

My two issues:
For i fix (i =nb of division) , I can not mange to draw my helixs , as GH  take all the radius , and and the angle range in the helix. I would like it to take one radius, for all the angle range, then all the radius.

Second problem , I often find this limit ( My GH knowing limit , no the software itself, as I ‘am sure it is a such powerful software there is a way to do it).
I would like to make a function like  in rhino script “ FOR EACH I in list y DO …. END “
In fact a loop with a variable number of parameter. ( even with a nb of division fixed I don’t know how to do).
In concert term in this case I would like to draw a helix for each point what ever is the number of division.

I already try to use hook snake,no succeed for me.

 

If you think you can help me , thanks you very much!

 

Cheers,
Fred

ps:I saw this discusion http://www.grasshopper3d.com/forum/topics/tree-iterator but I don't get it ! where should I put the code.

Views: 1565

Attachments:

Replies to This Discussion

Hi,

If you want to program forloops without custom scripting you should refer to Hoopsnake. The code in your referenced link should be inside a C# script component, I can't spot the relevance to your problem though. I am sorry I don't have that much time so that I can look more into your problem, but I hope these tips should give you a heads up.

M.

Hi Marios , alls,

Thanks Mario for your quick answer , I will have a closer look to the Script component, looks powerfull.
But I found a very simple solution of my problem with out using hooksnake.

Just change the data tree geometry.
if my intersection points are 'Graf't and not 'Flattened', that's work perfect.
attach the GH definition working  and two picture( one showing the crux , and the other one the result).

thanks

cheers,
Fred

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service