Hello everyone, new to Grasshopper here.
I’m working on a definition where I need to calculate average slopes across multiple curves that I’ve projected onto a surface, and I keep running into data structure issues, approach and genuinely think I need some help from you guys.
I’ve tried to explain what I wrote on the script so far:
I used Evaluate Curve to divide each projected curve onto a surface into a set number of points.
This gave me multiple branches (one for each curve) containing several points.
I then used List Shift (with Shift = 0, I suppose it has to be 1 but for some reason 0 gave me the desired result) to pair each point with its neighbor. Connected these lists into a Line component to create segments.
Used Deconstruct Point to get X, Y, and Z for each pair of points.
Calculated the vertical difference and the horizontal distance (run) by ignoring Z in the distance calculation. Then I used them to get the slope ratio, which I want to convert into either a percentage.
I tried using Graft and Flatten in different spots, but I’m still not sure how to ensure each curve is processed independently.
I want to average the slopes across all segments on each curve.
I’m attaching the grasshopper and rhino file on here.
Rise_Run.3dm (71.7 KB)
Rise_Run.gh (23.5 KB)