프로젝트

일반

사용자정보

개정판 54be6611

ID54be661144fe2cc8a8497de7b2b9ae046e1f8a77
상위 7a16f1f8
하위 353b7f9f

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

Fix: 유사도 리스트 목록 동기화

Change-Id: Id12ee063f2ed00fae961e088ce9188f2c9dd7a12

차이점 보기:

ID2.Manager/ID2.Manager.Compare/Classes/CompareModelWorkUnit.cs
1
using devDept.Eyeshot;
2
using devDept.Eyeshot.Entities;
3
using devDept.Geometry.Entities;
4
using devDept.Eyeshot.Translators;
5
using System;
6
using System.Collections.Generic;
7
using System.ComponentModel;
8
using System.Linq;
9
using System.Text;
10
using System.Threading.Tasks;
11
using devDept.Geometry;
12
using System.Windows.Forms;
13
using Telerik.WinControls;
14
using System.Drawing;
15
using System.Numerics;
16
using System.IO;
17

  
18
namespace ID2.Manager.Classes
19
{
20
    public class CompareModelWorkUnit : devDept.WorkUnit
21
    {
22
        private static readonly int SLICES = 16;
23
        private static readonly double TOLER = 1;
24

  
25
        System.ComponentModel.BackgroundWorker _worker;
26
        private Workspace _workspace;
27
        private List<Entity> _AutoCADEntities { get; } = new List<Entity>();
28
        private List<Entity> _AVEVAEntities { get; } = new List<Entity>();
29
        public double Tolerance { get; set; } = 0;
30
        public double LengthToleranceRatio { get; set; } = 0;
31

  
32
        public string AutoCADDiffLayer { get; set; }
33
        public string AVEVADiffLayer { get; set; }
34
        public System.Drawing.Color DiffColor { get; set; }
35

  
36
        public string RevCloudLayer { get; set; }
37
        public System.Drawing.Color RevCloudColor { get; set; }
38

  
39
        public CompareModelWorkUnit(Workspace workspace, List<Entity> AutoCADEntities, List<Entity> AVEVAtities)
40
        {
41
            _workspace = workspace;
42
            _AutoCADEntities.AddRange(AutoCADEntities);
43
            _AVEVAEntities.AddRange(AVEVAtities);
44
        }
45

  
46
        public override void DoWork(System.ComponentModel.BackgroundWorker worker, System.ComponentModel.DoWorkEventArgs doWorkEventArgs)
47
        {
48
            var DiffRegions = new List<devDept.Eyeshot.OrientedBoundingRect>();
49

  
50
            bool[] equalEntitiesInV2 = new bool[_AVEVAEntities.Count];
51
            var EqualIndices = new List<int>();
52

  
53
            /// 서로 검사 가능한 타입인지 확인한다.
54
            bool CheckType(Entity ent1, Entity ent2)
55
            {
56
                return ent1.GetType() == ent2.GetType() ||
57
                    (ent1.GetType() == typeof(devDept.Eyeshot.Entities.Text) && ent2.GetType() == typeof(devDept.Eyeshot.Entities.MultilineText)) ||
58
                    (ent1.GetType() == typeof(devDept.Eyeshot.Entities.MultilineText) && ent2.GetType() == typeof(devDept.Eyeshot.Entities.Text)) ||
59
                    (ent1.GetType() == typeof(devDept.Eyeshot.Entities.Line) && ent2.GetType() == typeof(devDept.Eyeshot.Entities.TabulatedSurface)) ||
60
                    (ent1.GetType() == typeof(devDept.Eyeshot.Entities.Attribute) && ent2.GetType() == typeof(devDept.Eyeshot.Entities.Text)) ||
61
                    (ent1.GetType() == typeof(devDept.Eyeshot.Entities.Attribute) && ent2.GetType() == typeof(devDept.Eyeshot.Entities.MultilineText));
62
            }
63

  
64
            try
65
            {
66
                for (int i = 0; i < _AutoCADEntities.Count(); i++)
67
                {
68
                    Entity entVp1 = _AutoCADEntities[i];
69
                    EqualIndices.Clear();
70

  
71
                    for (int j = 0; j < _AVEVAEntities.Count(); j++)
72
                    {
73
                        Entity entVp2 = _AVEVAEntities[j];
74

  
75
                        if (entVp2 is BlockReference blkref && (blkref.BlockName == "PSNODE" || blkref.BlockName == "PENODE")) continue;
76
                        if (!equalEntitiesInV2[j] && CheckType(entVp1, entVp2) &&
77
                            CompareIfEqual(_workspace, entVp1, _workspace, entVp2))
78
                        {
79
                            EqualIndices.Add(j);
80
                        }
81
                    }
82

  
83
                    #region 임계값 안에 들어오는 항목이 여러개 있을 경우 가장 가까운 항목을 유사 항목으로 선택한다.
84
                    if (EqualIndices.Any())
85
                    {
86
                        var ordered = EqualIndices.ConvertAll(x => _AVEVAEntities[x]).OrderBy(x =>
87
                        {
88
                            return x.BoxMin.DistanceTo(entVp1.BoxMin);
89
                        });
90

  
91
                        int idx = _AVEVAEntities.ToList().FindIndex(x => x == ordered.First());
92
                        equalEntitiesInV2[idx] = true;
93
                    }
94
                    #endregion
95

  
96
                    if (!EqualIndices.Any())
97
                    {
98
                        _AutoCADEntities[i].LayerName = AutoCADDiffLayer;
99
                        ColorEntity(_workspace, _AutoCADEntities[i], DiffColor, colorMethodType.byEntity, false);
100

  
101
                        #region 틀린 엔터티의 BoundingBox를 구함
102
                        var origin = new devDept.Geometry.Point2D(entVp1.BoxMin.X - 1, entVp1.BoxMin.Y - 1);
103
                        double width = entVp1.BoxMax.X - entVp1.BoxMin.X;
104
                        double height = entVp1.BoxMax.Y - entVp1.BoxMin.Y;
105
                        if (Math.Abs(width) != double.PositiveInfinity && Math.Abs(height) != double.PositiveInfinity)
106
                        {
107
                            var rect = new devDept.Eyeshot.OrientedBoundingRect(origin, width + 2, height + 2);
108
                            DiffRegions.Add(rect);
109
                        }
110
                        #endregion
111
                    }
112

  
113
                    UpdateProgress(i, _AutoCADEntities.Count, "Comparing....", worker);
114
                }
115

  
116
                for (int j = 0; j < _AVEVAEntities.Count; j++)
117
                {
118
                    if (!equalEntitiesInV2[j])
119
                    {
120
                        _AVEVAEntities[j].LayerName = AVEVADiffLayer;
121
                        ColorEntity(_workspace, _AVEVAEntities[j], DiffColor, colorMethodType.byEntity, false);
122

  
123
                        #region 틀린 엔터티의 BoundingBox를 구함 
124
                        var origin = new devDept.Geometry.Point2D(_AVEVAEntities[j].BoxMin.X - 1, _AVEVAEntities[j].BoxMin.Y - 1);
125
                        double width = _AVEVAEntities[j].BoxMax.X - _AVEVAEntities[j].BoxMin.X;
126
                        double height = _AVEVAEntities[j].BoxMax.Y - _AVEVAEntities[j].BoxMin.Y;
127
                        if (Math.Abs(width) != double.PositiveInfinity && Math.Abs(height) != double.PositiveInfinity)
128
                        {
129
                            var rect = new devDept.Eyeshot.OrientedBoundingRect(origin, width + 2, height + 2);
130
                            DiffRegions.Add(rect);
131
                        }
132
                        #endregion
133
                    }
134
                }
135

  
136
                #region 인접한 영역을 하나로 합친다.
137
                var queue = new List<devDept.Eyeshot.OrientedBoundingRect>(DiffRegions);
138
                DiffRegions.Clear();
139
                while (queue.Any())
140
                {
141
                    var first = queue[0];
142
                    var FirstMin = first.GetOrigin();
143
                    var FirstMax = FirstMin + first.GetAxis()[0] * first.Size.X + first.GetAxis()[1] * first.Size.Y;
144

  
145
                    queue.Remove(first);
146
                    bool overlap = false;
147
                    for (int i = 0; i < queue.Count; ++i)
148
                    {
149
                        var second = queue[i];
150
                        overlap = devDept.Eyeshot.OrientedBoundingRect.DoOverlapOrTouch(first, second);
151
                        if (overlap)
152
                        {
153
                            var SecondMin = second.GetOrigin();
154
                            var SecondMax = SecondMin + second.GetAxis()[0] * second.Size.X + second.GetAxis()[1] * second.Size.Y;
155

  
156
                            var min = new devDept.Geometry.Point2D(Math.Min(FirstMin.X, SecondMin.X), Math.Min(FirstMin.Y, SecondMin.Y));
157
                            var max = new devDept.Geometry.Point2D(Math.Max(FirstMax.X, SecondMax.X), Math.Max(FirstMax.Y, SecondMax.Y));
158
                            double width = max.X - min.X;
159
                            double height = max.Y - min.Y;
160

  
161
                            #region 두 영역을 합친다.(작업 완료된 영역도 다시 queue에 넣는다.)
162
                            var rect = new devDept.Eyeshot.OrientedBoundingRect(min, width, height);
163
                            queue.Add(rect);
164
                            queue.AddRange(DiffRegions);
165
                            DiffRegions.Clear();
166
                            queue.Remove(second);
167
                            #endregion
168
                            break;
169
                        }
170
                    }
171

  
172
                    if (!overlap) DiffRegions.Add(first);
173
                }
174
                #endregion
175

  
176
                _workspace.Invoke(new Action(() =>
177
                {
178
                    if (!_workspace.Layers.Contains(RevCloudLayer))
179
                        _workspace.Layers.Add(RevCloudLayer.ToUpper(), RevCloudColor);
180
                    DiffRegions.ForEach(x => DrawRevCloud(_workspace, x));
181
                }));
182
            }
183
            catch (Exception ex)
184
            {
185
                Console.Write($"Error : {ex.Message}");
186
            }
187
        }
188

  
189
        /// <summary>
190
        /// 주어진 두 엔터티를 비교한다.
191
        /// </summary>
192
        /// <param name="entVp1"></param>
193
        /// <param name="entVp2"></param>
194
        /// <returns></returns>
195
        private bool CompareIfEqual(Workspace design1, Entity entVp1, Workspace design2, Entity entVp2)
196
        {
197
            return AreEqual(design1, entVp1, design2, entVp2);
198
        }
199

  
200
        private bool CompareGEntityIfEqual(GEntity entVp1, GEntity entVp2)
201
        {
202
            return AreGEntityEqual(entVp1, entVp2);
203
        }
204

  
205
        private bool AreGEntityEqual(GEntity ent1, GEntity ent2)
206
        {
207
            if (ent1 is GCompositeCurve cc1 && ent2 is GCompositeCurve cc2)
208
            {
209
                if (cc1.CurveList.Count == cc2.CurveList.Count)
210
                {
211
                    int equalCurvesInListCount = 0;
212
                    foreach (var entC in cc1.CurveList)
213
                    {
214
                        foreach (var entC2 in cc2.CurveList)
215
                        {
216
                            if (entC.GetType() == entC2.GetType())
217
                            {
218
                                if (entC is GEntity && entC2 is GEntity && CompareGEntityIfEqual(entC as GEntity, entC2 as GEntity))
219
                                {
220
                                    equalCurvesInListCount++;
221
                                    break;
222
                                }
223
                            }
224
                        }
225
                    }
226

  
227
                    if (cc1.CurveList.Count == equalCurvesInListCount)
228
                    {
229
                        return true;
230
                    }
231
                }
232
            }
233
            else if (ent1 is GLinearPath lp1 && ent2 is GLinearPath lp2)
234
            {
235
                if (lp1.Vertices.Length == lp2.Vertices.Length)
236
                {
237
                    for (int i = 0; i < lp1.Vertices.Length; i++)
238
                    {
239
                        if (lp1.Vertices[i].DistanceTo(lp2.Vertices[i]) > Tolerance)
240
                            return false;
241
                    }
242
                    return true;
243
                }
244
            }
245

  
246
            else if (ent1 is GPlanarEntity pe1 && ent2 is GPlanarEntity pe2)
247
            {
248
                if (
249
                    pe1.Plane.AxisZ == pe2.Plane.AxisZ &&
250
                    pe1.Plane.AxisX == pe2.Plane.AxisX
251
                    )
252
                {
253
                    if (ent1 is GArc arc1 && ent2 is GArc arc2)
254
                    {
255
                        if (
256
                            arc1.Center.DistanceTo(arc2.Center) <= Tolerance &&
257
                            Math.Abs(arc1.Radius - arc2.Radius) <= Tolerance &&
258
                            Math.Abs(arc1.Domain.Min - arc2.Domain.Min) <= Tolerance &&
259
                            Math.Abs(arc1.Domain.Max - arc2.Domain.Max) <= Tolerance
260
                            )
261
                        {
262
                            return true;
263
                        }
264
                    }
265
                    else if (ent1 is GCircle c1 && ent2 is GCircle c2)
266
                    {
267
                        if (c1.Center.DistanceTo(c2.Center) <= Tolerance &&
268
                            Math.Abs(c1.Radius - c2.Radius) <= Tolerance)
269
                        {
270
                            return true;
271
                        }
272
                    }
273
                    else if (ent1 is GEllipticalArc e1 && ent2 is GEllipticalArc e2)
274
                    {
275
                        if (
276
                            e1.Center.DistanceTo(e2.Center) <= Tolerance &&
277
                            Math.Abs(e1.RadiusX - e2.RadiusX) <= Tolerance &&
278
                            Math.Abs(e1.RadiusY - e2.RadiusY) <= Tolerance &&
279
                            Math.Abs(e1.Domain.Low - e2.Domain.Low) <= Tolerance &&
280
                            Math.Abs(e1.Domain.High - e2.Domain.High) <= Tolerance
281
                        )
282
                        {
283
                            return true;
284
                        }
285
                    }
286
                    else if (ent1 is GEllipse el1 && ent2 is GEllipse el2)
287
                    {
288
                        if (
289
                            el1.Center.DistanceTo(el2.Center) <= Tolerance &&
290
                            Math.Abs(el1.RadiusX - el2.RadiusX) <= Tolerance &&
291
                            Math.Abs(el1.RadiusY - el2.RadiusY) <= Tolerance
292
                        )
293
                        {
294
                            return true;
295
                        }
296
                    }
297
                    else
298
                    {
299
                        Console.Write("Type " + ent1.GetType() + " not implemented.");
300
                        return true;
301
                    }
302
                }
303
            }
304

  
305
            else if (ent1 is GLine line1 && ent2 is GLine line2)
306
            {
307
                if (line1.StartPoint.DistanceTo(line2.StartPoint) <= Tolerance &&
308
                    line1.EndPoint.DistanceTo(line2.EndPoint) <= Tolerance
309
                )
310
                {
311
                    return true;
312
                }
313
            }
314
#if NURBS
315
            else if (ent1 is Curve)
316
            {
317
                Curve cu1 = (Curve)ent1;
318
                Curve cu2 = (Curve)ent2;
319

  
320
                if (
321
                    cu1.ControlPoints.Length == cu2.ControlPoints.Length &&
322
                    cu1.KnotVector.Length == cu2.KnotVector.Length &&
323
                    cu1.Degree == cu2.Degree
324
                    )
325
                {
326
                    for (int k = 0; k < cu1.ControlPoints.Length; k++)
327
                    {
328
                        if (cu1.ControlPoints[k] != cu2.ControlPoints[k])
329
                        {
330
                            return false;
331
                        }
332
                    }
333

  
334
                    for (int k = 0; k < cu1.KnotVector.Length; k++)
335
                    {
336
                        if (cu1.KnotVector[k] != cu2.KnotVector[k])
337
                        {
338
                            return false;
339
                        }
340
                    }
341

  
342
                    return true;
343
                }
344
            }
345
#endif
346

  
347
            else
348
            {
349
                Console.Write("Type " + ent1.GetType() + " not implemented.");
350
                return true;
351
            }
352
            return false;
353
        }
354

  
355
        /// <summary>
356
        /// 그래픽적으로 두 엔터티가 유사한지 검사한다.
357
        /// </summary>
358
        /// <param name="design1"></param>
359
        /// <param name="ent1"></param>
360
        /// <param name="design2"></param>
361
        /// <param name="ent2"></param>
362
        /// <returns></returns>
363
        private bool AreEqual(Workspace design1, Entity ent1, Workspace design2, Entity ent2)
364
        {
365
            if (ent1 is CompositeCurve cc1 && ent2 is CompositeCurve cc2)
366
            {
367
                if (cc1.CurveList.Count == cc2.CurveList.Count)
368
                {
369
                    int equalCurvesInListCount = 0;
370
                    foreach (var entC in cc1.CurveList)
371
                    {
372
                        foreach (var entC2 in cc2.CurveList)
373
                        {
374
                            if (entC.GetType() == entC2.GetType())
375
                            {
376
                                if (entC is Entity && entC2 is Entity && CompareIfEqual(design1, entC as Entity, design2, entC2 as Entity))
377
                                {
378
                                    equalCurvesInListCount++;
379
                                    break;
380
                                }
381
                                else if (entC is GEntity && entC2 is GEntity && CompareGEntityIfEqual(entC as GEntity, entC2 as GEntity))
382
                                {
383
                                    equalCurvesInListCount++;
384
                                    break;
385
                                }
386
                            }
387
                        }
388
                    }
389

  
390
                    if (cc1.CurveList.Count == equalCurvesInListCount)
391
                    {
392
                        return true;
393
                    }
394
                }
395
            }
396
            else if (ent1 is LinearPath lp1 && ent2 is LinearPath lp2)
397
            {
398
                if (lp1.Vertices.Length == lp2.Vertices.Length)
399
                {
400
                    for (int i = 0; i < lp1.Vertices.Length; i++)
401
                    {
402
                        if (lp1.Vertices[i].DistanceTo(lp2.Vertices[i]) > Tolerance)
403
                            return false;
404
                    }
405

  
406
                    return true;
407
                }
408
            }
409
            else if (ent1 is PlanarEntity && ent2 is PlanarEntity)
410
            {
411
                if (ent1 is Arc arc1 && ent2 is Arc arc2)
412
                {
413
                    if (
414
                        arc1.Center.DistanceTo(arc2.Center) <= Tolerance &&
415
                        Math.Abs(arc1.Radius - arc2.Radius) <= Tolerance &&
416
                        Math.Abs(arc1.Domain.Min - arc2.Domain.Min) <= Tolerance &&
417
                        Math.Abs(arc1.Domain.Max - arc2.Domain.Max) <= Tolerance
418
                        )
419
                    {
420
                        return true;
421
                    }
422
                }
423
                else if (ent1 is Circle c1 && ent2 is Circle c2)
424
                {
425
                    if (
426
                        c1.Center.DistanceTo(c2.Center) <= Tolerance &&
427
                        Math.Abs(c1.Radius - c2.Radius) <= Tolerance
428
                        )
429
                    {
430
                        return true;
431
                    }
432
                }
433
                else if (ent1 is EllipticalArc e1 && ent2 is EllipticalArc e2)
434
                {
435
                    if (
436
                        e1.Center.DistanceTo(e2.Center) <= Tolerance &&
437
                        Math.Abs(e1.RadiusX - e2.RadiusX) <= Tolerance &&
438
                        Math.Abs(e1.RadiusY - e2.RadiusY) <= Tolerance &&
439
                        Math.Abs(e1.Domain.Low - e2.Domain.Low) <= Tolerance &&
440
                        Math.Abs(e1.Domain.High - e2.Domain.High) <= Tolerance
441
                    )
442
                    {
443
                        return true;
444
                    }
445
                }
446
                else if (ent1 is Ellipse el1 && ent2 is Ellipse el2)
447
                {
448
                    if (
449
                        el1.Center.DistanceTo(el2.Center) <= Tolerance &&
450
                        Math.Abs(el1.RadiusX - el2.RadiusX) <= Tolerance &&
451
                        Math.Abs(el1.RadiusY - el2.RadiusY) <= Tolerance
452
                    )
453
                    {
454
                        return true;
455
                    }
456
                }
457
                #region 해치는 중점만 비교
458
                else if (ent1 is Hatch hatch1 && ent2 is Hatch hatch2)
459
                {
460
                    var center1 = (hatch1.BoxMin + hatch1.BoxMax) * 0.5;
461
                    center1.Z = 0;
462
                    var center2 = (hatch2.BoxMin + hatch2.BoxMax) * 0.5;
463
                    center2.Z = 0;
464
                    return center1.DistanceTo(center2) < Tolerance;
465
                }
466
                #endregion
467
                else if (ent1 is Text)
468
                {
469
                    if (ent1 is Dimension dim1 && ent2 is Dimension dim2)
470
                    {
471
                        if (
472
                            dim1.InsertionPoint.DistanceTo(dim2.InsertionPoint) <= Tolerance &&
473
                            dim1.DimLinePosition.DistanceTo(dim2.DimLinePosition) <= Tolerance
474
                            )
475
                        {
476
                            if (ent1 is AngularDim ad1 && ent2 is AngularDim ad2)
477
                            {
478
                                if (
479
                                    ad1.ExtLine1.DistanceTo(ad2.ExtLine1) <= Tolerance &&
480
                                    ad1.ExtLine2.DistanceTo(ad2.ExtLine2) <= Tolerance &&
481
                                    Math.Abs(ad1.StartAngle - ad2.StartAngle) <= Tolerance &&
482
                                    Math.Abs(ad1.EndAngle - ad2.EndAngle) <= Tolerance &&
483
                                    Math.Abs(ad1.Radius - ad2.Radius) <= Tolerance
484
                                    )
485
                                {
486
                                    return true;
487
                                }
488
                            }
489
                            else if (ent1 is LinearDim ld1 && ent2 is LinearDim ld2)
490
                            {
491
                                if (
492
                                    ld1.ExtLine1.DistanceTo(ld2.ExtLine1) <= Tolerance &&
493
                                    ld1.ExtLine2.DistanceTo(ld2.ExtLine2) <= Tolerance
494
                                    )
495
                                {
496
                                    return true;
497
                                }
498
                            }
499
                            else if (ent1 is DiametricDim dd1 && ent2 is DiametricDim dd2)
500
                            {
501
                                if (
502
                                    Math.Abs(dd1.Distance - dd2.Distance) <= Tolerance &&
503
                                    Math.Abs(dd1.Radius - dd2.Radius) <= Tolerance &&
504
                                    Math.Abs(dd1.CenterMarkSize - dd2.CenterMarkSize) <= Tolerance
505
                                )
506
                                {
507
                                    return true;
508
                                }
509
                            }
510
                            else if (ent1 is RadialDim rd1 && ent2 is RadialDim rd2)
511
                            {
512
                                if (
513
                                    Math.Abs(rd1.Radius - rd2.Radius) <= Tolerance &&
514
                                    Math.Abs(rd1.CenterMarkSize - rd2.CenterMarkSize) <= Tolerance
515
                                )
516
                                {
517
                                    return true;
518
                                }
519
                            }
520
                            else if (ent1 is OrdinateDim od1 && ent2 is OrdinateDim od2)
521
                            {
522
                                if (
523
                                    od1.DefiningPoint.DistanceTo(od2.DefiningPoint) <= Tolerance &&
524
                                    od1.Origin.DistanceTo(od2.Origin) <= Tolerance &&
525
                                    od1.LeaderEndPoint.DistanceTo(od2.LeaderEndPoint) <= Tolerance
526
                                )
527
                                {
528
                                    return true;
529
                                }
530
                            }
531
                            else
532
                            {
533
                                Console.Write("Type " + ent1.GetType() + " not implemented.");
534
                                return true;
535
                            }
536
                        }
537
                    }
538

  
539
                    else if (ent1 is devDept.Eyeshot.Entities.Attribute att1 && ent2 is devDept.Eyeshot.Entities.Attribute att2)
540
                    {
541
                        if (
542
                            att1.Value == att2.Value &&
543
                            att1.InsertionPoint.DistanceTo(att2.InsertionPoint) <= Tolerance
544
                            )
545
                        {
546
                            return true;
547
                        }
548
                    }
549
                    else
550
                    {
551
                        Text tx1 = (Text)ent1;
552
                        Text tx2 = (Text)ent2;
553

  
554
                        #region 공백을 무시하여 비교
555
                        string string1 = tx1.TextString.Trim();
556
                        string string2 = tx2.TextString.Trim();
557
                        string1 = System.Text.RegularExpressions.Regex.Replace(string1, @"\s+", "");
558
                        string2 = System.Text.RegularExpressions.Regex.Replace(string2, @"\s+", "");
559
                        if (
560
                            tx1.BoxMin.DistanceTo(tx2.BoxMin) <= Tolerance &&
561
                            string1 == string2 &&
562
                            Math.Abs(tx1.WidthFactor - tx2.WidthFactor) <= Tolerance &&
563
                            Math.Abs(tx1.Height - tx2.Height) <= Tolerance
564
                            )
565
                        {
566
                            return true;
567
                        }
568
                        #endregion
569
                    }
570
                }
571
            }
572
            else if (ent1 is Line line1 && ent2 is Line line2)
573
            {
574
                var dir1 = line1.Direction;
575
                dir1.Normalize();
576
                var dir2 = line2.Direction;
577
                dir2.Normalize();
578
                if (devDept.Geometry.Vector3D.AreParallel(dir1, dir2, 0.1) &&
579
                    Math.Abs(line1.Length() - line2.Length()) <= line1.Length() * LengthToleranceRatio &&
580
                    line1.MidPoint.DistanceTo(line2.MidPoint) <= Tolerance
581
                )
582
                {
583
                    return true;
584
                }
585
            }
586
            else if (ent1 is Line && ent2 is devDept.Eyeshot.Entities.TabulatedSurface lwpolyline && lwpolyline.ControlPoints.Length == 4)
587
            {
588
                line1 = ent1 as Line;
589
                var start = new devDept.Geometry.Point3D(lwpolyline.ControlPoints[0, 0].X, lwpolyline.ControlPoints[0, 0].Y, 0);
590
                var end = new devDept.Geometry.Point3D(lwpolyline.ControlPoints[1, 0].X, lwpolyline.ControlPoints[1, 0].Y, 0);
591
                var vec = new devDept.Geometry.Vector3D(start, end);
592
                vec.Normalize();
593
                var dir = line1.Direction.Clone() as devDept.Geometry.Vector3D;
594
                dir.Normalize();
595

  
596
                if (
597
                    devDept.Geometry.Vector3D.AreParallel(dir, vec) &&
598
                    line1.StartPoint.DistanceTo(start) <= Tolerance &&
599
                    line1.EndPoint.DistanceTo(end) <= Tolerance
600
                )
601
                {
602
                    return true;
603
                }
604
            }
605
            else if (ent1 is devDept.Eyeshot.Entities.Point point1 && ent2 is devDept.Eyeshot.Entities.Point point2)
606
            {
607
                if (point1.Position.DistanceTo(point2.Position) <= Tolerance)
608
                {
609
                    return true;
610
                }
611
            }
612
            else if (ent1 is Curve cu1 && ent2 is Curve cu2)
613
            {
614
                if (
615
                    cu1.ControlPoints.Length == cu2.ControlPoints.Length &&
616
                    cu1.KnotVector.Length == cu2.KnotVector.Length &&
617
                    cu1.Degree == cu2.Degree
618
                    )
619
                {
620
                    for (int k = 0; k < cu1.ControlPoints.Length; k++)
621
                    {
622
                        if (cu1.ControlPoints[k].DistanceTo(cu2.ControlPoints[k]) > Tolerance)
623
                        {
624
                            return false;
625
                        }
626
                    }
627

  
628
                    for (int k = 0; k < cu1.KnotVector.Length; k++)
629
                    {
630
                        if (cu1.KnotVector[k] != cu2.KnotVector[k])
631
                        {
632
                            return false;
633
                        }
634
                    }
635

  
636
                    return true;
637
                }
638
            }
639
            else if (ent1 is Mesh m1 && ent2 is Mesh m2 && m1.Vertices.Count() == m2.Vertices.Count())
640
            {
641
                for (int i = 0; i < m1.Vertices.Count(); ++i)
642
                {
643
                    if (m1.Vertices[i].DistanceTo(m2.Vertices[i]) > Tolerance) return false;
644
                }
645

  
646
                return true;
647
            }
648
            else if (ent1 is BlockReference blkref1 && ent2 is BlockReference blkref2)
649
            {
650
                int equalCurvesInEntityList = 0;
651

  
652
                #region Point, Attribute, Text 제거 및 LinePath를 라인으로 분리
653
                var entities1 = blkref1.Explode(design1.Blocks).Where(x => x.LayerName != "AS_PORT" && !(x is devDept.Eyeshot.Entities.Point) &&
654
                !(x is devDept.Eyeshot.Entities.Attribute) && !(x is devDept.Eyeshot.Entities.Text)).ToList();
655
                var coll1 = new List<Entity>();
656
                entities1.ForEach(x =>
657
                {
658
                    if (x is LinearPath lp)
659
                    {
660
                        for (int i = 0; i < lp.Vertices.Length - 1; ++i)
661
                        {
662
                            if (lp.Vertices[i].DistanceTo(lp.Vertices[i + 1]) < 0.1) continue;
663
                            coll1.Add(new Line(lp.Vertices[i], lp.Vertices[i + 1]));
664
                        }
665
                    }
666
                    else
667
                    {
668
                        coll1.Add(x);
669
                    }
670
                });
671
                #endregion
672

  
673
                #region Point 및 Nesting Block 제거 및 LinePath를 라인으로 분리
674
                var entities2 = blkref2.Explode(design2.Blocks).Where(x =>
675
                !(x is devDept.Eyeshot.Entities.BlockReference blkref && blkref.BlockName == "PORT") && !(x is devDept.Eyeshot.Entities.Point)).ToList();
676
                var coll2 = new List<Entity>();
677
                entities2.ForEach(x =>
678
                {
679
                    if (x is LinearPath lp)
680
                    {
681
                        for (int i = 0; i < lp.Vertices.Length - 1; ++i)
682
                        {
683
                            if (lp.Vertices[i].DistanceTo(lp.Vertices[i + 1]) < 0.1) continue;
684
                            coll2.Add(new Line(lp.Vertices[i], lp.Vertices[i + 1]));
685
                        }
686
                    }
687
                    else if (x is devDept.Eyeshot.Entities.Attribute attr)
688
                    {
689
                        if (!attr.Invisible) coll2.Add(attr);
690
                    }
691
                    else if (x.GetType().Name == "AttributeReferenceData")
692
                    {
693
                    }
694
                    else
695
                    {
696
                        coll2.Add(x);
697
                    }
698
                });
699
                #endregion
700

  
701
                if (coll1.Count != coll2.Count) return false;
702

  
703
                foreach (var entC in coll1)
704
                {
705
                    foreach (var entC2 in coll2)
706
                    {
707
                        if (entC.GetType() == entC2.GetType())
708
                        {
709
                            if (entC is Entity && entC2 is Entity && CompareIfEqual(design1, entC as Entity, design2, entC2 as Entity))
710
                            {
711
                                equalCurvesInEntityList++;
712
                                break;
713
                            }
714
                        }
715
                    }
716
                }
717

  
718
                if (coll1.Count == equalCurvesInEntityList)
719
                {
720
                    return true;
721
                }
722
            }
723
            else
724
            {
725
                Console.Write("Type " + ent1.GetType() + " not implemented.");
726
                return false;
727
            }
728

  
729
            return false;
730
        }
731

  
732
        /// <summary>
733
        /// 엔터티들의 색상을 바꾼다.
734
        /// </summary>
735
        /// <param name="design"></param>
736
        /// <param name="list"></param>
737
        public void ColorEntities(Workspace design , IList<Entity> list, Color color, colorMethodType colorMethod = colorMethodType.byEntity, bool ChangeBlkColor = true)
738
        {
739
            foreach (Entity ent in list)
740
            {
741
                ColorEntity(design, ent, color, colorMethod, ChangeBlkColor);
742
            }
743
        }
744

  
745
        /// <summary>
746
        /// 엔터티의 색상을 변경한다.
747
        /// </summary>
748
        /// <param name="design"></param>
749
        /// <param name="entity"></param>
750
        /// <param name="color"></param>
751
        private void ColorEntity(Workspace design , Entity entity, Color color, colorMethodType colorMethod = colorMethodType.byEntity,
752
            bool ChangeBlkColor = true)
753
        {
754
            if (entity is BlockReference blkref)
755
            {
756
                _workspace.Invoke(new Action(() =>
757
                {
758
                    blkref.Color = color;
759
                    blkref.ColorMethod = colorMethod;
760
                }));
761

  
762
                if (ChangeBlkColor)
763
                {
764
                    var blk = design.Blocks.FirstOrDefault(x => x.Name == blkref.BlockName);
765
                    if (blk != null)
766
                    {
767
                        ColorEntities(design, blk.Entities, color, colorMethodType.byParent);
768
                        _workspace.Invoke(new Action(() =>
769
                        {
770
                            foreach (var attr in blkref.Attributes.Values)
771
                            {
772
                                attr.Color = color;
773
                                attr.ColorMethod = colorMethodType.byParent;
774
                            }
775
                        }));
776
                    }
777
                }
778
            }
779
            else
780
            {
781
                _workspace.Invoke(new Action(() =>
782
                {
783
                    entity.Color = color;
784
                    entity.ColorMethod = colorMethod;
785
                }));
786
            }
787
        }
788

  
789
        /// <summary>
790
        /// 주어진 두 엔터티 리스트를 비교하여 틀린 엔터티의 색상을 설정한 색상으로 변경한다.
791
        /// </summary>
792
        /// <param name="entList1"></param>
793
        /// <param name="entList2"></param>
794
        private void CompareAndMark(Design design1, IList<Entity> AutoCADEntities, Design design2, IList<Entity> AVEVAEntities)
795
        {
796
            var DiffRegions = new List<devDept.Eyeshot.OrientedBoundingRect>();
797

  
798
            bool[] equalEntitiesInV2 = new bool[AVEVAEntities.Count];
799
            var EqualIndices = new List<int>();
800

  
801
            /// 서로 검사 가능한 타입인지 확인한다.
802
            bool CheckType(Entity ent1, Entity ent2)
803
            {
804
                return ent1.GetType() == ent2.GetType() ||
805
                    (ent1.GetType() == typeof(devDept.Eyeshot.Entities.Text) && ent2.GetType() == typeof(devDept.Eyeshot.Entities.MultilineText)) ||
806
                    (ent1.GetType() == typeof(devDept.Eyeshot.Entities.MultilineText) && ent2.GetType() == typeof(devDept.Eyeshot.Entities.Text)) ||
807
                    (ent1.GetType() == typeof(devDept.Eyeshot.Entities.Line) && ent2.GetType() == typeof(devDept.Eyeshot.Entities.TabulatedSurface)) ||
808
                    (ent1.GetType() == typeof(devDept.Eyeshot.Entities.Attribute) && ent2.GetType() == typeof(devDept.Eyeshot.Entities.Text)) ||
809
                    (ent1.GetType() == typeof(devDept.Eyeshot.Entities.Attribute) && ent2.GetType() == typeof(devDept.Eyeshot.Entities.MultilineText));
810
            }
811

  
812
            try
813
            {
814
                for (int i = 0; i < AutoCADEntities.Count(); i++)
815
                {
816
                    Entity entVp1 = AutoCADEntities[i];
817
                    EqualIndices.Clear();
818

  
819
                    for (int j = 0; j < AVEVAEntities.Count(); j++)
820
                    {
821
                        Entity entVp2 = AVEVAEntities[j];
822

  
823
                        if (entVp2 is BlockReference blkref && (blkref.BlockName == "PSNODE" || blkref.BlockName == "PENODE")) continue;
824
                        if (!equalEntitiesInV2[j] && CheckType(entVp1, entVp2) &&
825
                            CompareIfEqual(design1, entVp1, design2, entVp2))
826
                        {
827
                            EqualIndices.Add(j);
828
                        }
829
                    }
830

  
831
                    #region 임계값 안에 들어오는 항목이 여러개 있을 경우 가장 가까운 항목을 유사 항목으로 선택한다.
832
                    if (EqualIndices.Any())
833
                    {
834
                        var ordered = EqualIndices.ConvertAll(x => AVEVAEntities[x]).OrderBy(x =>
835
                        {
836
                            return x.BoxMin.DistanceTo(entVp1.BoxMin);
837
                        });
838

  
839
                        int idx = AVEVAEntities.ToList().FindIndex(x => x == ordered.First());
840
                        equalEntitiesInV2[idx] = true;
841
                    }
842
                    #endregion
843

  
844
                    if (!EqualIndices.Any())
845
                    {
846
                        AutoCADEntities[i].LayerName = AutoCADDiffLayer;
847
                        ColorEntity(design1, AutoCADEntities[i], DiffColor, colorMethodType.byEntity, false);
848

  
849
                        #region 틀린 엔터티의 BoundingBox를 구함
850
                        var origin = new devDept.Geometry.Point2D(entVp1.BoxMin.X - 1, entVp1.BoxMin.Y - 1);
851
                        double width = entVp1.BoxMax.X - entVp1.BoxMin.X;
852
                        double height = entVp1.BoxMax.Y - entVp1.BoxMin.Y;
853
                        if (Math.Abs(width) != double.PositiveInfinity && Math.Abs(height) != double.PositiveInfinity)
854
                        {
855
                            var rect = new devDept.Eyeshot.OrientedBoundingRect(origin, width + 2, height + 2);
856
                            DiffRegions.Add(rect);
857
                        }
858
                        #endregion
859
                    }
860
                }
861

  
862
                for (int j = 0; j < AVEVAEntities.Count; j++)
863
                {
864
                    if (!equalEntitiesInV2[j])
865
                    {
866
                        AVEVAEntities[j].LayerName = AVEVADiffLayer;
867
                        ColorEntity(design2, AVEVAEntities[j], DiffColor, colorMethodType.byEntity, false);
868

  
869
                        #region 틀린 엔터티의 BoundingBox를 구함 
870
                        var origin = new devDept.Geometry.Point2D(AVEVAEntities[j].BoxMin.X - 1, AVEVAEntities[j].BoxMin.Y - 1);
871
                        double width = AVEVAEntities[j].BoxMax.X - AVEVAEntities[j].BoxMin.X;
872
                        double height = AVEVAEntities[j].BoxMax.Y - AVEVAEntities[j].BoxMin.Y;
873
                        if (Math.Abs(width) != double.PositiveInfinity && Math.Abs(height) != double.PositiveInfinity)
874
                        {
875
                            var rect = new devDept.Eyeshot.OrientedBoundingRect(origin, width + 2, height + 2);
876
                            DiffRegions.Add(rect);
877
                        }
878
                        #endregion
879
                    }
880
                }
881

  
882
                #region 인접한 영역을 하나로 합친다.
883
                var queue = new List<devDept.Eyeshot.OrientedBoundingRect>(DiffRegions);
884
                DiffRegions.Clear();
885
                while (queue.Any())
886
                {
887
                    var first = queue[0];
888
                    var FirstMin = first.GetOrigin();
889
                    var FirstMax = FirstMin + first.GetAxis()[0] * first.Size.X + first.GetAxis()[1] * first.Size.Y;
890

  
891
                    queue.Remove(first);
892
                    bool overlap = false;
893
                    for (int i = 0; i < queue.Count; ++i)
894
                    {
895
                        var second = queue[i];
896
                        overlap = devDept.Eyeshot.OrientedBoundingRect.DoOverlapOrTouch(first, second);
897
                        if (overlap)
898
                        {
899
                            var SecondMin = second.GetOrigin();
900
                            var SecondMax = SecondMin + second.GetAxis()[0] * second.Size.X + second.GetAxis()[1] * second.Size.Y;
901

  
902
                            var min = new devDept.Geometry.Point2D(Math.Min(FirstMin.X, SecondMin.X), Math.Min(FirstMin.Y, SecondMin.Y));
903
                            var max = new devDept.Geometry.Point2D(Math.Max(FirstMax.X, SecondMax.X), Math.Max(FirstMax.Y, SecondMax.Y));
904
                            double width = max.X - min.X;
905
                            double height = max.Y - min.Y;
906

  
907
                            #region 두 영역을 합친다.(작업 완료된 영역도 다시 queue에 넣는다.)
908
                            var rect = new devDept.Eyeshot.OrientedBoundingRect(min, width, height);
909
                            queue.Add(rect);
910
                            queue.AddRange(DiffRegions);
911
                            DiffRegions.Clear();
912
                            queue.Remove(second);
913
                            #endregion
914
                            break;
915
                        }
916
                    }
917

  
918
                    if (!overlap) DiffRegions.Add(first);
919
                }
920
                #endregion
921

  
922
                if (!design2.Layers.Contains(RevCloudLayer))
923
                    design2.Layers.Add(RevCloudLayer.ToUpper(), RevCloudColor);
924
                DiffRegions.ForEach(x => DrawRevCloud(design2, x));
925
            }
926
            catch (Exception ex)
927
            {
928
                Console.Write($"Error : {ex.Message}");
929
            }
930
        }
931

  
932
        /// <summary>
933
        /// Revision mark를 그린다.
934
        /// </summary>
935
        /// <param name="design"></param>
936
        /// <param name="obr"></param>
937
        private void DrawRevCloud(Workspace design , devDept.Eyeshot.OrientedBoundingRect obr)
938
        {
939
            IList<IGCurve> DrawRevCloudLine(devDept.Geometry.Point2D start, devDept.Geometry.Point2D end)
940
            {
941
                var res = new List<IGCurve>();
942

  
943
                var AxisX = new devDept.Geometry.Vector3D(end.X - start.X, end.Y - start.Y);
944
                AxisX.Normalize();
945
                var AxisY = devDept.Geometry.Vector3D.Cross(devDept.Geometry.Vector3D.AxisZ, AxisX);
946

  
947
                double step = 10;
948
                double dist = start.DistanceTo(end);
949
                int count = Convert.ToInt32(dist / step);
950
                if (count == 0 && dist > 0)
951
                {
952
                    var tmp = (start + end) * 0.5;
953

  
954
                    var center = new devDept.Geometry.Point3D(tmp.X, tmp.Y, 0);
955
                    var plane = new devDept.Geometry.Plane(center, AxisX, AxisY);
956
                    GArc arc = new GArc(plane, center, start.DistanceTo(end) * 0.5, Math.PI, Math.PI * 2);
957
                    res.Add(arc);
958
                }
959
                else
960
                {
961
                    for (int i = 0; i < count; ++i)
962
                    {
963
                        var _start = (start + AxisX * i * step);
964
                        var _end = (start + AxisX * (i + 1) * step);
965
                        if (i == count - 1) _end = end;
966
                        var tmp = (_start + _end) * 0.5;
967

  
968
                        var center = new devDept.Geometry.Point3D(tmp.X, tmp.Y, 0);
969
                        var plane = new devDept.Geometry.Plane(center, AxisX, AxisY);
970
                        GArc arc = new GArc(plane, center, _start.DistanceTo(_end) * 0.5, Math.PI, Math.PI * 2);
971
                        res.Add(arc);
972
                    }
973
                }
974

  
975
                return res;
976
            }
977

  
978
            GCompositeCurve profile = new GCompositeCurve();
979

  
980
            var vertices = obr.GetVertices();
981
            for (int i = 0; i < vertices.Length; ++i)
982
            {
983
                var curves = DrawRevCloudLine(vertices[i], vertices[(i + 1) % vertices.Length]);
984
                profile.CurveList.AddRange(curves);
985
            }
986

  
987
            var revcloud = new devDept.Eyeshot.Entities.CompositeCurve(profile);
988
            revcloud.LayerName = RevCloudLayer;
989
            revcloud.Color = RevCloudColor;
990
            revcloud.ColorMethod = colorMethodType.byEntity;
991
            revcloud.LineWeight = 3;
992
            revcloud.LineWeightMethod = colorMethodType.byEntity;
993
            design.Entities.Add(revcloud);
994
        }
995

  
996
        /// <summary>
997
        /// 작업 완료
998
        /// </summary>
999
        /// <param name="sender"></param>
1000
        public override void WorkCompleted(object sender)
1001
        {
1002
            var mymodel = (sender as Workspace);
1003

  
1004
            try
1005
            {
1006
            }
1007
            catch (Exception ex)
1008
            {
1009
            }
1010
            finally
1011
            {
1012
                mymodel.ZoomFit();
1013
                mymodel.Invalidate();
1014
            }
1015

  
1016
            base.WorkCompleted(sender);
1017
        }
1018

  
1019
        public override void WorkFailed(object sender)
1020
        {
1021
            RadMessageBox.Show("Failed");
1022
            base.WorkFailed(sender);
1023
        }
1024
    }
1025
}
1026

  
ID2.Manager/ID2.Manager.Compare/Controls/Verification.cs
379 379
            #region Except Layer를 로딩한다.
380 380
            LoadLayerSettings();
381 381
            #endregion
382

  
383
            this.designCompare.WorkCompleted += DesignCompare_WorkCompleted;
384
        }
385

  
386
        private void ApplyLayers()
387
        {
388
            var others = this.designCompare.Entities.Where(x =>
389
            {
390
                return (x.LayerName != Verification.AVEVALayer && x.LayerName != Verification.AVEVADiffLayer &&
391
                x.LayerName != Verification.AutoCADLayer && x.LayerName != Verification.AutoCADDiffLayer &&
392
                x.LayerName != Verification.RevCloudLayer);
393
            }).ToList();
394

  
395
            others.ForEach(x =>
396
            {
397
                if (x.LayerName == Verification.AutoCADExceptLayer)
398
                    x.LayerName = Verification.AutoCADLayer;
399
                else if (x.LayerName == Verification.AVEVAExceptLayer)
400
                    x.LayerName = Verification.AVEVALayer;
401
            });
402

  
403
            #region 레이어 설정 적용
404
            var layer = this.designCompare.Layers.FirstOrDefault(x => x.Name.ToUpper() == Verification.RevCloudLayer.ToUpper());
405
            if (layer != null) layer.Visible = this.radCheckBoxRevCloud.Checked;
406

  
407
            layer = this.designCompare.Layers.FirstOrDefault(x => x.Name.ToUpper() == Verification.AVEVALayer.ToUpper());
408
            if (layer != null)
409
            {
410
                var item = this.radCheckedDropDownListAVEVA.Items.FirstOrDefault(x => x.Text.ToUpper() == Verification.AVEVALayer.ToUpper());
411
                if (item is RadCheckedListDataItem CheckedItem) layer.Visible = CheckedItem.Checked;
412
            }
413

  
414
            layer = this.designCompare.Layers.FirstOrDefault(x => x.Name.ToUpper() == Verification.AVEVADiffLayer.ToUpper());
415
            if (layer != null)
416
            {
417
                var item = this.radCheckedDropDownListAVEVA.Items.FirstOrDefault(x => x.Text.ToUpper() == Verification.AVEVADiffLayer.ToUpper());
418
                if (item is RadCheckedListDataItem CheckedItem) layer.Visible = CheckedItem.Checked;
419
            }
420

  
421
            layer = this.designCompare.Layers.FirstOrDefault(x => x.Name.ToUpper() == Verification.AutoCADLayer.ToUpper());
422
            if (layer != null)
423
            {
424
                var item = this.radCheckedDropDownListAutoCAD.Items.FirstOrDefault(x => x.Text.ToUpper() == Verification.AutoCADLayer.ToUpper());
425
                if (item is RadCheckedListDataItem CheckedItem) layer.Visible = CheckedItem.Checked;
426
            }
427

  
428
            layer = this.designCompare.Layers.FirstOrDefault(x => x.Name.ToUpper() == Verification.AutoCADDiffLayer.ToUpper());
429
            if (layer != null)
430
            {
431
                var item = this.radCheckedDropDownListAutoCAD.Items.FirstOrDefault(x => x.Text.ToUpper() == Verification.AutoCADDiffLayer.ToUpper());
432
                if (item is RadCheckedListDataItem CheckedItem) layer.Visible = CheckedItem.Checked;
433
            }
434
            #endregion
435
        }
436

  
437
        private void DesignCompare_WorkCompleted(object sender, devDept.WorkCompletedEventArgs e)
438
        {
439
            if(e.WorkUnit is Classes.CompareModelWorkUnit workunit)
440
            {
441
                ApplyLayers();    
442
                this.designCompare.Invalidate();
443
            }
382 444
        }
383 445

  
384 446
        /// <summary>
......
927 989
            {
928 990
                var AutoCADEntities = this.designCompare.Entities.Where(x => x.LayerName == Verification.AutoCADLayer).ToList();
929 991
                var AVEVAtities = this.designCompare.Entities.Where(x => x.LayerName == Verification.AVEVALayer).ToList();
930
                CompareAndMark(this.designCompare, AutoCADEntities, this.designCompare, AVEVAtities);
931
            }
932

  
933
            var others = this.designCompare.Entities.Where(x =>
934
            {
935
                return (x.LayerName != Verification.AVEVALayer && x.LayerName != Verification.AVEVADiffLayer &&
936
                x.LayerName != Verification.AutoCADLayer && x.LayerName != Verification.AutoCADDiffLayer &&
937
                x.LayerName != Verification.RevCloudLayer);
938
            }).ToList();
939

  
940
            others.ForEach(x =>
941
            {
942
                if (x.LayerName == Verification.AutoCADExceptLayer)
943
                    x.LayerName = Verification.AutoCADLayer;
944
                else if (x.LayerName == Verification.AVEVAExceptLayer)
945
                    x.LayerName = Verification.AVEVALayer;
946
            });
947

  
948
            #region 레이어 설정 적용
949
            var layer = this.designCompare.Layers.FirstOrDefault(x => x.Name.ToUpper() == Verification.RevCloudLayer.ToUpper());
950
            if (layer != null) layer.Visible = this.radCheckBoxRevCloud.Checked;
951

  
952
            layer = this.designCompare.Layers.FirstOrDefault(x => x.Name.ToUpper() == Verification.AVEVALayer.ToUpper());
953
            if (layer != null)
954
            {
955
                var item = this.radCheckedDropDownListAVEVA.Items.FirstOrDefault(x => x.Text.ToUpper() == Verification.AVEVALayer.ToUpper());
956
                if (item is RadCheckedListDataItem CheckedItem) layer.Visible = CheckedItem.Checked;
957
            }
958

  
959
            layer = this.designCompare.Layers.FirstOrDefault(x => x.Name.ToUpper() == Verification.AVEVADiffLayer.ToUpper());
960
            if (layer != null)
961
            {
962
                var item = this.radCheckedDropDownListAVEVA.Items.FirstOrDefault(x => x.Text.ToUpper() == Verification.AVEVADiffLayer.ToUpper());
963
                if (item is RadCheckedListDataItem CheckedItem) layer.Visible = CheckedItem.Checked;
964
            }
965

  
966
            layer = this.designCompare.Layers.FirstOrDefault(x => x.Name.ToUpper() == Verification.AutoCADLayer.ToUpper());
967
            if (layer != null) 
968
            {
969
                var item = this.radCheckedDropDownListAutoCAD.Items.FirstOrDefault(x => x.Text.ToUpper() == Verification.AutoCADLayer.ToUpper());
970
                if(item is RadCheckedListDataItem CheckedItem) layer.Visible = CheckedItem.Checked;
971
            }
972

  
973
            layer = this.designCompare.Layers.FirstOrDefault(x => x.Name.ToUpper() == Verification.AutoCADDiffLayer.ToUpper());
974
            if (layer != null)
975
            {
976
                var item = this.radCheckedDropDownListAutoCAD.Items.FirstOrDefault(x => x.Text.ToUpper() == Verification.AutoCADDiffLayer.ToUpper());
977
                if(item is RadCheckedListDataItem CheckedItem) layer.Visible = CheckedItem.Checked;
992
                var workunit = new Classes.CompareModelWorkUnit(this.designCompare, AutoCADEntities, AVEVAtities);
993
                workunit.Tolerance = Verification.Tolerance;
994
                workunit.LengthToleranceRatio = Verification.LengthToleranceRatio;
995
                workunit.AutoCADDiffLayer = Verification.AutoCADDiffLayer;
996
                workunit.AVEVADiffLayer = Verification.AVEVADiffLayer;
997
                workunit.DiffColor = Verification.DiffColor;
998
                workunit.RevCloudLayer = Verification.RevCloudLayer;
999
                workunit.RevCloudColor = Verification.RevCloudColor;
1000
                if (!this.designCompare.IsBusy && !ResultOnly)
1001
                {
1002
                    this.designCompare.StartWork(workunit);
1003
                }
1004
                else
1005
                {
1006
                    workunit.DoWork();
1007
                    ApplyLayers();
1008
                }
978 1009
            }
979

  
980
            this.designCompare.Invalidate();
981
            #endregion
982 1010
        }
983 1011

  
984 1012
        /// <summary>
ID2.Manager/ID2.Manager.Compare/ID2.Manager.Compare.csproj
101 101
  </ItemGroup>
102 102
  <ItemGroup>
103 103
    <Compile Include="Classes\BaseWorker.cs" />
104
    <Compile Include="Classes\CompareModelWorkUnit.cs" />
104 105
    <Compile Include="Classes\ID2Helper.cs" />
105 106
    <Compile Include="Classes\LinqExtension.cs" />
106 107
    <Compile Include="Controls\DetailGridViewTemplate.cs">
ID2.Manager/ID2.Manager.Compare/Main.cs
109 109
                this.radBrowseEditorAVEVAFolder.ValueChanged += RadBrowseEditorAVEVAFolder_ValueChanged;
110 110
                this.radGridViewDocument.DataBindingComplete += RadGridViewDocument_DataBindingComplete;
111 111
                this.radGridViewDocument.ViewRowFormatting += RadGridViewDocument_ViewRowFormatting;
112
                this.radGridViewDocument.CellClick += RadGridViewDocument_CellClick;
113 112
                this.radButtonElementCompare.Click += RadButtonElementCompare_Click;
114 113
                this.radButtonElementConfiguration.Click += RadButtonElementConfiguration_Click;
115 114

  
......
120 119

  
121 120
                Program.AVEVAPIDFolder = Classes.ID2Helper.IniReadValue(Program.IniFilePath, "Path", "AVEVA P&ID Folder");
122 121
                if (!string.IsNullOrEmpty(Program.AVEVAPIDFolder)) this.radBrowseEditorAVEVAFolder.Value = Program.AVEVAPIDFolder;
122

  
123
                this.radGridViewDocument.SelectionChanged += RadGridViewDocument_SelectionChanged;
123 124
            }
124 125
            catch (Exception ex)
125 126
            {
......
130 131
            base.OnLoad(e);
131 132
        }
132 133

  
134
        private void RadGridViewDocument_SelectionChanged(object sender, EventArgs e)
135
        {
136
            if (this.radGridViewDocument.SelectedRows.Any() && this.radGridViewDocument.SelectedRows[0].DataBoundItem is Document doc)
137
            {
138
                this.Cursor = Cursors.WaitCursor;
139
                try
140
                {
141
                    var verification = this.LayoutValidation.Controls[0] as Controls.Verification;
142
                    verification.CompareDrawings(new List<Document>() { doc });
143
                }
144
                finally
145
                {
146
                    this.Cursor = Cursors.Default;
147
                }
148
            }
149
        }
150

  
133 151
        /// <summary>
134 152
        /// 도면 리스트를 갱신한다.
135 153
        /// </summary>
......
198 216
            }
199 217
        }
200 218

  
201
        private void RadGridViewDocument_CellClick(object sender, GridViewCellEventArgs e)
202
        {
203
            if (e.RowIndex >= 0 && (e.ColumnIndex == 1 || e.ColumnIndex == 2))
204
            {
205
                if (this.radGridViewDocument.SelectedRows.Any() && this.radGridViewDocument.SelectedRows[0].DataBoundItem is Document doc)
206
                {
207
                    this.Cursor = Cursors.WaitCursor;
208
                    try
209
                    {
210
                        var verification = this.LayoutValidation.Controls[0] as Controls.Verification;
211
                        verification.CompareDrawings(new List<Document>() { doc });
212
                    }
213
                    finally
214
                    {
215
                        this.Cursor = Cursors.Default;
216
                    }
217
                }
218
            }
219
        }
220

  
221 219
        private void RadGridViewDocument_ViewRowFormatting(object sender, RowFormattingEventArgs e)
222 220
        {
223 221
            if(e.RowElement is GridRowElement)
ID2.Manager/ID2.Manager/Controls/Classify.Designer.cs
29 29
        /// </summary>
30 30
        private void InitializeComponent()
31 31
        {
32
            devDept.Eyeshot.CancelToolBarButton cancelToolBarButton1 = new devDept.Eyeshot.CancelToolBarButton("Cancel", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
33
            devDept.Eyeshot.ProgressBar progressBar1 = new devDept.Eyeshot.ProgressBar(devDept.Eyeshot.ProgressBar.styleType.Circular, 0, "Idle", System.Drawing.Color.Black, System.Drawing.Color.Transparent, System.Drawing.Color.Green, 1D, true, cancelToolBarButton1, false, 0.1D, 0.333D, true);
34
            devDept.Graphics.BackgroundSettings backgroundSettings1 = new devDept.Graphics.BackgroundSettings(devDept.Graphics.backgroundStyleType.Solid, System.Drawing.Color.DeepSkyBlue, System.Drawing.Color.DodgerBlue, System.Drawing.Color.Black, 0.75D, null, devDept.Graphics.colorThemeType.Auto, 0.33D);
35
            devDept.Eyeshot.Camera camera1 = new devDept.Eyeshot.Camera(new devDept.Geometry.Point3D(-4.5374030325107811E-16D, 2.0434646606445308D, 47.596564948558793D), 97.257904648780823D, new devDept.Geometry.Quaternion(0.49999999999999989D, 0.5D, 0.5D, 0.50000000000000011D), devDept.Graphics.projectionType.Orthographic, 40D, 2.3787098441796113D, false, 0.001D);
36
            devDept.Eyeshot.MagnifyingGlassToolBarButton magnifyingGlassToolBarButton1 = new devDept.Eyeshot.MagnifyingGlassToolBarButton("Magnifying Glass", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
37
            devDept.Eyeshot.ZoomWindowToolBarButton zoomWindowToolBarButton1 = new devDept.Eyeshot.ZoomWindowToolBarButton("Zoom Window", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
38
            devDept.Eyeshot.ZoomToolBarButton zoomToolBarButton1 = new devDept.Eyeshot.ZoomToolBarButton("Zoom", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
39
            devDept.Eyeshot.PanToolBarButton panToolBarButton1 = new devDept.Eyeshot.PanToolBarButton("Pan", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
40
            devDept.Eyeshot.ZoomFitToolBarButton zoomFitToolBarButton1 = new devDept.Eyeshot.ZoomFitToolBarButton("Zoom Fit", devDept.Eyeshot.ToolBarButton.styleType.PushButton, true, true);
41
            devDept.Eyeshot.ToolBar toolBar1 = new devDept.Eyeshot.ToolBar(devDept.Eyeshot.ToolBar.positionType.HorizontalTopCenter, true, new devDept.Eyeshot.ToolBarButton[] {
42
            ((devDept.Eyeshot.ToolBarButton)(magnifyingGlassToolBarButton1)),
43
            ((devDept.Eyeshot.ToolBarButton)(zoomWindowToolBarButton1)),
44
            ((devDept.Eyeshot.ToolBarButton)(zoomToolBarButton1)),
45
            ((devDept.Eyeshot.ToolBarButton)(panToolBarButton1)),
46
            ((devDept.Eyeshot.ToolBarButton)(zoomFitToolBarButton1))});
47
            devDept.Eyeshot.Histogram histogram1 = new devDept.Eyeshot.Histogram(30, 80, "Title", System.Drawing.Color.Blue, System.Drawing.Color.Gray, System.Drawing.Color.Black, System.Drawing.Color.Red, System.Drawing.Color.LightYellow, false, true, false, "{0:+0.###;-0.###;0}");
48
            devDept.Eyeshot.Grid grid1 = new devDept.Eyeshot.Grid(new devDept.Geometry.Point2D(-100D, -100D), new devDept.Geometry.Point2D(100D, 100D), 10D, new devDept.Geometry.Plane(new devDept.Geometry.Point3D(0D, 0D, 0D), new devDept.Geometry.Vector3D(0D, 0D, 1D)), System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))), System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))), System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(0)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))), false, false, false, false, 10, 100, 10, System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))), System.Drawing.Color.Transparent, false, System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255))))));
49
            devDept.Eyeshot.OriginSymbol originSymbol1 = new devDept.Eyeshot.OriginSymbol(10, devDept.Eyeshot.originSymbolStyleType.Ball, new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))), System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.Red, System.Drawing.Color.Green, System.Drawing.Color.Blue, "Origin", "X", "Y", "Z", true, null, false);
50
            devDept.Eyeshot.RotateSettings rotateSettings1 = new devDept.Eyeshot.RotateSettings(new devDept.Eyeshot.MouseButton(devDept.Eyeshot.mouseButtonsZPR.Middle, devDept.Eyeshot.modifierKeys.None), 10D, false, 1D, devDept.Eyeshot.rotationType.Trackball, devDept.Eyeshot.rotationCenterType.CursorLocation, new devDept.Geometry.Point3D(0D, 0D, 0D), false);
51
            devDept.Eyeshot.ZoomSettings zoomSettings1 = new devDept.Eyeshot.ZoomSettings(new devDept.Eyeshot.MouseButton(devDept.Eyeshot.mouseButtonsZPR.Middle, devDept.Eyeshot.modifierKeys.Shift), 25, true, devDept.Eyeshot.zoomStyleType.AtCursorLocation, false, 1D, System.Drawing.Color.Empty, devDept.Eyeshot.Camera.perspectiveFitType.Accurate, false, 10, true);
52
            devDept.Eyeshot.PanSettings panSettings1 = new devDept.Eyeshot.PanSettings(new devDept.Eyeshot.MouseButton(devDept.Eyeshot.mouseButtonsZPR.Middle, devDept.Eyeshot.modifierKeys.Ctrl), 25, true);
53
            devDept.Eyeshot.NavigationSettings navigationSettings1 = new devDept.Eyeshot.NavigationSettings(devDept.Eyeshot.Camera.navigationType.Examine, new devDept.Eyeshot.MouseButton(devDept.Eyeshot.mouseButtonsZPR.Left, devDept.Eyeshot.modifierKeys.None), new devDept.Geometry.Point3D(-1000D, -1000D, -1000D), new devDept.Geometry.Point3D(1000D, 1000D, 1000D), 8D, 50D, 50D);
54
            devDept.Eyeshot.CoordinateSystemIcon coordinateSystemIcon1 = new devDept.Eyeshot.CoordinateSystemIcon(new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))), System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))), System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))), System.Drawing.Color.OrangeRed, "Origin", "X", "Y", "Z", true, devDept.Eyeshot.coordinateSystemPositionType.BottomLeft, 37, null, false);
55
            devDept.Eyeshot.ViewCubeIcon viewCubeIcon1 = new devDept.Eyeshot.ViewCubeIcon(devDept.Eyeshot.coordinateSystemPositionType.TopRight, false, System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(20)))), ((int)(((byte)(60))))), true, "FRONT", "BACK", "LEFT", "RIGHT", "TOP", "BOTTOM", System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), 'S', 'N', 'W', 'E', true, null, System.Drawing.Color.White, System.Drawing.Color.Black, 120, true, true, null, null, null, null, null, null, false, new devDept.Geometry.Quaternion(0D, 0D, 0D, 1D), true);
56
            devDept.Eyeshot.Viewport.SavedViewsManager savedViewsManager1 = new devDept.Eyeshot.Viewport.SavedViewsManager(8);
57
            devDept.Eyeshot.Viewport viewport1 = new devDept.Eyeshot.Viewport(new System.Drawing.Point(0, 0), new System.Drawing.Size(1064, 572), backgroundSettings1, camera1, new devDept.Eyeshot.ToolBar[] {
58
            toolBar1}, new devDept.Eyeshot.Legend[0], histogram1, devDept.Eyeshot.displayType.Wireframe, true, false, false, false, new devDept.Eyeshot.Grid[] {
59
            grid1}, new devDept.Eyeshot.OriginSymbol[] {
60
            originSymbol1}, false, rotateSettings1, zoomSettings1, panSettings1, navigationSettings1, coordinateSystemIcon1, viewCubeIcon1, savedViewsManager1, devDept.Eyeshot.viewType.Top);
61
            Telerik.WinControls.UI.GridViewCheckBoxColumn gridViewCheckBoxColumn1 = new Telerik.WinControls.UI.GridViewCheckBoxColumn();
62
            Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn1 = new Telerik.WinControls.UI.GridViewTextBoxColumn();
63
            Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn2 = new Telerik.WinControls.UI.GridViewTextBoxColumn();
64
            Telerik.WinControls.UI.TableViewDefinition tableViewDefinition1 = new Telerik.WinControls.UI.TableViewDefinition();
32
            devDept.Eyeshot.CancelToolBarButton cancelToolBarButton2 = new devDept.Eyeshot.CancelToolBarButton("Cancel", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
33
            devDept.Eyeshot.ProgressBar progressBar2 = new devDept.Eyeshot.ProgressBar(devDept.Eyeshot.ProgressBar.styleType.Circular, 0, "Idle", System.Drawing.Color.Black, System.Drawing.Color.Transparent, System.Drawing.Color.Green, 1D, true, cancelToolBarButton2, false, 0.1D, 0.333D, true);
34
            devDept.Graphics.BackgroundSettings backgroundSettings2 = new devDept.Graphics.BackgroundSettings(devDept.Graphics.backgroundStyleType.Solid, System.Drawing.Color.DeepSkyBlue, System.Drawing.Color.DodgerBlue, System.Drawing.Color.Black, 0.75D, null, devDept.Graphics.colorThemeType.Auto, 0.33D);
35
            devDept.Eyeshot.Camera camera2 = new devDept.Eyeshot.Camera(new devDept.Geometry.Point3D(-4.5374030325107811E-16D, 2.0434646606445308D, 47.596564948558793D), 97.257904648780823D, new devDept.Geometry.Quaternion(0.49999999999999989D, 0.5D, 0.5D, 0.50000000000000011D), devDept.Graphics.projectionType.Orthographic, 40D, 2.3787098441796113D, false, 0.001D);
36
            devDept.Eyeshot.MagnifyingGlassToolBarButton magnifyingGlassToolBarButton2 = new devDept.Eyeshot.MagnifyingGlassToolBarButton("Magnifying Glass", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
37
            devDept.Eyeshot.ZoomWindowToolBarButton zoomWindowToolBarButton2 = new devDept.Eyeshot.ZoomWindowToolBarButton("Zoom Window", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
38
            devDept.Eyeshot.ZoomToolBarButton zoomToolBarButton2 = new devDept.Eyeshot.ZoomToolBarButton("Zoom", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
39
            devDept.Eyeshot.PanToolBarButton panToolBarButton2 = new devDept.Eyeshot.PanToolBarButton("Pan", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
40
            devDept.Eyeshot.ZoomFitToolBarButton zoomFitToolBarButton2 = new devDept.Eyeshot.ZoomFitToolBarButton("Zoom Fit", devDept.Eyeshot.ToolBarButton.styleType.PushButton, true, true);
41
            devDept.Eyeshot.ToolBar toolBar2 = new devDept.Eyeshot.ToolBar(devDept.Eyeshot.ToolBar.positionType.HorizontalTopCenter, true, new devDept.Eyeshot.ToolBarButton[] {
42
            ((devDept.Eyeshot.ToolBarButton)(magnifyingGlassToolBarButton2)),
43
            ((devDept.Eyeshot.ToolBarButton)(zoomWindowToolBarButton2)),
44
            ((devDept.Eyeshot.ToolBarButton)(zoomToolBarButton2)),
45
            ((devDept.Eyeshot.ToolBarButton)(panToolBarButton2)),
46
            ((devDept.Eyeshot.ToolBarButton)(zoomFitToolBarButton2))});
47
            devDept.Eyeshot.Histogram histogram2 = new devDept.Eyeshot.Histogram(30, 80, "Title", System.Drawing.Color.Blue, System.Drawing.Color.Gray, System.Drawing.Color.Black, System.Drawing.Color.Red, System.Drawing.Color.LightYellow, false, true, false, "{0:+0.###;-0.###;0}");
48
            devDept.Eyeshot.Grid grid2 = new devDept.Eyeshot.Grid(new devDept.Geometry.Point2D(-100D, -100D), new devDept.Geometry.Point2D(100D, 100D), 10D, new devDept.Geometry.Plane(new devDept.Geometry.Point3D(0D, 0D, 0D), new devDept.Geometry.Vector3D(0D, 0D, 1D)), System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))), System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))), System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(0)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))), false, false, false, false, 10, 100, 10, System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))), System.Drawing.Color.Transparent, false, System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255))))));
49
            devDept.Eyeshot.OriginSymbol originSymbol2 = new devDept.Eyeshot.OriginSymbol(10, devDept.Eyeshot.originSymbolStyleType.Ball, new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))), System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.Red, System.Drawing.Color.Green, System.Drawing.Color.Blue, "Origin", "X", "Y", "Z", true, null, false);
50
            devDept.Eyeshot.RotateSettings rotateSettings2 = new devDept.Eyeshot.RotateSettings(new devDept.Eyeshot.MouseButton(devDept.Eyeshot.mouseButtonsZPR.Middle, devDept.Eyeshot.modifierKeys.None), 10D, false, 1D, devDept.Eyeshot.rotationType.Trackball, devDept.Eyeshot.rotationCenterType.CursorLocation, new devDept.Geometry.Point3D(0D, 0D, 0D), false);
51
            devDept.Eyeshot.ZoomSettings zoomSettings2 = new devDept.Eyeshot.ZoomSettings(new devDept.Eyeshot.MouseButton(devDept.Eyeshot.mouseButtonsZPR.Middle, devDept.Eyeshot.modifierKeys.Shift), 25, true, devDept.Eyeshot.zoomStyleType.AtCursorLocation, false, 1D, System.Drawing.Color.Empty, devDept.Eyeshot.Camera.perspectiveFitType.Accurate, false, 10, true);
52
            devDept.Eyeshot.PanSettings panSettings2 = new devDept.Eyeshot.PanSettings(new devDept.Eyeshot.MouseButton(devDept.Eyeshot.mouseButtonsZPR.Middle, devDept.Eyeshot.modifierKeys.Ctrl), 25, true);
53
            devDept.Eyeshot.NavigationSettings navigationSettings2 = new devDept.Eyeshot.NavigationSettings(devDept.Eyeshot.Camera.navigationType.Examine, new devDept.Eyeshot.MouseButton(devDept.Eyeshot.mouseButtonsZPR.Left, devDept.Eyeshot.modifierKeys.None), new devDept.Geometry.Point3D(-1000D, -1000D, -1000D), new devDept.Geometry.Point3D(1000D, 1000D, 1000D), 8D, 50D, 50D);
54
            devDept.Eyeshot.CoordinateSystemIcon coordinateSystemIcon2 = new devDept.Eyeshot.CoordinateSystemIcon(new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))), System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))), System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))), System.Drawing.Color.OrangeRed, "Origin", "X", "Y", "Z", true, devDept.Eyeshot.coordinateSystemPositionType.BottomLeft, 37, null, false);
55
            devDept.Eyeshot.ViewCubeIcon viewCubeIcon2 = new devDept.Eyeshot.ViewCubeIcon(devDept.Eyeshot.coordinateSystemPositionType.TopRight, false, System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(20)))), ((int)(((byte)(60))))), true, "FRONT", "BACK", "LEFT", "RIGHT", "TOP", "BOTTOM", System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), 'S', 'N', 'W', 'E', true, null, System.Drawing.Color.White, System.Drawing.Color.Black, 120, true, true, null, null, null, null, null, null, false, new devDept.Geometry.Quaternion(0D, 0D, 0D, 1D), true);
56
            devDept.Eyeshot.Viewport.SavedViewsManager savedViewsManager2 = new devDept.Eyeshot.Viewport.SavedViewsManager(8);
57
            devDept.Eyeshot.Viewport viewport2 = new devDept.Eyeshot.Viewport(new System.Drawing.Point(0, 0), new System.Drawing.Size(1064, 572), backgroundSettings2, camera2, new devDept.Eyeshot.ToolBar[] {
58
            toolBar2}, new devDept.Eyeshot.Legend[0], histogram2, devDept.Eyeshot.displayType.Wireframe, true, false, false, false, new devDept.Eyeshot.Grid[] {
59
            grid2}, new devDept.Eyeshot.OriginSymbol[] {
60
            originSymbol2}, false, rotateSettings2, zoomSettings2, panSettings2, navigationSettings2, coordinateSystemIcon2, viewCubeIcon2, savedViewsManager2, devDept.Eyeshot.viewType.Top);
61
            Telerik.WinControls.UI.GridViewCheckBoxColumn gridViewCheckBoxColumn2 = new Telerik.WinControls.UI.GridViewCheckBoxColumn();
62
            Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn3 = new Telerik.WinControls.UI.GridViewTextBoxColumn();
63
            Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn4 = new Telerik.WinControls.UI.GridViewTextBoxColumn();
64
            Telerik.WinControls.UI.TableViewDefinition tableViewDefinition2 = new Telerik.WinControls.UI.TableViewDefinition();
65 65
            this.radSplitContainer1 = new Telerik.WinControls.UI.RadSplitContainer();
66 66
            this.splitPanel1 = new Telerik.WinControls.UI.SplitPanel();
67 67
            this.radSplitContainer2 = new Telerik.WinControls.UI.RadSplitContainer();
......
86 86
            this.radButtonExtractText = new Telerik.WinControls.UI.RadButton();
87 87
            this.splitPanel5 = new Telerik.WinControls.UI.SplitPanel();
88 88
            this.splitPanel3 = new Telerik.WinControls.UI.SplitPanel();
89
            this.radButtonRefresh = new Telerik.WinControls.UI.RadButton();
89 90
            ((System.ComponentModel.ISupportInitialize)(this.radSplitContainer1)).BeginInit();
90 91
            this.radSplitContainer1.SuspendLayout();
91 92
            ((System.ComponentModel.ISupportInitialize)(this.splitPanel1)).BeginInit();
......
120 121
            ((System.ComponentModel.ISupportInitialize)(this.radButtonExtractText)).BeginInit();
121 122
            ((System.ComponentModel.ISupportInitialize)(this.splitPanel5)).BeginInit();
122 123
            ((System.ComponentModel.ISupportInitialize)(this.splitPanel3)).BeginInit();
124
            ((System.ComponentModel.ISupportInitialize)(this.radButtonRefresh)).BeginInit();
123 125
            this.SuspendLayout();
124 126
            // 
125 127
            // radSplitContainer1
......
236 238
            this.designDrawing.Dock = System.Windows.Forms.DockStyle.Fill;
237 239
            this.designDrawing.Location = new System.Drawing.Point(3, 3);
238 240
            this.designDrawing.Name = "designDrawing";
239
            this.designDrawing.ProgressBar = progressBar1;
241
            this.designDrawing.ProgressBar = progressBar2;
240 242
            this.designDrawing.Size = new System.Drawing.Size(1064, 572);
241 243
            this.designDrawing.TabIndex = 0;
242 244
            this.designDrawing.Text = "design1";
243
            this.designDrawing.Viewports.Add(viewport1);
245
            this.designDrawing.Viewports.Add(viewport2);
244 246
            // 
245 247
            // radSplitContainerMain
246 248
            // 
......
284 286
            this.radGridViewDocument.MasterTemplate.AllowAddNewRow = false;
285 287
            this.radGridViewDocument.MasterTemplate.AllowDeleteRow = false;
286 288
            this.radGridViewDocument.MasterTemplate.AllowSearchRow = true;
287
            gridViewCheckBoxColumn1.CheckFilteredRows = false;
288
            gridViewCheckBoxColumn1.EnableHeaderCheckBox = true;
289
            gridViewCheckBoxColumn1.HeaderText = "Checked";
290
            gridViewCheckBoxColumn1.MaxWidth = 30;
291
            gridViewCheckBoxColumn1.Name = "Checked";
292
            gridViewCheckBoxColumn1.Width = 20;
293
            gridViewTextBoxColumn1.FieldName = "DocumentNo";
294
            gridViewTextBoxColumn1.HeaderText = "DocumentNo";
295
            gridViewTextBoxColumn1.Name = "columnDocumentNo";
296
            gridViewTextBoxColumn1.ReadOnly = true;
297
            gridViewTextBoxColumn2.FieldName = "Simularity";
298
            gridViewTextBoxColumn2.HeaderText = "Simularity";
299
            gridViewTextBoxColumn2.Name = "Simularity";
300
            gridViewTextBoxColumn2.ReadOnly = true;
289
            gridViewCheckBoxColumn2.CheckFilteredRows = false;
290
            gridViewCheckBoxColumn2.EnableHeaderCheckBox = true;
291
            gridViewCheckBoxColumn2.HeaderText = "Checked";
292
            gridViewCheckBoxColumn2.MaxWidth = 30;
293
            gridViewCheckBoxColumn2.Name = "Checked";
294
            gridViewCheckBoxColumn2.Width = 20;
295
            gridViewTextBoxColumn3.FieldName = "DocumentNo";
296
            gridViewTextBoxColumn3.HeaderText = "DocumentNo";
297
            gridViewTextBoxColumn3.Name = "columnDocumentNo";
298
            gridViewTextBoxColumn3.ReadOnly = true;
299
            gridViewTextBoxColumn4.FieldName = "Simularity";
300
            gridViewTextBoxColumn4.HeaderText = "Simularity";
301
            gridViewTextBoxColumn4.Name = "Simularity";
302
            gridViewTextBoxColumn4.ReadOnly = true;
301 303
            this.radGridViewDocument.MasterTemplate.Columns.AddRange(new Telerik.WinControls.UI.GridViewDataColumn[] {
302
            gridViewCheckBoxColumn1,
303
            gridViewTextBoxColumn1,
304
            gridViewTextBoxColumn2});
304
            gridViewCheckBoxColumn2,
305
            gridViewTextBoxColumn3,
306
            gridViewTextBoxColumn4});
305 307
            this.radGridViewDocument.MasterTemplate.EnableFiltering = true;
306
            this.radGridViewDocument.MasterTemplate.ViewDefinition = tableViewDefinition1;
308
            this.radGridViewDocument.MasterTemplate.ViewDefinition = tableViewDefinition2;
307 309
            this.radGridViewDocument.Name = "radGridViewDocument";
308 310
            this.radGridViewDocument.Size = new System.Drawing.Size(250, 578);
309 311
            this.radGridViewDocument.TabIndex = 0;
......
340 342
            // 
341 343
            // tableLayoutPanel3
342 344
            // 
343
            this.tableLayoutPanel3.ColumnCount = 14;
345
            this.tableLayoutPanel3.ColumnCount = 15;
346
            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 30F));
344 347
            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 80F));
345 348
            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
346 349
            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 80F));
......
355 358
            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 28F));
356 359
            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 60F));
357 360
            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 80F));
358
            this.tableLayoutPanel3.Controls.Add(this.radLabel3, 0, 0);
359
            this.tableLayoutPanel3.Controls.Add(this.radSpinEditorTolerance, 1, 0);
360
            this.tableLayoutPanel3.Controls.Add(this.radButtonExceptLayer, 11, 0);
361
            this.tableLayoutPanel3.Controls.Add(this.radButtonClassify, 12, 0);
362
            this.tableLayoutPanel3.Controls.Add(this.radLabel1, 2, 0);
363
            this.tableLayoutPanel3.Controls.Add(this.radSpinEditorSimularity, 3, 0);
364
            this.tableLayoutPanel3.Controls.Add(this.radLabel4, 4, 0);
365
            this.tableLayoutPanel3.Controls.Add(this.radButtonExtractText, 13, 0);
361
            this.tableLayoutPanel3.Controls.Add(this.radLabel3, 1, 0);
362
            this.tableLayoutPanel3.Controls.Add(this.radSpinEditorTolerance, 2, 0);
363
            this.tableLayoutPanel3.Controls.Add(this.radButtonExceptLayer, 12, 0);
364
            this.tableLayoutPanel3.Controls.Add(this.radButtonClassify, 13, 0);
365
            this.tableLayoutPanel3.Controls.Add(this.radLabel1, 3, 0);
366
            this.tableLayoutPanel3.Controls.Add(this.radSpinEditorSimularity, 4, 0);
367
            this.tableLayoutPanel3.Controls.Add(this.radLabel4, 5, 0);
368
            this.tableLayoutPanel3.Controls.Add(this.radButtonExtractText, 14, 0);
369
            this.tableLayoutPanel3.Controls.Add(this.radButtonRefresh, 0, 0);
366 370
            this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
367 371
            this.tableLayoutPanel3.Location = new System.Drawing.Point(3, 3);
368 372
            this.tableLayoutPanel3.Name = "tableLayoutPanel3";
......
374 378
            // radLabel3
375 379
            // 
376 380
            this.radLabel3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
377
            this.radLabel3.Location = new System.Drawing.Point(3, 3);
381
            this.radLabel3.Location = new System.Drawing.Point(33, 3);
378 382
            this.radLabel3.Name = "radLabel3";
379
            this.radLabel3.Size = new System.Drawing.Size(74, 18);
383
            this.radLabel3.Size = new System.Drawing.Size(63, 18);
380 384
            this.radLabel3.TabIndex = 0;
381 385
            this.radLabel3.Text = "Tolerance : ";
382 386
            // 
......
389 393
            0,
390 394
            0,
391 395
            131072});
392
            this.radSpinEditorTolerance.Location = new System.Drawing.Point(83, 3);
396
            this.radSpinEditorTolerance.Location = new System.Drawing.Point(113, 3);
393 397
            this.radSpinEditorTolerance.Name = "radSpinEditorTolerance";
394 398
            this.radSpinEditorTolerance.Size = new System.Drawing.Size(114, 20);
395 399
            this.radSpinEditorTolerance.TabIndex = 1;
......
415 419
            // radLabel1
416 420
            // 
417 421
            this.radLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
418
            this.radLabel1.Location = new System.Drawing.Point(203, 3);
422
            this.radLabel1.Location = new System.Drawing.Point(233, 3);
419 423
            this.radLabel1.Name = "radLabel1";
420
            this.radLabel1.Size = new System.Drawing.Size(74, 18);
424
            this.radLabel1.Size = new System.Drawing.Size(64, 18);
421 425
            this.radLabel1.TabIndex = 10;
422 426
            this.radLabel1.Text = "Simularity : ";
423 427
            // 
424 428
            // radSpinEditorSimularity
425 429
            // 
426 430
            this.radSpinEditorSimularity.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
427
            this.radSpinEditorSimularity.Location = new System.Drawing.Point(283, 3);
431
            this.radSpinEditorSimularity.Location = new System.Drawing.Point(313, 3);
428 432
            this.radSpinEditorSimularity.Name = "radSpinEditorSimularity";
429 433
            this.radSpinEditorSimularity.NullableValue = new decimal(new int[] {
430 434
            80,
... 이 차이점은 표시할 수 있는 최대 줄수를 초과해서 이 차이점은 잘렸습니다.

내보내기 Unified diff

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