Assigning floor use when using an envelope

1003
5
Jump to solution
01-03-2014 08:33 AM
LoringTupper
New Contributor
I'm having a problem getting a use assigned to the individual floors of building creted using an envelope. I'm able to do it when the building is created using extrusionbut with the envelope the floor index does not appear to work. The report does indicate the CurrentFloorIndex is increased but the floors are not displayed properly concernig their use. Below is some or code I used, this code is simplified so we're only dealing with commercial and residential floors but in reality I would, want to expand this to include mixed and office floors.

Building-->  setupProjection(0, scope.xz, 500, 500)     envelope(MaxHeight, FrontBaseHgt, FrontAngle, RearBaseheight, RearAngle, SideBaseheight, SideAngle )     #comp(f) {top : Top }  BuildingVolume3D   BuildingVolume3D -->   # the 3d volume will not be split into smaller 3d volumes ! 1 ground floor volume will be created.   alignScopeToAxes(y)   split(y) {GroundFloorHeight : Volume("GF") | ~1 : AllUpperFloors}   AllUpperFloors -->  alignScopeToAxes(y)  split(y) {~UpperFloorHeight : Volume("UF")}*  NIL  Volume(volumeType) -->  case volumeType == "GF" :   case NumFlrComm > 0:    case LOD == 1:     comp(f){side: GFloorSide | bottom: FloorBottom}     set(material.opacity,0.8)     report("1 Ground Flr Area", geometry.area(bottom))     report("1 Ground Flr Revenue", (geometry.area(bottom) * GFRate))     set(TotRevenue, (TotRevenue + geometry.area(bottom) * GFRate))     report("3 Total Revenue", TotRevenue)     set (currentFloorIndex, currentFloorIndex + 1)     report("NUMBER OF FLRS", currentFloorIndex)     MassReporting    else:     comp(f){side: GFloorSideS | bottom: FloorBottom}     report("1 Ground Flr Area", geometry.area(bottom))     report("1 Ground Flr Revenue", (geometry.area(bottom) * GFRate))     set(TotRevenue, (TotRevenue + geometry.area(bottom) * GFRate))     report("3 Total Revenue", TotRevenue)     set (currentFloorIndex, currentFloorIndex + 1)     report("NUMBER OF FLRS", currentFloorIndex)     MassReporting   else:    case LOD == 1:     comp(f){side: FloorSideRes | bottom: FloorBottom | top : Top}     set(material.opacity,0.8)     report("2 Res Flr Area", geometry.area(bottom))     report("2 Res Flr Revenue", (geometry.area(bottom) * UFRate))     set(TotRevenue, (TotRevenue + geometry.area(bottom) * UFRate))     report("3 Total Revenue", TotRevenue)     set (currentFloorIndex, currentFloorIndex + 1)     report("NUMBER OF FLRS", currentFloorIndex)     MassReporting    else:     comp(f){side: FloorSideSRes | bottom: FloorBottom | top : Top}     report("2 Upper Flr Area", geometry.area(bottom))     report("2 Upper Flr Revenue", (geometry.area(bottom) * UFRate))     set(TotRevenue, (TotRevenue + geometry.area(bottom) * UFRate))     report("3 Total Revenue", TotRevenue)     set (currentFloorIndex, currentFloorIndex + 1)     report("NUMBER OF FLRS", currentFloorIndex)     MassReporting  else :   case currentFloorIndex <= NumFlrComm:    case LOD == 1:     comp(f){side: FloorSideC | bottom: FloorBottom | top : Top}     set(material.opacity,0.8)     report("2 Comm Flr Area", geometry.area(bottom))     report("2 Comm Flr Revenue", (geometry.area(bottom) * UFRate))     set(TotRevenue, (TotRevenue + geometry.area(bottom) * UFRate))     report("3 Total Revenue", TotRevenue)     set (currentFloorIndex, currentFloorIndex + 1)     report("NUMBER OF FLRS", currentFloorIndex)     MassReporting    else:     comp(f){side: FloorSideSC | bottom: FloorBottom | top : Top}     report("2 Comm Flr Area", geometry.area(bottom))     report("2 Comm Flr Revenue", (geometry.area(bottom) * UFRate))     set(TotRevenue, (TotRevenue + geometry.area(bottom) * UFRate))     report("3 Total Revenue", TotRevenue)     set (currentFloorIndex, currentFloorIndex + 1)     report("NUMBER OF FLRS", currentFloorIndex)     MassReporting   else:    case LOD == 1:     comp(f){side: FloorSideRes | bottom: FloorBottom | top : Top}     set(material.opacity,0.8)     report("2 Res Flr Area", geometry.area(bottom))     report("2 Res Flr Revenue", (geometry.area(bottom) * UFRate))     set(TotRevenue, (TotRevenue + geometry.area(bottom) * UFRate))     report("3 Total Revenue", TotRevenue)     set (currentFloorIndex, currentFloorIndex + 1)     report("NUMBER OF FLRS", currentFloorIndex)     MassReporting    else:     comp(f){side: FloorSideSRes | bottom: FloorBottom | top : Top}     report("2 Upper Flr Area", geometry.area(bottom))     report("2 Upper Flr Revenue", (geometry.area(bottom) * UFRate))     set(TotRevenue, (TotRevenue + geometry.area(bottom) * UFRate))     report("3 Total Revenue", TotRevenue)     set (currentFloorIndex, currentFloorIndex + 1)     report("NUMBER OF FLRS", currentFloorIndex)     MassReporting


The building this creates is always just symbolozed as commercial, no residential at all:

[ATTACH=CONFIG]30228[/ATTACH]

The only time I get something other than commercial (red) is if I set the NumFlrComm attribute to 0 in the Inspector. It appears that "set (currentFloorIndex, currentFloorIndex + 1)" is not effecting the "Volume(volumeType) -->" rule, although the number of floors is reported correctly in the report.
Any one have any idea how I can rearrange this so the currentFloorIndex is used correctly.
0 Kudos
1 Solution

Accepted Solutions
MatthiasBuehler1
Frequent Contributor
My video here should help you further in understanding reporting a bit better. From this, you should be able to extrapolate ..



Have you seen it already ?

Let me know ..

Matt

View solution in original post

0 Kudos
5 Replies
MatthiasBuehler1
Frequent Contributor
Hi,

I think the issue is that NumFlrComm is wrong / constant.

You need at some point to compare this value with 'split.index' and 'split.total'

Check the docs on those .. ok ?

matt


ps. you're copying all the reporting code many times. I'd rewrite the code in just 1 rule that also works on all LODs at the same time. Try to find a code structure that NEVER repeats code. Ok ?
0 Kudos
LoringTupper
New Contributor
Thanks Matthias,
Using the split.index did work just fine. I also did as you suggested and modified the code to remove the repetitive reporting code.

I do have another question though, is there a way to add to an attribute as you go through the reporting mechanism? I want to report the required number of parking stalls required for a building based on the gross floor area and a stall requirment factor but I get odd results if I simply use the geometry.area and the rint function in the mass reporting rule, i.e. rint(((geometry.area -(geometry.area * .15))/StallFactor))), I assume this is because the numbers are smaller on a floor by floor basis and as you round these numbers then combine them the amount lost through rounding is compounded. Is there a way to make the same calculation on the full GFA rather than doing it incrementally. I tried using a set(attribute1, attribute1 + geometry.area)  within the reporting rule and it when  I reported the attribute1 it gave me the right answer, 10809.84, but when I plugged attribute1 into the calcualtion above, report("attribute1 value", ((attribute1 - (attribute1 * .15)/140))) I got 10798.26 as a result, I expected 65.53. If I try to use attribute1 outside of the reporting rule it appears the value is 0. What am I not seeing here?
0 Kudos
MatthiasBuehler1
Frequent Contributor
My video here should help you further in understanding reporting a bit better. From this, you should be able to extrapolate ..



Have you seen it already ?

Let me know ..

Matt
0 Kudos
LoringTupper
New Contributor
Thanks again Matthias,
Yes, I had seen that video before, but some time ago. I re-watched it and it did clear some things up for me. I was able to get the report I needed.
0 Kudos
MatthiasBuehler1
Frequent Contributor
Ok, cool !

matt
0 Kudos