Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00.05 --> 00:00:01.07
- [Instructor] The generator section
2
00:00:01.07 --> 00:00:03.05
of a generative design script
3
00:00:03.05 --> 00:00:06.01
is where geometry or elements are created
4
00:00:06.01 --> 00:00:09.07
to form a new potential solution within the study.
5
00:00:09.07 --> 00:00:11.05
So given a set of input data,
6
00:00:11.05 --> 00:00:14.01
the generators will generate something in the model,
7
00:00:14.01 --> 00:00:16.01
which can then be evaluated.
8
00:00:16.01 --> 00:00:19.03
I currently have the Revit and Dynamo exercise files open
9
00:00:19.03 --> 00:00:20.02
for this lesson,
10
00:00:20.02 --> 00:00:23.00
which is where we left off from in the last lesson.
11
00:00:23.00 --> 00:00:25.05
The only thing I've updated in our Dynamo file
12
00:00:25.05 --> 00:00:28.00
is I've renamed these sections
13
00:00:28.00 --> 00:00:30.09
so that they're a little bit more descriptive.
14
00:00:30.09 --> 00:00:36.00
We currently have a wall and some window data,
15
00:00:36.00 --> 00:00:39.02
along with two input sliders.
16
00:00:39.02 --> 00:00:41.09
Let's use these to create two generators.
17
00:00:41.09 --> 00:00:44.08
The first will generate points along the wall,
18
00:00:44.08 --> 00:00:45.09
which indicates the location
19
00:00:45.09 --> 00:00:48.01
that will place windows.
20
00:00:48.01 --> 00:00:51.03
The second will generate window volumes at these point
21
00:00:51.03 --> 00:00:53.09
to evaluate the size of the windows.
22
00:00:53.09 --> 00:00:56.02
I've already got the bones of this second generator
23
00:00:56.02 --> 00:00:59.05
with the script under this Generators section.
24
00:00:59.05 --> 00:01:02.00
We will need to update some of the inputs, however.
25
00:01:02.00 --> 00:01:04.09
So first, let's focus on the first generator.
26
00:01:04.09 --> 00:01:06.04
To generate the location points
27
00:01:06.04 --> 00:01:08.09
for the windows, we can use the location line
28
00:01:08.09 --> 00:01:10.05
of the wall to create points
29
00:01:10.05 --> 00:01:13.01
at equal lengths along the curve
30
00:01:13.01 --> 00:01:14.02
and to do that,
31
00:01:14.02 --> 00:01:18.05
we can use the PointsAtEqualSegmentLength's node.
32
00:01:18.05 --> 00:01:21.02
To find that node, let's right click the canvas
33
00:01:21.02 --> 00:01:25.00
and we'll search PointsAtEqualSegmentLength.
34
00:01:25.00 --> 00:01:28.01
Here it is.
35
00:01:28.01 --> 00:01:29.06
This node requires a curve
36
00:01:29.06 --> 00:01:31.05
and we can use that curve we retrieved
37
00:01:31.05 --> 00:01:33.06
in the last lesson,
38
00:01:33.06 --> 00:01:37.03
which should be in this Data Remember node here.
39
00:01:37.03 --> 00:01:38.05
So let's select that
40
00:01:38.05 --> 00:01:42.04
and we'll place it into the curve input.
41
00:01:42.04 --> 00:01:45.00
For the divisions or the second input,
42
00:01:45.00 --> 00:01:47.06
we want the number of segments along the curve
43
00:01:47.06 --> 00:01:49.00
and for this, we have the slider
44
00:01:49.00 --> 00:01:52.08
that we created, which is named Number Of Wall Segments.
45
00:01:52.08 --> 00:01:57.06
So let's select that and place it into the node.
46
00:01:57.06 --> 00:01:58.07
To view what this looks like,
47
00:01:58.07 --> 00:02:00.00
we can run the script.
48
00:02:00.00 --> 00:02:01.06
However, it's not going to work at the moment
49
00:02:01.06 --> 00:02:04.00
because we haven't selected a wall.
50
00:02:04.00 --> 00:02:07.07
So in Revit, let's use the Select Wall Element node
51
00:02:07.07 --> 00:02:11.07
and select the blank wall.
52
00:02:11.07 --> 00:02:13.00
Perfect.
53
00:02:13.00 --> 00:02:15.02
Now when we run our script,
54
00:02:15.02 --> 00:02:17.03
we can see the wall in the background.
55
00:02:17.03 --> 00:02:19.08
I'm going to switch my script to Auto
56
00:02:19.08 --> 00:02:21.08
so it updates automatically.
57
00:02:21.08 --> 00:02:26.01
And then I'm going to hide this wall geometry
58
00:02:26.01 --> 00:02:27.04
by right clicking the node
59
00:02:27.04 --> 00:02:29.07
and unselecting Preview.
60
00:02:29.07 --> 00:02:32.06
And I'll do the same for the Data Remember node.
61
00:02:32.06 --> 00:02:36.03
So now we can see that we have divided the wall
62
00:02:36.03 --> 00:02:37.08
into two segments,
63
00:02:37.08 --> 00:02:40.00
which is why there is one point on the line.
64
00:02:40.00 --> 00:02:43.02
And when we update the Number of Wall Segments node,
65
00:02:43.02 --> 00:02:47.09
we can see that changes.
66
00:02:47.09 --> 00:02:49.07
This is the first generator,
67
00:02:49.07 --> 00:02:52.07
which will allow the generative design study
68
00:02:52.07 --> 00:02:55.06
to generate different iterations of how many points
69
00:02:55.06 --> 00:02:58.00
are generated along the curve.
70
00:02:58.00 --> 00:03:01.02
That is how many windows are generated on the curve.
71
00:03:01.02 --> 00:03:02.04
So with these points,
72
00:03:02.04 --> 00:03:04.00
we can now generate the volumes
73
00:03:04.00 --> 00:03:05.06
of the windows, which we can use
74
00:03:05.06 --> 00:03:09.00
to determine whether windows are overlapping or not.
75
00:03:09.00 --> 00:03:09.09
For these volumes,
76
00:03:09.09 --> 00:03:14.01
we'll use this Cuboid By Lengths node here.
77
00:03:14.01 --> 00:03:16.02
First though, they need to be translated
78
00:03:16.02 --> 00:03:19.07
or moved up so that they are not positioned on the ground
79
00:03:19.07 --> 00:03:23.06
and this can be done with this Geometry.Translate node.
80
00:03:23.06 --> 00:03:26.07
So let's plug our points into this node,
81
00:03:26.07 --> 00:03:28.08
which is the geometry input.
82
00:03:28.08 --> 00:03:30.08
So now we can see in the background,
83
00:03:30.08 --> 00:03:32.04
our points have moved up
84
00:03:32.04 --> 00:03:36.02
and so let's update the Cuboid By Lengths node.
85
00:03:36.02 --> 00:03:39.05
For that, we need a width and height.
86
00:03:39.05 --> 00:03:42.00
And this is where we can use the width
87
00:03:42.00 --> 00:03:43.02
and height information
88
00:03:43.02 --> 00:03:46.09
that we retrieved in the last lesson.
89
00:03:46.09 --> 00:03:49.08
Using the List.GetItemAtIndex node,
90
00:03:49.08 --> 00:03:53.07
let's put the width into the width input
91
00:03:53.07 --> 00:03:58.05
and the height into the height input.
92
00:03:58.05 --> 00:04:01.06
Now if we preview the Cuboid By Lengths node,
93
00:04:01.06 --> 00:04:05.03
we can see we have two volumes in the background.
94
00:04:05.03 --> 00:04:07.03
When we update the window type,
95
00:04:07.03 --> 00:04:12.07
those volumes should change.
96
00:04:12.07 --> 00:04:14.05
We now have the generators set up
97
00:04:14.05 --> 00:04:18.01
to create the geometry needed to evaluate our designs.
98
00:04:18.01 --> 00:04:20.03
Next, let's look at how we can determine
99
00:04:20.03 --> 00:04:22.03
or evaluate whether one design
100
00:04:22.03 --> 00:04:24.03
is better or worse than the next.
7805
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.