So, here is my answer:
Yes... to a certain degree :)
I decided to create a new rule file, rather than expanding on my existing rule (as per my previous posts). So....lets start:
The aim of the rule is to create 2 to 4 "sections" in my building that will have different zoning attributes (selected manually by the user).
Splitting sections |
Attributes
- Firstly, I created attributes for the building and floor heights.
- Second step was to create attributes for the number of floors that each "section" will have (for example section1NumFloors = 4)
- Step 3: Create zoning attributes for each section
- Step 4: Create a numerical attribute to determine the height of each section (by multiplying the floor height with the number of floors) This attribute will be used when we split the building vertically
Functions
The next part describes the functions for this rule:
- getFloors: Determines the total number of floors of each building by dividing the building height by the floor height and returning an integer
- testFloors: This functions checks that the total number of floors of all the "sections" are less than the number of floor returned by getFloors. If the total is less than the maximum floors, the building will be divided into 4 sections. If the number of floors exceed the maximum, one section at a time will be removed until the number of floors is less than the maximum. (I could probably have worded that better....)
Rules
Finally we get to the cool part! The rules:
- Lot--> Extrudes the building according to building height and splits it into a top part and side parts
- SplitBuilding--> This rule uses testFloors as a guide and splits the floors vertically into sections (either 2; 3; or 4 sections)
At this point our building is divided into 4 sections.
Each section calls the appropriate nested split function, for example Section1Floors
- Section*Floors--> These rules splits each section repetitively vertically until the end of the section has been reached. Each one in turn calls the SetZoningSection rules
- SetZoningSection--> These rules assigns zoning type of the floor to disply each zone differently.
So to conclude: it is possible to assign individual zoning types per section manually. By dividing the building into sections we have made the rule a bit more robust, as the number of floors per division can also be changed manually. One can always extend this rule to include more "sections" but for most uses I think 4 should be enough.
Thanks for the comments regarding this series.
If you have any additional comments, questions or suggestions regarding this post please feel free to add them below.