This tutorial will cover some basic techniques for importing GIS data into Rhino—using the Grasshopper plugin—in order to create a 3D site model with basic building masses. This method generates NURBS geometry in Rhino, allowing you to use features like Make2D to export vector graphics.
This tutorial uses the TT Toolbox plugin for Grasshopper to read Excel spreadsheets.
TT Toolbox can be downloaded here.
This exercise uses a building footprint shapefile and visualizes the height of the buildings by extruding with height data in the shape file’s attributes.
For this exercise, we will be using the MNBuildingAttributes.shp shapefile found here: X:/NewYorkCity/BaseData/Buildings/BuildingFootprints_2012/
1) Open ArcMap. (You will find it in your start menu under Programs > ArcGIS > ArcMap)
2) Add the Data to the map. Once you’ve added your data, it will appear in the preview window.
5) Open Microsoft Excel.
6) Open the exported shapefile database (DBF file extension). Navigate to the folder where you exported your shapefile of selected building footprints, and open the file with the .dbf extension. If you do not see this file in the Excel Open menu, make sure the pull down menu for visible filetypes is set to “All Files”.
7) Save As this file as an Excel Workbook (.xlsx extension).
8) Open Rhino 5. Make sure your units are set to US Feet.
9) Open up Grasshopper.
10) Load Building Footprints with the Import SHP component. Create a File Path component, an Import SHP component and a Curve component. Right click on the File Path component and use the Set One File Path command to link to the exported shapefile (.shp file extension).
Note: SHP component may only open shapefiles in Rhinoceros 5 (not the 64-Bit version).
12) Connect to Excel spreadsheet. Locate the attributes spreadsheet with a File Path component. Right-click the File Path component, choose Set One File Path, and choose the Excel workbook you saved earlier.
13) Import data from Excel Spreadsheet. Connect the File Path component to a Read Excel Sheet component (from TT Toolbox). Connect the File Path component to the [Fp] input, and create a Boolean Toggle component (under the first component tab, Params > Input) and connect it to the R? input. Set the Boolean Toggle to True to get the Read Excel Sheet component to import the Attributes file.
15) Extract Height Data. Create a Tree Branch Index component and connect the Data component to the Data Tree (T) input. Then, create a Number Slider of integers, and connect it to the Tree Branch Index component’s Branch Index (i) input. Create a Split List component, and connect the output of the Tree Branch Index component to the List (L) input. Create a Panel or Number Slider component with the value “1” and connect it to the Splitting Index (i) input. Finally, create two Panel components and connect them to the (A) and (B) outputs of the Split List component.
You should now see the Field Name in the panel connected to (A) and the values in the panel connected to (B). Changing the slider connected to the Branch Index will change between all of the fields (the columns from the Excel file), and “45” should be the field NumFloors" in this example.