generative components quick start guide

64

Click here to load reader

Upload: dominic-seah

Post on 15-Oct-2014

73 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Generative Components Quick Start Guide

TRN00NNNN-L/000X

GenerativeComponents V8i Quick Start Guide08.11.08

Bentley Institute Course Guide

Page 2: Generative Components Quick Start Guide

Trademarks

AccuDraw, Bentley, the “B” Bentley logo, MDL, GenerativeComponents and SmartLine are registered trademarks; PopSet and Raster Manager are trademarks; Bentley SELECT is a service mark of Bentley Systems, Incorporated or Bentley Software, Inc.

AutoCAD is a registered trademark of Autodesk, Inc.

All ther brands and product names are the trademarks of their respective owners.

Patents

United States Patent Nos. 5,8.15,415 and 5,784,068 and 6,199,125.

Copyrights

©2000-2009 Bentley Systems, Incorporated. GenerativeComponents ©1998 Bentley Systems, Incorporated. All rights reserved.

GenerativeComponents V8i Quick Start Guide ii Aug-10Copyright © 2009 Bentley Systems, Incorporated

Page 3: Generative Components Quick Start Guide

Aug-10

Table of Contents

Welcome to GenerativeComponents ____________________ 1What is GenerativeComponents __________________________1Launching GenerativeComponents ________________________3Getting Oriented ______________________________________4

Mouse ___________________________________________6Naming and Numbers __________________________________6

Numbers _________________________________________7Operators____________________________________________7Coordinate System ____________________________________8Example Help _________________________________________9Many More Ways to Learn GenerativeComponents __________12Features _____________________________________________12Update Methods and Properties__________________________13

Properties ________________________________________15Each Update Method has its own Properties. ____________15

Points _______________________________________________15Expression Inputs______________________________________17Dot Operator _________________________________________21Lists and Indexing _____________________________________21

Indexing__________________________________________23Functions ____________________________________________25Feature Types ________________________________________26

Zero Dimensions ___________________________________27One Dimension ____________________________________27Two Dimensions ___________________________________28Three Dimensions __________________________________28Built-In Types______________________________________28

Frequently Asked Questions _____________________________32Tips and Tricks ________________________________________34

Putting it Together __________________________________ 35Module Overview _____________________________________35Module Prerequisites __________________________________36Module Objectives_____________________________________36Free Form Surfaces ____________________________________36Tunnel with a Crossbar Roof _____________________________36

iii Table of ContentsCopyright © 2009 Bentley Systems, Incorporated

Page 4: Generative Components Quick Start Guide

Aug-10

Table of Contents

Learning More ______________________________________ 55Module Overview _____________________________________55Professional Training from The Bentley Institute _____________55

OnDemand eLearning _______________________________56Live training_______________________________________56

The GenerativeComponents learning path__________________56GenerativeComponents Essentials _____________________56GenerativeComponents Basic Scripting _________________57

iv Table of ContentsCopyright © 2009 Bentley Systems, Incorporated

Page 5: Generative Components Quick Start Guide

Aug-10 v Table of ContentsCopyright © 2009 Bentley Systems, Incorporated

Page 6: Generative Components Quick Start Guide

Table of Contents vi Aug-10Copyright © 2009 Bentley Systems, Incorporated

Table of Contents

Page 7: Generative Components Quick Start Guide

Welcome to GenerativeComponents

What is GenerativeComponents

GenerativeComponents is a parametric and associative design system which gives users new ways to efficiently explore alternative designs.

GenerativeComponents is a tool-making application. You use it to make software tools that are specific to your design. The fixed set of tools in GC can be expanded by you.

GenerativeComponents captures design intent by graphically representing both design components and the relationships between them.

Aug-10 1 Welcome to GenerativeComponents

Copyright © 2010 Bentley Systems, Incorporated

Page 8: Generative Components Quick Start Guide

What is GenerativeComponents

GenerativeComponents enables efficient design exploration and reuse without manually rebuilding the model for each scenario.

GenerativeComponents allows designers to work completely graphically, or to combine this with scripting and programming where appropriate.

GenerativeComponents is the tool of choice for those who appreciate that design is best when it emerges from a combination of intuition and logic.

GenerativeComponents is a flexible design environment that is designed to be used both as a digital exploration/sketching tool for design development and as a production tool.

GenerativeComponents is self-documenting. A series of transactions is easy to review and learn from.

Welcome to GenerativeComponents 2 Aug-10Copyright © 2010 Bentley Systems, Incorporated

Page 9: Generative Components Quick Start Guide

Launching GenerativeComponents

Launching GenerativeComponents

You will begin by launching GenerativeComponents and creating a GenerativeComponents document file, called a design file.

When GenerativeComponents opens it opens in the typical mode for GenerativeComponents, which requires that you be in an active DGN file. Files are also always automatically saved, so File > Save is not necessary.

New users expect to be able to open an example file modify it and then close without saving -- this is an exploratory mode. To do that in GenerativeComponents, begin by creating a copy of the blank DGN file supplied in the default DGN directory. The easiest way to do this is by using Copy and Paste on the file.

There are several ways to launch GenerativeComponents. Here you will use the most conventional way.

Exercise: Launching GenerativeComponents

1 Click the Windows Start button.

2 Select All Programs > Bentley > GenerativeComponents > GenerativeComponents.

3 GenerativeComponents launches and the File Open dialog appears.

4 In the lower right corner, User and Project are set to:

User: gc

Project: gc_default

From here you can create a new file to work in.

Exercise: Create and open a design file

1 Continuing in the File Open dialog, click the New file icon.

2 In the New dialog, type the file name Quick Start.

Aug-10 3 Welcome to GenerativeComponentsCopyright © 2010 Bentley Systems, Incorporated

Page 10: Generative Components Quick Start Guide

Getting Oriented

There is no need to type the extension .dgn because it will be automatically appended for you.

3 Click Save.

Back in the File Open dialog, your new file, Quick Start.dgn, is selected.

4 Click Open.

The file opens and you are presented with the default GenerativeComponents application window interface. The title bar displays the name of the open file.

Getting Oriented

The first time you see the GenerativeComponents application window, you may feel a little overwhelmed. You need not be. Here we highlight the features most relevant elements for a quick start.

Menu Bar View Controls

DrawingView

Tools and

Symbolic Diagram

Tabs for other docked dialogs

Create Featuredialog

Status bar

Base CoordinateSystem

Tasks

Welcome to GenerativeComponents 4 Aug-10Copyright © 2010 Bentley Systems, Incorporated

Page 11: Generative Components Quick Start Guide

Getting Oriented

Menu Bar

Gives access to standard menu items plus many additional tools and utilities.

View Controls

Allows you to control the window area, zoom level and many other view tools.

Tools and Tasks

Gives you access to different tools that are most commonly used with GC.

Create Feature dialog

Allows you to create a new feature by selecting a feature and its update methods.

Drawing VIew

Where you draw.

Base Coordinate System

The 0,0,0 point of the file. It is generated automatically.

Symbolic Diagram

Shows the features created and their relationship. Almost every symbolic diagram will have a Coordinate System.

Status Bar

Shows messages and propmts for the user, as well as giving access to other common utilities.

Tabs and other docked dialogs

Gives you access to other dialogs, like: Transactions, Examples, Edit Feature, New Feature, Variables, Console, and more.

Aug-10 5 Welcome to GenerativeComponentsCopyright © 2010 Bentley Systems, Incorporated

Page 12: Generative Components Quick Start Guide

Naming and Numbers

Mouse

They basic use of the mouse is as follows:

Left Mouse Button is the “Yes” button. For example, “yes, I want to place point here” or “yes, I want to pick that item in a dialog box”

Right Mouse Button is the “No” button. For example, “no, I do not want to place more points”. You can think of it as the “cancel” or “stop” button.

The mouse can be used to do a lot of things such as controlling the view (zoom, pan, etc).

Naming and Numbers

As you create objects in GC you give them a unique name. GC will do this automatically for you by giving the object the name of its type along with a number. For instance,

• point03

• line12

• coordinateSystem04

You can, and should, give objects meaningful names of your own, following a few simple rules:

1 The name must begin with a letter

2 It may not contain space

3 Names are case-sensitive

A common practice is to use join words together without spaces, called camel case:

• assembly0001

• height

• numberOfBeams

• treeFootPrint

• Height is not same as height.

Welcome to GenerativeComponents 6 Aug-10Copyright © 2010 Bentley Systems, Incorporated

Page 13: Generative Components Quick Start Guide

Operators

You can also name your own functions, generated feature types and more.

Remember, case matters, that is GC is case-sensitive.

Numbers

You can use several different types of numbers in GC. You will use numbers to specify the locations of features and for any expressions you need.

Integer

A whole number.

12

378

-14

1000

Double

Doubles are real numbers. Double is short for a double-precision floating point. Examples are:

43

12.345

-34.667

1.222E3

0.347E-2

Operators

Operators allow you to enter more complex expressions.

The standard arithmetic operators are:

+ - * /

Standard addition, subtraction, multiplication and division

Aug-10 7 Welcome to GenerativeComponentsCopyright © 2010 Bentley Systems, Incorporated

Page 14: Generative Components Quick Start Guide

Coordinate System

\

Floored integer divide, for example, 10\3 is 3

%

Modulo or remainder, for example, 8%3 is 2

< == > != <= >=

Less than, equal to, greater than, not equal, less than or equal, greater than or equal

GC follows the PODMAS rule for arithmetic:

P - Parentheses first. Do operations inside parentheses first, starting with inner most set of parentheses if more than one set is used.

O - Orders, Powers and Roots. Do exponential and root functions next.

DM - Division and Multiplication

AS - Addition and Subtraction

Coordinate System

The coordinate system controls the location and direction of the X, Y and Z coordinates.

Every file is created with a Cartesian coordinate system at its world origin. It is called baseCS and cannot be renamed.

Welcome to GenerativeComponents 8 Aug-10Copyright © 2010 Bentley Systems, Incorporated

Page 15: Generative Components Quick Start Guide

Example Help

You can create new coordinate systems wherever you like to locate your design.

Some of the Update Methods used to create a coordinate system

When you create a new file you are automatically assigned a coordinate system called baseCS and it is located “AtModelOrigin”.

You can change the plane to the YZ plane or XZ plane using the option list in the GenerativeComponents Active Plane dialog.

Example Help

Help is available in the form of pre-built examples. GenerativeComponents includes a large library of geometric and data feature types. You can explore them by using the built-in Example files. Which provide an interactive example of each of the feature types.

You can find these files in the following folder:

Windows XP

Aug-10 9 Welcome to GenerativeComponentsCopyright © 2010 Bentley Systems, Incorporated

Page 16: Generative Components Quick Start Guide

Example Help

C:\Documents and Settings\All Users\Application Data\Bentley\GenerativeComponents\WorkSpace\Projects\Examples\GC_Default\dgn\

Windows 7C:\Program Data\Bentley\GenerativeComponents\WorkSpace\Projects\Examples\GC_Default\dgn

Exercise: Using Example Help

1 Create a new transaction file.

2 From the GenerativeComponents task select New Feature.

A New Feature tab opens.

Welcome to GenerativeComponents 10 Aug-10Copyright © 2010 Bentley Systems, Incorporated

Page 17: Generative Components Quick Start Guide

Example Help

3 On the New Feature tab of the GenerativeComponents dialog, expand the node next to the Arc feature by clicking the +.

4 Under Update Method, expand the method ByAngleCenterStartPlanePoint.

5 Click inside the first Expression field, next to CenterPoint.

The Example button highlights.

6 Click the Example button.

View 2 opens. In addition an Example Symbolic Diagram opens and is for the Example. Also, a new tab named Example appears in the GC dialog.

7 In the GC dialog, click Play All Remaining Transactions to see the geometry that results from the example.

8 Spend a few minutes to try other Features and Update Methods and explore their Examples.

9 Use the window control in the upper right to close the Examples tab.

This will also close the View and the Example Symbolic Diagram.

Most Update Methods have an Help Example so you can see how they work. So when you define a Feature you must think of the Update Method you will use to define it.

Aug-10 11 Welcome to GenerativeComponentsCopyright © 2010 Bentley Systems, Incorporated

Page 18: Generative Components Quick Start Guide

Many More Ways to Learn GenerativeComponents

Many More Ways to Learn GenerativeComponents

One of GC's strengths is that it is self-documenting! As you create new features GC records them in a series of transactions. Each of these steps is editable: you can change what they do, they can be renamed, and rearranged to explain a design.

The easiest way to learn GC is by looking at existing designs. You can play through the transactions in a file to understand them, then copy and modify them to suit your needs. GC includes many useful examples in the DGN directory of the Default workspace.

In addition there are many GC files available on the Internet, from Bentley, and many other GC users. A good place to start is:

http://communities.bentley.com

Features

The whole concept of features is so central to GC, and it is also a bit strange if you have never worked with them before.

You can efficiently construct sophisticated designs from a number of small pieces. Just as a line is constructed by first creating two points, a complex shape can be created by creating two solids and performing a Boolean between them.

Features are the building blocks of a GC model. Features can be geometry, such as a line curve or a point, They can be data, such as a slider to specify length. Or they can be a process such as exporting data to Excel.

Once all of the required inputs, or parameters, are supplied, the feature can be created. The dependencies between the features and its inputs are retained and are visible in the Symbolic Diagram.

GenerativeComponents is a dynamic system. Performance will be affected by the number of features you use, so be as efficient as possible. Use the output of one feature as the input of a new feature.

Features can be:

Welcome to GenerativeComponents 12 Aug-10Copyright © 2010 Bentley Systems, Incorporated

Page 19: Generative Components Quick Start Guide

Update Methods and Properties

• Geometric entity

• Point

• Line

A Feature may not necessarily be geometric:

• GraphVariable

• DataExporter

• ImageCapture

You could call a Feature a software object, because they represent the pieces of your design.

Update Methods and Properties

When you create a GC feature, it is defined by the method of its creation, called the Update Method. A feature has many available update methods, which one you choose depends upon what inputs are available. It may also depend upon design intent, as each Update Method makes a Feature behave differently.

Names of Feature Types

Aug-10 13 Welcome to GenerativeComponentsCopyright © 2010 Bentley Systems, Incorporated

Page 20: Generative Components Quick Start Guide

Update Methods and Properties

Features can be created interactively, using the mouse, or by filling in the fields in the Create Feature dialogue.

Let us consider creating a point.

You could place one interactively in 3D space by clicking in the View with your mouse. This will place a Point ByCartesianCoordinates.

Placing a point interactively

Or you could place a point at the intersection of a curve and a surface by using the Create Feature dialog and filling in the arguments of Point AtCurveSurfaceIntersection.

GenerativeComponents has nearly 500 update methods spread across almost 40 built-in feature types! But it is manageable because you will find that for most designs only a handful of them are necessary to remember. If you have questions about what an update method does, don't forget to look at the built-in Example

Welcome to GenerativeComponents 14 Aug-10Copyright © 2010 Bentley Systems, Incorporated

Page 21: Generative Components Quick Start Guide

Points

file, or look the feature up in the online reference Help > Feature Library. For example, the Line Feature Type has about 22 Update Methods. Which is to say you can draw a Line up to 22 different ways.

You will need to learn each Update Method one-by-one, but many are familiar concepts. Most Update Methods are specific to that feature.

Properties

Each Update Method has its own Properties.

Points

It is all about Points. Almost every feature is dependent on Points. Points are the basis of the geometry you will create. GC stores the relationships between points in the geometry you create, so often you will use points to control your model.

Exercise: Creating a New Feature

1 From the GenerativeComponents Primary Task select Create Point.

Aug-10 15 Welcome to GenerativeComponentsCopyright © 2010 Bentley Systems, Incorporated

Page 22: Generative Components Quick Start Guide

Points

This is a Point ByCartesian coordinates.

2 Place a point in the view by pressing the left mouse button.

3 Select Move Feature.

4 Use the left mouse button and select the XY-plane indicator.

5 By clicking on the plane indicator you can move the point on the XY-plane.

6 Right click to cancel the move.

7 Select Move Feature again and this time select the cyan line and point.

This allows you to move the point in Z only.

Click here

Click here

Welcome to GenerativeComponents 16 Aug-10Copyright © 2010 Bentley Systems, Incorporated

Page 23: Generative Components Quick Start Guide

Expression Inputs

8 Note that when you select a feature to move teh Feature Coordinates dialog opens.

You can use this dialog to enter numbers and lock or free a coordinate.

Expression Inputs

The Expression input fields are similar to the Excel input field. You can type in simple numbers or arithmetic expressions.

Aug-10 17 Welcome to GenerativeComponentsCopyright © 2010 Bentley Systems, Incorporated

Page 24: Generative Components Quick Start Guide

Expression Inputs

For example,

• 33.125

• 21

• height / 4.0

• a+b

• (a+b) * width

• Sqrt(polygon04.Area+1)

• a>b?red:blue

Excel input field is the same as ...

GC Expression fields

Welcome to GenerativeComponents 18 Aug-10Copyright © 2010 Bentley Systems, Incorporated

Page 25: Generative Components Quick Start Guide

Expression Inputs

So all of the following are OK.

The second last one says, take the area of polygon04 and add one to it, then take the square root of the combined number.

This is your first clue that you can use the property of one feature to create another feature, in other words, creating an association between the two features.

The last one says if a is greater than b then the result is red, if b is greater than a then the result is blue. Very handy.

Exercise: Using Properties and Expression to place a point

1 Continue in the same file.

2 In the Point Properties, you are asked for four pieces of information and fifth optional (in blue) expression.

3 In the expression fields, enter the following:

CoordinateSystem: baseCS

XTranslation: 5

YTranslation: 12

ZTranslation: 3

Aug-10 19 Welcome to GenerativeComponentsCopyright © 2010 Bentley Systems, Incorporated

Page 26: Generative Components Quick Start Guide

Expression Inputs

4 Leave the Origin set to null.

5 Click on OK.

The name point01 will be automatically assigned, if you do not supply one in the "Name of new feature" field.

6 On the Transaction tab, click on “Record Recent Graph Changes as a New Transaction”.

The last step creates a new Transaction or records what you just did as a new step in the transaction file.

You can view or edit the contents of the recorded transactions by clicking on the cyan button which opens the Transactions script editor.

New Pointcreated

Welcome to GenerativeComponents 20 Aug-10Copyright © 2010 Bentley Systems, Incorporated

Page 27: Generative Components Quick Start Guide

Dot Operator

Dot Operator

The DotOperator is a special operator. A feature always has a given set of properties. Thus, the line feature always has the StartPoint, EndPoint and Length properties. A circle always has the Radius property.

The dot operator “.”, allows you to capture or use a property of a feature.

For example,

point01.X

line03.Length

polygon07.Area

coordinateSystem02.Xdirection

line04.StartPoint.XTranslation

You can use these properties to create new features. It is an economical way of working, as it will reduce the number of features overall. It is one of the most powerful tools in GC.

Lists and Indexing

{} are sometimes called braces or curly brackets. They designate a list or a collection.

Lists are convenient way of copying a feature and its properties.

It can be a list of numbers, or a list of points or even a list of lists.

Aug-10 21 Welcome to GenerativeComponentsCopyright © 2010 Bentley Systems, Incorporated

Page 28: Generative Components Quick Start Guide

Lists and Indexing

{1,5,2,9}

{point01,point02,point05}

{point01,0.25,point03,1.4}

{{1,2},{3,5},{8,11}}

This is a very powerful way to “copy” a property of a feature.

Exercise: Using {} to generate a list

1 Continue in the same file and select Edit Feature.

2 In the Symbolic Graph click on point01.

3 Replace the following with:

XTranslation: {1,2,3,4,5}

YTranslation: {2,4,6,8,10}

ZTranslation: 0

Welcome to GenerativeComponents 22 Aug-10Copyright © 2010 Bentley Systems, Incorporated

Page 29: Generative Components Quick Start Guide

Lists and Indexing

4 Click on OK.

Top View of point01 with lists used for X and Y

Indexing

[] or square brackets designate a position within a list. You can then affect one member of a list only by calling out its index. For example,

point01[2]

The first position is [0].

So, point01[2] is the third instance (copy) of point01.

In the following example, the rail cars represent the container for the list, in other words, a list of points or a list of numbers, etc. There are five members in this list.

[0] [1] [2] [3] [4]

Aug-10 23 Welcome to GenerativeComponentsCopyright © 2010 Bentley Systems, Incorporated

Page 30: Generative Components Quick Start Guide

Lists and Indexing

Lists can contain empty or null containers.

In the image above [2] and [3] are null.

Lists can be of different types.

Here the type of rail car changes, indicating that you can change the type of the container. So one list for numbers and one list for points.

The great thing about lists is that any other object created based on the listed feature is also copied. Of course there are many ways to control this copying and that where the fun lies.

So for our previous exercise the YTranslation was:

[0] [1] [2] [3] [4]

Welcome to GenerativeComponents 24 Aug-10Copyright © 2010 Bentley Systems, Incorporated

Page 31: Generative Components Quick Start Guide

Functions

{2,4,6,8,10}, therefore point01[0] YTranslation is equal to 2 and point01[4] is equal to 10.

You can also declare a variable on-the-fly as a list:

sectionAreas = {A,B,C,D,E}

You can have several dimensions as well: [5][11]

Functions

Functions are designated by parentheses or round brackets. For example,

Sqrt(9) - The square root of 9, which evaluates to 3.

Cos(60) - Cosine of 60, which evaluates to 0.5.

Series(0,2,0.25) - To generate a series of numbers

The Series function is one of the most used functions as you are getting started as it allows you to create an evenly spaced list of numbers.

[0]

[1]

[2]

[3]

[4]

Aug-10 25 Welcome to GenerativeComponentsCopyright © 2010 Bentley Systems, Incorporated

Page 32: Generative Components Quick Start Guide

Feature Types

There are many functions available in GC. Simply click on the Fx icon in the main task.

Functions are important to more complex geometry as you want your geometry to obey some “rules”. Many of the “rules” are defined through Functions.

Feature Types

There are many type of features. They can be related. For example, you can create point at the intersection of two lines or create line from the intersection of two surfaces. Many Update Methods are based on this concept. Let’s start with some basics.

Welcome to GenerativeComponents 26 Aug-10Copyright © 2010 Bentley Systems, Incorporated

Page 33: Generative Components Quick Start Guide

Feature Types

Zero Dimensions

A point is zero dimensional. It has no volume or lenght or width.

Coordinate System (left) and a Point (right)

It is all about Points. Almost every feature is dependent on Points. Points are the basis of the geometry you will create. GenerativeComponents stores the relationship between the points and associated geometry and computes the associated geometry from the current value of the points.

One Dimension

A line is an example of a one dimensional object.

In addition, an arc or curve are mathematically one dimension, hence, GC considers them as one dimensional as well.

Aug-10 27 Welcome to GenerativeComponentsCopyright © 2010 Bentley Systems, Incorporated

Page 34: Generative Components Quick Start Guide

Feature Types

Two Dimensions

A Plane is an example of a two dimensional object. A surface is also considered a two dimensional object mathematically.

Three Dimensions

A solid is a three dimensional object.

Built-In Types

The built-in types can be seen in the interface.

The following are standard types:

• Int: an integer, no decimal places

• Double: a number with decimal places

• Boolean: a true or false value

• String: a string of characters or “text” - in double quotes

GenerativeComponents Types

IPOINT - parent class (zero dimension (0D) object)

Welcome to GenerativeComponents 28 Aug-10Copyright © 2010 Bentley Systems, Incorporated

Page 35: Generative Components Quick Start Guide

Feature Types

• Point (location only)

• Plane (location and direction): An infinite plane can divide the world into two half spaces. Can also be thought of as a 2D Cartesian space, with X and Y coordinates

• CoordinateSystem

Point (left), Plane (center) and Coordinate System (right)

IDIRECTION - parent class (one dimension (1D) object)

• vector

• line

ICURVE - parent class (1D object)

• line

• arc

• circles

• ellipses

Aug-10 29 Welcome to GenerativeComponentsCopyright © 2010 Bentley Systems, Incorporated

Page 36: Generative Components Quick Start Guide

Feature Types

• b-spline curves

ISURFACE - parent class (2D or 3D object)

• surface

ISOLID - parent class (3D object)

• solid

Welcome to GenerativeComponents 30 Aug-10Copyright © 2010 Bentley Systems, Incorporated

Page 37: Generative Components Quick Start Guide

Feature Types

The basic relationships between types is as follows:

So when GC asks for a IPoint, you can supply a point, plane or ccordinate system.

The term “repl.” is short for Replication, meaning that you could supply a list of points, and not just one point.

Aug-10 31 Welcome to GenerativeComponentsCopyright © 2010 Bentley Systems, Incorporated

Page 38: Generative Components Quick Start Guide

Frequently Asked Questions

Frequently Asked Questions

What is a Transaction file?

It contains the instructions that will generate geometry. When you open one in GenerativeComponents, you see the working environment. It is comprised of the GenerativeComponents dialog, the Symbolic Diagram and a Geometric view.

What is the View?

View 1-8 are the views in which geometric construction is represented. You can open any views to let you visualize the current geometric state of the model by displaying all geometric features in 3 dimensions.

What is the Symbolic Diagram?

The Symbolic Diagram is a view of the geometric and non-geometric features you are placing, in graph form. The features are capsules with the feature type noted underneath the feature name. For example, a coordinate system feature with its name, baseCS, below it.

The lines connecting the features show any dependencies between features. The arrows show the direction of the dependency.

The Symbolic Diagram visually expresses dependencies that may not be as apparent in the Geometric view, but which influence other dependent features and so the behaviors of the whole model.

Welcome to GenerativeComponents 32 Aug-10Copyright © 2010 Bentley Systems, Incorporated

Page 39: Generative Components Quick Start Guide

Frequently Asked Questions

For reference, please review the term Directed Acyclic Graphs.

Simple Directed Acyclic Graph

What is the Coordinate System, or baseCS?

The coordinate system controls the direction of the x, y and z coordinates. When you open a transaction file there is a coordinate system called baseCS. You can see it in the View and the Symbolic Diagram.

Top view of the baseCS Isometric view of the baseCS

What is a Transaction?

Each change you make is recorded as a step or transactions. Use transactions to group multiple steps into a single, logical entity. Think of this as recording the building of a portion of the final geometric construction. When you play the transactions, the geometric construction is built in the Geometric view. Transactions only record the changes or deltas. The granularity of transactions is user defined.

Aug-10 33 Welcome to GenerativeComponentsCopyright © 2010 Bentley Systems, Incorporated

Page 40: Generative Components Quick Start Guide

Tips and Tricks

Tips and Tricks

1 Learn the basics of the interface. Spend 15 minutes exploring menus and tools for your first few sessions.

2 Understand how to use the View Controls, spend five minutes at thebbeginning of each session practicing zoom in/out and rotating. Spin thebmouse wheel for Zoom In/Out, double click to fit the view and Shift+press the wheel for Rotate about center of view.

3 Remember it is all about points. Explore the Point feature and its Update Methods.

4 Use Example Help.

5 The Symbolic Diagram is a great way to find, insert into expression fields and operate on features.

6 Learn the vocabulary of GC now. Features, Transactions, Symbolic Diagram, Update Methods, Parametric values, free v. locked values, etc.

7 Sets can be created in two basic ways: curly brackets or a Series function. There are other ways but these work well for most challenges.

8 Know how to read and find a location in a list for example, Line01[2][1]

9 You can declare variables in the expression field of a feature.

10 Try to write neat transaction files.

11 Be efficient: Use the output of one feature as the input of a new feature.

12 Know your Types: Variable Types (string, bool, int, etc) and GC Types (IPoint, ISolid, etc).

13 Replication is a more efficient and controllable way to copy.

Welcome to GenerativeComponents 34 Aug-10Copyright © 2010 Bentley Systems, Incorporated

Page 41: Generative Components Quick Start Guide

Putting it Together

Module Overview

The following exercise will have you use several aspects of GenerativeComponents to create an rig and support structure for a free form roof/tunnel. You will start by building one rig and the replicating it along a curve and use the rig endpoints as attachment points for a surface. The surface is then converted to polygons and the polygon vertices are then used as attachments for a crossbar structure. You will create and attach the crossbars and finally, you will edit the base curve and see how the associativity works.

Aug-10 35 Putting it Together

Copyright © 2009 Bentley Systems, Incorporated

Page 42: Generative Components Quick Start Guide

Module Prerequisites

Module Prerequisites

• Knowledge of Features, Functions and Transactions

Module Objectives

After completing this module, you will be able to:

• Apply more features and functions to your designs

• Build a Tunnel with Crossbar roof

Free Form Surfaces

Free form surface, or free form surfacing, is used in CAD and other computer graphics software to describe the skin of a 3D geometric element. Freeform surfaces do not have rigid radial dimensions, unlike regular surfaces such as planes, cylinders and conic surfaces. Most systems today use nonuniform rational B-spline (NURBS) mathematics to describe the surface forms; however, there are other methods such as Gorden surfaces or Coon surfaces.

The forms of free form surfaces (and curves) are not stored or defined in CAD software in terms of polynomial equations, but by their poles, degree, and number of patches (segments with spline curves). The degree of a surface determines its mathematical properties, and can be seen as representing the shape by a polynomial with variables to the power of the degree value. For example, a surface with a degree of 1 would be a flat cross section surface. A surface with degree 2 would be curved in one direction, while a degree 3 surface could (but does not necessarily) change once from concave to convex curvature. Some CAD systems use the term order instead of degree. The order of a polynomial is one greater than the degree, and gives the number of coefficients rather than the greatest exponent.

Tunnel with a Crossbar Roof

The exercise will start with a new file and all geometry will be defined.

Exercise: Create a new file

Putting it Together 36 Aug-10Copyright © 2009 Bentley Systems, Incorporated

Page 43: Generative Components Quick Start Guide

Tunnel with a Crossbar Roof

1 Select the New File icon or File > New.

2 Arrange the windows in such a way that they don't overlap and both the Symbolic view and the Geometric view are visible as well as the GC control panel.

3 Save the file with the name tunnel.dgn.

Remember that GC does not save geometry, but the instructions to generate geometry, so the .gct file cannot be opened in GenerativeComponents or other CAD programs directly.

To begin the model select the Create Point tool and place four points in an isometric view. These points are the base for the path that goes through the landscape.

Exercise: Placing the Path Control Points

1 Select Create Point and place four points. in the Isometric view.

2 Select New Feature.

3 Click on the BSplineCurve feature and expand it.

Aug-10 37 Putting it TogetherCopyright © 2009 Bentley Systems, Incorporated

Page 44: Generative Components Quick Start Guide

Tunnel with a Crossbar Roof

4 From the available feature method (the different possible ways to create this feature based on various combinations of inputs) select ByPoles.

The Poles variable expects a List of points to create a BSplineCurve. The syntax for a List in GC is: {point1, point2, point3} where each element is separated by commas between opening and closing curly brackets {}.

5 In order to construct the list of points, click in the Poles input field.

6 To select an existing feature, hold down the Ctrl key, then hover over the point in the Geometric or Symbolic view until the name of the feature appears in the input window. Clicking will confirm the selection and add a comma. Repeat until all four points are filled in, then press Enter to confirm the selection.

7 In the Order field fill in: 3.

This is the order of the BSplineCurve. The Order is maximum the number of Control Points, which is 4. It defines the type of curve that is constructed from the point, an Order of 2 would create a line. Maximum order is 15 and minimum is 2.

8 To complete the command click OK.

Putting it Together 38 Aug-10Copyright © 2009 Bentley Systems, Incorporated

Page 45: Generative Components Quick Start Guide

Tunnel with a Crossbar Roof

You should now see a BSplineCurve that follows the control polygon defined by the four points.

9 Record User Changes into Transaction file.

The next step is to create some working planes that are parallel and perpendicular to the path.

Exercise: Creating the Planes

1 Click Create Feature, or click Create New.

2 Select Feature Type Plane and select the Update Method as ByParameterAlongCurve.

3 Select BSplineCurve01 by holding down the Ctrl key as your Curve.

4 For the T Parameter, type in 0.5, and then press Enter.

Aug-10 39 Putting it TogetherCopyright © 2009 Bentley Systems, Incorporated

Page 46: Generative Components Quick Start Guide

Tunnel with a Crossbar Roof

5 Use Edit Feature and select plane01, then right click on the T variable and make sure the free option is checked so the plane can be moved along the curve for testing.

6 Select the Move Feature and click on the red circle handle that is around the plane you just created. and test the attachment to the curve.

Now you will create a second plane that will be horizontal at all times.

7 Select Create Feature and choose Plane and choose ParallelToPlaneThroughPoint as the Update Method.

For the Origin, you want the new Plane to follow the initial Plane on the path so you can intersect the two.

8 Select plane01 using the Ctrl key, as the origin.

As the ReferencePlane, you will use the baseCS.XYPlane of the baseCS CoordinateSystem.

9 First select the baseCS, pressing the Ctrl key, and then type a period after the feature name.

A menu containing valid parameters opens.

10 Select the XYPlane from that list by double clicking on it and then click OK.

11 Record User Changes into Transaction file.

Putting it Together 40 Aug-10Copyright © 2009 Bentley Systems, Incorporated

Page 47: Generative Components Quick Start Guide

Tunnel with a Crossbar Roof

This should create the second Plane, plane02 at the same location as plane01 but with a different orientation.

The next step is to create one inverted "T" cross section of the roof along the path. In order to complete the roof you will construct one cross section first and later replicate it along the path. For the section you need a plane that is perpendicular to the path and one that is parallel to the horizontal component of the path.

Now you can use plane02 to create a line that defines the height of the roof.

Exercise: Creating one sample "T" cross section

1 Select Create Feature, choose the Line feature, and as the Update Method choose ByStartPointDirectionLength.

2 The StartPoint is plane01, the direction is the plane02 (a plane is basically a vector normal to the plane at its origin and therefore can be used as a direction). As Length use a fixed number to start with, depending on the scale of your model, for example, 3 then click OK.

Aug-10 41 Putting it TogetherCopyright © 2009 Bentley Systems, Incorporated

Page 48: Generative Components Quick Start Guide

Tunnel with a Crossbar Roof

If you want to jump ahead use the expression 5-plane01.Z instead, which makes the length responsive to the path. The 5 ensures that the top of the roof is at least 5 units above ground plane.

Creating the ribs or outrigger of the roof you need to first define the direction the cross members should be pointing to. You can derive this direction from intersecting the two planes you already have, since their intersection will create a Direction that is always horizontal and always perpendicular to the curve.

3 To create a Direction, select the feature type Direction and the PlaneIntersection method. Fill in plane01 and plane02 and click OK.

Now that you have the direction of the ribs, you can create two lines that point in opposite directions from the planes.

4 Select the Line feature and the ByStartPointDirectionLength method. The StartPoint is plane01 and the Direction is the direction01. As the length, use a fraction of the length of the vertical line. In order to create that reference you select the vertical line line01 then enter a period to access valid parameters, and double click on Length. Multiply the result by 0.5. The final expression should look like this:

Length = line01.Length * 0.5

5 Click Apply, not OK, to keep the dialog open, because you need it for the next step.

6 To repeat the line to the other side you can use the Create Copy button to the left of Apply.

Create Copy keeps the current values but creates a new Line instance.

7 The only change you need to make is inverting the direction of the Line by changing the Length from 0.5 to -0.5 and pressing OK.

Putting it Together 42 Aug-10Copyright © 2009 Bentley Systems, Incorporated

Page 49: Generative Components Quick Start Guide

Tunnel with a Crossbar Roof

8 You should see an upside down T now, which is the roof section.

9 Record User Changes into Transaction file.

Now you will replicate the single section multiple times along the curved path. You can replace a single input value for a feature with a List of values, which causes anything that depends on that feature to be replicated for each of the values in the array. In this case you will use the T parameter of plane01. Instead of a single T = 0.3 value you will replace it with a List of values. The syntax for a list requires curly brackets and coma separated values. T = {0, 0.2, 0.4, 0.6, 0.8, 1.0}.

Exercise: Replicate the Section along the curve

1 To change the T value you use Edit Feature on plane01. Select the Edit Feature tool and click on plane01 (the plane with the red handle circle).

2 In the edit window click on the T value and replace the single value T = 0.3 with the list, T = {0, 0.2, 0.4, 0.6, 0.8, 1.0}

3 Click Apply and observe what happens to the section.

It will replicate along the curve for as many times as there are values in the List.

Aug-10 43 Putting it TogetherCopyright © 2009 Bentley Systems, Incorporated

Page 50: Generative Components Quick Start Guide

Tunnel with a Crossbar Roof

4 Alternatively you could also use the function Series(0,1.0,0.1) here, a function that generates the list for you.

5 Record User Changes into Transaction file.

You can now use the Lists of Line.Endpoint’s of the sections to define a BSplineSurface, which will be the design surface for the roof.

Exercise: Creating a Surface from the Line.EndPoints

1 To create a BSplineSurface select it from the feature list. As the Update Method select ByPoints.

One could also use ByPoles but then the surface would not pass through the high point.

For the Points input you need to create a nested List. A nested list is of rank 2, which means it is a list of lists, which is essentially Lists nested inside another List. For instance { {0, 0.2, 0.3}, {0.1, 0.5, 0.4} } But here you need references to Points instead of numbers so you can construct the surface.

Putting it Together 44 Aug-10Copyright © 2009 Bentley Systems, Incorporated

Page 51: Generative Components Quick Start Guide

Tunnel with a Crossbar Roof

2 The lines are replicated already and therefore form Lists of Lines. Therefore their EndPoints are also Lists, so you can reference to them directly. For example, line01.EndPoint is such a List.

3 line01.Endpoint[0] would refer to line01's EndPoint only so you need to remove the index ( [0] ). To construct a nested List of points you need to construct a List of the EndPoint's of line01, line03 and line02 The expression should look like this

Points = {line02.EndPoint, line01.EndPoint, line03.EndPoint}

4 Be sure to remove the [0] indexes after selecting the lines with the Ctrl key, since you want the entire List of endpoints, and not just one.

5 Record User Changes into Transaction file.

Currently the roof height is constant in height and width even as the path goes up and down. To make it more interesting you can make it responsive to the undulation of the path. To do so, you replace the fixed length of the vertical line, line01, of the sections with an expression that calculates the height as a function

Aug-10 45 Putting it TogetherCopyright © 2009 Bentley Systems, Incorporated

Page 52: Generative Components Quick Start Guide

Tunnel with a Crossbar Roof

of the desired maximum height of the roof and the height of it base point along the path.

Exercise: Making the Roof Height Responsive to the Path Elevation

1 Edit the vertical line line01 by selecting on the Edit Feature tool and then the line. or select the line in the Symbolic diagram.

2 In the length field of the line subtract the Z value of plane01 from a fixed value. This value will be the maximum elevation of the roof in absolute Z of the baseCS CoordinateSystem: Length=5-plane01.Z.

This will adjust the height of the roof so that it will always exactly reach the height of absolute 5 in the Z-Axis of the baseCS. This is possible because the simple equation varies the line01.Length to compensate for the ups and downs of the path.

3 Use the move command to vary the initial four point’s height and position to see the roof respond.

4 This completes building the roof surface - the next step explains how to create a users defined component and populate it on the surface.

5 Record User Changes into Transaction file.

Additional steps could be placing a grid of components on the surface that responds to the distortions of the roof.

You will see one way to place a user defined cross bar panel along the surface using a point grid on the surface and a intermediary ShapeGrid.

Exercise: Creating a User Defined Roof Panel

You will first place a point on the roof surface.

Putting it Together 46 Aug-10Copyright © 2009 Bentley Systems, Incorporated

Page 53: Generative Components Quick Start Guide

Tunnel with a Crossbar Roof

1 Use the Create Point and hold down Ctrl before clicking on the BSplineSurface. Click to place it anywhere on the surface.

2 Once the point is placed on the surface use the Edit Feature command to edit the point.

3 Replace the current U and V value with a Series functions to obtain a grid of point rather then a singular point.

U should be set to U = Series(0.0,1.0,0.05)

V should be set to V = Series(0.0,1.0,0.1)

4 Click Apply.

5 You will see a diagonal set of points. In order to get the full grid of points you need to toggle the replication option of the point. Choose the Toggle Replication command and click on the points once. That should turn the diagonal into a full grid of points.

Next you create a Polygon.ByPointGrid based on the point grid just created. This grid serves as the placement method for a diagonal cone grid of the roof.

Aug-10 47 Putting it TogetherCopyright © 2009 Bentley Systems, Incorporated

Page 54: Generative Components Quick Start Guide

Tunnel with a Crossbar Roof

6 Select the feature Polygon and as the creation method used ByPointGrid. Set the PointGrid variable to the point you just created on the surface, most likely point05. Remove the curly braces, {}. When selecting the point make sure to erase the index's [0][1] to get the entire array not just one point of it.

7 Record User Changes into Transaction file.

Next you will create a simple crossbar panel. You use a placeholder shape to create it on the side. Then you create a new feature from it. After that you can use the new feature to populate the roof surface using the grid of shapes instead of the placeholder as the input to the crossbar panel. This will create an elegant lattice as a roof, which still can be manipulated moving the initial four points of the path.

Exercise: Creating the geometry of a Crossbar

In order to create a crossbar feature you first have to create a placeholder to simulate the roof input point grid.

Putting it Together 48 Aug-10Copyright © 2009 Bentley Systems, Incorporated

Page 55: Generative Components Quick Start Guide

Tunnel with a Crossbar Roof

1 Place four planar points in a square configuration away from the roof using the point shortcut.

2 Using those points create a Polygon from the feature list using the ByVertices as the Update Method. The input needs to be in the form of a list of points.

Vertices = {point06, point07, point08, point09}

3 After creating the shape, hide the original points using the Toggle Visibility command. This is so you do not accidentally select them. Use the Symbolic view for easier selection.

In order to be able to replicate the Generated Feature Type (a generative component) using a polygon grid you need to use only the polygon vertices as input, not the underlying points.

4 Create the crossbar members by first creating a diagonal line in each direction. Select the Line feature from the list and create it using the ByPoints Update Method. As StartPoint type in: polygon02.Vertices[0] and EndPoint is: polygon02.Vertices[2]

5 For the other diagonal click Apply and then the Create Copy button and replace [0] with [1] and [2] with [3] in the Vertices index.

Remember that a Polygon counts its Vertices in a circular fashion, not row by row. In this case you have four vertices therefore the index goes from 0-3. You now have a diagonal cross.

6 Add a Cone feature from using the Update Method ByLine.

As the Line use the diagonal. As the starting radius you do not want a fixed number as the scale of the component is not fixed. In order to make it responsive you need to tie the radius proportionally to the length of the diagonal.

7 Set StartRadius = line04.Length/25.0

Aug-10 49 Putting it TogetherCopyright © 2009 Bentley Systems, Incorporated

Page 56: Generative Components Quick Start Guide

Tunnel with a Crossbar Roof

25 is an arbitrary scaling factor to scale down the radius, feel free to adjust it. Repeat for EndRdius. Also, repeat adding a cone to the other diagonal as well.

8 Record User Changes into Transaction file.

Extra: Add a Graph Variable to control the cone radii.

Think of other geometry besides a crossbar that you can substitute here.

Exercise: Creating a Generated Feature Type from the Crossbar

1 Now you create a new user defined feature from the crossbar. To do so, select the Generate Feature Type tool.

The Generate Feature Type window opens.

2 Click on Select from Model to select the geometry of the new feature.

3 The symbolic model turns grey to prepare for the selection. As input, choose the placeholder polygon (polygon02) you created for the component. Click OK.

In the Symbolic view you see the line and cone icons in green, which confirms your selection. This will be the Output of the new feature, the input, the shape appears in cyan.

4 In the Generate Feature Type dialog, be sure to enable the Replicatable check box in the input list for the shape.

This makes it possible to multiple shapes as inputs and not just one.

5 Enable the Construction check box for the two diagonal lines so you don’t see the lines in the final placed crossbar feature check.

6 Enable Make this feature available in future sessions.

7 Name the feature, crossbar01 in the Type name field.

Add a number as you are likely to create several versions and it becomes hard to distinguish them in the feature list.

Putting it Together 50 Aug-10Copyright © 2009 Bentley Systems, Incorporated

Page 57: Generative Components Quick Start Guide

Tunnel with a Crossbar Roof

8 Click OK to create the new feature.

9 Record User Changes into Transaction file.

In the final step, place the new feature crossbar01 onto the polygon grid on the roof.

Exercise: Placing the generated feature

1 Select Create Feature.

It lists the new feature you just created called crossbar01.

2 Use the ByDefault update method and select the grid of shapes on the BSplineSurface, polygon01 as the input.

Be sure to remove the index square brackets when selecting the polygon01 with the Ctrl key, as you want to use all shapes, not just one.

3 Click OK and you will see the crossbar grid populating the surface.

4 Toggle Visibility on the shape grid polygon01 in order to see the crossbar01 grid more clearly.

Aug-10 51 Putting it TogetherCopyright © 2009 Bentley Systems, Incorporated

Page 58: Generative Components Quick Start Guide

Tunnel with a Crossbar Roof

5 Shade the view by selecting the Set View Display Mode and Smooth as the shading type.

6 Record User Changes into Transaction file.

Optional exercises: Further editing and adjustments

Try some of the following to see the dynamic nature of the design.

1 Use the Pyramid feature type you created earlier in the class. It, too, is looking for a polygon input type.

2 Adjust the Series function for U and V for the point on the surface (point05) by adding finer increments. For example, change to Series(0,1.01,0.25).

3 Adjust the line length equation.

4 In order to be able to move the initial points you may want to toggle the BSplineSurface update property to Deferred using the Toggle Deferral tool. Click on the bSplineSurface01 in the Symbolic tree model. Since it is hidden, you cannot select it from the geometry model). This will cause the

Putting it Together 52 Aug-10Copyright © 2009 Bentley Systems, Incorporated

Page 59: Generative Components Quick Start Guide

Tunnel with a Crossbar Roof

BSplineSurface and all its children (the crossbar etc.) to not update while moving the path points. Once the path is adjusted, you need to toggle the deferred property of the surface again to update its position.

Aug-10 53 Putting it TogetherCopyright © 2009 Bentley Systems, Incorporated

Page 60: Generative Components Quick Start Guide

Tunnel with a Crossbar Roof

Putting it Together 54 Aug-10Copyright © 2009 Bentley Systems, Incorporated

Page 61: Generative Components Quick Start Guide

Learning More

Module Overview

You have finished the exercises in this guide! Congratulations on making it to this point.

Are you ready to begin working on projects with GenerativeComponents? Probably not. This guide covers only a small subset of GenerativeComponents concepts and tools, and the examples are rather simplistic.

The information provided in this chapter will help you decide how to proceed:

• You will learn about paths you can take toward productivity with GenerativeComponents

• You will be introduced to additional concepts and tools that are likely to becritical to your understanding and productivity

Professional Training from The Bentley Institute

The Bentley Institute offers professional training for users who want to master GenerativeComponents and other Bentley software products. It is a global learning community that educates and sustains current and future generations of infrastructure professionals.

The following types of training are offered by the Bentley Institute:

• OnDemand eLearning

• Live training

Aug-10 55 Learning More

Copyright © 2009 Bentley Systems, Incorporated

Page 62: Generative Components Quick Start Guide

The GenerativeComponents learning path

OnDemand eLearning

OnDemand eLearning delivery options include:

• more than 1,100 video lectures

• hands-on courses totaling more than 7,300 hours of learning

Live training

Live hands-on training is delivered by Bentley experts in regularly scheduled courses. Delivery options include:

• Virtual classroom — improve your skills online while eliminating trainingr related travel time and cost

• Local classroom — receive instruction in a traditional classroom setting

The GenerativeComponents learning path

The GenerativeComponents learning path is the Bentley Institute’s recommended progression of professional development for infrastructure professionals who use GenerativeComponents products.

Browse to http://www.bentley.com/LearningPaths

and follow the link to the GenerativeComponents learning path. From there you can follow links to register for course offerings.

Your first step along the GenerativeComponents learning path will be either the GenerativeComponents Essentials course.

GenerativeComponents Essentials

Learning More 56 Aug-10Copyright © 2009 Bentley Systems, Incorporated

Page 63: Generative Components Quick Start Guide

The GenerativeComponents learning path

Designed for a new GenerativeComponents user without previous experience, this course teaches the concepts, tools, and features of the GenerativeComponents design environment.

The GC Essentials course will take students through the principles of design with GenerativeComponents. Students will become familiar with installation, general interface principles, basic geometric generation, basic scripting and importing/exporting data, with an emphasis on many design problems.

Upon completion of the course users will be able to:

• Install and set up GenerativeComponents

• Use GenerativeComponents tools to create geometry

• Apply principles of Transactional and Programmatic design

• Import and Export with Excel and databases

• Use principles of scripting to design

• Integrate GenerativeComponents design with their CAD workflow

GenerativeComponents Basic Scripting

Learn the basics of GCScript and scripting in general. This video covers the basic concepts and reviews how to create and use Functions, and cover basic looping and conditional statements. A brief introduction to GC and .NET is also discussed.

Upon completing this course, you will be able to:

• Recognize the value of basic scripting

• Develop basic Functions

• Begin to use .NET and GC

Aug-10 57 Learning MoreCopyright © 2009 Bentley Systems, Incorporated

Page 64: Generative Components Quick Start Guide

The GenerativeComponents learning path

Learning More 58 Aug-10Copyright © 2009 Bentley Systems, Incorporated