Generative Design Application Example: REC Placement Optimization

Generative Design Application Example: REC Placement Optimization

The method for handling repetitive sequences in Dynamo scripts can vary depending on the specific situation. A designer focused on optimization might try to consolidate these repeated levels to reduce the number of Node Groups, perhaps by utilizing a Python Node to implement a for loop.

However, we generally recommend an approach that prioritizes clarity and maintainability. This involves using only standard (basic) nodes to create repeated groups, as shown in the image below, and connecting various logics and rules sequentially.

While optimizing and compressing Dynamo nodes might seem efficient, it often leads to significant difficulty in future modifications. Therefore, it's highly recommended to structure your scripts by allowing basic node groups to repeat. This ensures that even less-experienced users can easily follow and understand the overall flow of the node script, maintaining the long-term integrity of your Computational Design workflow.

Article content

I will introduce an example of executing Generative Design by running a sample file.

Article content

control the movement of each element from REC1 through REC4, we strategically place Sliders corresponding to each REC.

When you adjust the slider for the first element, REC0, all subsequent RECs also move. This happens because the process involves a sequential placement logic for REC0 through REC4. REC0 moves first, and then the next element, REC1, moves to an available position excluding the space now occupied by REC0.

Article content

The placement sequence can be confirmed by following the order shown in the image below.

The process begins by positioning REC0 at every conceivable placement location. Next, the script filters this list to isolate the REC0 placements that do not overlap with the boundary polycurve. Finally, using Slider 1, the first item from this list (which has been randomized by List.Shuffle) is selected, and its position for REC0 is finalized.

This three-step placement process represents a very fundamental approach. While a human might simply select a single, optimal location, a computer can handle this thought process using various complex methods. The sequence described above is one such valid method. Because there are diverse placement strategies available depending on the scenario, you must carefully select the most appropriate method for your specific project constraints.

For the second element, REC1, the system receives the updated point list after the position of REC0 has been confirmed. As a result, the location of the first element, REC0, remains fixed, while the positions of the remaining elements, REC1 through REC3, are adjusted accordingly.

Article content

Placement Logic for Subsequent Elements (REC1, REC2, REC3)

The placement sequence for REC1 is identical to that of REC0. The critical difference is that the script proceeds with the condition that REC1 cannot be placed in the space already occupied by REC0.

The subsequent elements, REC2 and REC3, are larger than REC0 and REC1. The key movement to compare and focus on is how the script handles the overlap detection between the size of the current REC being placed and the previously positioned RECs.

Article content
Article content

Advanced Overlap Detection (REC2 Placement)

The first image below displays the existing elements: the previously placed REC0 and REC1, along with the boundary surface that has been given a thickness value.

In this current step, we execute the DoesIntersect – BoolMask process on a Polysurface that is generated from a total of three surfaces: REC0, REC1, and the boundary surface.

This advanced process ensures that the newly placed REC2 successfully avoids intersecting both REC0 and REC1. The result of this successful avoidance can be confirmed in the second image below, where REC2 is clearly positioned without overlapping the existing elements.

Article content

The Critical Impact of Placement Order (REC3 and Beyond)

Once REC0, REC1, and REC2 have been positioned, the remaining available space for REC3 becomes significantly limited. This is a crucial point in this specific placement process.

Since REC0, REC1, REC2, and REC3 are all different sizes, the placement of the relatively smaller elements (REC0 and REC1) has a disproportionately large impact on the placement of the larger elements (REC2 and REC3).

Therefore, as you proceed with a project, it is essential to determine the sequence for the spaces or facilities that will be represented by the RECs. This sequence must be decided based on the spatial importance of each element. An ill-considered order could easily render subsequent placements meaningless.

Adding Real-World Constraints for Generative Design

Taking a more practical, real-world approach, each REC (representing a space or facility) may be subject to various rules and codes.

For example, if a rule dictates, "Place this facility near the main entrance," you must construct a dedicated placement logic for that REC to define its proximity range to the entrance.

Similarly, if a rule requires, "REC0 and REC2 must be placed within 10 meters of each other," you have two primary options:

Adjust the sequence and construct a proximity placement logic within the Dynamo script.

Set the connecting line between the two RECs as an output and then verify this distance requirement by filtering the results after running the Generative Design study.

This integration of real-world constraints is where the true power of Computational Design is realized.

Article content

Due to the fixed positions of the previously placed elements—REC0, REC1, and REC2—the number of viable placement options for REC3 is significantly reduced.

This challenge highlights the need to actively utilize the method mentioned earlier: changing the placement sequence. It is crucial to leverage this flexibility to automate a placement process that yields practical and usable designs in a real-world context.

Article content
Article content

Organizing Repetitive Logic in Dynamo

As shown above, critical processes are repeated across four distinct sections. We recommend grouping similar node configurations in Dynamo—as seen in the image below—when they represent analogous rules or codes.

These sections consistently receive similar Inputs, process them according to a shared set of rules, and generate comparable Outputs. This technique is one of the recommended ways to structure repetitive sequences using standard Dynamo nodes before proceeding with script optimization.

Once these repetitive sections are built, you have two primary methods for optimization:

Using Code Blocks to increase the geometry processing speed.

Utilizing Python Nodes to perform batch iterations via for or while loops.

Given that an increasing number of these repeated segments will likely slow down your script's performance, it is highly recommended that you select the optimization method that is most appropriate for your specific process requirements.


A) Executing Generative Design

Before you can run a Generative Design study, you must first click on Extensions to complete the necessary pre-settings.


Article content

Setting Up the Generative Design Graph

Click on Show Graph Status (as seen in the image below). A Graph Status window will appear on the right side of your screen. In this new window, click the dropdown menu that currently displays None.

Executing an Optioneering Process

Article content

Click Generative Design under None to complete the pre-settings.

Article content

Understanding Graph Status Warnings

Separately, the Graph Status window allows you to check for Node Issues and Graph Issues. Common error messages often relate to:

Whether Input and Output nodes have been properly set up.

Instances where nodes share the same name.

Cases where a Remember node has not been placed in an appropriate location.

For example, the image below displays the warning: "No Output nodes have been set." To add an Output for filtering within Generative Design, you must correctly set up the relevant node to output that information.

Article content

Setting Input/Output Status

You can set a node's status as either Is Output or Is Input by hovering your mouse over the node and right-clicking it.

Article content

Clearing Graph Issues

Once you select Is Output by right-clicking the node, you can confirm that the warning message disappears from the Graph Issues section, as shown in the image below.

Article content

Managing Package Dependencies and Troubleshooting

Beyond the issues mentioned above, various problems can arise related to Package versions and other complexities.

While we generally recommend writing scripts using only standard (basic) nodes to avoid Package dependencies entirely, if you must use a Package, it is highly advisable to be proficient in methods for troubleshooting and resolving the diverse error issues that may occur.

Article content

Initiating a Generative Design Study

Click Create Study within the Generative Design environment. This button initiates the process of creating a new study. Once studies have been run, you can review their results by clicking Explore Outcomes.

The Create Study window is comprised of two main sections: selecting a folder and searching for studies. Click the folder + icon next to Choose Folder to open the Manage folders window.

In the Manage folders window, select the folder that contains your working Dynamo file. The settings we configured in the previous step (changing the dropdown from None to Generative Design) are crucial, as they link the selected folder to the Create Study process.

It is essential to develop the habit of saving your Dynamo file immediately after modifying it and running the script. If you see an orange circle next to your Dynamo file name, it indicates that the file has been modified but not yet saved.

Article content

Ensuring Graph Readiness Before Running a Study

The orange circle next to the file name signifies that the Dynamo file has not yet been saved after recent modifications.

The core principle for linking to Generative Design is this: After making any change, you must run the script, then save the file, and finally, confirm that the orange circle has disappeared. Simultaneously, you must check the Graph Status window for any readiness or error messages.

Most new Generative Design users encounter an initial error here. If you see the triangle with an exclamation mark (!) icon next to your Dynamo file name in the Create Study window (as visible in the image below), you must repeat the steps above (Run, Save, and Check Status) until the error is resolved.

Article content

Adding the Dynamo File Folder

After clicking the folder + icon, proceed to the Manage folders window and add the folder that contains your working Dynamo file.

Article content

Selecting the File and Defining the Study

Click Choose Folder and select the folder you just added from the dropdown menu. Next, confirm that the Dynamo file name is loaded below.

Clicking the Dynamo file icon will change the view to the Define Study window. In this window, you can configure the Study Name, select the Method (which includes Randomize, Space Evenly, Optimize, and Like This), and review the set Inputs and Outputs.

Note that the configuration options displayed in the lower part of the window will dynamically change depending on the Method you select.

Article content


Generative Design Primer: (https://www.generativedesign.org/)

Official Generative Design Execution Sequences

Article content

1. Executing an Optioneering Process (Randomize)

Optioneering allows you to explore all possible solutions that your Dynamo graph can generate within the defined constraints.

Execution Steps:

  1. Start a Create Study from the Generative Design menu in Dynamo.
  2. Select your graph and choose Randomize from the Method dropdown menu.
  3. In the Inputs section, confirm all desired inputs are present. For any inputs you do not wish to change, uncheck the box and set the desired fixed value.
  4. In Generation Settings, select the Number of Solutions you want to generate.
  5. Also in Generation Settings, select a Random Seed (a number) to use for starting the randomization, or simply use the default value.
  6. Resolve any items found in the Issues section.
  7. Finally, click Generate to run the optioneering process.

Article content

2. Executing an Optimization Process (Optimize)

The Optimization process directs the computer to evolve your design based on the provided constraints and goals to find the most suitable options. Generative Design uses the NSGA-II, an elite multi-objective genetic algorithm, to optimize the results.

Execution Steps:

  1. Start a Create Study from the Generative Design menu in Dynamo.
  2. Select your graph and choose Optimize as the generation method.
  3. In the Inputs section, confirm all desired inputs are present. For any inputs you do not wish to change, uncheck the box and set the desired fixed value.
  4. In Set goals, review each Objective and set the goal for what you want to Maximize or Minimize.
  5. In Set constraints, you can optionally set minimum and maximum values for each Output (Result).
  6. In Generation settings, set the Population Size (the number of options Generative Design will create in each generation) or use the default value.
  7. In Generation settings, set the Number of Generations you wish to generate, or use the default value. (New generations are created based on the range of options between the two best designs from the previous generation.)
  8. In Generation settings, select a Random Seed to use for starting the optimization, or use the default value.
  9. Resolve any items found in the Issues section.
  10. Finally, click Generate to run the optimization process.



Returning to our specific example, we will now select Randomize.

Article content


Outputs, and filtering in the Generative Design study:

Configuring Inputs and Understanding Dependencies

In the Inputs section, you can see the Sliders (Slide 0, 1, 2, 3) that control the movement of REC0, 1, 2, and 3, respectively. These boxes are currently checked, meaning they will be varied by the Generative Design process.

To set a specific Input to a fixed value and prevent it from running through the study, you simply uncheck the box.

Article content

For example, you might consider the right-side settings in the image above as a scenario where REC0 and REC2 are set to fixed positions.

However, a crucial point must be understood: We confirmed earlier that when REC1 moves, the positions of all subsequent RECs also change due to the sequential logic. Even if you fix the second input (Slide 1), since REC0 is first fixed and then REC1 moves randomly, the position of REC2 will still be altered by REC1's final placement.

This is a case where you must adjust the sequence of the RECs within your Dynamo script before configuring the Inputs in Generative Design.

Article content

Generating Alternatives and Troubleshooting

When you click the Generate button, the system loads and produces design alternatives, as shown in the image above. You may notice an error where the images for a few alternatives are not visible. However, if you click on one of these missing images (as shown in the second image below), you can confirm that all Inputs and Outputs were correctly calculated.

Article content

If the Inputs and Outputs were in an unsolvable state, or if a valid result could not be produced, the solution would not pass the filtering process, and the image would be treated as an error.

In this specific example, we confirmed that the placement movement of the next REC is constrained by the size and location of the preceding RECs (REC0, 1, and 2). As the number of RECs increases, the chance of failing to find a viable placement location also increases significantly. If this happens, you must go back and modify your Dynamo rules to ensure the script can execute without errors.

Article content

Filtering Results Based on Output

The three images below illustrate how to review the results using a filter based on the Output Length (likely a measure of the connecting line or total path):


[1] Output Length: 400 ~ (Filtering for results where the length is 400 or greater)

Article content


[2] Output Length: 320 ~ 420 (Filtering for results where the length falls within this specific range)

Article content


[3] Output Length: 0 ~ 360 (Filtering for results where the length is 360 or less)

Article content

In our next session, we will demonstrate the practical application of this process by sharing content introduced at AU2025 (Autodesk University 2025).

We plan to share this information in alignment with the official AU2025 video upload schedule, so please stay tuned!

In the meantime, if you have any questions about various other approaches beyond this example, please leave them in the comments. We have a wealth of case studies to draw from.


And I will share the next steps that are connected after the AU2025 update.

Article content



I hope you found this content helpful. Your support is what fuels this ongoing research and documentation.

If you'd like to contribute, you can buy me a coffee or become a member to take a deeper dive with me on this journey.

By becoming a member, you'll get access to the test files and supplementary documents featured in the newsletter.


[Become a Member & Get Access Newsletter 📧 Data Box 💽 ]

update list

The Newsletter Data Box Update List will be shared every Sunday, beginning this October.

Research Note : Medium Wonho Cho

Newsletter : LinkedIn weeklydynamo


To view or add a comment, sign in

More articles by WonHo Cho

Others also viewed

Explore content categories