For this assignment, I modeled a bus stop shelter with an outer frame of curved ribs and glass and an inner frame of linear components.
First, I defined 4 lines for the controlling geometry- one line for the base of the shelter, one line for the back of the roof line, one line for the front of the roof line, and one line to represent the extent of a roof overhang A user can change the x, y, and z translations between each line using number sliders.
Sliders change the endpoint of the end of the roof overhang line. This can make one end of the structure’s roof extend closer to the ground than the other.
I broke up the following code into 2 categories, one for the main (curved) structure/panels and the other for linear panels within the outer geometry. For the ribs: Each category takes the 4 controlling lines and computes/groups rib placement points. A user can use sliders to specify a different number of ribs for the linear geometry and the outer/main geometry.
For the panels: Curves are created for each of the rib placement points. The outer structure’s points are “curved” using NurbsCurve.ByPoints with a “degree” of 3. The inner geometry is made linear by specifying a NurbsCurve with a “degree” of 1. This eliminates any curving between the rib points. The curves are then divided into panel placement points. Integer sliders can adjust the number of panel placement points
Ribs are placed in Revit for the outer geometry using a 4-point adaptive component (tube). The radius of each tube decreases moving from its start to its end. The inner geometry is set up to only display panels, not ribs.
Panels are placed in Revit for both the main/outer geometry and the inner geometry. The outer/main panels are adaptive panel components with openings and glazing. They bridge between the ribs and fully cover the structure. The inner panels are created from adaptive panels with openings (and no glazing).