I am trying to make several hundred unique trees (actual trees, not the data trees) in rhino for a model of Cornell from a tree survey. I have the trunk heights (line), the base point (points), the trunk diameter (curve, circle), and the canopy diameter (curve, circle). I have made a script that creates the spheres for the canopy, and the trunks (pipe component). Because the trees base are not all at the correct height relative to the terrain and I need them to peirce through the terrain a bit, I did meshclosestpoint and moved the bottom point down 2m and then made the pipe from that bottom point and the top point of the trunk height curve.
My issue is that I now need to move all the spheres so that they sit on top of the trunks, and for the life of me I cannot figure out how
to move them the correct distance. They all move a diff distance. Here are some sc and I have attached my gh script and model. I think it is a data sorting issue? But I am not sure. I am no expert.Trees.gh (9.7 KB)
Access Denied - it asks for me to request access with my email. change the settings on the drive sharing, or just internalize the data we need into the .gh document and we wouldn’t need the rhino file at all.
You did not internalize your mesh, so i ignored that part, but should be easy for you to add back in. Here’s the file: Trees_internalized_RE.gh (131.2 KB)
There is probably a mathematical way to do this with the radius of the pipes and the spheres but I did it the easy way.
Thanks so much! This is exactly what I need. Now, the only issue is that the spheres are not the correct diameters. See the picture here (this is what I get now, the spheres are not the correct diameter, see the circle below them)
You’re right, turns out the original lists of objects (the lines that make the pipes, and the circles that make the spheres) were not in the same order. You just have to sort them the same way first before you do the other operations and then the radii will match up. Trees_internalized_RERE.gh (209.1 KB)