Get all floors on the same level then calculate the area of the total outline

I need to create a script that calculates the total constructed area of a project. Intersections don’t count (if there’s a smaller floor above a bigger floor, only the area of the bigger floor will count (in general, the outline of joining them together).

So I need to get all the floors in the project, get them on the same level to account for intersections, create an outline of all the floors, create a floor from that outline and calculate the area.

What I have tried so far to get the outline (I don’t know how to get them on the same level, so I haven’t even tried that):

The error says “The local of the structural element is not a valid curve”.

Any ideas on this?

replace your selected category with rooms not floors and remove the element.getlocation node with Romm.FinishBoundary. That should set all of the floors to that type. Im not sure If that is what you were looking to do though.

Hello,
here’s a way to answer (shouldn’t be the least resource intensive)

Cordially
christian.stan

1 Like

Hi @lucasmdoliveira try made a room boundary outside the building and create a room …then you have the overall perimeter


2 Likes

hello, very smart, bravo :wink:
cordially
christian.stan

1 Like

Hi all,

As an alternative:

  1. Pull all floors onto the same level
  2. Union them
  3. Intersect with world plane, which returns a surface
  4. Retrieve perimetercurves.
1 Like

Guys, thank you so much for all the replies, this was the one that worked perfectly! @christian.stan I really appreciate it. The only part that I haven’t understood the purpose is this one:

Sorry if it’s an obvious thing, I’m new to Dynamo. Could you explain what it does?

1 Like

Hello, thank you.

The normal is directed from the material outwards (the system node does the job well, it normalizes the vector for you) (u,v) are the parameters of orthogonal directions of the surface (bounded at 0 beginning 1 at end)
so you will have entered the 0.5.

In the code block (Com: variable) which calls the Vector class in fact and .Z (the property, Z component of the vector)
then test:
if component Z = 1, in this case it is true, otherwise it is false)

test ? action to do if true : actions to do if false ;

Filters all horizontal top faces

In fact, I should have filtered with ==-1 to take the balconies into account (worked upper surfaces, more and more like works of art in their own right) just in case.

it’s a very good reading (designscript) (How does lacing work in Design Script? - #11 by solamour)
Cordially
christian.stan