개정판 8aa6f2db
dev issue #000 : add flow direction logic
Change-Id: Ifb1915357b5b2178b0e2614169ff504e65b64b1b
DTI_PID/BaseModel/Model/Document.cs | ||
---|---|---|
20 | 20 |
private List<Note> _NOTES = new List<Note>(); |
21 | 21 |
private List<Line> _LINES = new List<Line>(); |
22 | 22 |
private List<LineNumber> _LINENUMBERS = new List<LineNumber>(); |
23 |
private List<TrimLine> _TRIMLINES = new List<TrimLine>(); |
|
23 | 24 |
private List<EndBreak> _EndBreaks = new List<EndBreak>(); |
24 | 25 |
private List<Equipment> _Equipments = new List<Equipment>(); |
25 | 26 |
private bool _Enable; |
... | ... | |
53 | 54 |
} |
54 | 55 |
public double SIZE_WIDTH { get => _SIZE_WIDTH; } |
55 | 56 |
public double SIZE_HEIGHT { get => _SIZE_HEIGHT; } |
56 |
|
|
57 |
public List<TrimLine> TRIMLINES { get => _TRIMLINES; set => _TRIMLINES = value; } |
|
57 | 58 |
|
58 | 59 |
public Document(string xmlPath) |
59 | 60 |
{ |
... | ... | |
68 | 69 |
SetLineNumber(xml.Element("LINENOS")); |
69 | 70 |
SetText(xml.Element("TEXTINFOS")); |
70 | 71 |
SetNote(xml.Element("NOTES")); |
72 |
SetTrimLine(xml.Element("TRIMLINENOS")); |
|
71 | 73 |
|
72 | 74 |
_Enable = true; |
73 | 75 |
} |
... | ... | |
171 | 173 |
FLIP = Convert.ToInt32(item.Element("FLIP").Value), |
172 | 174 |
CURRENTPOINTMODEINDEX = Convert.ToInt32(item.Element("CURRENTPOINTMODEINDEX").Value) |
173 | 175 |
}; |
176 |
if (symbol.ANGLE == 1.57) |
|
177 |
//ANGLE = 270 * Math.PI / 180; |
|
178 |
symbol.ANGLE = 90 * Math.PI / 180; |
|
179 |
else if (symbol.ANGLE == 3.14) |
|
180 |
symbol.ANGLE = Math.PI; |
|
181 |
else if (symbol.ANGLE == 4.71) |
|
182 |
//ANGLE = 90 * Math.PI / 180; |
|
183 |
symbol.ANGLE = 270 * Math.PI / 180; |
|
184 |
|
|
174 | 185 |
SetAssociations(item.Element("ASSOCIATIONS"), symbol.ASSOCIATIONS); |
175 | 186 |
SetSymbolConnectors(item.Element("CONNECTORS"), symbol.CONNECTORS, symbol.CONNECTIONPOINT); |
176 | 187 |
SetProperties(item.Element("PROPERTIES"), symbol.PROPERTIES); |
... | ... | |
264 | 275 |
NOTES.Add(note); |
265 | 276 |
} |
266 | 277 |
} |
267 |
|
|
278 |
|
|
279 |
private void SetTrimLine(XElement node) |
|
280 |
{ |
|
281 |
foreach (XElement item in node.Elements("TRIM_LINE_NO")) |
|
282 |
{ |
|
283 |
TrimLine trimLine = new TrimLine() |
|
284 |
{ |
|
285 |
UID = item.Element("UID").Value, |
|
286 |
}; |
|
287 |
SetLineNumberRuns(item, trimLine.RUNS); |
|
288 |
TRIMLINES.Add(trimLine); |
|
289 |
} |
|
290 |
} |
|
291 |
|
|
268 | 292 |
private void SetAssociations(XElement node, List<Association> associations) |
269 | 293 |
{ |
270 | 294 |
foreach (XElement item in node.Elements("ASSOCIATION")) |
... | ... | |
342 | 366 |
} |
343 | 367 |
} |
344 | 368 |
|
345 |
private void SetLineNumberRuns(XElement node, List<LineNumberRun> lineNumberRuns)
|
|
369 |
private void SetLineNumberRuns(XElement node, List<LineRun> lineNumberRuns) |
|
346 | 370 |
{ |
347 | 371 |
foreach (XElement item in node.Elements("RUN")) |
348 | 372 |
{ |
349 |
LineNumberRun run = new LineNumberRun()
|
|
373 |
LineRun run = new LineRun()
|
|
350 | 374 |
{ |
351 | 375 |
TYPE = item.Attribute("TYPE").Value |
352 | 376 |
}; |
내보내기 Unified diff