I have a CGA rule that extrudes the building and then splits it into the ground floor that has a height of 5M and the remainder are upper flooors that have a height of 4M. The rule then goes on to report the GFA and FAR but in both of those the number of floors appears to be 1 less than the total, I believe it is because the last split was for the upper floors and the ground floor is being ignored. How do I get the report to include all of the floors?

The CGA code is below:

attr FSetback = 1.5

attr BSetback = 5

attr LSetback = 5

attr RSetback = 5

attr height = 46

attr LUColor = "#ff6464"

attr GroundFloorHeight = 5

attr UpperFloorHeight = 4

@Hidden

attr plotArea = 0 # used to calc FAR

@StartRule

Lot --> setback(FSetback) { street.front : Concrete | remainder : Sub1 }

Concrete --> color("#CCCCCC") #Grey

Sub1 --> setback(BSetback) { street.back : Concrete1 | remainder : Sub2 }

Concrete1 --> color("#CCCCCC") #Grey

Sub2 --> setback(LSetback) { street.left : Concrete2 | remainder : Sub3 }

Concrete2 --> color("#CCCCCC") #Grey

Sub3 --> setback(RSetback) { street.right : Concrete3 | remainder : Building }

Concrete3 --> color("#CCCCCC") #Grey

Building --> extrude(world.y,height)

color(LUColor)

set(plotArea, geometry.area)

BuildingVolume3D

BuildingVolume3D -->

# the 3d volume will not be split into smaller 3d volumes ! 1 ground floor volume will be created.

split(y) {GroundFloorHeight : Volume("GF") | ~1 : AllUpperFloors}

AllUpperFloors -->

# the rest of the volume is not split into upper floor volumes, as many times as possible ('*' sign)

split(y) {~UpperFloorHeight : Volume("UF")}*

Volume(volumeType) -->

case volumeType == "GF" :

color ("#646464")

else :

color (LUColor)

set(material.opacity,0.6) FloorCalc

FloorCalc -->

report("GFA",geometry.area)

report("FAR",geometry.area/plotArea)

The CGA code is below:

attr FSetback = 1.5

attr BSetback = 5

attr LSetback = 5

attr RSetback = 5

attr height = 46

attr LUColor = "#ff6464"

attr GroundFloorHeight = 5

attr UpperFloorHeight = 4

@Hidden

attr plotArea = 0 # used to calc FAR

@StartRule

Lot --> setback(FSetback) { street.front : Concrete | remainder : Sub1 }

Concrete --> color("#CCCCCC") #Grey

Sub1 --> setback(BSetback) { street.back : Concrete1 | remainder : Sub2 }

Concrete1 --> color("#CCCCCC") #Grey

Sub2 --> setback(LSetback) { street.left : Concrete2 | remainder : Sub3 }

Concrete2 --> color("#CCCCCC") #Grey

Sub3 --> setback(RSetback) { street.right : Concrete3 | remainder : Building }

Concrete3 --> color("#CCCCCC") #Grey

Building --> extrude(world.y,height)

color(LUColor)

set(plotArea, geometry.area)

BuildingVolume3D

BuildingVolume3D -->

# the 3d volume will not be split into smaller 3d volumes ! 1 ground floor volume will be created.

split(y) {GroundFloorHeight : Volume("GF") | ~1 : AllUpperFloors}

AllUpperFloors -->

# the rest of the volume is not split into upper floor volumes, as many times as possible ('*' sign)

split(y) {~UpperFloorHeight : Volume("UF")}*

Volume(volumeType) -->

case volumeType == "GF" :

color ("#646464")

else :

color (LUColor)

set(material.opacity,0.6) FloorCalc

FloorCalc -->

report("GFA",geometry.area)

report("FAR",geometry.area/plotArea)