Spiral path

Hello guys,
I’ve a little problem regarding a creation of a path.
I have a loft shape divides in some layers thanks to the “contour” tool. Every contour has 3 offset curves. My scope is to generate a spiral path between the offset curve, inside each layer. I created the path for one layer but I’m not able to repeat the operation in the next one. How could I solve it?


Spiral path.gh (23.3 KB)

Dear @Giulia_Riccardi
add a grasshopper tag to the topic - this will attract the right people.

I had a fast look at your definition - you can exchange the Flip-Matrix components with PathMapper.
for a starting point - the mapping expression will be similar to
{A;B;C}(i) → {A;i;C}(B)
you can adapt the Datatree - organisation to also work with multiple curves…

I might find time to dig into it deeper → see my post below.

kind regards - tom

Thanks for your reply. Unfortunately, I’m not an expert in grasshopper and therefore using the “path mapper” is always a bit difficult, however I will try to experiment with it.

1 Like

I fooled around with data trees for awhile before I gave up and rewrote your ‘SPIRAL PATH’ group, dropping Offset Curve completely. See the white group ‘spiral path 2’. It matches your ‘ONE CURVE’ test and works for all contours.



Spiral path_2023Sep15a.gh (28.3 KB)

4 Likes

thank you very much. I didn’t know how difficult could be managed the offset curve!!

Joseph - I won’t be able to try your solution for a few days, but do you think it would work if the base geometry’s contours had corners instead of being smooth curves?

(this is more a personal message @Giulia_Riccardi , not sure if it is interesting for others)

I tried to not change the logic of how the geometry is created.
My approach mainly focuses on organising the datatrees.
I also have to say - if someone asks me to do something like this i would do it with a script (component).
I think it is very demanding to design a grasshopper-definition that works well for different depths / path-lengths of datatrees.
For example I can not tell, if my solution works for multiple breps.

There is one initial inclarity:
if you want to create a spiral with for example 3 turns, you should use 4 (offset-) curves - the connecting polyline then has 3 segments resulting in 3 vectors to move 3 points.
As all 3 curves are offsets the vectors will be more or less the same (parallel) - this is why your definition worked for one curve (the first vector was repeated to move the 3rd point)
if you don t provide same amount of vectors and points grasshopper has it s rules how to match the two datasets - but these rules will not always match your logic.

Flip Matrix is problematic with more complex paths / tree-structures.
Pathmapper helps - see my initial post.

There is a few places where I use pathmapper to correct the data-structure.

check the attached file - I hope it is at least a learning outcome for you.
add some “param viewer” at different stages of the definition to understand what get s sorted.

i added comments (red fields) where / why I did changes.

have a nice weekend - kind regards -tom

Spiral path_02_tp.gh (19.7 KB)

1 Like

Thank you very much Tom for your clarification. During these days I tried to apply both one and the other solution to see which could fit better with my project :+1:t2: