Evaluation of building footprint orientation with the contour line

Hi, I am trying to evaluate building footprint orientation with the contour line of steep terrain. I found a ph.d thesis that they have used a grasshopper code for this evaluation. I tried to use this code but I believe something is not attached and it is not complete. I would appreciate it if you help me to understand what is wrong with the code and give me an idea about the logic behind the code since I have no clue about it. ( I could not attach the Rhino file, but the footprint and the contour lines are some basic 2d shapes like image 3 that I have attached)
Thank you in advance
Footprint-Contourline.gh (18.7 KB)


welcome to the forum :slight_smile:
with the GH definition and your Rhino file open, if you right click on the GH parameters that contain something that was referenced from Rhino and choose Internalise data, that data will be stored inside the GH definition (no need to attach the Rhino file)

that will allow anyone to see only your Rhino data that is relevant for your definition

please also provide a link to that ph.d thesis, that might also be useful

1 Like

Thank you so much for the warm welcome and your advice, I did internalize the data as you recommended. I have attached the screenshot of the Rhino file as well (Contour line-Footprint).
I also have attached the link to the thesis that you mentioned.(pdf page 137-140 - Building-Topography relationship section).


Footprint-Contourline.gh (75.0 KB)

ph.d Thesis

1 Like

not an architect here :slight_smile: but I kind of not understand the process used to evaluate several vectors that belong to the same footprint :slight_smile:

in (A) we have several vectors per building that indicate the direction in which the contour lines intersect the building itself

in (B) be have a single vector for each building wall, and all the vectors of each building are in random order

when in (C) the angle between (A) and (B) is evaluated, we get the angle between the vector that is the sum of all the ones generated by the direction of the contour, and each of the direction of all the walls that belong to each building…
is that meant to be like that? :slight_smile:


one important thing: data inside the Footprint Curve was a bit messed up, it contained single lines and open polylines… I cleaned it a little bit

this looks A BIT convoluted -lol- but gets to the point where for each building you get a list of the vectors representing the contours which intersect it, and the angle between a particular vector and the building wall it’s intersecting (vectors are aligned with X axis)
for instance, building #20 has 3 contour vectors, and their angle with their relative wall is listed in the Panel


Footprint-Contourline_inno_Re.gh (76.5 KB)

this might make more sense to me, but I don’t know how this angular data (which is often multiple angles per footprint) should be merged together, in such a way it could be visualized with a single color per footprint? [for sure: lack of knowledge on my side :slight_smile: ]


[edit]

this for instance just plain-averages the angles (between the building walls that happen to be intersected by a contour and the contour vector) and spits out red-color the more that average angle is close to 45 degrees


Footprint-Contourline_inno_Re_Re.gh (82.1 KB)

not sure how much to be happy of the result tho :frowning:

1 Like


Thank you so much for taking the time! I really appreciate it.
I am kind of confused since the file that you uploaded give me an error.

I believe I found what was the error about. it is when the contour line passes the vertex of the footprint and I used the prune tree component to remove the branches less than N=2 and it solves the issue.
Let me think about the code and see if it is understandable for me and my project then get back to you again soon.
Again I am so thankful for helping me.
Footprint-Contourline_inno_Re_Re-niloo.gh (80.8 KB)

1 Like

I tooke a look to the original script, was that script you originally posted somehow attached to the paper, or did you reproduce it manually? :slight_smile:
I’m asking because I think there were a couple of wires that had to be rerouted in order to make the definition actually work :slight_smile:

I just applied the cleaned footprints curve-data from one of the last definitions and this is how it looks, which I believe is “fairly ok” :slight_smile:

the angles you get from A are in the range [0 to 45] degrees, and are the angles between:

  1. the average direction vector of the contours intersecting the footprint
    and
  2. the direction vector of each wall of the footprint

that number gets remapped into range [0 to 100] :thinking:

then what B does is the average of the angles in (A) for each footprint, weighted on wall length

what goes to the gradient component are a list of numbers, in the range [0 to 100], one value per footprint

Footprint-Contourline_original_good_inputs.gh (70.1 KB)


test with stupid rectangles: if “bad” is at 45 degress, and 0 or 90 degrees are equally OK, then maybe the gradient might look something like this?


Footprint-Contourline_original_good_inputs_Re.gh (72.6 KB)

1 Like

Thank you so much. For the question that you already asked, I copied the script from the screenshot. yes, I believe that some wires are rerouted. Thank you for your vigilance and consideration.And I have no idea about the 100 too, I believe you’re right it might be 90. As you mentioned 90 seems logical to me.
On a separate note, is it possible that I have you’r full name and email address.
Again I am so thankful for sharing your knowledge.

I believe the lower limit should be 45 based on the thesis. I m not sure. What do you think? Since we have three-phase, 90 degrees, 45 degrees,s and the case between 45 and 90 degrees.

Footprint-Contourlin-Edition.gh (75.8 KB)

actually there are a few points that are still very unclear to me :slight_smile:

first thing, it’s described as if the averaged contour-vector angle was measured against the wall-line it starts from, but that is not happening: in the image shown, each averaged contour vector angle is measured against each wall-vector of a given building

second thing, the direction of each contour-curve just depends on how they were referenced in GH: they can be easily flipped

my question is: what makes “preferable” a direction or its opposite?

in the following example:

depending on how we flip the contour curves, we will get vectors in opposite directions, that will intersect different walls
it’s easy to find which wall a given contour intersects, but when the vector are summed up in such a way you get one single contour vector per building: at that point how can you tell which wall the vector is now intersecting? you don’t have a location for that vector anymore, you just get its direction

how it looks in the paper images: all the contour-vectors of a given building are summed up into a single one, then that vector is compared to all the wall-vectors

Being honest, i have no clue. I am doing my best to find the logic and use the code for my master’s thesis for analyzing the buildings in the steeped terrain. I am not sure if I use 45 and 90 for the gradient limit, is logical, I mean does the code work properly? If you are interested I can meet you via zoom and share the project with you too, since I am trying to make some other analysis too.