Calculating Areas with Grasshopper (and how to select co-planar lines/surfaces to include in the calculation)

Hi All,

I’m working on a massing and needs to calculate the areas based on the floor to floor height (therefore I used contour with base point and height number to generate the floor plate outlines).

The problem I’m having right now is that when the bottom surface of the box on top and the top surface of the box at bottom sit on the same plane, the contour will be created for both and thus double calculate the areas whereas only the top floor is needed (they could be seen as an area that’s indoor [blue lines] vs an area that include both indoors and outdoors [red lines]).

I’m thinking of creating a rule that can pick up co-planar lines/surfaces and will only calculate the ones that are within a “box”, or the floor that’s at the bottom, or something on this line…

Could anyone please help on this? Thanks!

Hi
If you don’t need separate lists of areas for every volume maybe you can slice joined breps?

Upload file :slight_smile:

qna_rhino6_sample gh.gh (13.1 KB)
qna_rhino6_sample.3dm (587.9 KB)

Thanks for your reply Tim!

Please find the files here. Rhino file is saved in rhino6.

Hi Roman thanks for the reply!

I’ve uploaded my files here if it helps.

Hi Tim

have you got a chance to look at the file? Thanks!

well, since you have identified the error condition, write a ‘filter’, when both surface are in the same plane, cull one surface from the area calculation. assuming ‘same plane’ = same z, you could compare z coordinates of a vertice, or check for co-planirity