프로젝트

일반

사용자정보

개정판 ba25c427

IDba25c4275192606ca033af89317d7b4cc02bbb5b
상위 28d05cc2
하위 9157c1b8

gaqhf 이(가) 5년 이상 전에 추가함

dev issue #1191 : fix minor

Change-Id: Ib27dd847e30bf2db8324c35a20ee2f97b8c0c06b

차이점 보기:

DTI_PID/SPPIDConverter/AutoModeling.cs
664 664
            List<Note> endList = new List<Note>();
665 665
            if (correctList.Count > 0)
666 666
                endList.Add(correctList[0]);
667
            foreach (var item in document.NOTES)
667
            foreach (var item in correctList)
668 668
                try
669 669
                {
670 670
                    if (!endList.Contains(item))
......
4118 4118
                loop = false;
4119 4119
                foreach (var overlap in endList)
4120 4120
                {
4121
                    if (overlap.SPPID.Range != null && note.SPPID.Range !=null)
4121
                    if (SPPIDUtil.IsOverlap(overlap.SPPID.Range, note.SPPID.Range))
4122 4122
                    {
4123
                        if (SPPIDUtil.IsOverlap(overlap.SPPID.Range, note.SPPID.Range))
4123
                        double tempX = 0;
4124
                        double tempY = 0;
4125
                        bool overlapX = false;
4126
                        bool overlapY = false;
4127
                        SPPIDUtil.CalcOverlap(note.SPPID.Range, overlap.SPPID.Range, ref tempX, ref tempY, ref overlapX, ref overlapY);
4128
                        double angle = SPPIDUtil.CalcAngle(note.LOCATION_X, note.LOCATION_Y, overlap.LOCATION_X, overlap.LOCATION_Y);
4129
                        if (overlapY && angle >= 45)
4124 4130
                        {
4125
                            double tempX = 0;
4126
                            double tempY = 0;
4127
                            bool overlapX = false;
4128
                            bool overlapY = false;
4129
                            SPPIDUtil.CalcOverlap(note.SPPID.Range, overlap.SPPID.Range, ref tempX, ref tempY, ref overlapX, ref overlapY);
4130
                            double angle = SPPIDUtil.CalcAngle(note.LOCATION_X, note.LOCATION_Y, overlap.LOCATION_X, overlap.LOCATION_Y);
4131
                            if (overlapY && angle >= 45)
4132
                            {
4133
                                int count = Convert.ToInt32(tempY / gridSetting.Length) + 1;
4134
                                double move = gridSetting.Length * count;
4135
                                note.SPPID.SPPID_Y = note.SPPID.SPPID_Y - move;
4136
                                note.SPPID.Range = new double[] { note.SPPID.Range[0], note.SPPID.Range[1] - move, note.SPPID.Range[2], note.SPPID.Range[3] - move };
4137
                                needRemodeling = true;
4138
                                loop = true;
4139
                            }
4140
                            if (overlapX && angle <= 45)
4141
                            {
4142
                                int count = Convert.ToInt32(tempX / gridSetting.Length) + 1;
4143
                                double move = gridSetting.Length * count;
4144
                                note.SPPID.SPPID_X = note.SPPID.SPPID_X + move;
4145
                                note.SPPID.Range = new double[] { note.SPPID.Range[0] + move, note.SPPID.Range[1], note.SPPID.Range[2] + move, note.SPPID.Range[3] };
4146
                                needRemodeling = true;
4147
                                loop = true;
4148
                            }
4131
                            int count = Convert.ToInt32(tempY / gridSetting.Length) + 1;
4132
                            double move = gridSetting.Length * count;
4133
                            note.SPPID.SPPID_Y = note.SPPID.SPPID_Y - move;
4134
                            note.SPPID.Range = new double[] { note.SPPID.Range[0], note.SPPID.Range[1] - move, note.SPPID.Range[2], note.SPPID.Range[3] - move };
4135
                            needRemodeling = true;
4136
                            loop = true;
4137
                        }
4138
                        if (overlapX && angle <= 45)
4139
                        {
4140
                            int count = Convert.ToInt32(tempX / gridSetting.Length) + 1;
4141
                            double move = gridSetting.Length * count;
4142
                            note.SPPID.SPPID_X = note.SPPID.SPPID_X + move;
4143
                            note.SPPID.Range = new double[] { note.SPPID.Range[0] + move, note.SPPID.Range[1], note.SPPID.Range[2] + move, note.SPPID.Range[3] };
4144
                            needRemodeling = true;
4145
                            loop = true;
4149 4146
                        }
4150 4147
                    }
4151
                    else
4152
                    {
4153

  
4154
                    }
4155
                   
4156 4148
                }
4157 4149
            }
4158 4150

  

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)