개정판 71ba1ca3
dev issue #000 : fix bug
Change-Id: I254e19b9c8f4ca7d618d9542c0190bb47fa87edc
DTI_PID/SPPIDConverter/AutoModeling.cs | ||
---|---|---|
187 | 187 |
foreach (var item in document.TEXTINFOS) |
188 | 188 |
TextModeling(item); |
189 | 189 |
|
190 |
// LineRun Line Join |
|
191 |
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Join LineRuns"); |
|
192 |
foreach (LineNumber lineNumber in document.LINENUMBERS) |
|
193 |
foreach (LineRun run in lineNumber.RUNS) |
|
194 |
JoinRunLine(run); |
|
195 |
// TrimLineRun Line Join |
|
196 |
foreach (TrimLine trimLine in document.TRIMLINES) |
|
197 |
foreach (LineRun run in trimLine.RUNS) |
|
198 |
JoinRunLine(run); |
|
199 |
|
|
200 | 190 |
// Input LineNumber Attribute |
201 | 191 |
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Set LineNumbers Attribute"); |
202 | 192 |
foreach (var item in document.LINENUMBERS) |
... | ... | |
217 | 207 |
foreach (var item in document.SYMBOLS) |
218 | 208 |
LabelSymbolModeling(item); |
219 | 209 |
|
210 |
// LineRun Line Join |
|
211 |
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Join LineRuns"); |
|
212 |
foreach (LineNumber lineNumber in document.LINENUMBERS) |
|
213 |
foreach (LineRun run in lineNumber.RUNS) |
|
214 |
JoinRunLine(run); |
|
215 |
// TrimLineRun Line Join |
|
216 |
foreach (TrimLine trimLine in document.TRIMLINES) |
|
217 |
foreach (LineRun run in trimLine.RUNS) |
|
218 |
JoinRunLine(run); |
|
219 |
|
|
220 | 220 |
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetProgress, AllCount); |
221 | 221 |
} |
222 | 222 |
} |
... | ... | |
1179 | 1179 |
{ |
1180 | 1180 |
if (symbol != null) |
1181 | 1181 |
{ |
1182 |
string symbolUID = document.SYMBOLS.Find(x => x.SPPID.RepresentationId == symbol.AsLMRepresentation().Id).UID; |
|
1183 |
string lineUID = line.UID; |
|
1182 |
try |
|
1183 |
{ |
|
1184 |
string repID = symbol.AsLMRepresentation().Id; |
|
1185 |
string symbolUID = SPPIDUtil.FindSymbolByRepresentationID(document, repID).UID; |
|
1186 |
string lineUID = line.UID; |
|
1184 | 1187 |
|
1185 |
SpecBreak startSpecBreak = document.SpecBreaks.Find(x => |
|
1186 |
(x.DownStreamUID == symbolUID || x.UpStreamUID == symbolUID) && |
|
1187 |
(x.DownStreamUID == lineUID || x.UpStreamUID == lineUID)); |
|
1188 |
SpecBreak startSpecBreak = document.SpecBreaks.Find(x =>
|
|
1189 |
(x.DownStreamUID == symbolUID || x.UpStreamUID == symbolUID) &&
|
|
1190 |
(x.DownStreamUID == lineUID || x.UpStreamUID == lineUID));
|
|
1188 | 1191 |
|
1189 |
EndBreak startEndBreak = document.EndBreaks.Find(x => |
|
1190 |
(x.OWNER == symbolUID || x.PROPERTIES.Find(y => y.ATTRIBUTE == "Connected Item").VALUE == symbolUID) && |
|
1191 |
(x.OWNER == lineUID || x.PROPERTIES.Find(y => y.ATTRIBUTE == "Connected Item").VALUE == lineUID)); |
|
1192 |
EndBreak startEndBreak = document.EndBreaks.Find(x => |
|
1193 |
(x.OWNER == symbolUID || x.PROPERTIES.Find(y => y.ATTRIBUTE == "Connected Item").VALUE == symbolUID) && |
|
1194 |
(x.OWNER == lineUID || x.PROPERTIES.Find(y => y.ATTRIBUTE == "Connected Item").VALUE == lineUID)); |
|
1195 |
|
|
1196 |
if (startSpecBreak != null || startEndBreak != null) |
|
1197 |
result = true; |
|
1198 |
} |
|
1199 |
catch (Exception ex) |
|
1200 |
{ |
|
1192 | 1201 |
|
1193 |
if (startSpecBreak != null || startEndBreak != null) |
|
1194 |
result = true; |
|
1202 |
} |
|
1195 | 1203 |
} |
1196 | 1204 |
} |
1197 | 1205 |
|
... | ... | |
1439 | 1447 |
List<Line> lines = SPPIDUtil.FindLinesByModelId(document, branch.Item1); |
1440 | 1448 |
|
1441 | 1449 |
Dictionary<LMConnector, List<double[]>> connectorVertices = GetPipeRunVertices(branch.Item1); |
1442 |
if (lines.Find(x => x.UID == "d4bea462-44cc-473d-8fe2-fb2e98009578") != null) |
|
1443 |
{ |
|
1444 |
|
|
1445 |
} |
|
1446 | 1450 |
LMConnector _StartConnector = null; |
1447 | 1451 |
LMConnector _EndConnector = null; |
1448 | 1452 |
double lengthStart = double.MaxValue; |
... | ... | |
3024 | 3028 |
CalcLabelLocation(ref x, ref y, text.SPPID.ORIGINAL_X, text.SPPID.ORIGINAL_Y, text.SPPIDLabelLocation, mapping.Location); |
3025 | 3029 |
Array array = new double[] { 0, x, y }; |
3026 | 3030 |
|
3027 |
LMLabelPersist _LMLabelPersist = _placement.PIDPlaceLabel(mapping.SPPIDSYMBOLNAME, ref array, Rotation: text.ANGLE, LabeledItem: _LMSymbol.AsLMRepresentation(), IsLeaderVisible: mapping.LeaderLine);
|
|
3031 |
LMLabelPersist _LMLabelPersist = _placement.PIDPlaceLabel(mapping.SPPIDSYMBOLNAME, ref array, Rotation: text.ANGLE, LabeledItem: connectedLMConnector.AsLMRepresentation(), IsLeaderVisible: mapping.LeaderLine);
|
|
3028 | 3032 |
if (_LMLabelPersist != null) |
3029 | 3033 |
{ |
3030 | 3034 |
_LMLabelPersist.Commit(); |
내보내기 Unified diff