개정판 f3e2693f
dev issue #706 : Line Modeling 수정
Change-Id: Ifd3065e13fd3b667844e1902ed2ad9f47f042034
DTI_PID/SPPIDConverter/AutoModeling.cs | ||
---|---|---|
37 | 37 |
|
38 | 38 |
public string DocumentLabelText { get; set; } |
39 | 39 |
|
40 |
List<Line> NewBranchLines = new List<Line>(); |
|
41 |
List<Tuple<string, Line, Line>> BranchLines = new List<Tuple<string, Line, Line>>(); |
|
40 |
List<Line> BranchLines = new List<Line>(); |
|
42 | 41 |
List<string> ZeroLengthSymbolToSymbolModelItemID = new List<string>(); |
43 | 42 |
List<string> ZeroLengthModelItemID = new List<string>(); |
44 | 43 |
List<string> ZeroLengthModelItemIDReverse = new List<string>(); |
... | ... | |
222 | 221 |
} |
223 | 222 |
private void RunBranchLineModeling() |
224 | 223 |
{ |
225 |
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetAllProgress, NewBranchLines.Count);
|
|
224 |
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetAllProgress, BranchLines.Count); |
|
226 | 225 |
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Branch Lines Modeling"); |
227 |
int branchCount = NewBranchLines.Count;
|
|
228 |
while (NewBranchLines.Count > 0)
|
|
226 |
int branchCount = BranchLines.Count; |
|
227 |
while (BranchLines.Count > 0) |
|
229 | 228 |
{ |
230 | 229 |
try |
231 | 230 |
{ |
232 | 231 |
SortBranchLines(); |
233 |
Line item = NewBranchLines[0];
|
|
232 |
Line item = BranchLines[0]; |
|
234 | 233 |
if (EnableBranchModeling(item)) |
235 | 234 |
{ |
236 | 235 |
NewLineModeling(item, true); |
... | ... | |
242 | 241 |
catch (Exception ex) |
243 | 242 |
{ |
244 | 243 |
Log.Write("Error in NewLineModeling"); |
245 |
Log.Write("UID : " + NewBranchLines[0].UID);
|
|
244 |
Log.Write("UID : " + BranchLines[0].UID); |
|
246 | 245 |
Log.Write(ex.Message); |
247 | 246 |
Log.Write(ex.StackTrace); |
248 | 247 |
break; |
... | ... | |
1532 | 1531 |
double index = 0; |
1533 | 1532 |
private void NewLineModeling(Line line, bool isBranchModeling = false) |
1534 | 1533 |
{ |
1535 |
if (!string.IsNullOrEmpty(line.SPPID.ModelItemId) || (NewBranchLines.Contains(line) && !isBranchModeling))
|
|
1534 |
if (!string.IsNullOrEmpty(line.SPPID.ModelItemId) || (BranchLines.Contains(line) && !isBranchModeling)) |
|
1536 | 1535 |
return; |
1537 | 1536 |
|
1538 | 1537 |
List<Line> group = new List<Line>(); |
... | ... | |
1541 | 1540 |
|
1542 | 1541 |
foreach (var groupLine in group) |
1543 | 1542 |
{ |
1544 |
if (!isBranchModeling && SPPIDUtil.IsBranchLine(groupLine))
|
|
1543 |
if (!isBranchModeling) |
|
1545 | 1544 |
{ |
1546 |
NewBranchLines.Add(groupLine);
|
|
1545 |
BranchLines.Add(groupLine); |
|
1547 | 1546 |
continue; |
1548 | 1547 |
} |
1549 | 1548 |
|
... | ... | |
1683 | 1682 |
if (_LMSymbolEnd != null) |
1684 | 1683 |
ReleaseCOMObjects(_LMSymbolEnd); |
1685 | 1684 |
|
1686 |
if (isBranchModeling && NewBranchLines.Contains(groupLine))
|
|
1687 |
NewBranchLines.Remove(groupLine);
|
|
1685 |
if (isBranchModeling && BranchLines.Contains(groupLine)) |
|
1686 |
BranchLines.Remove(groupLine); |
|
1688 | 1687 |
} |
1689 | 1688 |
} |
1690 | 1689 |
|
... | ... | |
3798 | 3797 |
|
3799 | 3798 |
private void SortBranchLines() |
3800 | 3799 |
{ |
3801 |
NewBranchLines.Sort(SortBranchLine);
|
|
3800 |
BranchLines.Sort(SortBranchLine); |
|
3802 | 3801 |
int SortBranchLine(Line a, Line b) |
3803 | 3802 |
{ |
3804 | 3803 |
int countA = a.CONNECTORS.FindAll(x => x.ConnectedObject != null && |
내보내기 Unified diff