개정판 51b9a24a
Feature: LWPOLYLINE의 길이가 설정 길이보다 작고 LineWeight가 0보다 클때 화살표를 그리도록 한다.
Change-Id: I6a26fac9da474965ccafbd21e934d1ee8fec69eb
ID2.Manager/ID2.Manager.Compare/Controls/Verification.cs | ||
---|---|---|
323 | 323 |
LengthToleranceRatio = Convert.ToDouble(_LengthToleranceRatio); |
324 | 324 |
} |
325 | 325 |
|
326 |
string _ArrowMaxLength = Classes.ID2Helper.IniReadValue(IniFilePath, "Verification", "Arrow Max Length"); |
|
327 |
if (!string.IsNullOrEmpty(_ArrowMaxLength)) |
|
328 |
{ |
|
329 |
Forms.ExceptLayer.ArrowMaxLength = Convert.ToDouble(_ArrowMaxLength); |
|
330 |
} |
|
331 |
|
|
326 | 332 |
#region Except Layer를 로딩한다. |
327 | 333 |
LoadLayerSettings(); |
328 | 334 |
#endregion |
... | ... | |
556 | 562 |
{ |
557 | 563 |
if (x is LinearPath lp) |
558 | 564 |
{ |
559 |
int count = Convert.ToInt32(lp.Vertices.Length); |
|
560 |
for (int i = 0; i < count - 1; ++i) |
|
565 |
#region 정점 수가 2이고 LineWeight이 0 초과이고 길이가 ArrowMaxLength보다 작을때 화살표를 그려준다. |
|
566 |
if (lp.Vertices.Count() == 2 && lp.LineWeight > 0 && lp.Length() < Forms.ExceptLayer.ArrowMaxLength) |
|
567 |
{ |
|
568 |
double weight = lp.LineWeight; |
|
569 |
var dir = new devDept.Geometry.Vector3D(lp.Vertices[0], lp.Vertices[1]); |
|
570 |
dir.Normalize(); |
|
571 |
var cross = devDept.Geometry.Vector3D.Cross(devDept.Geometry.Vector3D.AxisZ, dir); |
|
572 |
var pts = new devDept.Geometry.Point3D[] |
|
573 |
{ |
|
574 |
lp.Vertices[1] + cross * weight * 0.5, |
|
575 |
lp.Vertices[0], |
|
576 |
lp.Vertices[1] - cross * weight * 0.5 |
|
577 |
}; |
|
578 |
|
|
579 |
var hatch = new Hatch("SOLID", new List<ICurve>() { new LinearPath(pts) }); |
|
580 |
AddEntities.Add(hatch); |
|
581 |
} |
|
582 |
#endregion |
|
583 |
else |
|
561 | 584 |
{ |
562 |
AddEntities.Add(new devDept.Eyeshot.Entities.Line(lp.Vertices[i], lp.Vertices[i + 1]) |
|
585 |
int count = Convert.ToInt32(lp.Vertices.Length); |
|
586 |
for (int i = 0; i < count - 1; ++i) |
|
563 | 587 |
{ |
564 |
LayerName = lp.LayerName, |
|
565 |
LineWeight = lp.LineWeight, |
|
566 |
LineTypeMethod = colorMethodType.byEntity |
|
567 |
}); |
|
588 |
AddEntities.Add(new devDept.Eyeshot.Entities.Line(lp.Vertices[i], lp.Vertices[i + 1]) |
|
589 |
{ |
|
590 |
LayerName = lp.LayerName, |
|
591 |
LineWeight = lp.LineWeight, |
|
592 |
LineTypeMethod = colorMethodType.byEntity |
|
593 |
}); |
|
594 |
} |
|
568 | 595 |
} |
569 | 596 |
} |
570 | 597 |
}); |
... | ... | |
824 | 851 |
x.LayerName != Verification.RevCloudLayer) x.LayerName = Verification.AutoCADLayer; |
825 | 852 |
}); |
826 | 853 |
} |
854 |
|
|
855 |
#region 레이어 설정 적용 |
|
856 |
var layer = this.designCompare.Layers.FirstOrDefault(x => x.Name.ToUpper() == Verification.RevCloudLayer.ToUpper()); |
|
857 |
if (layer != null) layer.Visible = this.radCheckBoxRevCloud.Checked; |
|
858 |
|
|
859 |
layer = this.designCompare.Layers.FirstOrDefault(x => x.Name.ToUpper() == Verification.AVEVALayer.ToUpper()); |
|
860 |
if (layer != null) layer.Visible = this.radCheckBoxAVEVA.Checked; |
|
861 |
|
|
862 |
layer = this.designCompare.Layers.FirstOrDefault(x => x.Name.ToUpper() == Verification.AutoCADLayer.ToUpper()); |
|
863 |
if (layer != null) layer.Visible = this.radCheckBoxAutoCAD.Checked; |
|
864 |
|
|
865 |
this.designCompare.Invalidate(); |
|
866 |
#endregion |
|
827 | 867 |
} |
828 | 868 |
|
829 | 869 |
/// <summary> |
ID2.Manager/ID2.Manager.Compare/Forms/ExceptLayer.Designer.cs | ||
---|---|---|
46 | 46 |
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); |
47 | 47 |
this.radLabel1 = new Telerik.WinControls.UI.RadLabel(); |
48 | 48 |
this.radSpinEditorLengthToleranceRatio = new Telerik.WinControls.UI.RadSpinEditor(); |
49 |
this.radLabel2 = new Telerik.WinControls.UI.RadLabel(); |
|
50 |
this.radSpinEditorArrowMaxLength = new Telerik.WinControls.UI.RadSpinEditor(); |
|
49 | 51 |
this.tableLayoutPanel1.SuspendLayout(); |
50 | 52 |
this.tableLayoutPanel2.SuspendLayout(); |
51 | 53 |
((System.ComponentModel.ISupportInitialize)(this.radButtonOK)).BeginInit(); |
... | ... | |
62 | 64 |
this.tableLayoutPanel3.SuspendLayout(); |
63 | 65 |
((System.ComponentModel.ISupportInitialize)(this.radLabel1)).BeginInit(); |
64 | 66 |
((System.ComponentModel.ISupportInitialize)(this.radSpinEditorLengthToleranceRatio)).BeginInit(); |
67 |
((System.ComponentModel.ISupportInitialize)(this.radLabel2)).BeginInit(); |
|
68 |
((System.ComponentModel.ISupportInitialize)(this.radSpinEditorArrowMaxLength)).BeginInit(); |
|
65 | 69 |
((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); |
66 | 70 |
this.SuspendLayout(); |
67 | 71 |
// |
... | ... | |
123 | 127 |
this.radPageViewOption.Dock = System.Windows.Forms.DockStyle.Fill; |
124 | 128 |
this.radPageViewOption.Location = new System.Drawing.Point(3, 3); |
125 | 129 |
this.radPageViewOption.Name = "radPageViewOption"; |
126 |
this.radPageViewOption.SelectedPage = this.radPageViewPageExceptLayer;
|
|
130 |
this.radPageViewOption.SelectedPage = this.radPageViewPageTolerance;
|
|
127 | 131 |
this.radPageViewOption.Size = new System.Drawing.Size(275, 258); |
128 | 132 |
this.radPageViewOption.TabIndex = 1; |
129 | 133 |
// |
... | ... | |
190 | 194 |
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); |
191 | 195 |
this.tableLayoutPanel3.Controls.Add(this.radLabel1, 0, 0); |
192 | 196 |
this.tableLayoutPanel3.Controls.Add(this.radSpinEditorLengthToleranceRatio, 1, 0); |
197 |
this.tableLayoutPanel3.Controls.Add(this.radLabel2, 0, 1); |
|
198 |
this.tableLayoutPanel3.Controls.Add(this.radSpinEditorArrowMaxLength, 1, 1); |
|
193 | 199 |
this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; |
194 | 200 |
this.tableLayoutPanel3.Location = new System.Drawing.Point(0, 0); |
195 | 201 |
this.tableLayoutPanel3.Name = "tableLayoutPanel3"; |
196 |
this.tableLayoutPanel3.RowCount = 2; |
|
202 |
this.tableLayoutPanel3.RowCount = 3; |
|
203 |
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); |
|
197 | 204 |
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); |
198 | 205 |
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); |
199 | 206 |
this.tableLayoutPanel3.Size = new System.Drawing.Size(254, 210); |
... | ... | |
237 | 244 |
0, |
238 | 245 |
65536}); |
239 | 246 |
// |
247 |
// radLabel2 |
|
248 |
// |
|
249 |
this.radLabel2.Anchor = System.Windows.Forms.AnchorStyles.Left; |
|
250 |
this.radLabel2.Location = new System.Drawing.Point(3, 36); |
|
251 |
this.radLabel2.Name = "radLabel2"; |
|
252 |
this.radLabel2.Size = new System.Drawing.Size(98, 18); |
|
253 |
this.radLabel2.TabIndex = 2; |
|
254 |
this.radLabel2.Text = "Max Arrow Length"; |
|
255 |
// |
|
256 |
// radSpinEditorArrowMaxLength |
|
257 |
// |
|
258 |
this.radSpinEditorArrowMaxLength.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); |
|
259 |
this.radSpinEditorArrowMaxLength.Location = new System.Drawing.Point(130, 35); |
|
260 |
this.radSpinEditorArrowMaxLength.Name = "radSpinEditorArrowMaxLength"; |
|
261 |
this.radSpinEditorArrowMaxLength.NullableValue = new decimal(new int[] { |
|
262 |
2, |
|
263 |
0, |
|
264 |
0, |
|
265 |
0}); |
|
266 |
this.radSpinEditorArrowMaxLength.Size = new System.Drawing.Size(121, 20); |
|
267 |
this.radSpinEditorArrowMaxLength.TabIndex = 3; |
|
268 |
this.radSpinEditorArrowMaxLength.Value = new decimal(new int[] { |
|
269 |
2, |
|
270 |
0, |
|
271 |
0, |
|
272 |
0}); |
|
273 |
// |
|
240 | 274 |
// ExceptLayer |
241 | 275 |
// |
242 | 276 |
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); |
... | ... | |
266 | 300 |
this.tableLayoutPanel3.PerformLayout(); |
267 | 301 |
((System.ComponentModel.ISupportInitialize)(this.radLabel1)).EndInit(); |
268 | 302 |
((System.ComponentModel.ISupportInitialize)(this.radSpinEditorLengthToleranceRatio)).EndInit(); |
303 |
((System.ComponentModel.ISupportInitialize)(this.radLabel2)).EndInit(); |
|
304 |
((System.ComponentModel.ISupportInitialize)(this.radSpinEditorArrowMaxLength)).EndInit(); |
|
269 | 305 |
((System.ComponentModel.ISupportInitialize)(this)).EndInit(); |
270 | 306 |
this.ResumeLayout(false); |
271 | 307 |
|
... | ... | |
286 | 322 |
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3; |
287 | 323 |
private Telerik.WinControls.UI.RadLabel radLabel1; |
288 | 324 |
private Telerik.WinControls.UI.RadSpinEditor radSpinEditorLengthToleranceRatio; |
325 |
private Telerik.WinControls.UI.RadLabel radLabel2; |
|
326 |
private Telerik.WinControls.UI.RadSpinEditor radSpinEditorArrowMaxLength; |
|
289 | 327 |
} |
290 | 328 |
} |
ID2.Manager/ID2.Manager.Compare/Forms/ExceptLayer.cs | ||
---|---|---|
31 | 31 |
public static List<Layer> ExceptLayers { get; } = new List<Layer>(); |
32 | 32 |
public static List<Layer> LineLayers { get; } = new List<Layer>(); |
33 | 33 |
public static double LengthToleranceRatio = 0.1; |
34 |
public static double ArrowMaxLength { get; set; } = 2; |
|
34 | 35 |
private BindingList<Layer> _ExceptLayerBindings { get; } = new BindingList<Layer>(); |
35 | 36 |
private BindingList<Layer> _LineLayerBindings { get; } = new BindingList<Layer>(); |
36 | 37 |
|
... | ... | |
48 | 49 |
this.radGridViewLineLayer.DataSource = _LineLayerBindings; |
49 | 50 |
|
50 | 51 |
this.radSpinEditorLengthToleranceRatio.Value = Convert.ToDecimal(LengthToleranceRatio); |
52 |
this.radSpinEditorArrowMaxLength.Value = Convert.ToDecimal(ArrowMaxLength); |
|
51 | 53 |
|
52 | 54 |
this.radButtonOK.Click += RadButtonOK_Click; |
53 | 55 |
this.radButtonCancel.Click += RadButtonCancel_Click; |
... | ... | |
72 | 74 |
LineLayers.AddRange(_LineLayerBindings); |
73 | 75 |
|
74 | 76 |
LengthToleranceRatio = Convert.ToDouble(this.radSpinEditorLengthToleranceRatio.Value); |
77 |
ArrowMaxLength = Convert.ToDouble(this.radSpinEditorArrowMaxLength.Value); |
|
75 | 78 |
|
76 | 79 |
this.DialogResult = DialogResult.OK; |
77 | 80 |
} |
ID2.Manager/ID2.Manager.Compare/Main.cs | ||
---|---|---|
174 | 174 |
|
175 | 175 |
Classes.ID2Helper.IniWriteValue(Program.IniFilePath, "Verification", "Length Tolerance Ratio", |
176 | 176 |
Forms.ExceptLayer.LengthToleranceRatio.ToString()); |
177 |
|
|
178 |
Classes.ID2Helper.IniWriteValue(Program.IniFilePath, "Verification", "Arrow Max Length", |
|
179 |
Forms.ExceptLayer.ArrowMaxLength.ToString()); |
|
177 | 180 |
} |
178 | 181 |
} |
179 | 182 |
} |
내보내기 Unified diff