Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
  • Welcome
  • Products
  • Support
  • About
  • More
  • Cancel
GenerativeComponents
  • Product Communities
  • More
GenerativeComponents
GenerativeComponents Community Wiki Simple Bridge Example
    • Sign in
    • +An Overview of GenerativeComponents
    • +Addin Content
    • +Bentley BIM Modeler Accreditation – Program Overview
    • +C# Sample Solution and other Add-ins
    • +GenerativeComponents Solutions
    • +Learn GenerativeComponents
    • +Reference Material
    • Support for GenerativeComponents
    • -Tutorials
      • 3D array copy surface
      • Add RFA data as BuildingContent to ABD with GC Extension
      • Cell Feature
      • Create a Set of Random Points
      • Creation of Global function from Custom function
      • Creation of Parabolic curve
      • Free Form Roof Example
      • GC Excel Feature
      • GenerativeComponents Essentials Course
      • How To Create Surface From Lines & Curves
      • How to Export GC elements
      • How to get concrete sections in the cross-section dialog in Generative Components
      • Landscape Bridge Example
      • +LawCurve
      • List Of Points With A Loop Example
      • Mesh feature 3d print
      • Modular Multiplication On Circle
      • +Operation Node
      • +Optimization with the Optimizer node type
      • Palm Tree Modeler
      • Point By Function Example
      • Points On Curve
      • Prime Number Pattern
      • Selection of Points
      • Selection of points based on Query Expressions
      • Selection of points based on range of indices
      • Set a New Property Value to a Set of Selected Nodes
      • Simple Bridge Example
      • Simple Equations To Describe Form Example
      • Simple Free Form Roof Example
      • Sin Tower
      • Skeleton
      • Sunflower Seed Pattern Modelling
      • Surface Division Basic Steps
      • Surface from Rails and Swept Sections
      • The use of Packager in Generative Components
      • +Tools and Techniques
      • Ulam Spiral From A Rectangular Spiral
      • Video Tutorials
      • Video Tutorials - Short Techniques
    • +User Projects
    • +Visualized Parametric Experimentations
    • +zed_Older Content

     
     Questions about this article, topic, or product? Click here. 

    Simple Bridge Example

    Introduction

    A simple example of using geometric context as the driver for generating adaptive versions of a design.

    Create a new GCTransaction file

    • Create a new GenerativeComponents Transaction file by pressing the New Script Transaction file button  .
    • Arrange the windows in such a way that they do not overlap and both the symbolic view and the geometric view are visible as well as the GenerativeComponents control panel.

    Saving the .gct File

    • Save the file with an appropriate name, for instance bridgeexample01.gct, by clicking on the Save or Save as icon  . If you resume your work open the file using the open button   . GenerativeComponents does not save geometry, but the instructions to generate geometry, so the .gct file cannot be opened in MicroStation or other CAD programs directly.

    View Rotation and the View Window Toolbar

    • Press    for view rotation. To get back to an orthographic view select the spinning arrow and switch from dynamic to “top” in the pull-down menu. This is MicroStation functionality.
    • To zoom in and out there are the + and – buttons   at the bottom of the window frame for Pan   and Fit  .
    • To shade a view click on the lightening bolt and select the shading mode  .

    Placing the Support Points

    • To begin the model select the point creation shortcut   and place four points in an axonometric view into the geometric model in two pairs as the future bridge supports.

    Creating the Bridge Supports

    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.

    Creating the Bridge Center Curve

    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}

    Constructing the adaptive Bridge Section

    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.

    • Start by opening the Feature library  .
    • Scroll to “P” like Plane and open the methods. Select ByParameterAlongCurve as the creation method.
    • As the curve select our BSpline by holding down the Ctrl key and then hovering over the BSplineCurve.
    • For the T Parameter type in a number of type double between 0 and 1, which is the permissible range for a parametric curve in GenerativeComponents, so for instance 0.3 and then press Return.
    • Right-click on the T variable afterwards and make sure the free option is checked so the plane can be moved along the curve for testing.
    • Select the Move tool   and click on the red circle handle that is around the plane you just created.

    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.

    • To create a Direction we need to go to the Feature library   and select the Feature “Direction.” As the creation method we choose ByPlanePlaneIntersection. Fill in plane01 and plane02 and click OK.
    • Now that we have the direction of the ribs we can create two lines that point in opposite directions from the planes.
    • Select Line again from Feature list  and as the method ByStartPointDirectionAndLength. The StartPoint is again plane01 and the Direction is the direction01 we just created. As length we use for now half the length of one of the support lines. In order to create that reference we select the support Line line01 then use the dot again to access its properties, double-click on Length. Multiply the result by 0.5. The final expression should look like this:

    Length = line01.Length * 0.5

    • Press Apply only, not OK, to keep the dialog window open, because we need it for the next step.
    • To repeat the Line to the other side we can use the Create Copy button to the left of Apply.   Create Copy keeps the current values but creates a new Line instance. The only change we need to make is inverting the direction of the Line by changing the Length from 0.5 to –0.5. Now press OK.
    • In addition we can place two points using the point shortcut tool onto the lines end points for easier reference.
    • We should see the view below now.

    Creating the Equation driven Section Points

    • Next in order to create an equation driven adaptable cross section we create three points related to the cross section Line EndPoints.
    • First we should create several variables to control the Sin based equation we are about to use to control the cross section.
    • The GraphVariables can easily be created using the Manage GraphVariable window. We can find it under Graph->Manage Graph Variables. Here add three variables using the Add button. Name them amp1, leng, and offset. After creating them select each and click the limit to range checkbox at the bottom to add sliders to the interface. The window should look like this now.

    • Now we can use these variables in a sin expression that determines the height of the cross section for step along the length of the path. Amp1 stands for the scale factor of the sine function result, leng stands for the scale factor of the 0-1 range along the Line of the T parameter. 360 would give us one sine revolution, we start with 720 to better observe what happens. Offset is a value that shifts the result of the equation. That way we can shift the range of pos. and neg. values of the sine equation into the positive range.

    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.

    Arraying the Section

    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.

    Creating a Surface from the Section Points

    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.

    Adding Context to the Bridge

    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.

    • Tutorial
    • Architecture
    • Learning
    • OpenBuildings Designer
    • Point
    • GenerativeComponents
    • Bridge
    • Generative Design
    • GenerativeComponents CONNECT Edition
    • gct
    • Share
    • History
    • More
    • Cancel
    • Jonathan Asher Created by Jonathan Asher
    • When: Tue, Oct 14 2008 4:00 PM
    • Alifur Mandal Last revision by Bentley Colleague Alifur Mandal
    • When: Fri, Apr 3 2020 6:08 AM
    • Revisions: 7
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2021 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies