/// <summary>
        ///     Gets polyline geometry corresponding to the subcurve(s) between the fromM and the toM.
        /// </summary>
        /// <param name="source">The source.</param>
        /// <param name="fromM">From measurement.</param>
        /// <param name="toM">To measurement.</param>
        /// <param name="offset">The offset.</param>
        /// <returns></returns>
        public static IPolyline GetPolylineByMs(this IMSegmentation4 source, double fromM, double toM, double offset)
        {
            var polyline = source.GetPolylineByMs(fromM, toM);

            var curve = new PolylineClass();

            curve.ConstructOffset(polyline, offset);

            return(curve);
        }