# Area calculation of brep that has holes

Hi. I spent some time trying to make a script that calculates areal of Breps that has holes, but not sure what I made is the right way.

I would like to calculate top surface area of the volume(Gross floor area), and 500mm offset to inside from the boundary of the surface(Net floor area with 500mm wall thickness).
And finally, Gross floor area and Net floor area of the all floors.

I got stuck with calculating areal of the volumes that has holes in it, as my script adds up the area of the hole, not subtracting them.

Could someone let me know how I can make happen?
bra bta.gh (33.6 KB)
3.1 bra.3dm (18.6 MB)

Hi,
Itâ€™s not perfect but I think you can do it like that.

bra bta2.gh (44.1 KB)

Thanks a lot, @paco-paco.
It works! But I was hoping to use the part that you added to the other areal script which I think is slightly better, and it does not seems to work the same way. It might be the sort of same question, but hope it is okay to repeat.

Is it possible to use this script and offset 500mm toward inside from the outer boundary and calculate the area?(Still have a problem subtracting the area of the hole)
BTA BRA test 20220324.3dm (11.4 MB)
bra bta 20220324.gh (23.8 KB)

I would like to ask a question about areal calculation in grasshopper, and refer to my previous post:
https://discourse.mcneel.com/t/areal-calculation-of-brep-that-has-holes/139906/2

Is it possible to use this areal script and offset 500mm toward inside from the outer boundary and calculate the area again? (A problem with subtracting the area of the hole)

BTA BRA test 20220324.3dm (11.4 MB)
bra bta 20220324.gh (23.8 KB)

Hope to learn from somebody, thanks in advance!

perhaps you can do like thatâ€¦

1 Like

That works! Thanks a lot!

I hope itâ€™s okay to ask one more question related to this script!

Some of the boxes offset toward outside, and some of them offset toward inside.
How could you â€śflipâ€ť the direction of polysurface or closed extrusion?

yes, I had this problem, I have a solution but maybe not the best!
I make 2 offset curves with 1 flip curve and I recover the curve in the surface.

Hi. As long as it works. But how do I make a rectangle and calculate the area again from this state?

can you post the gh file?

Yep. Here it is.
bra bta 220327.gh (18.3 KB)

Hi,
i think i have a problem with your â€śoldâ€ť offsetcurve compound.

You can test this file
bra bta 3.gh (38.8 KB)

Hello, Iam also trying to calculate the area of Brep with hole. As mentioned in your script we can put an offset curve to cut out the hole. It works for me too. Thanks for giving us a solution. But It seems to be a manual job.
It would be great if a script can automatically identify the hole in brep and cut it out from toal brep area.
(3D model is coming from Revit)