Пример #1
0
        /// <summary>
        /// Cadデータをコピーする
        /// </summary>
        /// <param name="src"></param>
        public void CopyData(CadLogicBase src)
        {
            // CadモードもUndo/Redo対象に入れる
            _CadMode = src._CadMode;

            for (int y = 0; y < MaxDiv.Height; y++)
            {
                for (int x = 0; x < MaxDiv.Width; x++)
                {
                    AreaSelection[y, x] = src.AreaSelection[y, x];
                }
            }
            for (int x = 0; x < MaxDiv.Width + 1; x++)
            {
                for (int y = 0; y < MaxDiv.Height; y++)
                {
                    YBoundarySelection[y, x] = src.YBoundarySelection[y, x];
                }
            }
            for (int y = 0; y < MaxDiv.Height + 1; y++)
            {
                for (int x = 0; x < MaxDiv.Width; x++)
                {
                    XBoundarySelection[y, x] = src.XBoundarySelection[y, x];
                }
            }
            EdgeList.Clear();
            foreach (Edge srcEdge in src.EdgeList)
            {
                Edge edge = new Edge(srcEdge.Delta);
                edge.CP(srcEdge);
                EdgeList.Add(edge);
            }
            IncidentPortNo = src.IncidentPortNo;
            //SelectedMediaIndex = src.SelectedMediaIndex;
            for (int i = 0; i < src.Medias.Length; i++)
            {
                Medias[i].SetP(src.Medias[i].P);
                Medias[i].SetQ(src.Medias[i].Q);
            }
            _NdivForOneLattice = src._NdivForOneLattice;
            _RodRadiusRatio    = src._RodRadiusRatio;
            _RodCircleDiv      = src._RodCircleDiv;
            _RodRadiusDiv      = src._RodRadiusDiv;
        }
Пример #2
0
        /// <summary>
        /// Cadデータをコピーする
        /// </summary>
        /// <param name="src"></param>
        public void CopyData(CadLogicBase src)
        {
            // CadモードもUndo/Redo対象に入れる
            _CadMode = src._CadMode;

            for (int y = 0; y < MaxDiv.Height; y++)
            {
                for (int x = 0; x < MaxDiv.Width; x++)
                {
                    AreaSelection[y, x] = src.AreaSelection[y, x];
                }
            }
            for (int x = 0; x < MaxDiv.Width + 1; x++)
            {
                for (int y = 0; y < MaxDiv.Height; y++)
                {
                    YBoundarySelection[y, x] = src.YBoundarySelection[y, x];
                }
            }
            for (int y = 0; y < MaxDiv.Height + 1; y++)
            {
                for (int x = 0; x < MaxDiv.Width; x++)
                {
                    XBoundarySelection[y, x] = src.XBoundarySelection[y, x];
                }
            }
            EdgeList.Clear();
            foreach (Edge srcEdge in src.EdgeList)
            {
                Edge edge = new Edge(srcEdge.Delta);
                edge.CP(srcEdge);
                EdgeList.Add(edge);
            }
            IncidentPortNo = src.IncidentPortNo;
            //SelectedMediaIndex = src.SelectedMediaIndex;
            for (int i = 0; i < src.Medias.Length; i++)
            {
                Medias[i].SetP(src.Medias[i].P);
                Medias[i].SetQ(src.Medias[i].Q);
            }
            _NdivForOneLattice = src._NdivForOneLattice;
            _RodRadiusRatio = src._RodRadiusRatio;
            _RodCircleDiv = src._RodCircleDiv;
            _RodRadiusDiv = src._RodRadiusDiv;
        }