개정판 c4ba621d
Feature: LengthToleranceRatio, 중첩 블럭 깨는 로직 추가
Change-Id: Ieed4c92f4e9ea0a1752e72b259b53d8eb9e0b979
ID2.Manager/ID2.Manager.Compare/Controls/Verification.cs | ||
---|---|---|
36 | 36 |
private static Color DiffColor = Color.Yellow; |
37 | 37 |
|
38 | 38 |
private static double Tolerance = 0; |
39 |
private static double LengthToleranceRatio { get; set; } = 0.1; |
|
39 | 40 |
#endregion |
40 | 41 |
|
41 | 42 |
private RadProgressBarElement _progressBar = null; |
... | ... | |
315 | 316 |
} |
316 | 317 |
} |
317 | 318 |
|
319 |
string _LengthToleranceRatio = Classes.ID2Helper.IniReadValue(IniFilePath, "Verification", "Length Tolerance Ratio"); |
|
320 |
if (!string.IsNullOrEmpty(_LengthToleranceRatio)) |
|
321 |
{ |
|
322 |
LengthToleranceRatio = Convert.ToDouble(_LengthToleranceRatio); |
|
323 |
} |
|
324 |
|
|
318 | 325 |
#region Except Layer를 로딩한다. |
319 | 326 |
LoadLayerSettings(); |
320 | 327 |
#endregion |
... | ... | |
402 | 409 |
} |
403 | 410 |
} |
404 | 411 |
|
412 |
private List<Entity> ExplodeBlockReference(Design design, BlockReference blkref, string LayerName, Color color) |
|
413 |
{ |
|
414 |
var res = new List<Entity>(); |
|
415 |
|
|
416 |
var entities = blkref.Explode(design.Blocks); |
|
417 |
foreach (var ent in entities) ent.LayerName = LayerName; |
|
418 |
entities.ToList().ForEach(y => |
|
419 |
{ |
|
420 |
if (y is LinearPath lp) |
|
421 |
{ |
|
422 |
int count = Convert.ToInt32(lp.Vertices.Length); |
|
423 |
for (int i = 0; i < count - 1; ++i) |
|
424 |
{ |
|
425 |
var line = new devDept.Eyeshot.Entities.Line(lp.Vertices[i], lp.Vertices[i + 1]) |
|
426 |
{ |
|
427 |
LayerName = lp.LayerName, |
|
428 |
LineWeight = lp.LineWeight, |
|
429 |
LineTypeMethod = colorMethodType.byEntity, |
|
430 |
Color = Verification.AutoCADColor, |
|
431 |
ColorMethod = colorMethodType.byEntity |
|
432 |
}; |
|
433 |
res.Add(line); |
|
434 |
} |
|
435 |
} |
|
436 |
else if(y is BlockReference subblkref) |
|
437 |
{ |
|
438 |
res.AddRange(ExplodeBlockReference(design, subblkref, LayerName, color)); |
|
439 |
} |
|
440 |
}); |
|
441 |
|
|
442 |
var attributes = blkref.Attributes; |
|
443 |
foreach (var ent in entities.Where(y => y is devDept.Eyeshot.Entities.Attribute)) |
|
444 |
{ |
|
445 |
var txt = ent as devDept.Eyeshot.Entities.Attribute; |
|
446 |
txt.LayerName = LayerName; |
|
447 |
txt.Color = color; |
|
448 |
txt.ColorMethod = colorMethodType.byEntity; |
|
449 |
KeyValuePair<string, AttributeReference>? kp = attributes.FirstOrDefault(z => z.Key == txt.TextString); |
|
450 |
if (kp.HasValue) txt.TextString = (kp.Value.Value) != null ? kp.Value.Value.Value : string.Empty; |
|
451 |
} |
|
452 |
|
|
453 |
res.AddRange(entities.Where(y => |
|
454 |
{ |
|
455 |
if (y is devDept.Eyeshot.Entities.Attribute attr && string.IsNullOrEmpty(attr.TextString)) return false; |
|
456 |
if (y is devDept.Eyeshot.Entities.Text text && string.IsNullOrEmpty(text.TextString)) return false; |
|
457 |
if (y is BlockReference subblkref && subblkref.BlockName == "PORT") return false; |
|
458 |
if (y is LinearPath) return false; |
|
459 |
return true; |
|
460 |
})); |
|
461 |
|
|
462 |
blkref.Attributes.Clear(); |
|
463 |
blkref.UpdateBoundingBox(new TraversalParams(design)); |
|
464 |
|
|
465 |
return res; |
|
466 |
} |
|
467 |
|
|
405 | 468 |
/// <summary> |
406 | 469 |
/// 주어진 도면의 원본과 AVEVA를 비교한다. |
407 | 470 |
/// </summary> |
... | ... | |
425 | 488 |
ent.Translate(-min.X, -min.Y); |
426 | 489 |
} |
427 | 490 |
ra.AddToScene(design); |
491 |
design.Entities.RemoveAll(x => Forms.ExceptLayer.ExceptLayers.Exists(y => y.Name.ToUpper() == x.LayerName.ToUpper() && !y.Visible)); |
|
428 | 492 |
} |
429 | 493 |
catch (Exception ex) |
430 | 494 |
{ |
... | ... | |
543 | 607 |
{ |
544 | 608 |
if (x is BlockReference blkref) |
545 | 609 |
{ |
546 |
var entities = blkref.Explode(design.Blocks); |
|
547 |
foreach (var ent in entities) ent.LayerName = Verification.AutoCADLayer; |
|
548 |
entities.ToList().ForEach(y => |
|
549 |
{ |
|
550 |
if (y is LinearPath lp) |
|
551 |
{ |
|
552 |
int count = Convert.ToInt32(lp.Vertices.Length); |
|
553 |
for (int i = 0; i < count - 1; ++i) |
|
554 |
{ |
|
555 |
var line = new devDept.Eyeshot.Entities.Line(lp.Vertices[i], lp.Vertices[i + 1]) |
|
556 |
{ |
|
557 |
LayerName = lp.LayerName, |
|
558 |
LineWeight = lp.LineWeight, |
|
559 |
LineTypeMethod = colorMethodType.byEntity, |
|
560 |
Color = Verification.AutoCADColor, |
|
561 |
ColorMethod = colorMethodType.byEntity |
|
562 |
}; |
|
563 |
AddEntities.Add(line); |
|
564 |
} |
|
565 |
} |
|
566 |
}); |
|
567 |
|
|
568 |
var attributes = blkref.Attributes; |
|
569 |
foreach (var ent in entities.Where(y => y is devDept.Eyeshot.Entities.Attribute)) |
|
570 |
{ |
|
571 |
var txt = ent as devDept.Eyeshot.Entities.Attribute; |
|
572 |
txt.LayerName = Verification.AutoCADLayer; |
|
573 |
txt.Color = Verification.AutoCADColor; |
|
574 |
txt.ColorMethod = colorMethodType.byEntity; |
|
575 |
KeyValuePair<string, AttributeReference>? kp = attributes.FirstOrDefault(z => z.Key == txt.TextString); |
|
576 |
if (kp.HasValue) txt.TextString = (kp.Value.Value) != null ? kp.Value.Value.Value : string.Empty; |
|
577 |
} |
|
578 |
|
|
579 |
AddEntities.AddRange(entities.Where(y => |
|
580 |
{ |
|
581 |
if (y is devDept.Eyeshot.Entities.Attribute attr && string.IsNullOrEmpty(attr.TextString)) return false; |
|
582 |
if (y is devDept.Eyeshot.Entities.Text text && string.IsNullOrEmpty(text.TextString)) return false; |
|
583 |
if (y is LinearPath) return false; |
|
584 |
return true; |
|
585 |
})); |
|
586 |
|
|
587 |
blkref.Attributes.Clear(); |
|
588 |
blkref.UpdateBoundingBox(new TraversalParams(design)); |
|
610 |
AddEntities.AddRange(ExplodeBlockReference(design, blkref, Verification.AutoCADLayer, Verification.AutoCADColor)); |
|
589 | 611 |
} |
590 | 612 |
}); |
591 | 613 |
|
592 | 614 |
design.Entities.RemoveAll(x => (x is BlockReference) || Forms.ExceptLayer.ExceptLayers.Exists(y => y.Name.ToUpper() == x.LayerName.ToUpper() && !y.Visible)); |
593 | 615 |
design.Entities.AddRange(AddEntities); |
616 |
|
|
617 |
#region 눈에 보이지 않는 라인은 제거 |
|
618 |
design.Entities.RemoveAll(x => x is Line line && line.Length() < 0.001); |
|
619 |
#endregion |
|
594 | 620 |
#endregion |
595 | 621 |
|
596 | 622 |
ColorEntities(design, design.Entities, Verification.AutoCADColor); |
... | ... | |
679 | 705 |
} |
680 | 706 |
ra.AddToScene(design); |
681 | 707 |
|
708 |
#region 불필요한 블럭들은 제거 |
|
709 |
design.Entities.RemoveAll(x => x is BlockReference blkref && (blkref.BlockName == "LBRK" || |
|
710 |
blkref.BlockName == "PSNODE" || blkref.BlockName == "PENODE" || blkref.BlockName.StartsWith("ARROW"))); |
|
711 |
#endregion |
|
712 |
|
|
682 | 713 |
#region 블럭을 깸 |
683 | 714 |
design.Entities.Where(x => x.LayerName == Verification.AVEVALayer).ToList().ForEach(x => |
684 | 715 |
{ |
685 | 716 |
if(x is BlockReference blkref) |
686 | 717 |
{ |
687 |
var attributes = blkref.Attributes; |
|
688 |
var entities = blkref.Explode(design.Blocks); |
|
689 |
entities.ToList().ForEach(y => |
|
690 |
{ |
|
691 |
if (y is LinearPath lp) |
|
692 |
{ |
|
693 |
int count = Convert.ToInt32(lp.Vertices.Length); |
|
694 |
for (int i = 0; i < count - 1; ++i) |
|
695 |
{ |
|
696 |
var line = new devDept.Eyeshot.Entities.Line(lp.Vertices[i], lp.Vertices[i + 1]) |
|
697 |
{ |
|
698 |
LayerName = Verification.AVEVALayer, |
|
699 |
LineWeight = lp.LineWeight, |
|
700 |
LineTypeMethod = colorMethodType.byEntity, |
|
701 |
Color = Verification.AVEVAColor, |
|
702 |
ColorMethod = colorMethodType.byEntity |
|
703 |
}; |
|
704 |
AddEntities.Add(line); |
|
705 |
} |
|
706 |
} |
|
707 |
else |
|
708 |
{ |
|
709 |
y.LayerName = Verification.AVEVALayer; |
|
710 |
y.Color = Verification.AVEVAColor; |
|
711 |
y.ColorMethod = colorMethodType.byEntity; |
|
712 |
} |
|
713 |
}); |
|
714 |
|
|
715 |
foreach (var ent in entities.Where(y => y is devDept.Eyeshot.Entities.Attribute)) |
|
716 |
{ |
|
717 |
var txt = ent as devDept.Eyeshot.Entities.Attribute; |
|
718 |
txt.LayerName = Verification.AVEVALayer; |
|
719 |
txt.Color = Verification.AVEVAColor; |
|
720 |
txt.ColorMethod = colorMethodType.byEntity; |
|
721 |
KeyValuePair<string, AttributeReference>? kp = attributes.FirstOrDefault(z => z.Key == txt.TextString); |
|
722 |
if (kp.HasValue) txt.TextString = (kp.Value.Value) != null ? kp.Value.Value.Value : string.Empty; |
|
723 |
} |
|
724 |
|
|
725 |
AddEntities.AddRange(entities.Where(y => |
|
726 |
{ |
|
727 |
if (y is devDept.Eyeshot.Entities.Attribute attr && string.IsNullOrEmpty(attr.TextString)) return false; |
|
728 |
if (y is devDept.Eyeshot.Entities.Text text && string.IsNullOrEmpty(text.TextString)) return false; |
|
729 |
if (y is LinearPath) return false; |
|
730 |
return true; |
|
731 |
})); |
|
732 |
blkref.Attributes.Clear(); |
|
733 |
blkref.UpdateBoundingBox(new TraversalParams(design)); |
|
718 |
AddEntities.AddRange(ExplodeBlockReference(design, blkref, Verification.AVEVALayer, Verification.AVEVAColor)); |
|
734 | 719 |
} |
735 | 720 |
}); |
736 | 721 |
design.Entities.RemoveAll(x => |
... | ... | |
740 | 725 |
design.Entities.AddRange(AddEntities); |
741 | 726 |
#endregion |
742 | 727 |
|
743 |
ColorEntities(design, design.Entities.Where(x => x.LayerName == Verification.AVEVALayer).ToList(), Verification.AVEVAColor); |
|
744 |
|
|
745 |
#region 블럭 이름이 PSNODE, PENODE인 블럭은 보이지 않도록 한다. |
|
746 |
design.Entities.ForEach(x => |
|
747 |
{ |
|
748 |
if (x is BlockReference blkref && (blkref.BlockName == "PSNODE" || blkref.BlockName == "PENODE" || |
|
749 |
blkref.BlockName.StartsWith("ARROW"))) |
|
750 |
blkref.Visible = false; |
|
751 |
}); |
|
728 |
#region 눈에 보이지 않는 라인은 제거 |
|
729 |
design.Entities.RemoveAll(x => x is Line line && line.Length() < 0.001); |
|
752 | 730 |
#endregion |
753 | 731 |
|
732 |
ColorEntities(design, design.Entities.Where(x => x.LayerName == Verification.AVEVALayer).ToList(), Verification.AVEVAColor); |
|
733 |
|
|
754 | 734 |
design.SetView(viewType.Top); |
755 | 735 |
design.ZoomFit(); |
756 | 736 |
design.Invalidate(); |
... | ... | |
826 | 806 |
equalEntitiesInV1[j] = i; |
827 | 807 |
equalEntitiesInV2[j] = true; |
828 | 808 |
foundEqual = true; |
829 |
|
|
830 |
design2.Entities.Remove(entVp2); |
|
831 | 809 |
break; |
832 | 810 |
} |
833 | 811 |
} |
... | ... | |
839 | 817 |
var origin = new devDept.Geometry.Point2D(entVp1.BoxMin.X - 1, entVp1.BoxMin.Y - 1); |
840 | 818 |
double width = entVp1.BoxMax.X - entVp1.BoxMin.X; |
841 | 819 |
double height = entVp1.BoxMax.Y - entVp1.BoxMin.Y; |
842 |
var rect = new devDept.Eyeshot.OrientedBoundingRect(origin, width + 2, height + 2); |
|
843 |
DiffRegions.Add(rect); |
|
820 |
if (Math.Abs(width) != double.PositiveInfinity && Math.Abs(height) != double.PositiveInfinity) |
|
821 |
{ |
|
822 |
var rect = new devDept.Eyeshot.OrientedBoundingRect(origin, width + 2, height + 2); |
|
823 |
DiffRegions.Add(rect); |
|
824 |
} |
|
844 | 825 |
#endregion |
845 | 826 |
} |
846 | 827 |
} |
... | ... | |
855 | 836 |
var origin = new devDept.Geometry.Point2D(AVEVAEntities[j].BoxMin.X - 1, AVEVAEntities[j].BoxMin.Y - 1); |
856 | 837 |
double width = AVEVAEntities[j].BoxMax.X - AVEVAEntities[j].BoxMin.X; |
857 | 838 |
double height = AVEVAEntities[j].BoxMax.Y - AVEVAEntities[j].BoxMin.Y; |
858 |
var rect = new devDept.Eyeshot.OrientedBoundingRect(origin, width + 2, height + 2); |
|
859 |
DiffRegions.Add(rect); |
|
839 |
if (Math.Abs(width) != double.PositiveInfinity && Math.Abs(height) != double.PositiveInfinity) |
|
840 |
{ |
|
841 |
var rect = new devDept.Eyeshot.OrientedBoundingRect(origin, width + 2, height + 2); |
|
842 |
DiffRegions.Add(rect); |
|
843 |
} |
|
860 | 844 |
#endregion |
861 | 845 |
} |
862 | 846 |
} |
... | ... | |
970 | 954 |
revcloud.LayerName = Verification.RevCloudLayer; |
971 | 955 |
revcloud.Color = Verification.RevCloudColor; |
972 | 956 |
revcloud.ColorMethod = colorMethodType.byEntity; |
957 |
revcloud.LineWeight = 10; |
|
958 |
revcloud.LineWeightMethod = colorMethodType.byEntity; |
|
973 | 959 |
design.Entities.Add(revcloud); |
974 | 960 |
} |
975 | 961 |
|
... | ... | |
1043 | 1029 |
return true; |
1044 | 1030 |
} |
1045 | 1031 |
} |
1046 |
else if (ent1 is PlanarEntity pe1 && ent2 is PlanarEntity pe2)
|
|
1032 |
else if (ent1 is PlanarEntity && ent2 is PlanarEntity)
|
|
1047 | 1033 |
{ |
1048 | 1034 |
if (ent1 is Arc arc1 && ent2 is Arc arc2) |
1049 | 1035 |
{ |
... | ... | |
1091 | 1077 |
return true; |
1092 | 1078 |
} |
1093 | 1079 |
} |
1094 |
#region 해치는 삽입점만 비교
|
|
1080 |
#region 해치는 중점만 비교
|
|
1095 | 1081 |
else if (ent1 is Hatch hatch1 && ent2 is Hatch hatch2) |
1096 | 1082 |
{ |
1097 | 1083 |
var center1 = (hatch1.BoxMin + hatch1.BoxMax) * 0.5; |
... | ... | |
1213 | 1199 |
var dir2 = line2.Direction; |
1214 | 1200 |
dir2.Normalize(); |
1215 | 1201 |
if (devDept.Geometry.Vector3D.AreParallel(dir1, dir2, 0.1) && |
1216 |
Math.Abs(line1.Length() - line2.Length()) <= 0.1 &&
|
|
1202 |
Math.Abs(line1.Length() - line2.Length()) <= line1.Length() * LengthToleranceRatio &&
|
|
1217 | 1203 |
line1.MidPoint.DistanceTo(line2.MidPoint) <= Verification.Tolerance |
1218 | 1204 |
) |
1219 | 1205 |
{ |
ID2.Manager/ID2.Manager.Compare/Forms/ExceptLayer.Designer.cs | ||
---|---|---|
39 | 39 |
this.radButtonCancel = new Telerik.WinControls.UI.RadButton(); |
40 | 40 |
this.radPageViewOption = new Telerik.WinControls.UI.RadPageView(); |
41 | 41 |
this.radPageViewPageExceptLayer = new Telerik.WinControls.UI.RadPageViewPage(); |
42 |
this.radPageViewPageLineLayer = new Telerik.WinControls.UI.RadPageViewPage(); |
|
43 | 42 |
this.radGridViewExceptLayer = new Telerik.WinControls.UI.RadGridView(); |
43 |
this.radPageViewPageLineLayer = new Telerik.WinControls.UI.RadPageViewPage(); |
|
44 | 44 |
this.radGridViewLineLayer = new Telerik.WinControls.UI.RadGridView(); |
45 |
this.radPageViewPageTolerance = new Telerik.WinControls.UI.RadPageViewPage(); |
|
46 |
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); |
|
47 |
this.radLabel1 = new Telerik.WinControls.UI.RadLabel(); |
|
48 |
this.radSpinEditorLengthToleranceRatio = new Telerik.WinControls.UI.RadSpinEditor(); |
|
45 | 49 |
this.tableLayoutPanel1.SuspendLayout(); |
46 | 50 |
this.tableLayoutPanel2.SuspendLayout(); |
47 | 51 |
((System.ComponentModel.ISupportInitialize)(this.radButtonOK)).BeginInit(); |
... | ... | |
49 | 53 |
((System.ComponentModel.ISupportInitialize)(this.radPageViewOption)).BeginInit(); |
50 | 54 |
this.radPageViewOption.SuspendLayout(); |
51 | 55 |
this.radPageViewPageExceptLayer.SuspendLayout(); |
52 |
this.radPageViewPageLineLayer.SuspendLayout(); |
|
53 | 56 |
((System.ComponentModel.ISupportInitialize)(this.radGridViewExceptLayer)).BeginInit(); |
54 | 57 |
((System.ComponentModel.ISupportInitialize)(this.radGridViewExceptLayer.MasterTemplate)).BeginInit(); |
58 |
this.radPageViewPageLineLayer.SuspendLayout(); |
|
55 | 59 |
((System.ComponentModel.ISupportInitialize)(this.radGridViewLineLayer)).BeginInit(); |
56 | 60 |
((System.ComponentModel.ISupportInitialize)(this.radGridViewLineLayer.MasterTemplate)).BeginInit(); |
61 |
this.radPageViewPageTolerance.SuspendLayout(); |
|
62 |
this.tableLayoutPanel3.SuspendLayout(); |
|
63 |
((System.ComponentModel.ISupportInitialize)(this.radLabel1)).BeginInit(); |
|
64 |
((System.ComponentModel.ISupportInitialize)(this.radSpinEditorLengthToleranceRatio)).BeginInit(); |
|
57 | 65 |
((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); |
58 | 66 |
this.SuspendLayout(); |
59 | 67 |
// |
... | ... | |
111 | 119 |
// |
112 | 120 |
this.radPageViewOption.Controls.Add(this.radPageViewPageExceptLayer); |
113 | 121 |
this.radPageViewOption.Controls.Add(this.radPageViewPageLineLayer); |
122 |
this.radPageViewOption.Controls.Add(this.radPageViewPageTolerance); |
|
114 | 123 |
this.radPageViewOption.Dock = System.Windows.Forms.DockStyle.Fill; |
115 | 124 |
this.radPageViewOption.Location = new System.Drawing.Point(3, 3); |
116 | 125 |
this.radPageViewOption.Name = "radPageViewOption"; |
... | ... | |
127 | 136 |
this.radPageViewPageExceptLayer.Size = new System.Drawing.Size(254, 210); |
128 | 137 |
this.radPageViewPageExceptLayer.Text = "Except Layer"; |
129 | 138 |
// |
130 |
// radPageViewPageLineLayer |
|
131 |
// |
|
132 |
this.radPageViewPageLineLayer.Controls.Add(this.radGridViewLineLayer); |
|
133 |
this.radPageViewPageLineLayer.ItemSize = new System.Drawing.SizeF(66F, 28F); |
|
134 |
this.radPageViewPageLineLayer.Location = new System.Drawing.Point(10, 37); |
|
135 |
this.radPageViewPageLineLayer.Name = "radPageViewPageLineLayer"; |
|
136 |
this.radPageViewPageLineLayer.Size = new System.Drawing.Size(254, 210); |
|
137 |
this.radPageViewPageLineLayer.Text = "Line Layer"; |
|
138 |
// |
|
139 | 139 |
// radGridViewExceptLayer |
140 | 140 |
// |
141 | 141 |
this.radGridViewExceptLayer.Dock = System.Windows.Forms.DockStyle.Fill; |
... | ... | |
148 | 148 |
this.radGridViewExceptLayer.Size = new System.Drawing.Size(254, 210); |
149 | 149 |
this.radGridViewExceptLayer.TabIndex = 0; |
150 | 150 |
// |
151 |
// radPageViewPageLineLayer |
|
152 |
// |
|
153 |
this.radPageViewPageLineLayer.Controls.Add(this.radGridViewLineLayer); |
|
154 |
this.radPageViewPageLineLayer.ItemSize = new System.Drawing.SizeF(66F, 28F); |
|
155 |
this.radPageViewPageLineLayer.Location = new System.Drawing.Point(10, 37); |
|
156 |
this.radPageViewPageLineLayer.Name = "radPageViewPageLineLayer"; |
|
157 |
this.radPageViewPageLineLayer.Size = new System.Drawing.Size(254, 210); |
|
158 |
this.radPageViewPageLineLayer.Text = "Line Layer"; |
|
159 |
// |
|
151 | 160 |
// radGridViewLineLayer |
152 | 161 |
// |
153 | 162 |
this.radGridViewLineLayer.Dock = System.Windows.Forms.DockStyle.Fill; |
... | ... | |
165 | 174 |
this.radGridViewLineLayer.Size = new System.Drawing.Size(254, 210); |
166 | 175 |
this.radGridViewLineLayer.TabIndex = 0; |
167 | 176 |
// |
177 |
// radPageViewPageTolerance |
|
178 |
// |
|
179 |
this.radPageViewPageTolerance.Controls.Add(this.tableLayoutPanel3); |
|
180 |
this.radPageViewPageTolerance.ItemSize = new System.Drawing.SizeF(65F, 28F); |
|
181 |
this.radPageViewPageTolerance.Location = new System.Drawing.Point(10, 37); |
|
182 |
this.radPageViewPageTolerance.Name = "radPageViewPageTolerance"; |
|
183 |
this.radPageViewPageTolerance.Size = new System.Drawing.Size(254, 210); |
|
184 |
this.radPageViewPageTolerance.Text = "Tolerance"; |
|
185 |
// |
|
186 |
// tableLayoutPanel3 |
|
187 |
// |
|
188 |
this.tableLayoutPanel3.ColumnCount = 2; |
|
189 |
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); |
|
190 |
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); |
|
191 |
this.tableLayoutPanel3.Controls.Add(this.radLabel1, 0, 0); |
|
192 |
this.tableLayoutPanel3.Controls.Add(this.radSpinEditorLengthToleranceRatio, 1, 0); |
|
193 |
this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; |
|
194 |
this.tableLayoutPanel3.Location = new System.Drawing.Point(0, 0); |
|
195 |
this.tableLayoutPanel3.Name = "tableLayoutPanel3"; |
|
196 |
this.tableLayoutPanel3.RowCount = 2; |
|
197 |
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); |
|
198 |
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); |
|
199 |
this.tableLayoutPanel3.Size = new System.Drawing.Size(254, 210); |
|
200 |
this.tableLayoutPanel3.TabIndex = 0; |
|
201 |
// |
|
202 |
// radLabel1 |
|
203 |
// |
|
204 |
this.radLabel1.Anchor = System.Windows.Forms.AnchorStyles.Left; |
|
205 |
this.radLabel1.Location = new System.Drawing.Point(3, 6); |
|
206 |
this.radLabel1.Name = "radLabel1"; |
|
207 |
this.radLabel1.Size = new System.Drawing.Size(121, 18); |
|
208 |
this.radLabel1.TabIndex = 0; |
|
209 |
this.radLabel1.Text = "Length Tolerance Ratio"; |
|
210 |
// |
|
211 |
// radSpinEditorLengthToleranceRatio |
|
212 |
// |
|
213 |
this.radSpinEditorLengthToleranceRatio.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); |
|
214 |
this.radSpinEditorLengthToleranceRatio.DecimalPlaces = 1; |
|
215 |
this.radSpinEditorLengthToleranceRatio.Increment = new decimal(new int[] { |
|
216 |
1, |
|
217 |
0, |
|
218 |
0, |
|
219 |
65536}); |
|
220 |
this.radSpinEditorLengthToleranceRatio.Location = new System.Drawing.Point(130, 5); |
|
221 |
this.radSpinEditorLengthToleranceRatio.Maximum = new decimal(new int[] { |
|
222 |
1, |
|
223 |
0, |
|
224 |
0, |
|
225 |
0}); |
|
226 |
this.radSpinEditorLengthToleranceRatio.Name = "radSpinEditorLengthToleranceRatio"; |
|
227 |
this.radSpinEditorLengthToleranceRatio.NullableValue = new decimal(new int[] { |
|
228 |
1, |
|
229 |
0, |
|
230 |
0, |
|
231 |
65536}); |
|
232 |
this.radSpinEditorLengthToleranceRatio.Size = new System.Drawing.Size(121, 20); |
|
233 |
this.radSpinEditorLengthToleranceRatio.TabIndex = 1; |
|
234 |
this.radSpinEditorLengthToleranceRatio.Value = new decimal(new int[] { |
|
235 |
1, |
|
236 |
0, |
|
237 |
0, |
|
238 |
65536}); |
|
239 |
// |
|
168 | 240 |
// ExceptLayer |
169 | 241 |
// |
170 | 242 |
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); |
... | ... | |
184 | 256 |
((System.ComponentModel.ISupportInitialize)(this.radPageViewOption)).EndInit(); |
185 | 257 |
this.radPageViewOption.ResumeLayout(false); |
186 | 258 |
this.radPageViewPageExceptLayer.ResumeLayout(false); |
187 |
this.radPageViewPageLineLayer.ResumeLayout(false); |
|
188 | 259 |
((System.ComponentModel.ISupportInitialize)(this.radGridViewExceptLayer.MasterTemplate)).EndInit(); |
189 | 260 |
((System.ComponentModel.ISupportInitialize)(this.radGridViewExceptLayer)).EndInit(); |
261 |
this.radPageViewPageLineLayer.ResumeLayout(false); |
|
190 | 262 |
((System.ComponentModel.ISupportInitialize)(this.radGridViewLineLayer.MasterTemplate)).EndInit(); |
191 | 263 |
((System.ComponentModel.ISupportInitialize)(this.radGridViewLineLayer)).EndInit(); |
264 |
this.radPageViewPageTolerance.ResumeLayout(false); |
|
265 |
this.tableLayoutPanel3.ResumeLayout(false); |
|
266 |
this.tableLayoutPanel3.PerformLayout(); |
|
267 |
((System.ComponentModel.ISupportInitialize)(this.radLabel1)).EndInit(); |
|
268 |
((System.ComponentModel.ISupportInitialize)(this.radSpinEditorLengthToleranceRatio)).EndInit(); |
|
192 | 269 |
((System.ComponentModel.ISupportInitialize)(this)).EndInit(); |
193 | 270 |
this.ResumeLayout(false); |
194 | 271 |
|
... | ... | |
205 | 282 |
private Telerik.WinControls.UI.RadPageViewPage radPageViewPageLineLayer; |
206 | 283 |
private Telerik.WinControls.UI.RadGridView radGridViewExceptLayer; |
207 | 284 |
private Telerik.WinControls.UI.RadGridView radGridViewLineLayer; |
285 |
private Telerik.WinControls.UI.RadPageViewPage radPageViewPageTolerance; |
|
286 |
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3; |
|
287 |
private Telerik.WinControls.UI.RadLabel radLabel1; |
|
288 |
private Telerik.WinControls.UI.RadSpinEditor radSpinEditorLengthToleranceRatio; |
|
208 | 289 |
} |
209 | 290 |
} |
ID2.Manager/ID2.Manager.Compare/Forms/ExceptLayer.cs | ||
---|---|---|
30 | 30 |
|
31 | 31 |
public static List<Layer> ExceptLayers { get; } = new List<Layer>(); |
32 | 32 |
public static List<Layer> LineLayers { get; } = new List<Layer>(); |
33 |
public static double LengthToleranceRatio = 0.1; |
|
33 | 34 |
private BindingList<Layer> _ExceptLayerBindings { get; } = new BindingList<Layer>(); |
34 | 35 |
private BindingList<Layer> _LineLayerBindings { get; } = new BindingList<Layer>(); |
35 | 36 |
|
... | ... | |
46 | 47 |
this.radGridViewLineLayer.DataBindingComplete += RadGridViewLineLayer_DataBindingComplete; |
47 | 48 |
this.radGridViewLineLayer.DataSource = _LineLayerBindings; |
48 | 49 |
|
50 |
this.radSpinEditorLengthToleranceRatio.Value = Convert.ToDecimal(LengthToleranceRatio); |
|
51 |
|
|
49 | 52 |
this.radButtonOK.Click += RadButtonOK_Click; |
50 | 53 |
this.radButtonCancel.Click += RadButtonCancel_Click; |
51 | 54 |
} |
... | ... | |
68 | 71 |
LineLayers.Clear(); |
69 | 72 |
LineLayers.AddRange(_LineLayerBindings); |
70 | 73 |
|
74 |
LengthToleranceRatio = Convert.ToDouble(this.radSpinEditorLengthToleranceRatio.Value); |
|
75 |
|
|
71 | 76 |
this.DialogResult = DialogResult.OK; |
72 | 77 |
} |
73 | 78 |
|
ID2.Manager/ID2.Manager.Compare/Main.cs | ||
---|---|---|
169 | 169 |
|
170 | 170 |
string LineLayers = string.Join(",", Forms.ExceptLayer.LineLayers.Select(x => x.Name)); |
171 | 171 |
Classes.ID2Helper.IniWriteValue(Program.IniFilePath, "Verification", "Line Layers", LineLayers); |
172 |
|
|
173 |
Classes.ID2Helper.IniWriteValue(Program.IniFilePath, "Verification", "Length Tolerance Ratio", |
|
174 |
Forms.ExceptLayer.LengthToleranceRatio.ToString()); |
|
172 | 175 |
} |
173 | 176 |
} |
174 | 177 |
} |
내보내기 Unified diff