I’ve been wondering, in an attempt to further facilitate the workflow between survey and bioclimatic analyses, whether it would be possible to close topographical contours with a boundary line. this might be too arbitrary because I presume it’s hard to tell Grasshopper which side to close the conutour with the boundary intersection while preserving the integrity o fthe topography (ie. the correct direction) without selecting that manually for each contour? can’t sort boundary trims by legnth, distance or height, as those are arbitrary…
I’ve done the initial work, ie. using a script (not included) to move the contours up to their correct height, making them fit/triiming to boundary extents and intersect with the boundary outlines.
(This is so that I have solid closed breps of each topographical layer in order to run shadow study for each topographical layer and then combine them unless someone knows how to perform the year’s soltice shadow studies of a terrain mesh on itself?)
This is not GH - because as you said, it’s difficult to tell topologically which side of the contour you want joined with the border. On top of that 2D contour maps can be completely ambiguous if there is no elevation data attached to the curves - you have no idea which way is “up” or “down”.
That being said, as in modelmaking we are often faced with the need for closed contours in order to cut material for physical models, I have a semi-automated script I developed which helps.
In the meantime, I think I found a way to tackle my problem, but I am stuck at trimming the boundaries at the end. I used the trimmed contrours to generate a 3D terrain. I wonder if now the terrain mesh/surface may be used to trim the boundaries at each respective height and then cull to chose only the boundary portions bellow the surface and join those with the contours?
contours_re.gh (248.4 KB)
It calculates everything in something like 3 seconds.
Problems:
extending Isopleths create problems, input curves should have a reliable status (already ending precisely at delimited area or all exceeding by a fixed amount, and not too much).
Currently extending by 7, which is found to avoiding further errors by trial and error
you were missing 3 small Isopleths here:
datatree management is sort of tricky, in many steps i wondered if implementing “Hops” to simplify it all could have lead into a faster and better logic
Tomorrow i won’t be able to understand this definition, hope it is good.
Summarized steps are:
project base perimeter, make it a surface
round Isopleths altitude and group them by altitude
for each altitude level, shatter the base surface by the Isopleths and move the fragments at the proper altitude
(if you stop here, bake and manually delete unwanted fragments on rhino to have a MUCH simpler solution, more reliable for future situations. Click>Del>Click>Del>Click>Del>Click>Del…)
for each altitude level, create a branch containing Isopleths curves of “neighbor” levels (+1 and -1 , when it exist)
for each Isopleths find the nearest neighbor Isopleths, do a “ping-pong” to have a clean “steep” vector and flip the Isopleth curve so it have at its right side the downhill.
for each altitude level, make a sufficiently dense (this depends on how much your Isopleths are near to external perimeter, and how small will be resulting cuts) point divisions and move them a bit to the right of the curve
for each altitude level, for each surface fragment, discard each of them that have an intersection with vertical rays from the points of previous step.