# Articulated Floor Plate with 2 Uses

651
2
01-28-2013 09:59 AM
New Contributor
Hi there,

I have been successful at making buildings with massing and floor plates with simple rectangular floors. However I am having trouble tackling this problem. Is there a clean/simple way to make a floor plate that looks like the left (yellow being residential, blue being balconies) and then making it into the 3d floor shape on the right. The reason for separating the floor space on a single floor is so that I can report total indoor floor space and total balcony floor space.

Thank you very much,

[ATTACH=CONFIG]21139[/ATTACH]
Tags (3)
2 Replies
by Anonymous User
Not applicable
[ATTACH=CONFIG]21166[/ATTACH]
Here is a CGA example that does what you are describing. Could probably be coded more eloquently, but it works:

```version "2012.1"

attr bayCount = 7
attr floorHeight = 4
attr stories = 3
attr balconyDepth = 4
attr balconyThickness = 0.2

const splitZnotX = scope.sz > scope.sx

baySize =
case splitZnotX : scope.sz / bayCount
else : scope.sx / bayCount

Footprint-->
case splitZnotX : split(z) {{baySize: BayOdd | baySize: BayEven}* | ~1 : BayOdd}
else :     split(x) {{baySize: BayOdd | baySize: BayEven}* | ~1 : BayOdd}

BayOdd-->
case splitZnotX : split(x) {balconyDepth: Balcony | ~1: Interior}
else :     split(z) {balconyDepth: Balcony | ~1: Interior}

BayEven-->
case splitZnotX : split(x) {~1: Interior | balconyDepth: Balcony }
else :    split(z) {~1: Interior | balconyDepth: Balcony }

Interior--> extrude(floorHeight * stories) split(y) {~floorHeight : InteriorFloor}*

Balcony-->  extrude(floorHeight * stories) split(y) {~floorHeight : BalconyFloor}*

InteriorFloor--> report("GFA-Interior", geometry.area(bottom)) color(1,1,0)

BalconyFloor--> report("GFA-Balcony", geometry.area(bottom))
comp(f) {bottom: BalconyFloor2}

BalconyFloor2--> extrude(0.2) color(0,0,1)```
New Contributor
Hi Chris,
That worked perfectly, thank you very much! Made a few tweaks to it myself.
take care