Hi,
Newbie here at coding, I have been doing a lot this weekend though on a project and have created a mass of random points along my surface (topography). I now want to copy these points along the Z axis, all the same amount, and then connect the two points to create lines that will represent trees.
I have created this code to create the points, on my surface, which I have outputted to A = Points
I want to, in a new c# component, now, as I said, copy these points vertically by some “z” amount (does not really matter), and then make lines between them.
I have a simple Grasshopper script that can do this, but I have been challenged to do this all in code…and for the life cannot figure it out.
I saw this other post which was projecting points, using this method:
// Create verticals
var vert = new List<Line>();
for (int i = 0; i < segments; i++)
{
var vertTemp = new Line(topChPts[i], botChPts[i]);
if (vertTemp.Length > 0)
{
vert.Add(vertTemp);
}
}
and something tells me I can use this and just replace the new Line(topChPts[i], botChPts[i]);
Portion w/ my points (topChPts being moved pts on top, and bot the bottom ones)
But in practice I do not know how to get my output of bottom points into the script and move them, and then incorporate those.
Any help much appreciated, thanks. File attached.Curves-script2.gh (13.0 KB)