개정판 6025ea51
dev issue #503 : fix validation
Change-Id: I6c1b3a25eb5508718415a252cc508aa60a42e9ff
DTI_PID/SPPIDConverter/BaseModel/Document.cs | ||
---|---|---|
850 | 850 |
List<string[]> flowDirectionCheck = new List<string[]>(); |
851 | 851 |
foreach (var line in LINES) |
852 | 852 |
{ |
853 |
if (line.TYPE != "Secondary" && line.TYPE != "Primary") |
|
854 |
continue; |
|
855 |
|
|
853 | 856 |
foreach (var connector in line.CONNECTORS) |
854 | 857 |
{ |
855 | 858 |
if (connector.ConnectedObject != null && |
... | ... | |
857 | 860 |
!SPPIDUtil.IsBranchLine(line, connector.ConnectedObject as Line)) |
858 | 861 |
{ |
859 | 862 |
Line connLine = connector.ConnectedObject as Line; |
863 |
if (connLine.TYPE != "Secondary" && connLine.TYPE != "Primary") |
|
864 |
continue; |
|
860 | 865 |
int lineIndex1 = line.CONNECTORS.IndexOf(connector); |
861 | 866 |
int lineIndex2 = connLine.CONNECTORS.IndexOf(connLine.CONNECTORS.Find(x => x.ConnectedObject == line)); |
862 | 867 |
if (lineIndex1 == lineIndex2 && flowDirectionCheck.Find(x => (x[0] == line.UID || x[1] == connLine.UID) || (x[1] == line.UID || x[0] == connLine.UID)) == null) |
DTI_PID/SPPIDConverter/ConverterDocking.cs | ||
---|---|---|
1862 | 1862 |
#region TEST |
1863 | 1863 |
private void simpleButton1_Click(object sender, EventArgs e) |
1864 | 1864 |
{ |
1865 |
double x1 = double.MaxValue; |
|
1866 |
double y1 = double.MaxValue; |
|
1867 |
double x2 = double.MinValue; |
|
1868 |
double y2 = double.MinValue; |
|
1869 |
foreach (DrawingObjectBase item in application.ActiveSelectSet) |
|
1870 |
{ |
|
1871 |
double tx1, ty1, tx2, ty2; |
|
1872 |
item.Range(out tx1, out ty1, out tx2, out ty2); |
|
1873 |
x1 = Math.Min(x1, tx1); |
|
1874 |
y1 = Math.Min(y1, ty1); |
|
1875 |
x2 = Math.Max(x2, tx2); |
|
1876 |
y2 = Math.Max(y2, ty2); |
|
1877 |
} |
|
1878 |
return; |
|
1879 |
|
|
1865 | 1880 |
//SPPIDUtil.test(); |
1866 | 1881 |
if (application.ActiveSelectSet.Count == 0) |
1867 | 1882 |
return; |
내보내기 Unified diff