Hi everyone,
I'm trying to understand one part of grasshopper that's been on my mind for a while but only just had a real need for it.
This is my problem:
Divide a curved line into segments of a specified length r (point to point, not along curve) and generate a set of points. The final unused part of the curve can be ignored.
My solution attempt:
- Generate the curve
- Identify the beginning point
- Draw a circle of radius r at this point
- Find the intersection point between the circle and the curve
(this is where it is getting more difficult)
- draw another circle r at this point
- find the intersection point between the second circle and the curve
- draw another circle r at this point...
...- circle does not intersect with curve.
In my mind, this is a relatively straightforward procedure consisting of a type of if -> then loop with a check. I could create the procedure in grasshopper by copying and pasting the code lots of time and having a long linear process but I feel that there should be a more compact solution.
Does grasshopper allow for this sort of operation or will I have to take my visual basic/c++ book down from the shelf again?
Thanks,
Zygnoth
ps I have a basic grasshopper script written but I think it's explained adequately above. If you want me to post just let me know...