Place Solid along the path

I am trying to place Road barriers along a path (polyline). The solid is converted from Microstation smart solid to GC readable solid. I have set-up a coordinate system at the start of my polyline. How can I array my solid (barrier) along the path? (Please note that my path is not planer, please check attached photo).

Things I want to achieve are,

1. Array Solid along the path.

2. Maintain min. 10mm spacing between each solid.

3. Output solids should follow the path vertically and horizontally.

4. If above mention things can be achieved then what are the steps (eg. do I have to setup point nodes, or coordinate system or planes along the path, any other things that I have to do to achieve my goal)

Thanks in Advance,

Jaimin Patel

  • Hi Jaimin,

    Yes, this can be achieved. Crucial is how you designed your components that you want to place along the path and the geometric type of your path.

    You know that any DGN Model can be used as a cell. A MicroStation solid (any MicroStation solid --there should not be any conversion required into a GC readable solid) in a DGN Model, therefore, is a cell, and the solid's relative location to the origin of the DGN Model determines how it will be placed as a cell. Cell nodes in GC align with their placement CoordinateSystem nodes (an input to the Cell node). Therefore, key in this is how to find the proper alignment of the GC CoordinateSystem node with the path at the placement point. This is the same challenge one would face when placing these cells manually along a path. However, with GC one can find out what the rules are for that placement once, and then apply it to all other cases (e.g. the dozens or more along that same path; or placement of another cell along another path in another project).

    You mention that your path is a polyline (Line String element in MicroStation, PolyLine node in GenerativeComponents, I assume). Depending on where the placement origin of the MicroStation solid (the cell) is, one would need to figure out how one would like the cells placed in relation to the path. There are perhaps three main cases: (1) the cell is short compared to the length of the polyline segments, (2) the cell is long compared to the length of the polyline segments, (3) there is a corner/bend in the path where the cell is supposed to be placed. For all those three cases, another question would be whether the start and end "points" of the cell are supposed to lie on the path, or whether it's the placement origin of the cell that should be on the path. All these aspects affect how the location and orientation of the placement coordinate systems for the cells would have to be determined.

    Lets focus on one case: "start point" and "end point" of the cell are supposed to lie on the path. Then I'd most likely use placement using the "ByFunction" technique and write a function that "walks" along the path, starting at whatever is the input for the start distance along the path (greater or equal to zero). Because I don't know on which of the polyline segments the "end point" of my cell will end up, I'll construct a sphere around the "start point" (and any next point I find alternating between the cell's length and the desired spacing between subsequent cells) and then check the resulting intersection with the current or next segments until I find a valid intersection further along the polyline. That intersection point will be the "end point" of my cell (or the interstitial space). From those two points in space I can construct an unambiguous coordinate system which will allow me to place the cell. I iterate between placing cells and creating interstitial spaces (not placing anything) until I reach the end of the polyline. This method will take care of cases (1) and (2), placing the cell by "chord" around corners/bends (case (3)).

    HTH,

         Volker

       

  • I got the theory of placement of an object.

    I assume I will have to develop a script which will place the cell followed by following steps.

    1. Find the origin of placement (which will be the start point of a line for example)

    2. Construct a "sphear" around the "start point" by the radius which will intersect a point on the path. This point will be a reference point to construct the unambiguous coordinate system.

    3. Place the cell along the coordinate system developed in Step 2.

    4. Place a point by offset along the curve (for eg. 10mm). The reference point for offset will be the point generated by the sphear intersection (as mention in step 2).

    5. Repeat step 1-4 by the number of cells along the path or distance along the path function.

    Please correct me if I am going on the wrong track. If my assumptions are right then is there any example script that covers this steps. My apologies for asking too much help, I am very new to GC and trying my head around. I am now comfortable with using different nodes but can't develop a script.

    If you could generate a full script, it will be very helpful for new users to understand scripts form real example and also for other people who want to achieve the same task. As you mention, it will be a standard script that can be used in any projects (by changing reference cell and polyline). 

    Any help will be appreciated.

  • Somehow my previous post removed. :/ Anyway...

    Please check Karsten's videos as a starter if you didn't yet.

    https://www.youtube.com/channel/UCSBc2Tuui0OH-r-clhGfi4w/videos

    I hope Volker can show us how to find intersection point of sphere and curve/polyline/line Slight smile with scripting or with any other amazing method.

    But yes! I did try to achieve it with node structure few months back and you can find all details below.

    transaction 1 modelChange 'Add baseCS, bsplineSurface3, coordinateSystem2, line1, line1_EndPoint, line1_StartPoint, point3, solid1, solid1_Centroid'
    {
        node User.Objects.baseCS Bentley.GC.NodeTypes.CoordinateSystem
        {
            Technique                 = 'AtModelOrigin';
            DGNModelName              = 'Design Model';
            SymbolSize                = 1;
            GraphLocation             = {644.8, -677.12};
        }
        node User.Objects.line1_StartPoint Bentley.GC.NodeTypes.Point
        {
            Technique                 = 'OnPlane';
            Plane                     = baseCS.XYPlane;
            XTranslation              = <free> 16850.1057076784;
            YTranslation              = <free> 29365.4659236188;
            Color                     = 0;
            LevelName                 = 'Default';
            LineStyleName             = '0';
            LineWeight                = 0;
            GraphLocation             = {934.006, -601.088, 0.0, 142.443};
        }
        node User.Objects.line1_EndPoint Bentley.GC.NodeTypes.Point
        {
            Technique                 = 'OnPlane';
            Plane                     = baseCS.XYPlane;
            XTranslation              = <free> 139708.907498415;
            YTranslation              = <free> 59216.8804251538;
            Color                     = 0;
            LevelName                 = 'Default';
            LineStyleName             = '0';
            LineWeight                = 0;
            GraphLocation             = {925.062, -439.035, 172.576, 142.443};
        }
        node User.Objects.line1 Bentley.GC.NodeTypes.Line
        {
            Technique                 = 'ByPoints';
            StartPoint                = line1_StartPoint;
            EndPoint                  = line1_EndPoint;
            Color                     = 0;
            LevelName                 = 'Default';
            LineStyleName             = '0';
            LineWeight                = 0;
            GraphLocation             = {1165.248, -594.925};
        }
        node User.Objects.solid1_Centroid Bentley.GC.NodeTypes.Point
        {
            Technique                 = 'OnPlane';
            Plane                     = baseCS.XYPlane;
            XTranslation              = <free> 40417.8011373495;
            YTranslation              = <free> 35910.8159124388;
            Color                     = 0;
            LevelName                 = 'Default';
            LineWeight                = 0;
            GraphLocation             = {931.984, -799.52, 0.0, 142.443};
        }
        node User.Objects.solid1 Bentley.GC.NodeTypes.Solid
        {
            Technique                 = 'SphereByCentroidRadius';
            Centroid                  = solid1_Centroid;
            Radius                    = 7900;
            Visibility                = NodeVisibility.Visible;
            GraphLocation             = {1154.086, -792.55, 0.0, 129.017};
        }
        node User.Objects.bsplineSurface3 Bentley.GC.NodeTypes.BSplineSurface
        {
            Technique                 = 'SelectSurfaceFromSolid';
            SolidToSelectSurfacesFrom = solid1;
            SelectorPoint             = solid1.Centroid;
            Visibility                = NodeVisibility.Hidden;
            GraphLocation             = {1439.068, -797.787, 0.0, 129.017};
        }
        node User.Objects.coordinateSystem2 Bentley.GC.NodeTypes.CoordinateSystem
        {
            Technique                 = 'AtCurveSurfaceIntersection';
            Curve                     = line1;
            Surface                   = bsplineSurface3;
            Visibility                = NodeVisibility.Visible;
            GraphLocation             = {1793.279, -602.996};
        }
        node User.Objects.point3 Bentley.GC.NodeTypes.Point
        {
            Technique                 = 'AtCurveSurfaceIntersection';
            Curve                     = line1;
            Surface                   = bsplineSurface3;
            GraphLocation             = {1783.148, -802.455, 0.0, 169.297};
        }
    }

  • Hi Emre,

    Thanks for your response.

    I followed instruction by Volker and somehow achieved this. (refer the image). I am able to generate things by nodes but still very hard writing the script. I could manually place sphear followed by the point at the intersection but I need to create a script which will do the job. Please note, I had to convert my spheresolid to BSplineSurface to get point at the intersection. Also, while creating a point at the intersection I am getting 2 points as the sphere will intersect on both directions on a curve (polyline). I will need to add the function which will ignore those points. I hope Volker will help us generate a proper script for this job. Especially in infrastructure (liner geometry), we use this function often to place objects like barriers, culverts, wall panels etc,. It will be very helpful if we can sort this out, then we can use the same script in future projects.

    node User.Objects.solid3 Bentley.GC.NodeTypes.Solid
        {
            Technique                 = 'SphereByCentroidRadius';
            Centroid                  = bsplineCurve1.StartPoint;
            Radius                    = 6;
            Density                   = 1;
            GraphLocation             = {1212.256, 16.554};
        }
    }
    
    {
        node User.Objects.solid3 Bentley.GC.NodeTypes.Solid
        {
            GraphLocation             = {1199.056, 20.154};
        }
    }
    
    {
        node User.Objects.bsplineSurface1 Bentley.GC.NodeTypes.BSplineSurface
        {
            Technique                 = 'ExtractAllSurfacesFromSolid';
            SolidToExtractSurfacesFrom = solid3;
            GraphLocation             = {1411.157, 20.57, 0.0, 115.59};
        }
        node User.Objects.point1 Bentley.GC.NodeTypes.Point
        {
            Technique                 = 'AtIntersection';
            Intersector0              = bsplineCurve1;
            Intersector1              = bsplineSurface1;
            IntersectionDirection     = baseCS.YDirection;
            Replication               = ReplicationOption.CorrespondingIndexing;
            GraphLocation             = {1639.556, 5.756};
        }
    }

  • Hi All,

    My apologies, today and tomorrow morning I am focusing on preparing the GC SIG tomorrow. I'll then work through an example script because what you describe is a recurring challenge.

    I was working from (sort of first) principles when describing the algorithm, that's why I chose a sphere for testing for the end point. I might have put my finger on a gap in GC's capabilities and will follow up on my side of things on that.

    Meanwhile, from any center point and a segment's start and end points I can construct a plane on which I can draw a circle or arc to find that intersection point for the end point of the placed cell. This requires to step through subsequent segments until I find an intersection. A sphere could have made this easier. Good that you found the B-spline surface work around. Filtering the intersection points may be another challenge for which there certainly is some solution, like distances from start and end points of the segment on which one would expect the intersection point. I'll look into that tomorrow afternoon.

    Transforming the steps from transactions to placing the cells using the ByFunction technique is the next step. One would most likely use a do-while or a while loop to iterate through the individual steps. Again, more about that tomorrow.

    Regards,

         Volker