개정판 24b5276c
dev issue #000 : 대각라인 모델링
Change-Id: I00661d2751884657e7ef8dfc14679a9bc7528feb
DTI_PID/SPPIDConverter/AutoModeling.cs | ||
---|---|---|
1535 | 1535 |
NewBranchLines.Add(groupLine); |
1536 | 1536 |
continue; |
1537 | 1537 |
} |
1538 |
if (groupLine.UID == "321c27f0-1a7e-4a4c-81cd-a7a6076e0a3a") |
|
1539 |
{ |
|
1540 |
|
|
1541 |
} |
|
1542 | 1538 |
|
1539 |
bool diagonal = false; |
|
1540 |
if (groupLine.SlopeType != SlopeType.HORIZONTAL && groupLine.SlopeType != SlopeType.VERTICAL) |
|
1541 |
diagonal = true; |
|
1543 | 1542 |
_LMAItem _LMAItem = _placement.PIDCreateItem(groupLine.SPPID.MAPPINGNAME); |
1544 | 1543 |
LMSymbol _LMSymbolStart = null; |
1545 | 1544 |
LMSymbol _LMSymbolEnd = null; |
1546 | 1545 |
PlaceRunInputs placeRunInputs = new PlaceRunInputs(); |
1547 | 1546 |
foreach (var connector in groupLine.CONNECTORS) |
1548 | 1547 |
{ |
1548 |
|
|
1549 | 1549 |
double x = 0; |
1550 | 1550 |
double y = 0; |
1551 | 1551 |
GetTargetLineConnectorPoint(connector, groupLine, ref x, ref y); |
... | ... | |
1561 | 1561 |
{ |
1562 | 1562 |
_LMSymbolStart = GetTargetSymbol(targetSymbol, groupLine); |
1563 | 1563 |
if (_LMSymbolStart != null) |
1564 |
placeRunInputs.AddSymbolTarget(_LMSymbolStart, x, y); |
|
1564 |
placeRunInputs.AddSymbolTarget(_LMSymbolStart, x, y, diagonal);
|
|
1565 | 1565 |
else |
1566 | 1566 |
placeRunInputs.AddPoint(x, y); |
1567 | 1567 |
} |
... | ... | |
1569 | 1569 |
{ |
1570 | 1570 |
_LMSymbolEnd = GetTargetSymbol(targetSymbol, groupLine); |
1571 | 1571 |
if (_LMSymbolEnd != null) |
1572 |
placeRunInputs.AddSymbolTarget(_LMSymbolEnd, x, y); |
|
1572 |
placeRunInputs.AddSymbolTarget(_LMSymbolEnd, x, y, diagonal);
|
|
1573 | 1573 |
else |
1574 | 1574 |
placeRunInputs.AddPoint(x, y); |
1575 | 1575 |
} |
... | ... | |
1580 | 1580 |
if (!string.IsNullOrEmpty(targetLine.SPPID.ModelItemId)) |
1581 | 1581 |
{ |
1582 | 1582 |
LMConnector targetConnector = FindTargetLMConnectorForBranch(line, targetLine, ref x, ref y); |
1583 |
placeRunInputs.AddConnectorTarget(targetConnector, x, y); |
|
1583 |
placeRunInputs.AddConnectorTarget(targetConnector, x, y, diagonal);
|
|
1584 | 1584 |
ChangeLineSPPIDCoordinateByConnector(groupLine, targetLine, x, y, false); |
1585 | 1585 |
} |
1586 | 1586 |
else |
... | ... | |
1902 | 1902 |
} |
1903 | 1903 |
} |
1904 | 1904 |
#endregion |
1905 |
bool diagonal = false; |
|
1906 |
if (line.SlopeType != SlopeType.HORIZONTAL && line.SlopeType != SlopeType.VERTICAL) |
|
1907 |
diagonal = true; |
|
1905 | 1908 |
_LMAItem _LMAItem = _placement.PIDCreateItem(symbolPath); |
1906 | 1909 |
LMConnector newConnector = null; |
1907 | 1910 |
dynamic OID = prevLMConnector.get_GraphicOID().ToString(); |
... | ... | |
1939 | 1942 |
} |
1940 | 1943 |
else |
1941 | 1944 |
{ |
1942 |
placeRunInputs.AddSymbolTarget(startSymbol, points[0], points[1]); |
|
1945 |
placeRunInputs.AddSymbolTarget(startSymbol, points[0], points[1], diagonal);
|
|
1943 | 1946 |
} |
1944 | 1947 |
} |
1945 | 1948 |
// 마지막 심볼이 있고 마지막 좌표일 때 |
... | ... | |
1959 | 1962 |
} |
1960 | 1963 |
else |
1961 | 1964 |
{ |
1962 |
placeRunInputs.AddSymbolTarget(endSymbol, points[0], points[1]); |
|
1965 |
placeRunInputs.AddSymbolTarget(endSymbol, points[0], points[1], diagonal);
|
|
1963 | 1966 |
} |
1964 | 1967 |
} |
1965 | 1968 |
// 첫번째이며 시작 심볼이 아니고 Connecotr일 경우 |
1966 | 1969 |
else if (i == 0 && prevLMConnector.ConnectItem1SymbolObject != null) |
1967 |
placeRunInputs.AddSymbolTarget(prevLMConnector.ConnectItem1SymbolObject, points[0], points[1]); |
|
1970 |
placeRunInputs.AddSymbolTarget(prevLMConnector.ConnectItem1SymbolObject, points[0], points[1], diagonal);
|
|
1968 | 1971 |
// 마지막이며 마지막 심볼이 아니고 Connecotr일 경우 |
1969 | 1972 |
else if (i == vertices.Count - 1 && prevLMConnector.ConnectItem2SymbolObject != null) |
1970 |
placeRunInputs.AddSymbolTarget(prevLMConnector.ConnectItem2SymbolObject, points[0], points[1]); |
|
1973 |
placeRunInputs.AddSymbolTarget(prevLMConnector.ConnectItem2SymbolObject, points[0], points[1], diagonal);
|
|
1971 | 1974 |
else |
1972 | 1975 |
placeRunInputs.AddPoint(points[0], points[1]); |
1973 | 1976 |
} |
내보내기 Unified diff