CGA : FAR calculations

4456
7
04-12-2013 07:30 AM
Frequent Contributor
Hi !

I've been asked to provide a few simple examples of how to work with the 'FAR' value in CE.

Hereâ??s 2 examples :

1] is very easy and shows how the FAR can be calculated with CGA, given an attribute with the parcel area.

2] is abit more complex. The 2 images show some details of this second example.

Note that the 2nd example shows how :
a] the â??parcelAreaâ?? object attribute of an other shape ( parcel Shape ) is sampled
b] a recursion is used to create as many floors as possible until the target FAR is reached.
[ATTACH=CONFIG]23447[/ATTACH]

[ATTACH=CONFIG]23448[/ATTACH]
[ATTACH=CONFIG]23449[/ATTACH]

I'm sure there's more questions .. Let me know ..

Matt
Tags (3)
7 Replies
by Anonymous User
Not applicable
Original User: matthiasbuehler

by
New Contributor II
Thanks a lot for the video! could you post the final rule file?
by Anonymous User
Not applicable
Original User: matthiasbuehler

Hi,

Here's the files.

But I really recommend you step through coding this manually yourself to hit all roadblocks, which give the learning experience .. 😉

m.
by
New Contributor II
thx a lot, but I had write another based on yours anyway 😛

I ran into some problems, if you could give me a hand.....

1º - I'm trying to set different setback atributes to the groundfloors, but it generates mixed geometry , the volumes are inside each other so the area calculation gives me a wrong number ....

SetbackAll () -->

setback ( AfastamentoFrontalRand ) { street.front : NIL | remainder :
setback ( AfastamentoFundosRand ) { street.back : NIL | remainder : SubirateCoefAprov
setback ( AfastamentoLateralRand ) {street.side : NIL | remainder :
SubirateCoefAprov
}
}
}

2º - i'm trying insert a condition related to the front side of a lot, but I don't know how to get this measure ( number ) .... the lot.front is what I want

Afastamentos -->
case lot.front <  15
report ( "Area do Lote" , AreadoLote )
Setbackfunction1

else :
report ( "Area do Lote" , AreadoLote )
Setbackfunction2

3º - I would like to know how to also limit the hight ( number of generated floors ) of a building by its total built area

something like this....

thanks again and sorry for my english
by Anonymous User
Not applicable
Original User: matthiasbuehler

Hi ..

1]

Note that

`A --> B C`

gives 2 copies of the geometry of A.

So in your code you duplicate 'SubirateCoefAprov'. Remove this.
```SetbackAll () -->

setback ( AfastamentoFrontalRand ) { street.front : NIL | remainder :
setback ( AfastamentoFundosRand ) { street.back : NIL | remainder :
SubirateCoefAprov
setback ( AfastamentoLateralRand ) {street.side : NIL | remainder :
SubirateCoefAprov
}
}
}
```

2]
by lot front, do you mean the edge length ?

3]
defining the max number of floors is easy. at the beginning, calculate it, then add a statement in the recursion which checks if the number of max floors is reached, then NIL it.

ok ?

matt
by
New Contributor II
😉

1 - exactly, how cloud I write it? I'm trying to do something some like this

```
setback 1
setback 2
extrude
setback 3
extrude

```

2 - Exactly the edge length, i tried to use de selector "street.front" but it seems to work only inside especific commands like comp

3 - I meant to limit the hight by the total built floor area

by Anonymous User
Not applicable
Original User: matthiasbuehler

1] and 3]

basically you write a recursive rule which breaks out of the loop when you have built enough floors.

start with the total number of m2 you need to build, then subtract the floor area in each floor.

the basic structure of the recursion is discussed in the video.

pseudo code :
```parcel --> set parcelarea attribute
do first setback
Recursion ( parcelArea)

Recursion ( restArea ) -->
case restArea < 0 : NIL
else :
extrude(floorHeight)
FloorVolume
// copy shape !
comp(f) { top : Recursion ( restArea ) - geometry.area() }```

you always take the top face of a floor volume box to go to the next floor until you're done.

you can pair this with a setback on each floor. Check the CGA forum for the 'simple recursive highrise' rule.

2]
sadly, accessing the first Edge length is not directly possible. Use scope.sx ( the shape width instead ), ok ?