I am trying to develop a simple script to move a planar curve (located on the cplane), to multiple points on the z axis, whilst still maintaining the same shape in the plan view. These points should align with a series of planes that I have constructed, which lay above the line. To clarify, the new curve should be one curve that moves up and down in the z axis relative to the height of the planes that sit above it.
Please see my screetshot and attached grasshopper file for a basic outline and start of the script. I have started by dividing the curve into point and finding where they intersect with the planes, but I am not clear on how to progress from here.
Any help/advice is greatly appreciated.
105_Road Line to Terrain.gh (29.6 KB)
Why are your points all located out at e+8? Are you building a road to Jupiter?
You can say that this distance is an arbitrary point above the surfaces to generate the intersecting points …
I think this is what you want, a series of curves at the intersection of the long curve with the ‘footprint’ surfaces. And as Ethan pointed out, your model does not appear to be well centered. (one would expect the curve to be positioned somewhere near the axe’s start.
footprint.gh (28.8 KB)
Not exactly … but close.
The “projected” curve should look identical to the curve on the Cplane in plan view (it should be one single line), but it should change it’s elevation (z axis) relative to the floating surfaces.
Aside from the irresistible urge to be snarky, anyone looking at your code will have to go through the additional effort of either scaling or translating your objects so they they remain near the axis. Were these points downloaded from some software perchance?
Resist … You can do it!
The points are geo-located to a site that I am working on, but for ease of use see attached for something a bit closer to home.
105_Road Line to Terrain.gh (27.4 KB)
Again - very very close and will probably do for now.
Is it, however, possible to keep the plan view of the new curve identical to the old (reference) curve. To modify the existing curve my pulling it’s control points up to the various heights, as opposed to creating a new curve from the elevated points… Might be a long shot …
It’s easy. The problem here is that the terrain surface “planes” (surfaces) are discontinuous. The gaps between them fail to receive the projected points, or even better, the projected ‘ROAD EDGE’ curve.
Why not project the ‘ROAD EDGE’ curve.directly onto your terrain instead of those patches?
I had a look at it again,
Man, your coordinates are astronomically off!
I made a definition that does what you want but for some reason it is not precise.
I suspect it is because the geometry resides 3 or 4 parsecs from the axe’s start. (as far as I know, rhino and gh don’t handle well astronomical numbers) but it could be a mistake in my definition.
I have exhausted my ‘forum time’ for today so I upload the definition in case somebody else wants to work on it.
footprint.gh (33.8 KB)
This is the problem that I have been having… A projection to the terrain would be a simple solution, but the aim is to generate a new terrain line for the road above the existing terrain that approximates the heights of the planes, not the existing landscape…
Thanks for the input - I will take a look and see if I can figure a solution from here.
This version projects the ‘ROAD EDGE’ curve to the ‘Planar Surfaces on terrain’ (but misses the 5th one from the end) and then connects the curve fragments. It was the first approach I tried earlier but won’t work until the planar surfaces are sorted in sequence (which I did here, by the ‘Y’ coordinate of their start points) and all the curves are flipped to have the same direction:
105_Road Line to Terrain_2018Jan22b.gh
cheers for the help!