Description
Key Learnings
- Learn about the prerequisite package and initial setup required for generative design in Civil 3D.
- Learn how to create the graph structure with initial input and output.
- Learn how to create study, assign methods, and set constraints for generative design.
- Learn how to run generative design in Civil 3D and explore outcomes.
Speakers
- Jowenn LuaAutodesk Expert Elite Alumni | 2016 Autodesk Gunslinger Syndey, Australia | 2018 Civil Infrastructure Inside the Factory Potsdam, Germany | 2020 Land Development Inside the Factory New Hampshire, USA | Jowenn is a Senior Principal Implementation Consultant at Autodesk. He holds a B.S. Civil Engineering degree from De La Salle University and MBA degree from Ateneo De Manila University. He has over 20 years industry experience in design and construction. He is highly skilled in Civil 3D, Dynamo and Subassembly composer. He provides technical workflow solutions, mentoring and support. Major projects he handled previously includes Sydney Metro TSE, SVC and OTS, Ballina Bypass (Pacific Highway), Brisbane Airport Link Northern Busway Tender Design, Gerringong Upgrade (Princess Highway) and Rozelle Interchange (WestConnex).
- NRNamit RanjanNamit is a highly passionate BIM professional who leads a team of Implementation Consultants in Bangalore, India. With an academic background in civil engineering, he possesses a wealth of knowledge and expertise in the fields of Building Information Modeling (BIM) and automation. Namit's extensive experience includes working on a wide range of projects related to Design Automation, Computational Design, and Generative Design. His innovative thinking and technical prowess have enabled him to streamline processes and drive efficiency in the design and construction industry. Namit's passion for leveraging technology to enhance project outcomes makes him a sought-after speaker in conferences like Autodesk University.
JOWENN LUA: Welcome to AU 2023. This class is Getting Started in Generative Design in Civil 3D, a Beginner's Guide. My name is Jowenn Lua and I'm here with my colleague, Namit Ranjan. Here's our safe harbor statement. This presentation is not intended to promise or guarantee any future delivery. Purchasing decisions shouldn't be made based on the reliance on these statements.
So let's start with a quick introduction about the speakers. I'm Jowenn Lua based in Sydney, Australia. I'm a principal implementation consultant from Autodesk and I have over 20 years industry experience in design and construction. I used to be a member of the Autodesk Expert Elite and a regular beta tester for Inside the Factory.
NAMIT RANJAN: Thank you, Jowenn. Hi, everyone. My name is Namit Ranjan. I'm from Bangalore, India. I'm a manager for Professional Services Consulting at Autodesk. I've been with this company for over five years now. And I have extensive industry experience in buildings and automation.
JOWENN LUA: We got four learning objectives for today. The first one is understand the prerequisite package and initial setup required for generative design in Civil 3D. The second is to create the graph structure with initial setup and output, basically understanding what are the essentials you will need to set up your generative design graphs. The third is to create study, assign method, and set constraint for generative design. Then we will run the generative design in Civil 3D and learn how to explore outcomes.
So what to expect in this class. We'll focus on the basic concept of generative design using Dynamo and Civil 3D. We have two in-action demos, which is the line slope generative design and the route finder generative design. And of course, the data set, all materials will be available for download. So let's start.
So what is generative design, or GD? It's a collaborative design process between humans and computer where the designer, or the humans, defines the design parameter, the inputs, outputs, goals, and algorithm that you will need for your generative design study. Then the computer produces the studies, which is your alternatives. It evaluates against quantifiable goals, improves the studies by using the result of previous one, and then rank the results based on how well they achieved the original goal. So that's generative design in a nutshell.
So it's also important to talk about the evolution of generative design automation. In the past, we use hand sketch drafting in creating blueprints. Then we evolved to using CAD, or computer-aided design, where here, the designer uses AutoCAD software and those an outcome, which is faster and more accurate.
Then it evolves to parametric design where we use products like Civil 3D and Revit to build parametric models where data and geometry are associated when creating an outcome. Then it evolves again to computational design, where here, we use Dynamo with our products to create additional functionality. So what are those additional functionalities?
As you can see, Dynamo is extremely efficient in manipulating data and geometry. So it uses that list expertise of DynamoDB to manipulate all of those information. Then it creates the outcome.
Then it evolves to generative design where here, we use Dynamo together with AEC generative design to create design options for creating multiple outcomes to choose from. So as you can see on the left, here, we got singular outcome, here, parametric design and computation design, we have singular outcome. But the generative design, you have multiple outcomes to choose for.
The image below here, you got the designer to create, update, and change the design goal, the algorithm, and the design constraint. And then the computer optimized that to create multiple outcomes and then asked the designer, be the judge of which outcome we will use and consume.
Then it evolves into machine learning. This takes us into the next level of automation where we predominantly use AI to generate the outcome. So here, we're going to focus on the green side, which is generative design.
So let's do an ice cream analogy. For the computer-aided design, imagine you walk into an ice cream shop. They have a limited set of options for their ice cream. Let's say you have a vanilla option and a chocolate option, and then there's no toppings available. So what do you do? You choose one option, you buy, and you eat.
For parametric design, to get the desired ice cream cup, you'd be required to convey to the machine a specification of what flavor and topping combination you want to buy. Here, you imagine that you're walking into a self-serve ice cream shop. They have a machine who is customizable for you and you choose a specification, what ice cream I want to choose from.
They have parameters that you could enter. For example, I will enter to the machine one scoop of vanilla ice cream plus two pieces of raspberry. You enter that and you get that ice cream. Or I want to choose one scoop of vanilla plus two scoops of strawberry plus one scoop of candy sprinkler. I plug it in as a parameter and then it creates me my ice cream. Then you buy and you eat.
So now how about computational design? This is like our parametric design process, but this time, we must use both computational and parametric design to achieve different results to help us make our decision. So let's add calories as part of the input before we make any decision of buying that ice cream. And imagine calories, they're not something you can easily visualize when you're buying or choosing an ice cream.
So here, the machine will help you visualize how many calories of toppings and flavors you will choose. This is like Dynamo, being so efficient in calculating and manipulating the data to help you decide. So now the machine will help you visualize that calories. And here you've enabled the parameter for your flavor and toppings and the machine helps you calculate that calories. And that helps you how to decide, when the machine creates your ice cream based on the specification, then you buy and you eat.
So now generative design. What if you don't know which flavor and toppings to opt for and you want to test various combinations to make up your mind? So your ice cream machine needs a way of illustrating numbers of permutations and combinations. So here, defining input and output is extremely important.
For example, I want to have 20% to 50% toppings and 10% to 80% ice cream. Then, I want to input to the machine-- I want to minimize the calorie but also maximize the chocolate toppings. So I can input that and then the machine would display the following.
It will display multiple serving options with the associated calories, flavors, and toppings. It will give us options to filter the ranges and what are the possible toppings. And every unique option will be available for you to choose from.
So even though the machine gives us those thumbs up and thumbs down, we will still need to select a unique option. The designer, or whoever wants to eat that ice cream, choose for those thumbs up, I will choose this one. Then I will buy and eat that.
So let's go back to the analogy. In the end, even with the help of computers, for the CAD or computer-aided design, we are bound to limited options if we opt for the passive design process. For the parametric design, it saves us modeling time and gives us chance to test new possibilities. For the computational design, it saves us design time by making it easy to visualize what you thought was impossible to create. And for generative design, this gives us a humongous number of options to choose from while saving both design and modeling time. So now let's go to the prerequisites.
NAMIT RANJAN: So let's get started with understanding a few prerequisites of using generative design in Civil 3D. Now first thing's first, let's get started with the software and packages. And here's the thing, Civil 3D does not officially come with generative design. So we'll need to rely on generative design for Revit.
As a part of this workflow, you need to have Revit installed on your machine. And then, of course, you also need to have Civil 3D installed on your machine. And then once you've installed both, you need to follow a little process here to get generative design in Dynamo for Civil 3D.
When you launch Dynamo for Civil 3D, you need to go to Preferences and Path of Generative Design, which is a part of Revit installation to Dynamo for Civil 3D as explained in the screenshot. The path would look very similar to this, C Drive, Program Data, Autodesk, RVT 2023, Dynamo slash 2.13, which is the version of Dynamo in use, slash packages.
Now since this is not an official integration, we have certain version limitations between Revit and Civil 3D. While there are certain permutation combinations that would work, a few of them might not work. Hence, we've done a thorough test of a particular combination that we'd like to recommend, Civil 3D 2023 and Revit 2023.
When you install them, you would get these respective versions of Dynamo, as you see on the screen. In this class, we've used 2023 versions of both, but the further versions are also compatible. It might require certain adjustments, though. Now part of the prerequisites is also to understand the key terminologies of generative design. Before we get to the terms, we'd like to give an overview of three essential components when it comes to generative design.
First, generator. This is a part of the program that is involved in taking inputs, doing processing, and then generating outputs and outcomes. Secondly, evaluator.
This is a part which is responsible for evaluating an outcome against some defined metrics and goals, which could be proximity, or orientation, or distance, or length. And then comes solvers. This is the part, which takes care of solving the problem by running the program several times to get to the outcome that is desired and required by the user.
Now here are certain keywords that you will come across as a part of generative design within these categories. So let's understand the meaning of each of these. First of all, inputs.
These are data that are used when generating outcomes. Constants are values that are fixed and do not change. They remain the same for all outcomes. And then comes variables. These are values that can change when generating outcomes. And then finally outcomes are design alternatives generated by generative design as a part of the study.
And then we get into talking about evaluators. So first of all, we've got goals. Goals are the metrics you want to evaluate your design against. An example of goal could be, let's say, minimizing length of the route or minimizing the number of obstacles hit.
And then comes outputs. So for each outcome, certain outputs are calculated during the generative design process. These outputs reflect the specific values measured for a particular outcome.
For example, the average distance to an amenity, or the clearance offset in a route. And then comes constraints. So these are conditions that a design alternative must satisfy. Example, let's say the tangent length should be between 100 and 200 meters.
And then let's get into talking about solvers. So first of all, let's go to understanding what is study and study type. Using Dynamo, you can create Dynamo scripts, which are known as graphs, to address specific design challenges in your work. After creating and testing a new graph, the author can export it from Dynamo to be used as a study type in generative design.
Once you have a study type, you can create studies from it. A study is basically an instance of the study type. Now as a part of the study settings, you will come across generation methods. Generation method decides the mechanism in which generative design attempts to solve a particular problem. And then you would come across a terminology of generation settings, which basically controls the number of outcomes, iterations, and population size. I'll expand on each of these as we get to the next slides.
Now let's get to talking about generation methods. When we select optimize method, generative design generates designs that are optimized for your goals. It runs multiple iterations of optioneering to improve your results based on prior results.
And then comes Randomized. This method is used for optioneering to explore a wide sample of possible solutions that the study type can produce. This method is helpful for exploring design alternatives quickly when you don't yet know what the metrics you want to optimize for.
Space evenly, also known as cross-product. It basically evenly distributes your values. This is used when you want to experiment with different combinations of variables. And then finally, like this. For the like this method, when creating outcomes, generative design uses values within 20% plus or minus of the starting value.
And then let's get to talking about generation settings. When we say population size, the genetic algorithm starts with an initial population from which the primary selection occurs and each individual in that population is a potential solution to the design problem. Each individual has a unique set of features that serve as the genes to evolve the design.
Talking about generations, when you set the generation value to 40, the process of selection, crossover, and mutation happens 40 times for each population of 40 designs. And then number of solutions. This setting only applies when the study method is set to randomize or like this.
It's the number of design alternatives. And finally, seed. The seed provides a starting point for the algorithm. If you keep the same seed and do another run with the same inputs, you should get the same outcome. And now we'll get into understanding the graph structure essentials.
JOWENN LUA: Thank you, Namit. So here's the graph essentials. So here's a typical breakdown of Dynamo template for generative design. We decided to create an AU generative design template as a guide to help you structure your graph.
And we start with the process of the input. We're processing all the data, or the geometry inputs in this process. And then we connect to the data remember. And here, the data remember node is used to capture the output of any node in case that results into that VYN file. It can hold both nongeometric data such as strings and numbers, and geometric data such as solids, points, and surfaces.
Then it connects to the processing. This is where your processing-- like I mentioned in Dynamo, it's very good at handling data geometry manipulation, and this is where you're doing all the processing to get into your output. For example, in the output, you want to minimize your result, or you want to create your constraint. So that's the process that you need to go through.
Then we connect to the data gate. The data gate is the node that controls the flow of the data. Typically, you set it to close. You have option to close or open. But you set it close all the time, or most of the time.
And this allows you to create or modify Civil 3D objects from the data you assign in your generative design. So another thing after that data gate would be export to Civil 3D. After you open that gate, then that's the time you could export to Civil 3D. So that's the process that we set up.
And another essential that is important would be how to rename a node and how to assign the is input and the is output. As you can see here, we got two samples, the number sliders and the watch node. Here, they are the typical node that you use for the is input and the is output.
You need to rename them. So if you select and right click, you could rename the node. You could double click the node as well if you want to rename it. But you need to right click to assign your is input and your is output.
So now, let's say this number slider I want to assign as is input. I need to rename it and assign that as input. It needs to be a unique name. So as you can see, as a sample, we got clearance offset and total length to minimize. So I want to define it in a unique way.
So now let's talk about setting up your Dynamo graph. The generate stage is where the design options are generated by the system. And the define step is the responsibility of the designer, while the run and the result steps are performed by the computer. Under this logic and parameter is where we set up our Dynamo.
And I want to highlight this part, that in the input process, you're not limited to one input. It can be multiple inputs. So in this case, I got input from Civil 3D, maybe a geometry, or input from Dynamo, maybe a number or a variable. Then we connect to this data remember.
So this data remember, you just need to be aware that this is optional. You can have this one if you need to, or you could leave it as is if you don't need to. So you need to do that data remember because sometimes, not everything is remembered in the Dynamo sandbox.
So when you jump into this generative design process, when we run that one, it fires up multiple instances of Dynamo Sandbox. As a result of that, you need to get the Dynamo objects coming out from Civil 3D. And that needs to be stored into your data remember so that the Dynamo sandbox can have access to that data.
And be aware, the data remember has limitation on what it can store. For example, if you want to store an AutoCAD entity or Civil 3D object, it will not allow you to do that. Or some packages, it will not allow you to do that. So be aware there's some limitations. You need to test that.
Then you jump into the data gate. As I mentioned, it needs to be closed most of the time because you don't want the geometry being created in Civil 3D as you go through your generation of your generative design. So you need to make it closed.
Then once you're done, you open it and then you export to Civil 3D. Again, it's not limited to one export. It can be multiple exports. You could export lines or hatches, if you want to, or other objects in Civil 3D.
So now let's talk about assigning generative design to Dynamo. So under this extension menu, you click this Show Graph Status. So now we will update that graph status.
On the right side, this graph type is typically set to none. If you want your Dynamo to be generative design-compatible, you change this to generative design. And then this one would show up that-- here. When you assign that graph type, it will show up here.
And this graph property, again, is under the extension menu. You choose this graph property. You don't need to have genitive design for you to update the property. It can be your generic Dynamo, you update your property. Even your Dynamo player you could update the property.
The good thing of this one is you have the ability to add description, image, author name, and URL. That URL can be helpful, let's say, a video tutorial of how to use your Dynamo routine. So as an example, we have this in our AU, we created that AUGD line slope.
We added that image. And keep in mind with this image, if you don't assign the image, when you create study, you will not see that image. So it's good to have that image so you could see what is that study you're creating for.
Now that we've learned how to assign the generative design, let's start talking about create study, or assigning method and setting up your constraint. So for the create study, you go to the generative design menu, which is here. And then you select this Create Study here. And then you will see that create study dialogue.
And on the upper right, you click that folder with a plus sign because you want to add your folder. Currently, it points to a Revit sample because we point to Revit initially. And that AUGD is something that we shared in our AU class. You can download it and then save it into your local drive, point to that local location. And then once you add that one, then you could choose that folder.
In this case, that's AUGD. It will show you those two samples that we have, the AUGD line slope and the AUGD route finder. And let's say I want to select the AUGD line slope.
If I select that, it will prompt me to define study. This is where Namit talks about the generation method. You will choose with randomized, space evenly, optimized, or like this. In this demo, we are focusing on Optimize, so we choose Optimize.
Then we have the ability to update the inputs. Here, it's ticked, meaning its all variable. If you untick that, you could assign constant value. So as of the moment, we set it up as variable. And then you need to update your goal. You set your goal to area to minimize, slope to maximize, and many more. You just set it up there.
Then you go to the constraint. This is your output in your generative design. For example, your watch node area, you want to update that. And here, take the slope. What I meant there is I want to set it up as a constraint from 1% to 10%. Anything beyond that, I will not need. So ignore those. And this is how you set up your constraint.
Then last, we go to generation settings. This is where Namit talks about population size, how many generations you want to run your genetic design, and then the seed. So once you're happy with that and it's all up to date, this is the time. You can click the Generate button.
When you select this generate button, it will process it and create your explore outcome. It will generate this one for you, and you can see that from 0 to 10, all the way to 10 out of 10. This is the time you could filter and then choose your output, and then you look at the details on the right, and then you select Open in Dynamo.
So that is how you create a study. So let's say you have created multiple studies in the past and you want to explore those previous studies you've created. How do you do that? This is the time you're going to talk about explore outcome.
So now, let's see what is explore outcome can do. So under the generative design menu, this time we choose this Explore Outcome. When you click that Explore Outcome, you can see those information that I've run in the past. For example, park model or this route finder version 3.
If I select that one, my next step is to filter it. I will choose how I will filter, whether it's clearance or length, and then I will choose here the output and select that. Once I choose that output, I will investigate the detail, check that output, and value in the variable, and then open in Dynamo.
So there's two filter options that you could use. One would be the scatter plot, which is you have ability to update based on x and y-axis. You can choose size and you can choose color.
You need to practice it to get used to it, or use the typical one which is here. That's the parallel coordinate. That's what we normally use and I normally use.
And here, I could just filter based on, let's say intersection. I want to choose zero intersection. I put it out here and it ignores everything that is not zero. So that's how you filter those options.
So now let's talk about in-action demo. I'm going to focus about the line slope generative design. And there's many way we create content in Dynamo. And all our demos are just one way to illustrate what is possible. You can take this example and develop it further if you want.
So me and Namit have created eight steps to get things right. So let's start with the first step. We start with paper and whiteboard. We sketch it out. We understand what we want, understand and define the problem.
Once you define your problem, this is the time you could clearly define what is the input, what I want to do as an output. What are the goals? Which one I want to minimize? And as soon as I know that, I'll start creating how I will process it? How will I create that routine?
Now that I have planned that, I can start building the graph in module. This is important, building the graph in module, because you want to create routine that is recyclable. You want to create small routine that's easy to digest and you could copy and paste it from routine to routine. Then you test it out properly.
Again, this is something that is important because sometimes you create a variable in your input, and then from minimum to maximum, you test it out. Sometimes the minimum won't work. So test it out so that your routine will work. Your value that you Insert will work in your routine.
Then you make your graph generative design compatible. This is where you assign your is input, your is output, and then you make your graph type generative design for this to work. Once you have everything compatible for you, this is the time you could create study, explore the outcome, and open in Dynamo.
Then once you open in Dynamo, it means you choose your outcome. That's the time you could export to Civil 3D. So let's start. Let's start with the number one. Start with paper and whiteboard. Then, we understand and define the problem.
In this example, we're trying to simulate a pipe design, and we're trying to use basic geometry. This is a profile design case and we want to show you how to start using AutoCAD Entity as an input. For example, this magenta input here. We want to define that object as a polyline, and that's our geometric input.
Then we decide what else we need? A variable. For example, here, we have this variable depth between five to 50 meters. Of course, we need to adjust as needed. And that's this red vertical depth that we created. Then we need to create another variable, which is this one, that is the vertical offset.
As we drop this vertical depth, we want to have an offset there. As you can see, those are the variable offset. Then we need to define what are the constants? For example, here at the beginning, I don't want to have offset. It's constant zero offset.
At the end, there is no offset. It's constant. It's 0 offset. So once you define your variable, your constant, then you could also decide what are my constraints.
For example, this green line, I want to constrain it between 1% to 10%. So I will set it up as my output as well. Then last that you need to decide what are the outputs? What are the outputs that you need? For example, which one generative design will create for you?
So here, the red line, it will be created by the routine, the green line, it will be created by the routine, and the hatch. This hatch, it will be created by this routine. Then when we're doing that, we also need to set up what are the outputs we want to minimize? That area, I want to minimize. So now that we defined the problem and understand it clearly, this is the time we could define what is the input, processing, output, and goals and metric.
So I want to talk about the three inputs first. Here, we have the input and the remember geometry. So we want to select the geometry and then remember that geometry. That's the geometric input. Then we also have two inputs for the variable, the constant, and that offset.
And before we do our process, we also need to know what are the outputs that we need, the x and y, the area that we want to create before we start processing what we need to achieve. And then last, once we are happy with the output, then we export to Civil 3D. Export the line, export the hatch, and then we're good to go.
Now that I clearly defined that, then it's time to break the graph into module. Build like LEGO. So this is where you're creating individual routine that will connect to each other and then build the whole routine for you. So we have the input and remember node.
So as an example, let's jump into for that one. So here, for that one, we have the input. We know that this is our polyline. And we use this Select Object, we convert that to Dynamo, which is object by geometry, or object.geometry. And then we remember that node.
Because now that you've selected it in AutoCAD, the Dynamo will remember that geometry in Dynamo. And then we do the input, which is variable depth, we enter those sliders, and we fix it based on the number minimum and maximum. We set it up, fix it as we create them, and then we jump to creating the constant and the variable offset.
In this case, we have zero constant for this one and the last one. And then the rest in the middle, they're variable. So now that we've created those inputs, this is the time I could create the points across the geometry.
In this case, we're using curve, that point at parameter. We are trying to create every 20%. So six points being created from 0%, 20%, 40%, 60%, 80%, and 100%. So we create the points first.
After we create the points, this is the time we could translate those points. Bring it down to the y-value. And that's the input that I have, the vertical depth. So we enter that, create a line-- variable line, so you have different length there. And then once you create that geometry, you could start creating the offset.
Remember that we have constant offset at the beginning and the end? But in between, we have that vertical offset as a variable. Then once you translate to that point again, this is the time where I could create the endpoint to the vertical offset point, and then create the tiny geometry that will help me create that area. So this is the time when we create that vertical offset.
Then we jump to creating the line slope. Now that I have this endpoint to endpoint, offset to endpoint, offset to endpoint, offset to endpoint, and so on, we could create that line and slope by manipulating that geometry. Then before we create our area, we need to find the first and last vertical because we already have the one below the tiny line, and the start and end. We need that.
After having that, this is the time we could accumulate all the outline for the polygon. Keep in mind here the input. They're polyline, meaning they're one full line. So we need to exploding it.
We use polycurve.curve to make an individual line. And then when we accumulate all the lists, we flatten it and then we use polycurve.byjoinedcurve.
Now we are converting the whole individual lines into one giant polycurve. And because we have polycurve, we can convert that into a surface. So we use surface.pipepatch, creating us a surface.
So now let's talk about visualization. It's extremely important in generative design to visualize what you're trying to do. And in Dynamo, everything looks gray. If you don't assign specific color, it's all gray. It's hard to visualize.
So assigning the which one is still, which one is blue is very important for you to visualize what you're trying to do. And of course, processing your calculator. DynamoDB is extremely good at manipulating lists, manipulating data, or manipulating geometry, or getting anything like area and so on. So you process that calculation and then in the end, you connect that to your output.
So what are the outputs? The slopes, the area. I want to minimize my area. I want to apply this constraint. All that slope that I'm building, I want to apply constraint. So that's part of my output, is output node.
Then we list all the things that we want to transfer to Civil 3D. So everything is being done in generative design, but you list everything you want to transfer to Civil 3D. Once you have that list, you lock it into your data.gate. It's closed. It won't go past that, but it's closed there until you click Open.
But in setting up, you need to connect it to the nodes that will create that line object.bygeometry, and also creating that hatch, hatch.bygeometry. So now that we've created that, keep in mind all of this one will be very good if you apply a proper template, like color coding for your standard grouping. So you apply that and mention what is the graph function.
So all of that, we've talked about from one to 19. We talk about that for the line slope generative design. So that's the item, or step number four.
So let's go to step number five, test your graph. So you want to test your graph and be sure your input range will not break your routine. If you see something that is wrong, you adjust as needed.
And you make your graph generative design compatible. So here, this is the time you will select a node, right click, Set is input. You're assigning all the things that you need. In this case, the constant is not needed, but the output you select, set as output.
So now I'm trying to assign and make it generative design compatible. Then you run and then save this graph. If you don't, you'll have graph issues, which nodes in modified state are not allowed. So you need to make sure you save-- you run and save.
Then you go to that graph status. In the graph type, you assign generative design. And then in the graph properties, this is where I mentioned update those information, author name, URL, and then you save. Once you've save that, then you managed to make it generative design compatible.
So now let's discuss how to create study explore outcome, and how to open in Dynamo. So here when you go to generative design menu, you create and then you define your study. Here, we choose optimize. We update the goal. We set the constraint. And then we click the Generate once we're happy.
As you can see, it's now in the generate mode. It will generate the outcome. It will process it. You just need to wait for it to finish. And then once it's done, it starts to populate things.
And here's the time you could investigate it, go to your filter, and start filtering what you want to see. So this is the time you filter that outcome and then you choose a result that you're happy with, investigate, and then you open in Dynamo.
So alternatively, once you create that, you could also do another way to explore your outcome. You could explore previously created study. And this time, I'm selecting explore outcome.
It will show me all the sample outcome that I've created, or sample study. Let's say this over 200 generations. Choose the filter, surface area, choose the detail, review it, zoom in, zoom out, and then once you're happy, you filter that outcome and open in Dynamo.
So you can also check different ways of filtering. Here's a different way. Again, as I mentioned, you need to practice this one to get used to. You need to choose between the different method of filtering and then be good at it. So as you can see here, once you choose Open in Dynamo and then you could start using that.
So till there, we've just created everything. Now that we opened in Dynamo, we are ready to export in Civil 3D. As you can see, we have only the input, the polyline on the left side. So let's open in Dynamo. This is the time you could investigate and set the data gate to open.
You click Open, then you run. And once you run, you can see on the left you line, your hatch, is being created for you. So that's the eight steps that we've created. Here's Namit to talk about the next in action demo.
NAMIT RANJAN: Well, thank you Jowenn. I hope that gave a very good preview of generative design in action. And now we'll look at another use case, and again, break it down for you to get some practical insights. And this use case is about creating a route finder using generative design.
Now as Jowenn talked about, we came up with these eight steps to get things right, and we will be using these eight steps in this use case and in this example as well. First thing's first, we always start with paper or whiteboard. So never start with generative design or Dynamo. Always sketch your idea on a paper or on whiteboard, and then you get started.
So here we are in the second step understanding and defining the problem. Now let's look at what the problem is. Here, we've got a start point, which is point A, and then we've got an end point, which is point B. The intent is to create a route from A to B. And there are certain goals and metrics that we want to evaluate our design against.
First thing's first, we need to make sure that it doesn't hit any of these obstacles. So all these odd shapes that you see here are obstacles. And we need to make sure that the route isn't hitting any of these obstacles.
Secondly, we need to make sure that the route passes through favorable guide points, so the ones in blue that you see there marked as 1, 2, and 3. These are favorable guide points, and we need to make sure that the route that generative design generates aligns itself as much as possible with these favorable guide points.
Thirdly, we talk about radius. So the radius is something that we need to maximize and the inputs could be from 15 to 50 meters. The next thing that we need to make sure is the variable length. And this tangent length should be somewhere between 100 to 200 meters and then this is something that we need to maximize.
And then we come to clearance offset. So we need to maximize our clearance offset for the route and it should be between eight to 20 meters. And there's an overall overarching criteria, which is the total route length. So we need to make sure that generative design is minimizing the total route length.
So now we have a clear understanding of the problem, what are the goals and what are the metrics, what is it that we are trying to solve here? And then once we are done with this, you get to the third step, which is clearly defining your inputs, processing outputs, and goals and metrics. So now we have got these inputs from Civil 3D and Dynamo.
We've got selecting obstacles, pick start point and end point, selecting favorable guide points, and all these three things would be coming from Civil 3D. And then we have certain Dynamo-based inputs, like input for control points, clearance offset, and radius for arcs between tangents. So these are-- the last three are inputs from Dynamo.
And then we will get into processing in detail when we get there. But in terms of outputs, we've got a number of obstacles hit, area of favorable guide points, number of favorable guide points hit, and the overall route length, the radius of arcs between tangents, the clearance offset, and the tangents, which are less than 100 and greater than 200. So all of these are going to be mathematical calculations and outputs that we are going to look at. And then finally, this is the piece which is exporting to Civil 3D.
So here, this is the last bit where we'll be exporting the lines and arcs to Civil 3D. Now as Jowenn described earlier, we will be doing the exact same thing of breaking the graph into modules and building this like LEGO blocks. So now we have defined these steps and all these steps are basically modules that we'll be creating. So now let's look at each of these modules in action.
First thing's first, we need to select the obstacle. So all these obstacles we have selected from Civil 3D using select objects node and then we have created converted that into geometry by saying object.geometry. geometry. And then comes the magical data.remember node that Jowenn talked about earlier, and this basically helps Dynamo remember what was the last geometry that it created. So it remembers the upstream value here.
As Jowenn mentioned, generative design doesn't use Dynamo for Civil 3D. Instead, it uses Dynamo Sandbox, and it's very important for it to remember the geometry so that it's able to work it on the same. The second thing is picking start point and end point. So this is when we pick the point A and point B, which is essentially the start point and the end point, and just go ahead and do data remember.
The third component here is selecting favorable guide points. So we've done, again, select objects and DB points by object and DB point by geometry. And then finally, we go ahead and remember that using data remember.
So all these are Civil 3D inputs and we are done with them. And now we come to certain Dynamo inputs. So this is input for control points. And the control points help us define the y-values of these individual points, and these will be the governing factors of how the route looks like. We'll come into detail, we'll get to the details of how this flexes the route and then comes clearance offset.
So this basically defines what offset is the root going to have. And we can set that range using that input slider once again. And then finally, in terms of inputs from Dynamo, we talk about input radius for arcs between tangents. So these define what are going to be the radius of the individual arcs that form at the junction of two tangents.
Now let's get into some of the processing nodes. So the first thing that we need to do is to create a straight line between point A and point B and then divide that into equal segment length. So of course, very straightforward.
We'll be using the curve.point at equal segment length to divide this into, let's say, 10 different parts. And then once we've got these points, we need to use our control points to translate these individual points, or rather geometries, and then make sure that these have certain values that we are able to flex with the help of control points. So now we've got all these points at different y-values.
Once we have done that, we need to connect all points. So we'll go ahead and connect all these points with the help of straight lines. So pretty straightforward. We've done a list.shiftindices, a little bit of list management, and then just go ahead and do a line by start point and end point. And we've got straight lines connecting all these points.
And now we need to factor in arcs. How do we create arcs at junctions? So for creating arcs, we've used arc.byfillet, and then we've come up with all these arcs, factoring in all the radius that we defined as inputs from Dynamo. And once we have done that, we have all these arcs in between these lines, or rather tangents. And for the sake of better visibility, we will turn off the preview for everything and just let the arcs be here so that you get a very clear picture of where we are right now.
Now the next thing that we need to do is to create lines between these arcs. So we identify the endpoint of the first arc and the start point of the second arc, and then we create these individual lines between these arcs. Once this is done, then we need to create the first and the last line. And then once we have created the first line and the last line, we are all set to join all these lines and arcs and get to the basis, or rather the skeleton of the route. So now, as you can see, we have the skeleton of the route.
Now, here is the last part of the Dynamo for-- I'm sorry, the input from Dynamo, which is the clearance offset. The moment we incorporate clearance offset, we need to create this into a surface. And that is where we've incorporated the clearance offset and now we have the final shape of what the route would look like.
And now we will be creating surfaces for obstacles. So now these surfaces have been created into-- the obstacles have been created into surfaces. And finally, we also create surfaces for favorable guide points. So we can do the mathematical calculations.
And there's this bit of visualization. It becomes very, very important when it comes to generative design because you're able to clearly see what's going on with your design. So now we have this visualization module, which takes care of a beautiful visualization that happens that talks about the start point, and the endpoint, the route going on in between, and all these obstacles lying around, and we've got these favorable guide points. So this is what we wanted.
And now we've got certain mathematical calculations happening, like checking the number of obstacles. Again, pretty straightforward. We'll do the geometry.doesintersect and we'll count the list of-- or rather the count of throws in this list. And then with that, we'll get the number of obstacles hit. Similarly, we will also get the area of favorable guide point set.
So now here's an interesting thing, that we've devised two mechanisms to check how well it aligns with the favorable guide points. One is by checking the area hit with respect to the favorable guide points. And then secondly, the number of favorable guide points hit. We'll come to the latter in a moment.
We'll get to the checking of the overall route length. This is the value that we need to minimize. So we've done a curve.length to get the overall route length. And then here's the thing that I was talking about. So checking how many favorable guide points hits and we'll just do geometry.doesintersect and then we will just count the number of throws in that list to get the number of points hit.
And then finally, we'll get to identifying tangents, which are less than 100 meters and greater than 200 meters because these are the values that we need to minimize, and then we found that out as well. Now the final part is going ahead and putting all of these as outputs. So we have created these watch nodes, which are duly renamed as per what these metrics are.
For example, length favorable guide points, obstacles hit. And also, as a best practice, we have stated what we need to do with this. Do we need to minimize or do we need to maximize? We've also prescribed that as a suffix with each of these watch node names.
So now that we have this, we have another set of outputs going on here like radius. So all these radius are defined here in these output nodes, and all of them are set as is output. And then we've got tangents less than 100 and tangents greater than 200. Once again, minimizing-- we're going to minimize both these things.
And there's this last bit that remains after this, which is to create a list to put these things into Civil 3D. So we've created a list of arcs and lines. And then I want to circle back to the discussion that Jowenn had with you about data gate.
And then we are keeping the data gate as closed. That means that anything beyond this point is not running right now because the data gate is set to close. This is to ensure that once we have derived that particular outcome that we want to take to Civil 3D, we are going to open this gate.
So right now, we're keeping it closed. And this is the downstream node after that, which is exporting lines and arcs to Civil 3D. So the main intent is that once we are satisfied and happy with that one outcome, we will be opening that data gate, and then this combination of lines and arcs will go to Civil 3D.
There's this one final piece, which is grouping and adding the group color as per the template. This is a very important piece because this helps you keep your graph well documented, and make sure that you've got enough information. So here you can see that we've got the Dynamo core version, the Dynamo Civil 3D version, the packages used, and the graph function, and who's the author of this graph.
And with all of that having done, this is what the final graph looks like. So 1 through 27. So we've got 27 steps here. And magically, this is the geometry that we get. We can flex the control points, we can flex the clearance offset, and we can flex the radius and these are the combinations that we would get. So now we are all set.
Now a few steps before we actually see generative design in action, the first thing that we need to do, very similar to how Jowenn described earlier, is testing your graph. So we need to test our graph thoroughly. We will try to break our graph as much as possible and make sure that all these input sliders are within the range. This is very important. Make sure that you've got reasonable brackets for generative design to run on.
The next thing that we need to do is to make our generative design-- make our graph generative design compatible. This is a very important step, because only after this you can see generative design in action. So the first thing that we need to do is to rename all these input nodes, or rather input sliders, and make sure that they have been set as is input, as you can see in the video right now.
And once we have done that, we'll go all the way to the output watch nodes, and all these are now renamed. And they have been set as is output. You right click on and set is output, which is very important. Once you've done that, you need to make sure that you need to run and save your graph.
And once you've done this, you need to go to extensions and say graph status and add graph type. You need to select generative design. Go to Graph Properties and you can also modify your description, set a good thumbnail, and add author information. And then you need to save your graph. And with this your graph is now generative design compatible and you're all set to see the magic with generative design.
So now we'll get to creating study, exploring outcomes, and opening in Dynamo. So you go to generative design, create study, select the study type, and then select the method, which is Optimize in this case. And we'll select all these necessary attributes like minimizing length, minimizing obstacles, maximizing clearance offset, maximizing radius. We'll probably also minimize the length and tangent length of 100 and 200 and then we will hit Generate Outcome.
Now you can already see that generative design has started to generate all these different outcomes for you. And once it is done, you can also go ahead and filter using all these sophisticated filter options that Jowenn talked about earlier. Here, we'll be minimizing on total route length, we'll be maximizing on clearance offset, and we'll be picking on that one option that you like the most.
And then once you're all happy and satisfied, you can go ahead and open that design in Dynamo. Then click on the Open in Dynamo button and then you're all set. You can go back to Dynamo and have your design there.
The other option to do this is to go ahead and click on generative design and say, explore outcomes. So here, you can see previously generated outcomes. So now here, for example, we left our machines running for overnight, and it generated 500 different outcomes.
So we've got much more granular options to filter to. And then we've selected something which gives us minimum route length, maximum clearance offset, and these are best three designs. And then once we are happy and satisfied, take it to Dynamo with a similar method, and then now we are all set to now take it back to Civil 3D.
So this is the final step of exporting to Civil 3D. And we go ahead and this is the step where we open the data gate. So we'll go ahead and open the generative design data gate, set that to open. And this will allow for the graph to run fully. And then this will export lines and arcs to Civil 3D. So now you can see that the lines and arcs are now converted it into Civil 3D. They're all exported to Civil 3D.
Now after that, there's a little bit of bonus here, which is exporting data for further analysis. So if you watch this video in the Explore outcomes, if you click on these three little dots on the left-hand panel, you can also export these outcomes. And then you can take them as CSV exports. You can choose to either include thumbnails or exclude thumbnails, and then just say export and just give it a nice file name, and it would export everything, like all these generated outcomes into CSV.
Save them, and then what we've done is we have taken that into Power BI. You can use your favorite business intelligence tool for that. And then we can do further analysis of your options here. So you can actually drill down and you can do all these kind of sophisticated analysis in your business intelligence tool to further work on your outcomes.
And this was pretty much it. And now we'll be going ahead into the summary. We'll be recapping and looking at what we discussed and learned today.
First of all, we learned the prerequisites required for generative design in Civil 3D. We created the graph structure with basic essentials. We created and defined studies. And then we ran generative design and explored outcomes. We also demonstrated generative design in action with two real life use cases and examples and broke it down for you.
And finally, we've gathered links to some great learning resources that we would like to recommend here as future learning paths. As you can see, there are these few past and current year AU classes of the likes of DynamoDB and Civil 3D Introduction, Unlocking the Mystery of Scripting by Jowenn and Andrew.
You've got Supercharge Your Dynamo Graph with Civil 3D Toolkit, once again by Jowenn. And you've got some fantastic Dynamo learning resources here, like Dynamo Primer. You should always keep it handy. Dynamo forum.
For any problems or anything that you would like to learn, you can always go ahead and visit the forum to know more about Dynamo Dictionary. Here's the link to know more about Dynamo nodes, you can go to Dynamo nodes. And then finally, Generative Design Primer. This is something that you all must have in handy, which is-- this is a very helpful resource for generative design.
And now finally, Jowenn and I were sort of wondering on how to compose our thank you note. So guess what? We went back to generative design and developed 400 different options to say thank you to you.
JOWENN LUA: Thank you.
NAMIT RANJAN: And here's generative design's way to convey a huge thank you for attending our class today. Thank you very much, and have a good one.