Create Topographic Contours In Archicad Using Rhino+Gh 1/2

Page 1

nb Create Topographic Contours In BIM ArchiCAD Using Rhino+GH 1/2 Nader Belal - naderbelal@hotmail.com - nbBIM.wordpress.com



Create Topographic Contours In ArchiCAD Using Rhino+GH 1/2 Nader Belal

nb BIM

nbBIM Blog


Create Topographic Contours In ArchiCAD Using Rhino+GH 1/2 Nader Belal

First Edition 2016, by Nader Belal

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/. This Creative Commons license permits that any part of this document can be copied, distributed, displayed, preformed, reprinted, or reproduced, in any electronic, mechanical, or any other means now known or hereafter invented, including photocopying and recording, or in any information storage or retrieval system in its original format, by attributing its creator Nader Belal, the document’s name Create Topographic Contours In ArchiCAD Using Rhino+GH 1/2, and the blog used as main mean of distribution nbbim.wordpress.com, for any purpose, other than commercial means or uses. The creator’s permission is required for any and all the means known or hereafter invented for edition, or modification, or any other type of change applied to the document, either totally, or partially, to it, or to any of its contents and/or constituent parts, by any and all the means previously mentioned, for any use or purpose, including commercial. Products or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe. ArchiCAD is a registered trademark of Graphisoft SE. Rhinoceros 3D and Grasshopper are a trademarks of Robert McNeel & Associates.


Special thanks for: My parent, to whom I own them a lot, My family and my friends, for being their when every I needed them, The Jedi Council, for all the time, knowledge, jokes, quarrels, chats, tip, and discussions that we have shared, and all the fights we endured on Facebook using Caps Locks, ArchiCAD Espa単a (The unofficial group in Facebook), whose its members are always ready to help anyone, except those who must not be named, To bloggers and forum members, that take out some of their time to answer our questions, And for you, who wants to improve his or her skills



Introduction ArchiCAD is a great BIM program that’s quite easy to learn, and when you master its tools, you’ll be able to unleash your creative powers to its full extents. With ArchiCAD’s Mesh, you can model your projects’ terrain, or elements that are destined to be converted into GDL1 objects, but when it’s used with other ArchiCAD tools (such as Slab and Boolean Operations), site creation and edition will never be the same for you. Unfortunately, ArchiCAD’s Mesh tool have a terrible down fall, since it doesn’t draw contour lines, and there is no official GDL object that would draw them; so as a natural result, I have seen many ArchiCAD professional users design their sites in other applications, and import it back to ArchiCAD, which in my point of view, is the perfect procedure to waste time and energy. Therefore, I have devised this method of creating 2D contour lines, that will require that ArchiCAD, Rhinoceros 3D, Grasshopper, and ArchiCAD’s plugin for Rhino+Grasshopper be installed on your computer (and some experience using them). And based on this method, the next post in nbBIM will show you other methods to make these contours lines visible in the 3D view on request. 1

Geometric Description Language, it’s a computer language used by ArchiCAD to create parametric objects, for more information visit: http:// gdl.graphisoft.com/gdlbasics/about-gdl/



Create Topografic Contours In ArchiCAD Using Rhino+GH 1/2

The Process Step 1 Make sure that you have the following programs and plug-ins installed correctly in your computer: ArchiCAD1-2 link: http://archicad.com/ Rhinoceros 3D1-3 link: http://www.rhino3d.com/ Grasshopper3 link: http://www.grasshopper3d.com/ Rhino – Grasshopper – ARCHICAD - plugin link: http://www.graphisoft.com/archicad/rhino-grasshopper/ Openoffice Calc4 link: http://www.openoffice.org/

Step 2 Creating a site model manually using a mesh in any program is a time consuming process, so you will create a mesh by importing an XYZ file5 (similar to the ones that you may receive from a surveyor), to Grasshopper. Download “nbBIM Terrain Example.txt” from this link: https://goo.gl/rh5dNx

Step 3 Now that you have the terrain XYZ file, proceed by opening it within the Openoffice Calc6 (right click on the file text file and choose open with OpenOffice Calc).

Note Or from inside of Openoffice Calc, go to (File  Open), and select “Text CSV (*.csv, *.txt)”.

1 2 3 4 5 6

If you’re a student, check the possibility to acquire an educational license of the program in your country. Make sure that you have the right ArchiCAD Build for the Rhinoceros - Grasshopper plugin. In case you have an Apple computer, install Rhinoceros WIP. Any program will do, but I prefer Openoffice Calc for practical reasons. It’s a coordinate text data file with separators (ex: tab character, semi colon or others), in case you’re working with surveyor in the same project, always ask him/er to supply it to you with the used coordinates format and the used unit system. You can use any other spreadsheet program, but you must be pay attention that the cell types and decimals do not as they tends to change or to disappear.

1


nbBIM

Step 4 A “Text Import Dialogue” window will open similar to the one shown below.

Note In the downloaded file, the first column is for X-axis co-ordinates, the second is for the Y-axis coordinates, the third is the Z-axis coordinates, and all units are in meters.

4.01

In the “Separator Options”, choose “Separated by Tab”.

4.02

In “Fields”, select the three columns that have numbers (just click on the headers, not the table cells), then in “Column type” select “Text”.

Step 5 Save it as a CSV file1. 1

2

CSV (Comma Separated Values) files format, stores tabular data (numbers and text) in plain text. Each line of the file is a data record. Each record consists of one or more fields, separated by commas.


Create Topografic Contours In ArchiCAD Using Rhino+GH 1/2

Step 6 Open a new ArchiCAD file (use the default template and set its units to meter, with 2 or 3 decimals)1.

Step 7 Activate ArchiCAD’s Grasshopper connection (Design  Design Extras  Grasshopper Connection).

Note Do not forget to click on “Start Connection”.

Step 8 Open Rhinoceros 3D, and choose the “Large Objects – Meters” template file1.

Step 9 Activate Grasshopper (type grasshopper in the command bar).

1 It’s preferred to have a consistent unit system across your programs’ files and the XYZ file.

3


nbBIM

Step 10 Now you will start to create the new definition in Grasshopper, by importing the CSV file XYZ coordinates. 10.01 In Grasshopper’s canvas, put “Import Coordinate” component (Params  Input  Import Coordinates).

Note You can put Grasshopper’s components, either by dragging them from the component tabs, or by double click on the canvas and type the component’s name.

10.02 Connect a “File Path” parameter (Params  Primitive File Path) to the “F” of “Import Coordinate” (“F” denotes file’s name and location).

Note To connect Grasshopper components, right click and hold from the right side of “File Path”. Component to the “F” of “Import Coordinate”.

10.03 Right click on the “File Path” parameter, and choose “Set One File Path”, and choose the terrain CSV file from its location on the computer.

4


Create Topografic Contours In ArchiCAD Using Rhino+GH 1/2

Step 11 Now we will get the data out of the terrain .CSV file in a manner that Grasshopper can handle it. 11.01 Connect a wire from “Panel” (Params  Input  Panel) to “Import Coordinate” “S” (the “S” input is to identify the character used as a separator in the CSV file, which in your case was the “Tab” character).

11.02 Double click on “Panel”, press “Tab” on your keyboard, and click “Ok”.

Note The “Tab” character have been highlighted, to indicate that in this case you don’t need to express the separator character using a special code.

11.03 Put a new “Panel” parameter, and connect it to the “X” of “Import Coordinate” component (the X input will indicate which column were used to house the X coordinates in the CSV file).

Note Grasshopper’s components turn red when they detect an error, and in this case, the reason of the error, was that the connected Panel to the “X” of “Import Coordinate” was empty.

5


nbBIM

11.04 In this new “Panel”, type “0” (it means that the component must extract the X coordinate values from the first column from the CSV file).

11.05 Now repeat the steps 11.03 & 11.04 for the “Y” and “Z” inputs of the “Import Coordinate” (but this time, you will type “1” in the Y coordinate panel, and “2” in the Z coordinate panel).

Step 12 Check if the coordinates that you will get from “Import Coordinate” component are correct. 12.01 Connect a wire from the “Import Coordinate” “P” output to a new panel.

6


Create Topografic Contours In ArchiCAD Using Rhino+GH 1/2

12.02 Check the values shown in the new panel:

Note Compare “Import Coordinate”output values with those of “nbBIM Terrain Example. txt”.

12.02.01 If you have 5501 indexed values, that correspond to those found in the CSV file, jump to Step 15. 12.02.02 If you have the right number of indexes, but the values are mixed, repeat the previous steps, starting from Step 11.03. 12.02.03 If you have the right number of indexes, but the values are wrong (ex: the appearance of inexplicable zeros), repeat starting from Step 11.03. 12.02.04 If you have only one indexed value, then start again from Step 11. 12.02.05 If you have the right number of indexes, but the values that are shown without decimals, or in the wrong place, proceed to Step 13.

Step 13 As mentioned before, the “nbBIM Terrain Example.txt” and the converted CSV file values were expressed in meters, but since that the decimals have disappeared, all coordinates are in fact expressed in millimetre. To correct this, you will start by separating each point that exits the “Import Coordinate” “P” to its constituent parts, by using “Deconstruct” component (Vector  Point  Deconstruct) and connects its “P” with “Import Coordinate” “P” output.

Note The “Deconstruct” output values of X, Y and Z coordinates, will always have the same index number of its source.

1 Grasshopper put values in indexed list (similar to those in spreadsheets or data bases), always numbering the first index by zero.

7


nbBIM

Step 14 Step 14 is composed of many sub-steps. The first one, will divide constituent value by 1000. The second, it will treat the division results as text. The third it will concatenate (add) the resulted text with a set of characters in a specific format, similar to the one used by Grasshopper to express points’ coordinates. 14.01 Put the “Expression” component (Maths  Script  Expression) on the canvas.

14.02 “Expression” component can accept numerous inputs, so in Grasshopper window, zoom in until you see the “+” and “–” signs appears beside the component’s input, then click the plus sign that lies underneath the “Y” input.

14.03 Connect “X”, “Y” and “Z” outputs of “Deconstruct” with its corresponding “X”, “Y” and “Z” inputs of the “Expression” component.

8


Create Topografic Contours In ArchiCAD Using Rhino+GH 1/2

14.04 Double click the “Expression” component, in the new window dialogue write down this expression as it is:

"{"&(x*0.001)&","&(y*0.001)&","&(z*0.001)&"}" Note Grasshopper is built on .NET technologies, so the only way to add curly brackets in formulas is by treat them as a text.

Note In Grasshopper, any number of characters that are put between quotation marks, means that these characters form a text that will appear as they are (including the case of each one of them) In Grasshopper, the ampersand symbol “&” is used to concatenate text.

14.05 Connect a wire from the “Expression” component “R” output to a new panel, and check it the coordinates are expressed correctly as you have received them from the XYZ terrain file.

9


nbBIM

Step 15 Model the site in ArchiCAD, by connecting the “R” output of the “Expression” component with the “P” input of ArchiCAD’s “Mesh” component (ArchiCAD  Design  Mesh).

Note If ArchiCAD’s “Mesh” component starts to flash in red, then check Grasshopper’s connection in ArchiCAD (Step 7), or right click on “Sy” of ArchiCAD’s “Mesh” component, and set its Boolean value to “True”.

Check the terrain model in Rhinocros 3D and ArchiCAD.

Note In some cases although your algorithmic definition is correct, they may not appear in Rhinoceros 3D or ArchiCAD, so in these cases it’s advisable to save your work, and restart the programs. In case that you didn’t know, geometries generated in Grasshopper are unselectable in Rhinceros (even these geometries had a Rhinoceros origin), unless they were baked (a term for sending the generated geometries from Grasshopper to Rhino by the “Bake..” order), as Grasshoper uses Rhinoceros as a medium of visual display.

10


Create Topografic Contours In ArchiCAD Using Rhino+GH 1/2

Step 16 Go to ArchiCAD’s, select and unlock the mesh (ArchiCAD  Locking  Unlock).

Note ArchiCAD’s elements that were created in Grasshopper, are always locked.

Then in “Mesh Selection Settings” uncheck “Cover Fills” and set “Ridge Selection” to “Show User Define Ridges”.

Step 17 To reduce memory consumption, turn off the preview of Grasshopper’s components. Hover over at the centre of the desired component, left click, and click on “Preview”

Note You can turn over a group of Grasshopper’s components at once, by selecting a group, right click then choose “Preview off”

11


nbBIM

Step 18 Draw the terrain mesh in Grasshopper, by connecting the “Expression” component “R” output with “Delaunay Mesh” component “P” input (Mesh  Triangulation  Delaunay Mesh).

Step 19 Start drawing the topographic contour lines on Rhinoceros’s mesh. 19.01 Connect “Delaunay Mesh” component “M” output, with the “S” input of “Contour (ex)” component (Intersect  Mathematical  Contour (ex) ).

Note “Contour (ex)” component, draws a set of contour lines as segments of straight lines.

19.02 Connect “Expression” component “R” output, with the “L” of “List Item” component (Sets  List  List Item).

12


Create Topografic Contours In ArchiCAD Using Rhino+GH 1/2

19.03 Connect a “Panel” component to “List Item” “I” input, and type in it “549”, then connect “List Item” “i” output to the “P” of “Contour (ex)”.

19.04 Put a “Series” component (Sets  Sequence  Series) on Grasshopper’s canvas, and connect its “S” output to “Contour (ex)” “O” input.

19.05 Connect 3 panel components to “Series”’s inputs. Type “0” in the panel connected to the “S” input, “1” in the panel connected to “N” and “23” in the panel connected to “C” input.

13


nbBIM

Note Basically you have told Grasshopper to draw Mesh’s contour lines from the supplied surface (20.01  20.02), starting from a specific point (20.03  20.04), and to repeat the process of drawing the contour lines a number of times with an offset of 1 in the Z axis (20.05  20.06).

Step 20 Now we have three issues to deal with:

1.

The resultant contour lines are draw in the Rhinoceros 3D model space, but ArchiCAD’s 2D elements are never show up in any 3D view.

2.

ArchiCAD 2D elements are housed in its 2D views only.

3.

And straight line segments aren’t eye appealing in plans (except in few cases).

To solve these problems, you will procced by finding contour lines defining points (i.e: control points), to rebuild the contour lines in the XY plane. 20.01 Connect “Contour (ex)” component “C” output with “Control Points” component (Curve  Analysis  Control Points) “C” input.

20.02 Turn off the preview of all Grasshopper’s components. 20.03 Connect “Deconstruct” component “P” input with “Control Points” “P” output.

14


Create Topografic Contours In ArchiCAD Using Rhino+GH 1/2

20.04 Connect “Construct Point” component (Vector  Point  Deconstruct) “X” and “Y” inputs, with their counter parts of “Deconstruct” components (do not connect the “Z” between the components).

Step 21 Connect “Construct Point” component “PT” output with “Nurbs Curve”1 component (Curve  Spline  Nurbs Curve) “V” input.

Step 22 Connect “Nurbs Curve” component “C” output with “Fit Curve”2 component (Curve  Util  Fit Curve) “C” input.

1 Make sure that the value of “D” is set to 3 and the Boolean value of “P” is false. 2 “Fit Curve” component will redraw a softer version of the original curve, and I have found that it’s indispensable to use it with ArchiCAD’s “2D Curve Component”, especially when building curved lines in the Plan View.

15


nbBIM

Step 23 And finally, export the final result to ArchiCAD. 23.01 Connect “Fit Curve” component “C” output with ArchiCAD’s “2D Curve” component (ArchiCAD  Document  2D Curve) “C” output.

23.02 Connect ArchiCAD’s “2D Viewpoint” component (ArchiCAD  Input  2D Viewpoint) with the “V” input of ArchiCAD’s “2D Curve”1. Then click the “2D Viewpoint” component to choose the view where you want to see the resultant curves.

Step 24 Enjoy the final result in ArchiCAD.

1 If ArchiCAD’s “2D Curve” started to flash in red, check its “Sy” Boolean value is set to True, that ArchiCAD is open, or that ArchiCAD Grasshopper Connection plugin is functioning.

16


Create Topografic Contours In ArchiCAD Using Rhino+GH 1/2

Final Word

The picture above, shows the Grasshopper algorithm that was explained through this manual, and I´m sure that in the past, whenever you have something similar, either you would be of those who would freak out, or of those who would just dismiss it thinking that only few from an elite scholar sector would understand and take advantage of the powers that offers Grasshopper in many field. Well, we can’t say that you were wrong, since that the general perception of Grasshopper users are classified into 2 type, type 1, people who have just learnt the basics that are applying what they have learnt in courses and video tutorials in endless forms and formats, type 2, people who have just reached a high level as a power user, that if they talk they would sound as speaking gibberish, while the third type, who really are good enough to explain how you can take advantage of Grasshopper, for everyday work, is missing. So I have decided to make this manual as easy as possible to initiate users in the use of Grasshopper in a clear and understandable way, and in the same time, solve one of the deficiencies that ArchiCAD have always had. But I must mention, that this algorithm have some defects, such as you need to know the points’ indexes, so you can choose the right point to be an origin for your contours; and you will not be able to make modifications to the terrain mesh in Rhinoceros 3D, or regenerate the contours if you have made the modifications in ArchiCAD. So for the next time, I will publish another manual in my blog of nbBIM, which with a modification to the steps you have just done, you will be able to execute design changes easily and quickly. Besides, I will explain another 2 ways so that you can model (draw) the topographic contour lines in 3D. So in the meantime, check if stay tuned for “Create Topographic Contours In ArchiCAD Using Rhino+GH 2/2”

17


nb BIM

nbBIM Blog


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.