Select to view content in your preferred language

Reporting GFA from Tutorial 11 to my 3D buildings

421
0
12-21-2021 10:37 AM
IrenePosada
New Contributor

Hi everyone Im fairly new to City Engine and just understanding the basic CGA grammar. Im trying to calculate the GFA of 3D buildings (acquired from here https://www1.nyc.gov/site/doitt/initiatives/3d-building.page) using the Tutorial 11 Reporting but modifying it to my 3D buildings. This is what I have so far but not sure if its in the proper format. My question is how can I modify it so that it intakes already built 3D objects? Does this methodology account for setbacks in buildings? Any help would be appreciated 

/**
* File: GFAestimator.cga
* Created: 14 Dec 2021 17:31:24 GMT
* Author: irepo
*/

version "2021.1"
# ---------------------------------------
# Attributes
# ---------------------------------------

@Group("Viz",4)
@Enum("massOnly", "floors", "massAndFloors")
attr vizMode = "massAndFloors"


# ---------------------------------------
# Start with the lot
# ---------------------------------------

@Hidden
attr plotArea = 0 # used to calc FAR


# -----------------------
# Mass / Floors
# -----------------------

Mass -->
MassViz
split(y){ floorHeight: Floor }*

Floor --> comp(f){ bottom: reverseNormals FloorBottom } 
FloorBottom -->
report("GFA",geometry.area)
report("FAR",geometry.area/plotArea)
color("#4444ff")
FloorViz


# -----------------------
# Leaf Shapes
# -----------------------

MassViz -->
case vizMode == "massOnly" :
Mass.
case vizMode == "massAndFloors" :
set(material.opacity,0.2) Mass.
else:
NIL

FloorViz -->
case vizMode == "massOnly" :
NIL
else:
FloorViz.



OpenSpace --> color("#777777")

Ground --> color("#777777")

0 Kudos
0 Replies