Monday 28 November 2016

Generating Plans using Dynamo-Revit Final Project

General Case




Imagine a client comes to you and gives detail about the requirements. Suppose his requirements are


Living Room            3 x 3.6
Kitchen                    2.7 x 3.6
Two Bed Rooms      3.9 x 2.1
Bath                         2.1 x 2.1 

Imagine a tool that would take these inputs and generate a plan automatically. Making that tool is the aim of this post

Let me demonstrate the use of the tool that I made

Load the given requirements in an excel file as shown.












Now go to the Dynamo file and link the path of this file to the node given. 


Now what this dynamo file would do in Revit is , it produces all the required rooms in to an instances of space family. The space family is designed in a generic model with parameters of height, length, width and name.




So to start with planning we can start by cascading the required rooms  like how we arrange puzzle pieces into the total area.




Finally use wall by face to place wall instances along the 3D faces. Once these faces have been used to make wall the the 3D family can be deleted. Use wall opening tool to create various wall opening. 






So within couple of minutes we have a working model in Revit with which we can start working.



The Code





So the basic idea of this code is:
  1.  Take data from excel sheet.
  2.  Sort it so that lists under different headings .
  3.  From this list count the number of instances required.
  4. Then places a similar kind of instances .
  5. Provide sufficient space between the instances.
  6. Then take these instances and manipulate the parameters in them.



The above code was used to make the plan . The green colored module on the left uses the excel sheet to read data.

SI 1


The purple colored group take these data and sort. The top node group sorts and adds an unique number index taking into account the number of times a instance can be used.
The node group below that multiplies the width with quantity to get the number of width instances. 
Similarly the group below it does the same thing to the Length.

SI 2


SI 3

SI 4



The fourth does the  above function but to the all parameters in the excel files. That is, to multiply by the quantity so that new instances are repeated.

SI 5


Once the sorting is done in this way,a integer slider control is introduced to manage the the distance between the space instances. Changing the slider would increase or decrease the space between instances so that they can used properly.In this node the space between the instances is governed by parameters Width and Length.

SI 6


Once this is done. The program uses the points generated and counts the number of points by using a math node. It uses the space between points created using the slider in the previous nodes so that sufficient space is available to avoid intersecting of elements.

SI 7



 These points are used to create points using Point. Add Node. Family Type has to be selected which in this case is Space Family. So number of instances as required by the user are created at this juncture but those instances are all same . So a node group has to be created so that it can manipulate the parameters in the instances already placed. 
Hence the final group of nodes do this by using Element. SetByParmaterName node. These nodes manipulate Length, Width, Height and Name parameters.

SI 8



Hence at this point the space instances are created and stacked one after the other. Now simple cascading operation using move tool can used to arrange these space.

As said before, the Wall-By-Face can be used to create walls. Then the space family can be deleted. Wall opening or doors can be added to get a working 3D model in Revit.

LunchBox and Clockwork

Some of the nodes in this program were used from Lunchbox ( 2016.11.8 8Nov 2016 Version). Those nodes were;

LunchBox. Mass Addition

THis nodes returns the  total value of a list of numbers. It is used as a recursive function.


Clockwork Nodes.

Clockwork is a package which is a collection of useful nodes. It is sub-program int eh main program.. It has to be loaded in the same folder as the main dynamo file. When loaded and called for, it returns the values into the main program from sub program. Following clockwork nodes were used in the present project

List.CountOccurences 

 Counts number of times each unique item is in a list. For example a list with following values           { 0,1,2,2,3,3,3}, this node will tell you that the frequency of 0 and 1 is 1, for 2 and 3 is 2.
To use this node two other nodes have to be added. They are show in the following figures.


List.SublistLengths 



TurnIntoList




Python Script/Node

A small python script had to be used which was just a replacement for LunchBox Mass Addition node. As the Mass. Addition node was used as a recursive function, the python script from this node was copied to do this. This was done so that LuchBox need not be installed on every computer this program runs, but due to accumulation of errors it was thought to go with the installation of LunchBox.


Hanoi Museum Project 1

The same code was used to make plan for the Hanoi Museum which was created in the previous project.
These are the rendering from that project.



Uses:


  1. In the initial planning stage this tool enables a simple manipulation in excel sheet data to change the plan in Revit file. Hence it eases the effort required in scheduling.
  2. Many different options of floor plans can be generated so that a better decision can be take.
  3. The space instances can be printed in 3D printer and can be arranged as models for presentations.
  4. It eases the documentation part of the planning as working plans and there excel sheet data can be quickly generated.

Future Development


  1. Adjacency studies can be applied to this model. In which a particular instance is not desired to be placed beside another instance. For example Restrooms placed beside kitchen. These kind of constraints can be developed in Dynamo
  2. Optimo can be used to optimize the various factors like maximizing the space, minimizing the walls. minimizing the walk-run in a building with given set of constraints like the plot size etc.

Concluding Remarks


This tool has lot of scope to improve efficiency in an Architectural Firm. especially at the planning stage looking at the ease with which plans are generated. This code gives sufficient control over the project allowing lot of tweaks from the used end to achieve a efficient plan design.



References:



1. Martin K. The Space Planning Data Cycle with Dynamo. http://dynamobimorg. 2015. Available at: http://dynamobim.org/space-planning-data-cycle/. Accessed November 29, 2016.























Monday 31 October 2016

Revit Parametric Modelling of Hanoi Museum, Vietnam - Project 1

Hanoi Museum 

This blog chronicles the the journey of modelling Hanoi Museum building located in n Hanoi, Vietnam. The main attraction of the museum is its structure which is been shaped like a inverted pyramid.
This design won 1st prize in Competition 2005. It is designed by gmp – von Gerkan, Marg and Partners

Hanoi Museum 


Modelling Thought Process

As the dimensions of the building were not available a mixture of parametric flexing and dimensions from the scaled autocad model was used to arrive at approximate dimensions. The modelling of this project was done in a conceptual mass environment with the preliminary dimensions obtained from autocad model developed using images and scaling it known dimensions
.

As the structure had 5 level(4 floors) a flexing model was conceived where individual floor heights could be changed in the project environment. 

As parametric modelling, a relationship between the slope of the building and the width of the building was thought to be related by parameters. Slope of the building here is defined "as an angle of an imaginary line ,in the elevation view ,connecting the vertex of the lowest level to the vertex of the top level". If the slope is changed then the building width would increase/decrease such that, the outer faces would would stretch/ contract themselves to reach the now slope. A decrease in slope would increase the building width.

Modelling : Actual Process

A series of rectangles were drawn at each level (5 in number). Dimensions were acquired from the autocad file. Since it is a parametric model , dimensions are not important, but , still an attempt was made to get best possible dimensions so that the structure could be felt better and an  intuitive understanding could be developed . The  rectangles were extruded by creating form . At the same time a new parameter was created to each floor height with the levels . The top surface of the extruded face was locked to the respective levels, thereby creating a model whose different floor heights could be flexed.


The key parameters for this mass was slope, which would vary the width of the building. Hence a slope parameter was created. A trigonometric relationship between the slope and width was developed. As mentioned before, from the autocad drawing it was assumed that every level had an offset of 8m. This inherent symmetry was used as an advantage in parametric modelling.




Reference plane were drawn at extreme face of the each of the extruded masses. The faces were locked to the the reference planes. Aligned annotation was used to create an equality constraint among the  all the faces. A new parameter x was created which would have the value of width of the first offset. This parameter x was related by using trigonometric relation x= Floor 1 / (tan(SLope)). Where Floor 1 is the height parameter of the floor 1.


Creating Curtain Wall Pattern using Generic Modelling Environment


Careful observation of the the outer curtain wall of the Hanoi building would reveal a very different type of curtain wall pattern. The design is very intricate and hence the regular curtain wall by pattern family could not be used. Hence an attempt was made to use the generic modelling environment .
Generic model pattern based family was used to develop as near as possible to the present pattern at Hanoi building.

Keeping in mind the project environment, 4 Parameters were created in the Generic model pattern based family. Radius of the outer material (Rout), Radius of the inner material (R). Material of the outer frame(Material Out) and Material of the inside frame (Material In) were created.
These parameters can be changed in the conceptual mass or in project to suit project needs.
New constraints were developed using aligned tool  so that the elements created in this step could adjust themselves when grid spacing would change.
The figures below are for a horizontal spacing of 2m and vertical spacing of 5 m(floor height)


Panel with Reference Line
     

Panel with solid form






Parameters for Materials










Massing Floors, Roof and Columns.


In the mass family, the faces of extrusion was selected to divide the surface. The surfaces were divided to make a grids of 5m x 2m . Instead of grid lines, distance was used, so that the panel created in the last step could easily fit into it .
After the surface is divided and the curtain panel loaded, the mass family is loaded into project.
First the floor levels are created (5 levels). Then floor massing is done. After that flooring is done using Floor Wood Joist Ceramic Flooring family.
For the roof a Basic Generic 12''  roof is selected.  Then roof is extended to look like the exact building. It is extended by using 14' offset. Finally the topography of the site is created.
Careful examination of the original buildings show that the structural column are used to enhance the look of the building. Hence grid lines are created to place structural columns.
 




Renderings are produced for the final project as follows.








Exterior 1




Interior 2



Interior 1

Future Scope


The  spiral staircase can be parametrically modeled using Dynamo environment.