Exemple #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);
        }
Exemple #2
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);
        }
Exemple #3
0
        public HeModel Restore()
        {
            HeModel ret = new HeModel();

            ret.VertexStore = MpUtil_v1002.VertexListFromMp(VertexStore);

            ret.NormalStore = MpUtil_v1002.Vector3dListFromMp(NormalStore);

            // Create dictionary
            Dictionary <uint, HalfEdge> dic = new Dictionary <uint, HalfEdge>();

            dic[0] = null;

            for (int i = 0; i < HalfEdgeList.Count; i++)
            {
                HalfEdge he = HalfEdgeList[i].Restore();
                dic.Add(he.ID, he);

                HalfEdgeList[i].TempHalfEdge = he;
            }

            // Create links
            for (int i = 0; i < HalfEdgeList.Count; i++)
            {
                HalfEdge he = HalfEdgeList[i].TempHalfEdge;
                he.Pair = dic[HalfEdgeList[i].PairID];
                he.Next = dic[HalfEdgeList[i].NextID];
                he.Prev = dic[HalfEdgeList[i].PrevID];
            }

            ret.FaceStore = MpUtil_v1002.HeFaceListFromMp(FaceStore, dic);

            ret.HeIdProvider.Counter = HeIdCount;

            ret.FaceIdProvider.Counter = FaceIdCount;

            return(ret);
        }