Autodesk/civilconnection

Featureline.PointAtStation still getting point when point is not lying on the featureline

atultegar opened this issue · 1 comments

Hi,
In Civil 3D file, the corridor contains only 1 baseline while having 2 baseline regions. Due to which it creates 2 featurelines for same point code. Also, the baseline is made up of very long alignment, due to which whenever I used the node Featureline.PointAtStation giving any station value outside the start and end point of featureline (but the station value withing the alignment station range), I am getting a point. Instead of getting point value, it should give an error or null value for a point.

CivilConn_PointAtStation

CivilConn_PointAtStation2

I also checked the old code of CivilConnection, it was as below:
`public CoordinateSystem CoordinateSystemByStation(double station, bool vertical = true)
{
Utils.Log(string.Format("Featureline.CoordinateSystemByStation started...", ""));

        CoordinateSystem cs = null;
        CoordinateSystem output = null;

        if (Math.Abs(station - this.Start) < 0.00001)
        {
            station = this.Start;
        }

        if (Math.Abs(station - this.End) < 0.00001)
        {
            station = this.End;
        }

        //bool findIntersection = true;

        if (station < this.Start || station > this.End)
        {
            var message = "The Station value is not compatible with the Featureline.";

            Utils.Log(string.Format("ERROR: {0}", message));

            //findIntersection = false;
            //return null;
        }

        cs = this._baseline.CoordinateSystemByStation(station);

        Utils.Log(string.Format("CoordinateSystem: {0}", cs));`

and in the new version of code :
` public CoordinateSystem CoordinateSystemByStation(double station, bool vertical = true)
{
Utils.Log(string.Format("Featureline.CoordinateSystemByStation started...", ""));

        CoordinateSystem cs = null;
        CoordinateSystem output = null;

        if (Math.Abs(station - this.Start) < 0.00001)
        {
            station = this.Start;
        }

        if (Math.Abs(station - this.End) < 0.00001)
        {
            station = this.End;
        }

        if (station < this.Start || station > this.End)
        {
            var message = "The Station value is not compatible with the Featureline.";

            Utils.Log(string.Format("ERROR: {0}", message));
        }

        cs = this._baseline.CoordinateSystemByStation(station);

        Utils.Log(string.Format("CoordinateSystem: {0}", cs));`

CivilConnection_temp.log

Requesting you to look into this issue.

Thanks
Atul Tegar

@atultegar this is by design, not going to change it.