프로젝트

일반

사용자정보

개정판 f40b9943

IDf40b9943532bc10409b2acc410231f273d78de57
상위 c4ad9cf9
하위 4c08c484

백흠경이(가) 일년 이상 전에 추가함

Fix: nuget을 통해 테마 적용

Change-Id: If6de48042fbababdcd466305a53b3db8fb1059fd

차이점 보기:

ID2.Manager/ID2.Manager/Controls/Verification.cs
146 146
                {
147 147
                    _progressBar.Text = doc.DocumentNo;
148 148
                    CompareDrawing(doc, true);
149
                    Invalidate();
150 149

  
151 150
                    using (var bmp = this.designCompare.RenderToBitmap(size))
152 151
                    {
......
181 180

  
182 181
                    var provider = new PdfFormatProvider();
183 182
                    File.WriteAllBytes(selectedFileName, provider.Export(FixedDoc));
183

  
184
                    RadMessageBox.Show("Comparing document is done");
184 185
                }
185 186
            }
186 187
            catch(Exception ex)
187 188
            {
188 189
                RadMessageBox.Show(ex.Message);
189
                return;
190 190
            }
191

  
192
            RadMessageBox.Show("Comparing document is done");
193 191
        }
194 192

  
195 193
        /// <summary>
......
399 397
        }
400 398

  
401 399
        /// <summary>
402
        /// 주어진 두 도면(lhs, rhs)을 비교한다.
400
        /// 주어진 도면의 원본과 AVEVA를 비교한다.
403 401
        /// </summary>
404 402
        private void CompareDrawing(Documents doc, bool ResultOnly = false)
405 403
        {
......
719 717
                    {
720 718
                        ColorEntity(design1, AutoCADEntities[i], Verification.DiffColor, colorMethodType.byEntity, false);
721 719

  
720
                        #region 틀린 엔터티의 BoundingBox를 구함
722 721
                        var origin = new devDept.Geometry.Point2D(entVp1.BoxMin.X - 1, entVp1.BoxMin.Y - 1);
723 722
                        double width = entVp1.BoxMax.X - entVp1.BoxMin.X;
724 723
                        double height = entVp1.BoxMax.Y - entVp1.BoxMin.Y;
725 724
                        var rect = new devDept.Eyeshot.OrientedBoundingRect(origin, width + 2, height + 2);
726 725
                        DiffRegions.Add(rect);
726
                        #endregion
727 727
                    }
728 728
                }
729 729

  
......
733 733
                    {
734 734
                        ColorEntity(design2, AVEVAEntities[j], Verification.DiffColor, colorMethodType.byEntity, false);
735 735

  
736
                        #region 틀린 엔터티의 BoundingBox를 구함 
736 737
                        var origin = new devDept.Geometry.Point2D(AVEVAEntities[j].BoxMin.X - 1, AVEVAEntities[j].BoxMin.Y - 1);
737 738
                        double width = AVEVAEntities[j].BoxMax.X - AVEVAEntities[j].BoxMin.X;
738 739
                        double height = AVEVAEntities[j].BoxMax.Y - AVEVAEntities[j].BoxMin.Y;
739 740
                        var rect = new devDept.Eyeshot.OrientedBoundingRect(origin, width + 2, height + 2);
740 741
                        DiffRegions.Add(rect);
742
                        #endregion
741 743
                    }
742 744
                }
743 745

  
......
749 751
                    var first = queue[0];
750 752
                    var FirstMin = first.GetOrigin();
751 753
                    var FirstMax = FirstMin + first.GetAxis()[0] * first.Size.X + first.GetAxis()[1] * first.Size.Y;
752
                    double FirstMinX = first.GetVertices().Select(x => x.X).Min();
753
                    double FirstMinY = first.GetVertices().Select(x => x.Y).Min();
754
                    double FirstMaxX = first.GetVertices().Select(x => x.X).Max();
755
                    double FirstMaxY = first.GetVertices().Select(x => x.Y).Max();
756 754

  
757 755
                    queue.Remove(first);
758 756
                    bool overlap = false;
......
765 763
                            var SecondMin = second.GetOrigin();
766 764
                            var SecondMax = SecondMin + second.GetAxis()[0] * second.Size.X + second.GetAxis()[1] * second.Size.Y;
767 765

  
768
                            double SecondMinX = second.GetVertices().Select(x => x.X).Min();
769
                            double SecondMinY = second.GetVertices().Select(x => x.Y).Min();
770
                            double SecondMaxX = second.GetVertices().Select(x => x.X).Max();
771
                            double SecondMaxY = second.GetVertices().Select(x => x.Y).Max();
772

  
773
                            var min = new devDept.Geometry.Point2D(Math.Min(FirstMinX, SecondMinX), Math.Min(FirstMinY, SecondMinY));
774
                            var max = new devDept.Geometry.Point2D(Math.Max(FirstMaxX, SecondMaxX), Math.Max(FirstMaxY, SecondMaxY));
766
                            var min = new devDept.Geometry.Point2D(Math.Min(FirstMin.X, SecondMin.X), Math.Min(FirstMin.Y, SecondMin.Y));
767
                            var max = new devDept.Geometry.Point2D(Math.Max(FirstMax.X, SecondMax.X), Math.Max(FirstMax.Y, SecondMax.Y));
775 768
                            double width = max.X - min.X;
776 769
                            double height = max.Y - min.Y;
777 770

  
778
                            min = new devDept.Geometry.Point2D(Math.Min(FirstMin.X, SecondMin.X), Math.Min(FirstMin.Y, SecondMin.Y));
779
                            max = new devDept.Geometry.Point2D(Math.Max(FirstMax.X, SecondMax.X), Math.Max(FirstMax.Y, SecondMax.Y));
780
                            width = max.X - min.X;
781
                            height = max.Y - min.Y;
782

  
771
                            #region 두 영역을 합친다.(작업 완료된 영역도 다시 queue에 넣는다.)
783 772
                            var rect = new devDept.Eyeshot.OrientedBoundingRect(min, width, height);
784 773
                            queue.Add(rect);
785 774
                            queue.AddRange(DiffRegions);
786 775
                            DiffRegions.Clear();
787 776
                            queue.Remove(second);
777
                            #endregion
788 778
                            break;
789 779
                        }
790 780
                    }
......
793 783
                }
794 784
                #endregion
795 785

  
796
                DiffRegions.ForEach(x =>
797
                {
798
                    DrawRevCloud(design2, x);  
799
                });
786
                DiffRegions.ForEach(x => DrawRevCloud(design2, x));
800 787
            }
801 788
            catch(Exception ex)
802 789
            {

내보내기 Unified diff

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