Monday, August 31, 2015

Building Simple Urban Development rules Post 4: "Section" (b)

I've had a couple of questions after my previous post about reporting at floor level. One of the questions was: Instead of creating mixed floor use randomly, is it possible to specify the floor usage of each floor manually?

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:

  1. Lot--> Extrudes the building according to building height and splits it into a top part and side parts
  2. 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.

3 comments:

  1. Hi Carl,

    wow! awesome... i never think that you'll split the building by section... it is really workable in my place, since normally high rise development here divided into section [ i.e building podium normally between 3-4 storeys ( section1), entertainment/mixed use between 1-2 storeys (section2), offices between 1-3 storey (section3) and rest of it either apartment/condominium/hotel room (section4)...

    As a town planner those type analysis are really important for us to put up our recommendation to the decision maker...

    i still have a lot of thing in my mind related to cityengine and it relation to other 3D software i.e sketchup and of course i am looking the best approach how to export an existing building with a real facade into cityengine... most of the time we try use collada or obj which we design in sketchup and import into cityengine but we still failed since the facade not appeared in cityengine (may be something wrong with mtl file)...

    By the way, thanks a lot for reply and solve my problem in cityengine... really appreciate it :)

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Hi carl... Recently i watch "favela" made by matthias. I am quite impressive with cloth cable line & electric cable line. My question, can we use CGA rule to create that cable.. Tq

    ReplyDelete