Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
GenerativeComponents
  • Product Communities
GenerativeComponents
GenerativeComponents Community Wiki Points On Curve
    • 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
      • BSplineSurface.LoftCurve is throwing an error when trying to add get the curves from cell
      • Cell Feature
      • Create a Set of Random Points
      • Creation of Global function from Custom function
      • Creation of Parabolic curve
      • Error while creating GNT
      • Free Form Roof Example
      • GC Excel Feature
      • GenerativeComponents Essentials Course
      • Get Corner points of a Solid
      • 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
      • Working with Parametric cells
    • +User Projects
    • +Visualized Parametric Experimentations
    • +zed_Older Content

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

    Points On Curve

    Introduction

    In this wiki, we will discuss about taking points in curve.
    First, we are going to see the available nodes and techniques for this purpose.
    Next, we are going to see how GC script can be used in fulfilling some advanced requirements.

    Taking Points on Curve Using Available Node and Technique 

    We are going to place points on curve at a particular distance.
    For this we use the node Point(technique :ByDistanceAlongCurve) and utility node Functioncall(function used: series).

    Part I:
    We attach an existing bspline curve to curve input port of point node. Line, polygon, polyline, arc etc. can also be used as the input.

    Part II:
    We attach the length of the curve as the input for the limit port of the series function.

    Finally, we get the points by attaching  functioncall1 to the DistanceAlongCurve port of the point node.

    https://communities.bentley.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-28/Points-on-Curve-Simple-method.gct

    Taking Points in Curve Leveraging GC Script

    In the above example, we have seen taking points at a fixed interval. In this example, the distance between the points will vary with segments of curve.

    Problem Description:

    The distance between the points for first 10km of the curve with be 500m and for the remaining part of the curve the distance will be between the points will be 1000m.

    Solution:

    We are going to write a function in GC script that will return the list of values required.
    If you are new to scripting you can refer this SIG video.

    This function is as follow

    function (double LengthOfCurve, double SegmentLength, double Interval1, double Interval2)  //Creating function with required input ports
    {
        double pointinterval= {};                                                              //Defining new empty list for storing the values
        double distance=0;
        while (distance<=LengthOfCurve)
        {
            if (distance<SegmentLength)
            {
                distance=distance+Interval1;
                pointinterval.Add(distance);                                                   //Adding values to the list
            }
            else
            {
                distance=distance+Interval2;
                pointinterval.Add(distance);
            }
        }
        return pointinterval;
    }
    

    The value of SegmentLength is entered as 10000.
    The value of Interval1 and Interval2 is entered as 500 and 1000 respectively.

    https://communities.bentley.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-28/Points-on-Curve-Using-GC-Script.gct

    Related

    Point By Function Example

    • Line
    • GC Node
    • Point
    • GCscript
    • Function
    • GenerativeComponents CONNECT Edition
    • curve
    • Share
    • History
    • More
    • Cancel
    • Tathagata Saha Created by Bentley Colleague Tathagata Saha
    • When: Mon, Oct 14 2019 8:23 AM
    • Tathagata Saha Last revision by Bentley Colleague Tathagata Saha
    • When: Mon, Oct 14 2019 8:32 AM
    • Revisions: 4
    • 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

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