I’m trying to create a spiral pattern by connecting series of dots and I would like to loop some part of my code, but I couldn’t figure it out. I’ve attached the code with the group of commands that I would like to loop. I’d be really thankful for your advice.
Please don’t use loops unless there is an actual need. This could all be solved by the use of the duplicate component.
Your circle generation could be done without loops:
If you have a screenshot that you can annotate of what you want in Rhino, that would help with how the spiral will be generated.
Thank you very much for your respond.
The aim of creating the spiral is to generate the tool path for robotic control based on the desired shape, which in this case is a circle. In the future I will have to work with different shapes or forms and the tool path needs to be continuous. That’s why I’m trying to create the code by deconstructing the shape then recreating the path. Sorry for not explaining this clearly and thank you agian for your help.
with the current use of interpolate curve, when the tool changes paths, it overcuts the outer circle.
one option is to just connect each path so that it doesn’t overcut.
other option is to actually spiral and move the points closer to the centre as it gets closer.
Here is the file:
Looping_edited.gh (17.9 KB)
The option 2 is exactly what I’m trying to achieve. You are right that my version didn’t give smooth curve and the option 2 is a better way to go than looping.
Thank you very much for your help!