예제 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="pts"></param>
        /// <param name="startTangent"></param>
        /// <param name="endTangent"></param>
        /// <returns></returns>
        public static BSplineCurve ByPoints(Point[] pts, Vector startTangent, Vector endTangent)
        {
            if (pts == null || startTangent == null || endTangent == null ||
                startTangent.IsZeroVector() || endTangent.IsZeroVector())
            {
                return(null);
            }

            IBSplineCurveHost ent = HostFactory.Factory.BSplineByPoints(pts.ToHostArray(), startTangent, endTangent);
            var spline            = new BSplineCurve(ent, true);

            spline.Points       = pts;
            spline.Degree       = 3;
            spline.StartTangent = startTangent;
            spline.EndTangent   = endTangent;

            return(spline);
        }
예제 #2
0
 internal BSplineCurve(IBSplineCurveHost host, bool persist = false)
     : base(host, persist)
 {
 }
예제 #3
0
 internal BSplineCurve(IBSplineCurveHost host, bool persist = false)
     : base(host, persist)
 {
 }