Professional Documents
Culture Documents
GenerativeComponents Principles
Valentines Day 2012 Volker Mueller
Research Director
GenerativeComponents Principles
A quick introduction to the most important things you need to know about GC Status:GC 8.11.9.93
2 | WWW.BENTLEY.COM
3 | WWW.BENTLEY.COM
4 | WWW.BENTLEY.COM
GenerativeComponents is a change propagation system. Changes are propagated through a dependency graph (the Graph). Graph is directed and acyclic = directed acyclic graph = DAG. Graph needs a (logical) starting point = baseCS.
5 | WWW.BENTLEY.COM
A Starting Point
Theoretical geometry gives us an infinite universe as a blank canvas. There is no inherent concept of up, or of where we are in this space.
We add a grid to provide some orientation.
6 | WWW.BENTLEY.COM
Theoretical geometry gives us an infinite universe as a blank canvas. There is no inherent concept of up, or of where we are in this space.
We add a grid to provide some orientation. We add a coordinate system baseCS to provide A Starting Point for the geometry, too.
7 | WWW.BENTLEY.COM
The most common way of describing space is the Cartesian grid with {X, Y, Z} coordinate triples.
8 | WWW.BENTLEY.COM
The most common way of describing space is the Cartesian grid with {X, Y, Z} coordinate triples.
9 | WWW.BENTLEY.COM
The most common way of describing space is the Cartesian grid with {X, Y, Z} coordinate triples.
The positive direction of the Z axis is considered up in infrastructure design.
10 | WWW.BENTLEY.COM
11 | WWW.BENTLEY.COM
A CoordinateSystem in GC determines
12 | WWW.BENTLEY.COM
A CoordinateSystem in GC determines
(a) A location (X, Y, Z), often at X, Y, and Z = 0 for the baseCS. (b) Three axes, normal to each other.
13 | WWW.BENTLEY.COM
A CoordinateSystem in GC determines
(a) A location (X, Y, Z), often at X, Y, and Z = 0 for the baseCS. (b) Three axes, normal to each other. (c) Three planes, spanned by pairs of the X, Y, Z direction vectors for 3 planes (XY, XZ, YZ), therefore, perpendicular to each other (b).
14 | WWW.BENTLEY.COM
A CoordinateSystem in GC determines
15 | WWW.BENTLEY.COM
16 | WWW.BENTLEY.COM
17 | WWW.BENTLEY.COM
This is a GC CoordinateSystem.
It is the Starting Point for the geometric model. and for the Graph.
18 | WWW.BENTLEY.COM
This is a GC CoordinateSystem.
It is the Starting Point for the geometric model. and for the Graph.
19 | WWW.BENTLEY.COM
This is a GC CoordinateSystem.
20 | WWW.BENTLEY.COM
22 | WWW.BENTLEY.COM
24 | WWW.BENTLEY.COM
25 | WWW.BENTLEY.COM
27 | WWW.BENTLEY.COM
28 | WWW.BENTLEY.COM
29 | WWW.BENTLEY.COM
drag
2012 Bentley Systems, Incorporated
30 | WWW.BENTLEY.COM
drop
2012 Bentley Systems, Incorporated
31 | WWW.BENTLEY.COM
wire
2012 Bentley Systems, Incorporated
32 | WWW.BENTLEY.COM
wire
2012 Bentley Systems, Incorporated
34 | WWW.BENTLEY.COM
generate result
2012 Bentley Systems, Incorporated
35 | WWW.BENTLEY.COM
generate result
2012 Bentley Systems, Incorporated
3 Modes
Model, Graph, GC-Script
36 | WWW.BENTLEY.COM
1: Model
2: Graph
2012 Bentley Systems, Incorporated
2
37 | WWW.BENTLEY.COM
1: Model
2: Graph 3: Editable input properties / expressions.
2012 Bentley Systems, Incorporated
23
38 | WWW.BENTLEY.COM
1: Model
2: Graph 3: Editable input properties / expressions.
2012 Bentley Systems, Incorporated
23
39 | WWW.BENTLEY.COM
1: Model
2: Graph 3: Editable input properties / expressions. Editable Transaction Script.
2012 Bentley Systems, Incorporated
3 2 33 1
40 | WWW.BENTLEY.COM
3 Methods
Left to right, right to left, hybrid
41 | WWW.BENTLEY.COM
Left to right
Left to right
Left to right
Left to right
Left to right
Left to right
Right to left
Right to left
Right to left
Right to left
Right to left
Right to left
Right to left
Right to left
Relationships/Dependencies
Directed Acyclic Graph (DAG) Propagation System
68 | WWW.BENTLEY.COM
Dependency Graph.
2012 Bentley Systems, Incorporated 69 | WWW.BENTLEY.COM
Dependency Graph.
We are interested in relationships, not just where and how big things are.
2012 Bentley Systems, Incorporated
70 | WWW.BENTLEY.COM
Dependency Graph.
We are interested in relationships, not just where and how big things are. Move point01 and cone01 as well as line01 move, too.
2012 Bentley Systems, Incorporated
71 | WWW.BENTLEY.COM
Dependency Graph.
We are interested in relationships, not just where and how big things are. Move point01 and cone01 as well as line01 move, too.
2012 Bentley Systems, Incorporated
72 | WWW.BENTLEY.COM
Input?
Graphic or typing?
73 | WWW.BENTLEY.COM
Like a spreadsheet.
2012 Bentley Systems, Incorporated 75 | WWW.BENTLEY.COM
Like a spreadsheet.
5
5+2 Sin(5)
Function
76 | WWW.BENTLEY.COM
Like a spreadsheet.
5
5+2 Sin(5)
Function
77 | WWW.BENTLEY.COM
Like a spreadsheet.
5
5+2 Sin(5)
Function
78 | WWW.BENTLEY.COM
Like a spreadsheet.
5
5+2 Sin(5) (1/Sin(5)) + 90
Single values. Simple expressions. Functions drag & drop Complex expressions follow BODMAS
79 | WWW.BENTLEY.COM
B O
( )
Brackets first Orders (Powers, Roots) Division and Multiplication (left to right) Addition and Subtraction (left to right) xy Pow(x,y)
2
DM / * AS + Power: Root:
3
expl. x Pow(x,0.5)
x Sqrt(x) x Pow(x,(1/3))
80 | WWW.BENTLEY.COM
B O
( )
Brackets first Orders (Powers, Roots) Division and Multiplication (left to right) Addition and Subtraction (left to right) = = = ? ? ?
DM / * AS + -
15 / ( 3 + 2) 15 / 3 + 2 ( 15 / 3) + 2
81 | WWW.BENTLEY.COM
B O
( )
Brackets first Orders (Powers, Roots) Division and Multiplication (left to right) Addition and Subtraction (left to right) = = = 3 7 7
DM / * AS + -
15 / ( 3 + 2) 15 / 3 + 2 ( 15 / 3) + 2
82 | WWW.BENTLEY.COM
5
5+2 Sin(5) (1/Sin(5)) + 90 dave dave*2
83 | WWW.BENTLEY.COM
Value
dave = 8
Once a variable is defined (named) it can take on a value and be used in place of a value.
Simple expression
Named variable
Objects
Everything is an object
84 | WWW.BENTLEY.COM
Including variables.
dave = 8
In computing, objects are not equal. They have Type.
85 | WWW.BENTLEY.COM
Types
What objects are
86 | WWW.BENTLEY.COM
Each kind of freight requires a matching kind of freight car. Computers are similarly picky, they only deal with what they have been prepared to handle. In some computer languages, type declares the what of a data object.
87 | WWW.BENTLEY.COM
88 | WWW.BENTLEY.COM
true, false whole numbers (0, 5, -4, 1000, -503) real or decimal numbers (0.5, -7.8, 15.0, 158.543679789) some text (hello world, 450, dave)
89 | WWW.BENTLEY.COM
Object-oriented computing implements the idea that data and their methods are bundled in packages, as classes.
A Class is a data type that includes the methods that construct (create and initialize) instances, manipulate the data contained in them, and destruct them at end of their lifecycle.
Data contained in a class instance may be exposed as instance properties.
Methods also determine how class instances behave, i.e. how they react to changes of their properties.
In GC classes are called features; methods are called techniques.
90 | WWW.BENTLEY.COM
Classes
Point Plane CoordinateSystem Direction Line Curve BSplineSurface Solid Generated Feature Type
91 | WWW.BENTLEY.COM
GC node types
GC node types
94 | WWW.BENTLEY.COM
GC node types
Properties
How objects are
95 | WWW.BENTLEY.COM
Features have properties. They can be simple variable types or sub-features. The dot operator (via dotNet, Microsoft) accesses feature.properties. Property myCoordinateSystem.Name = point01 myCoordinateSystem.XYPlane.X = 5.35 myCoordinateSystem.XYPlane.IsReplicated = false Type string double bool(ean)
feature
property
96 | WWW.BENTLEY.COM
Properties
97 | WWW.BENTLEY.COM
Properties
They are accessed through the Inputs and Outputs port editors on a features node.
98 | WWW.BENTLEY.COM
Properties
They are accessed through the Inputs and Outputs port editors on a features node.
99 | WWW.BENTLEY.COM
Properties
They are accessed through the Inputs and Outputs port editors on a features node.
100 | WWW.BENTLEY.COM
Properties
They are accessed through the Inputs and Outputs port editors on a features node.
101 | WWW.BENTLEY.COM
Properties
They are accessed through the Inputs and Outputs port editors on a features node.
102 | WWW.BENTLEY.COM
Properties
103 | WWW.BENTLEY.COM
Properties Ports
Default input properties for the active technique are visible as ports to which connections can be made.
104 | WWW.BENTLEY.COM
Properties Ports
Default input properties for the active technique are visible as ports to which connections can be made.
105 | WWW.BENTLEY.COM
Properties Ports
Default input properties for the active technique are visible as ports to which connections can be made.
106 | WWW.BENTLEY.COM
Properties Ports
Default input properties for the active technique are visible as ports to which connections can be made.
107 | WWW.BENTLEY.COM
Properties Ports
Default input properties for the active technique are visible as ports to which connections can be made.
108 | WWW.BENTLEY.COM
Properties Ports
Default input properties for the active technique are visible as ports to which connections can be made.
109 | WWW.BENTLEY.COM
Properties Ports
Additional output properties may be exposed as ports pinned to the node, too.
110 | WWW.BENTLEY.COM
Properties Ports
Additional output properties may be exposed as ports pinned to the node, too.
111 | WWW.BENTLEY.COM
Properties Ports
112 | WWW.BENTLEY.COM
However, you can sometimes stuff one data type into another slot (casting) but the type is generally a good hint as to what is required.
There are some specific casting functions.
In GC, casting works only for simple variable types, not for feature types.
113 | WWW.BENTLEY.COM
Interfaces draw on similar properties and methods of feature types to let us use one feature type in place of another one.
This softens the class boundaries for more flexible modeling options. Interfaces are prefixed with an I.
114 | WWW.BENTLEY.COM
CoordinateSystem is like a Point because of X,Y,Z location. Plane is like a Direction because of Planes normal vector. Etc.
115 | WWW.BENTLEY.COM
Lists
Collecting stuff, retrieving it, and leveraging its power
116 | WWW.BENTLEY.COM
{,,,,,,}
[0] [1] [2] [3]
[4]
117 | WWW.BENTLEY.COM
Lists
[0]
[1]
[2]
[3]
[4]
118 | WWW.BENTLEY.COM
Lists
dave = {A,B,C,D,E,F,G}
[0] [1] [2] [3] [4] [5] [6]
Then we can refer to any item of that list individually by its index. Remember to count indices from 0.
dave[4] = ?
dave[4] = E
119 | WWW.BENTLEY.COM
Lists
Multiple Dimensions
Geometry and data
120 | WWW.BENTLEY.COM
Geometry
Data
0 1 2 3
121 | WWW.BENTLEY.COM
Dimensions
Lists use nested Curly Brackets { } to indicate dimensionality of their nesting (property: List.Rank).
0d a1 1d {a1,a2,a3} 2d {{a1,a2,a3},{b1,b2},{c1,c2,c3,c4}} 3d {{{a1,a2,a3,a4,a5},{b1,b2}}, {{{c1,c2,c3},{d1,d2,d3,d4,d5,d6}}, {{{e1},{f1,f2},{g1,g2,g2}}, {{{h1,h2,h3,h4},{i1,i2,i3},{j1,j2}}} Nd {{{{{a,a,a},{b,b}},{c,c,c}}},{d,d,d},{{{e}}}, etc }
123 | WWW.BENTLEY.COM
Multi-Dimensional Lists
Replication
The Power of Lists in GenerativeComponents
124 | WWW.BENTLEY.COM
125 | WWW.BENTLEY.COM
REPLICATION
{3,4,4.5,5}
126 | WWW.BENTLEY.COM
REPLICATION
{3,4,4.5,5}
127 | WWW.BENTLEY.COM
REPLICATION
{3,4,4.5,5}
128 | WWW.BENTLEY.COM
REPLICATION
(repl.) = replicatable
129 | WWW.BENTLEY.COM
2
YTranslation: double (repl.)
130 | WWW.BENTLEY.COM
{2,4,6,8}
[0] [1] [2] [3]
[0]
[1]
[2]
[3]
131 | WWW.BENTLEY.COM
{2,4,6,8}
[0] [1] [2] [3]
[0]
[1]
[2]
[3]
{2,4,6,8}
[0] [1] [2] [3]
132 | WWW.BENTLEY.COM
{2,4,6,8,10,12}
[0] [1] [2] [3] [4] [5]
[0]
[1]
[2]
[3]
{2,4,6,8}
[0] [1] [2] [3]
[0][3]
[1][3]
[2][3]
[3][3]
[4][3]
[5][3]
[1][2]
[2][2]
[3][2]
[4][2]
[5][2]
[1][1]
[2][1]
[3][1]
[4][1]
[5][1]
{2,4,6,8,10,12}
[0] [1] [2] [3] [4] [5]
[0][0]
[1][0]
[2][0]
[3][0]
[4][0]
[5][0]
{2,4,6,8}
[0] [1] [2] [3]
Observations:
135 | WWW.BENTLEY.COM
Observation:
0d 1d 1d 2d 3d nd
4d 10000
Observation:
0d 1d 1d 2d
1 30 30 900
Space
Euclidean Space, non-Euclidean Space, Coordinate Space (Cartesian, Cylindrical, Spherical), Parametric Space,
138 | WWW.BENTLEY.COM
Cartesian space Unless you are a quantum physicist or a theoretical mathematician, 3dimensional Cartesian space is all you will ever need (almost). Descartes added the orthogonal coordinate system to the principled Euclidian space.
139 | WWW.BENTLEY.COM
In Euclidian space (originally defined in 2d space, i.e. on a plane, eg. a sheet of paper) there are straight lines that can be parallel. In non-Euclidian space (eg.the surface of a sphere), Euclidian rules do not apply, for example, there are no straight lines (but arcs, circles, curves).
140 | WWW.BENTLEY.COM
141 | WWW.BENTLEY.COM
Line.EndPoint T = 1.0
T = 0.35
Line.StartPoint T = 0.0
Parameter Space This is an embedded space. From within the line the universe only extends as far as the end of the line. This space is defined as 1 unit (of self), regardless of its size externally. The parameter is the T value
142 | WWW.BENTLEY.COM
T = 1.0
T = 0.0
While on a Line the T-parameter space is homogenous, this is not the case for BSplineCurves. T = 0.5 is not necessarily the geometric centre, it is the parametric centre. Parametric distances between control points are equal, if they are equally weighted
143 | WWW.BENTLEY.COM
The analog is true for surfaces, with the 2d parameter space being a 1 by 1 square. Instead of the Cartesian 3d XYZ coordinates they are 2d UV coordinates.
144 | WWW.BENTLEY.COM
A UV coordinate tuple {0.2, 0.7} can be sampled into an XYZ coordinate triplet {x,y,z}, for example by placing a Point.ByParametersO nSurface().
UV = {0.2,0.7} XYZ = {70,30,3.969}
145 | WWW.BENTLEY.COM
One way to think about how UV parametric space deals with distortion is to draw a grid on a balloon and then blow it up & squeeze it about a bit. The grid changes shape, but the relationships (topology) stay the same.
146 | WWW.BENTLEY.COM
There are also update methods using cylindrical or spherical coordinate systems. These are handy for cylindrical and spherical things, but also for survey data.
147 | WWW.BENTLEY.COM
148 | WWW.BENTLEY.COM
The End
2012 Bentley Systems, Incorporated