/** * File: densification.cga * Created: 27 Apr 2014 08:42:10 GMT * Author: Jan Wolski & Petr Bocharnikov * License: MIT license */ version "2013.1" @Range(120, 170) attr parkingReg = 120 @Range(2, 10) attr maxFloors = 4 Lot --> Area(((155*parkingReg)-16622)*(geometry.area()/8997.70)) /* 155 = parking spaces , 16622 = existing gross area , 8997.70 = total area of infill plots */ Area(target) --> report("target", target) shapeL(12, 0){shape: Footprint(maxFloors*3.3, target)} Footprint(height, target) --> case 3.3*target/(12*height) < 18: split(x){18: Mass(3.3*floor(target/(12*18)))} else: split(x){(3.3*target/(12*height)): Mass(height)} Mass(height) --> case (height > 3.3) : extrude(height) report("the_gross_area", geometry.volume()/3.3) color("#aaffff") else: NIL