示例#1
0
        public NurbsLine Restore()
        {
            NurbsLine nurbs = new NurbsLine();

            nurbs.CtrlCnt     = CtrlCnt;
            nurbs.CtrlDataCnt = CtrlDataCnt;
            nurbs.Weights     = MpUtil_v1002.ArrayClone <double>(Weights);
            nurbs.CtrlPoints  = MpUtil_v1002.VertexListFromMp(CtrlPoints);
            nurbs.CtrlOrder   = MpUtil_v1002.ArrayClone <int>(CtrlOrder);

            nurbs.BSplineP = BSplineP.Restore();

            return(nurbs);
        }
示例#2
0
        public static MpNurbsLine_v1002 Create(NurbsLine src)
        {
            MpNurbsLine_v1002 ret = new MpNurbsLine_v1002();

            ret.CtrlCnt     = src.CtrlCnt;
            ret.CtrlDataCnt = src.CtrlDataCnt;
            ret.Weights     = MpUtil_v1002.ArrayClone <double>(src.Weights);
            ret.CtrlPoints  = MpUtil_v1002.VertexListToMp(src.CtrlPoints);
            ret.CtrlOrder   = MpUtil_v1002.ArrayClone <int>(src.CtrlOrder);

            ret.BSplineP = MpBSplineParam_v1002.Create(src.BSplineP);

            return(ret);
        }
示例#3
0
        public BSplineParam Restore()
        {
            BSplineParam bs = new BSplineParam();

            bs.Degree    = Degree;
            bs.DivCnt    = DivCnt;
            bs.OutputCnt = OutputCnt;
            bs.KnotCnt   = KnotCnt;
            bs.Knots     = MpUtil_v1002.ArrayClone <double>(Knots);
            bs.LowKnot   = LowKnot;
            bs.HighKnot  = HighKnot;
            bs.Step      = Step;

            return(bs);
        }
示例#4
0
        public static MpBSplineParam_v1002 Create(BSplineParam src)
        {
            MpBSplineParam_v1002 ret = new MpBSplineParam_v1002();

            ret.Degree    = src.Degree;
            ret.DivCnt    = src.DivCnt;
            ret.OutputCnt = src.OutputCnt;
            ret.KnotCnt   = src.KnotCnt;
            ret.Knots     = MpUtil_v1002.ArrayClone <double>(src.Knots);
            ret.LowKnot   = src.LowKnot;
            ret.HighKnot  = src.HighKnot;
            ret.Step      = src.Step;

            return(ret);
        }
示例#5
0
        public NurbsSurface Restore()
        {
            NurbsSurface nurbs = new NurbsSurface();

            nurbs.UCtrlCnt = UCtrlCnt;
            nurbs.VCtrlCnt = VCtrlCnt;

            nurbs.UCtrlDataCnt = UCtrlDataCnt;
            nurbs.VCtrlDataCnt = VCtrlDataCnt;

            nurbs.CtrlPoints = MpUtil_v1002.VertexListFromMp(CtrlPoints);

            nurbs.Weights   = MpUtil_v1002.ArrayClone <double>(Weights);
            nurbs.CtrlOrder = MpUtil_v1002.ArrayClone <int>(CtrlOrder);

            nurbs.UBSpline = UBSpline.Restore();
            nurbs.VBSpline = VBSpline.Restore();

            return(nurbs);
        }