The idea for this part of the project is to affect the parameters of the dome panels with a gradient. Basically change the member width for each panel so that it goes from thin panels to thick ones. This change will be done to limit the sun's penetration to the interior courtyard. Therefore, a conceptual sun was created in the massing family. The conceptual sun was used to generate the distance from each panel to the conceptual sun. This was done as a strategy to make the panels that have greater sun exposure to become thicker, while the panels that have less sun exposure will become much thinner.
Revit API was used to create the changes and the repetitive tasks:
The following snippet of code describes the assignment of and getting the objects from the Revit environment. First, we get the id of the massing family inside the project. Then we get the panels ids from within the massing family, as well as the id for the conceptual sun. Finally we send the ids to the GetDistance function in order to make the changes.
The following snippet of code describes affecting the panels based on their distance from the conceptual sun. Basically we go through a loop which calculates the location of each panel and calculates the distance between the panel and the sun. The function then returns that distance and assigns it to the "Distance" parameter in each panel.
The following image shows the difference between the original panels (on the left), and the affected panels (on the right).