Even Spacing for Point Array

Hi All,

I am just working on a façade for a concept that has a double curve. It is just in the concept phase so just a quick model using some bsplines.

As you can see here is has a simple straight side and then a curve end.

I started with 2 separate segments but as you can see there is a joint as the surface starts perpendicular to the curve.

so the next attempt I joined the curves together using the curve node (composite curve) and that works to create a nice surface however when I place a point grid on (ByUVParametersOnSurface) it doesn't space the points how I would like.

I may be missing the option but is there a way to space the points out evenly so each diamond is a consistent size?

DGN sample attached

Thanks

Wayne

  • Hi Wayne,

    Parameter space can be a bit unpredictable, and in this specific case the uneven distribution of curvature shows up.  Consequently, UV-parameterization is not helpful.

    After some experimentation I found a solution for this. For various reasons, the best solution I could find is to generate the points with ByFunction technique. 

    Let me back up: first I backtracked to remove some levels of nesting from the geometry. When using FromElementsInRange, the node's output is always a list, even if it contains only one element, as is the case for Path, CrossSection, and line1.  Whenever using those as inputs later, I changed the references to Path[0], CrossSection[0], and line1[0], respectively, starting with curve1, and continuing with bsplineSurface1, as well.

    Because the vertical subdivision of bsplineSurface1 looked OK, I generated bsplineCurve1 as a BSplineCurve.IsoCurveFromSurface, using the same U parameter subdivision you used for bsplineSurface1 (Series(0, 1, 0.1) ).  This could become a variable as well as now is the horizontal subdivision.

    For the horizontal subdivision I created a Slider numberOfHorizontalBays, generating whole numbers between 5 and 36, limits that could be adjusted whichever way you need them for your design.

    The major work is in point4, which is a Point.ByFunction:

    function (BSplineCurve[] bsp, int numberOfBays)
    {
        //breakpoint;
        if(numberOfBays > 0 && bsp.Count > 0)
        {
            foreach (BSplineCurve crv in bsp)
            {
                if(crv != null)
                {
                    Point pntlist = new Point(this);
                    double baywidth = crv.Length / numberOfBays;
                    double[] incrementalDist = FilledList(numberOfBays + 1, baywidth);
                    incrementalDist[0] = 0.0;
                    incrementalDist[numberOfBays] = incrementalDist[numberOfBays] - 0.001;
                    pntlist.ByIncrementalDistanceAlongCurve(crv, incrementalDist, DistanceCurveOption.ArcLength);
                }
            }
        }
    }

    The function takes the iso-curves generated by bsplineCurve1 and numberOfHorizontalBays as input.  For each of the iso-curves it computes the spacing that is required to create the number of bays and fills a list of values as required for Point.ByIncrementalDistanceAlongCurve to generate evenly spaced points along these iso-curves.  There are two specific steps: first, the list needs a zero as first value to create the first point on each curve.  Then there are equal values as needed for the bay width.  The value for the last point needs to be reduced due to the approximations which are created when spacing points along a B-spline curve by a distance measure rather than a parameter.  For some of the iso-curves this meant that their last points were not on the curves and, therefore, could not be generated.  A tiny adjustment (way below any construction tolerances) prevents those last points from getting lost.  The last step is to use the ByIncrementalDistanceAlongCurve technique to create a list of points along an iso-curve and add it to the calling Point node, point4.

    The result is a much more evenly spaced point grid on the surface, so that Polygon.ByPointGrid is much more evenly distributed across the entire façade.

    4774.GC_Massing_EvenlySpaced.zip

    DGN is attached.

    Result of this investigation there are a few ideas for enhancements.  Thank you!

    HTH,

         Volker

       

    Answer Verified By: Wayne Dickerson 

  • Hi Volker,

    I wanted to open this file which gave me an error with Microstation 08.11.09.867 /  GC 08.11.09.349.

    What would be a proper version  to have a look into this file?

    Ingo

  • Hi Ingo,

    It was created in the connect edition. 

    If you have the opportunity definitely give it a try. 

    Thanks

    Wayne. 

  • Thanks Volker,

    Great information as always. 

    I woke up last night with a similar thinking of dividing up lines that I projected onto the surface. Your approach is much more elegant. 

    I have it a test today and it works very well. Gave me a thought to then link it to the floor manager in AECOsim so the horizontal lines could be generated at the floor intersections. Just need to either use plane curve intersections where the plane is generated by the floor z height or maybe I could find a way of using the floor height in the bsplinecurve.isocurvefromsurface. 

    Thanks again

    Wayne.