개정판 b2064e69
dev issue #507 : Branched Line 보정
Change-Id: I627c71969c49926bacd97c4483678d1f226c3158
DTI_PID/SPPIDConverter/Util/SPPIDUtil.cs | ||
---|---|---|
566 | 566 |
} |
567 | 567 |
} |
568 | 568 |
|
569 |
public static Line GetConnectedLine(Symbol symbol1, Symbol symbol2) |
|
570 |
{ |
|
571 |
Line line = null; |
|
572 |
Connector connector1 = symbol1.CONNECTORS.Find(x => x.ConnectedObject != null && x.ConnectedObject.GetType() == typeof(Line) && |
|
573 |
((Line)x.ConnectedObject).CONNECTORS.Find(y => y.ConnectedObject == symbol2) != null); |
|
574 |
Connector connector2 = symbol2.CONNECTORS.Find(x => x.ConnectedObject != null && x.ConnectedObject.GetType() == typeof(Line) && |
|
575 |
((Line)x.ConnectedObject).CONNECTORS.Find(y => y.ConnectedObject == symbol1) != null); |
|
576 |
if (connector1 != null && connector2 != null) |
|
577 |
line = connector1.ConnectedObject as Line; |
|
578 |
|
|
579 |
return line; |
|
580 |
} |
|
581 |
|
|
582 |
public static int GetBranchLineCount(Document document, Line line) |
|
583 |
{ |
|
584 |
return document.LINES.FindAll(x => IsBranchLine(line, x) && x.CONNECTORS.Find(y => y.ConnectedObject == line) != null).Count; |
|
585 |
} |
|
586 |
|
|
569 | 587 |
public static bool GetLineConnectorPoint(Line line, Connector connector, ref double x, ref double y) |
570 | 588 |
{ |
571 | 589 |
bool bStart = false; |
내보내기 Unified diff