Exemple #1
0
        /***************************************************/

        public static Point PointAtParameter(this PolyCurve curve, double parameter)
        {
            if (parameter == 1)
            {
                return(curve.IEndPoint());
            }

            double cLength = parameter * curve.Length();

            foreach (ICurve c in curve.SubParts())
            {
                double l = c.ILength();
                if (l >= cLength)
                {
                    return(c.IPointAtParameter(cLength / l));
                }

                cLength -= l;
            }

            return(null);
        }