You are currently reviewing an older revision of this page.
A simple example of using geometric context as the driver for generating adaptive versions of a design.
For more examples refer to the GenerativeComponents Documentation page.
Based on those four points one can create two lines which specify the direction of the cross section of the bridge at that point. Use the Line Feature from the Feature List and then the ByPoints update method. Locate the points by clicking into the input fields and then holding down the Ctrl key. Click on the respective points to select them, confirm the creation of the Line by pressing OK.
In order to get the direction of the bridge path, which is perpendicular to the section Line we can place a CoordinateSystem onto each of the lines. Use the CS shortcut and holding down the Ctrl key, click on the lines to place the CS onto the line. This is equivalent to selecting CoordinateSystem from the Feature list and selecting the ByParameterAlongCurve update method. Make sure that the T value is set to 0.5 by editing the CS with the edit tool .Add baseCS.ZDirection as the optional UpVector to make sure the CS does not flip.
We can now use the XDirection of those CoordinateSystems to construct to tangent lines needed to create a BSplineCurve path for the main bridge span. Go to the Feature list and choose Line.ByStartDirectionandLength. As StartPoint we can choose the coordinateSystem01 and coordinateSystem02 respectively (for the two lines), as the Direction the coordinateSystem01.XDirection and coordinateSystem02.XDirection respectively and as the length for now a fixed value of 4. Hit OK to create the line.
In the Feature List select BSplineCurve.ByTangents to create a BSplineCurve. The line03 and line04 will be the two tangents. Since there is only one input field and the input expects a list of lines we need to construct a list of lines on the fly by typing
{line03, line04}
Similar to the roof example we can again establish a set of planes on the BSplineCurve.
For the section we need a plane that is perpendicular to the path and one that is parallel to the horizontal component of the path.
Create the second plane that will be horizontal at all times. To create it select Plane from the Feature library again but this time choose ParallelToPlaneThroughPoint as the update method. To create the “ribs” or outrigger for the in-between section, we need to first define the direction the cross members should be pointing to. We can derive this direction from intersecting the two planes we already have since their intersection will create a Direction that is always horizontal and always perpendicular to the curve.
Length = line01.Length * 0.5
We create a simple point using the point shortcut. Then we can edit the point and select one of the section line EndPoints as the optional origin. Set the X and Ytranslation to 0. This will make the point coincide with its origin point. Now if we add our sine expression to the Ztranslation we get what we want.
Ztranslation = (Sin (plane01.T*leng)*amp1)-offset
Add another point for the other line’s EndPoint using the same expression. A third point is placed using the plane along the curve as the origin and a fixed offset of -1.
Now we can array the initial plane along the curve to replicate our cross section construct. Set the plane01.T to
plane01.T = Series(0, 1.0, 0.1)
This gives us the distribution of sections along the curve with the Points on the edges undulating according to our sine expression as the section steps along the curve.
Now we can use those points to create a BSplineSurface, similar to the roof exercise again. Create a BSplineSurface Feature using the ByPoles update method
Poles = { point05, point06, point07, point08, point09 }
Assuming that the sequence of points is such that point05 and point06 are the Line EndPoints, point07 and point09 are the sin offset points and point08 is the middle offset point.
Set the optional Vclosed flag to true to create a surface tube.
Then we should end up with the surface below.
In order to visualize the context for the bridge body better we can add surfaces to the end pieces of the support to symbolize the supports. To do so we can add Lines to the CoordinateSystems pointing into the negative direction downwards. We could write a small function that calculates the lowest point of the surface as a driver for the Line length or simply use a fixed value for now.
Now we can play with the variables and the four support points from the very beginning to see the bridge body adapt and change based on the varying context conditions.
Changing the variables can produce either a very continuous body when the leng variable is very small, or when going beyond 360 a very undulating body.
This is the end of this simple example that introduced the use of equations to control simple surfaces based on a geometric context. In contrast to the roof example the geometry of the bridge center line is a result of the boundary conditions and not explicitly described through control points.