프로젝트

일반

사용자정보

개정판 3b2d7bd8

ID3b2d7bd8eb9a638a3679a7235273defc38440338
상위 dffe8a9e
하위 d9794a6c

gaqhf 이(가) 5년 이상 전에 추가함

dev issue #000 : add line diagonal

Change-Id: Ia13fe3d173f35174fe2cc778a528cd21af99efc0

차이점 보기:

DTI_PID/SPPIDConverter/AutoModeling.cs
335 335
                            Log.Write(ex.StackTrace);
336 336
                        }
337 337

  
338

  
339 338
                    // Text Modeling
340 339
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Texts Modeling");
341 340
                    foreach (var item in document.TEXTINFOS)
......
351 350
                            Log.Write(ex.StackTrace);
352 351
                        }
353 352

  
354

  
355 353
                    // Input LineNumber Attribute
356 354
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Set LineNumbers Attribute");
357 355
                    foreach (var item in document.LINENUMBERS)
......
367 365
                            Log.Write(ex.StackTrace);
368 366
                        }
369 367

  
370

  
371 368
                    // Input Symbol Attribute
372 369
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Set Symbols Attribute");
373 370
                    foreach (var item in document.SYMBOLS)
......
383 380
                            Log.Write(ex.StackTrace);
384 381
                        }
385 382

  
386

  
387 383
                    // Input SpecBreak Attribute
388 384
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Set Symbols Attribute");
389 385
                    foreach (var item in document.SpecBreaks)
......
399 395
                            Log.Write(ex.StackTrace);
400 396
                        }
401 397

  
402

  
403 398
                    // Label Symbol Modeling
404 399
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Labels Modeling");
405 400
                    foreach (var item in document.SYMBOLS)
......
415 410
                            Log.Write(ex.StackTrace);
416 411
                        }
417 412

  
418

  
419 413
                    // LineRun Line Join
420 414
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Join LineRuns");
421 415
                    foreach (LineNumber lineNumber in document.LINENUMBERS)
......
1325 1319
                if (item.Item1 == "SYMBOL")
1326 1320
                {
1327 1321
                    LMSymbol targetSymbol = item.Item3 as LMSymbol;
1328
                    placeRunInputs.AddSymbolTarget(targetSymbol, x, y);
1322
                    placeRunInputs.AddSymbolTarget(targetSymbol, x, y, true);
1329 1323
                }
1330 1324
                else
1331 1325
                {
......
1361 1355
                    if (item.Item1 == "LINE")
1362 1356
                    {
1363 1357
                        LMConnector targetConnector = item.Item3 as LMConnector;
1364
                        placeRunInputs.AddConnectorTarget(targetConnector, x, y);
1358
                        placeRunInputs.AddConnectorTarget(targetConnector, x, y, true);
1365 1359
                    }
1366 1360

  
1367 1361
                    else
......
1493 1487
                    }
1494 1488
                    else
1495 1489
                    {
1496
                        placeRunInputs.AddSymbolTarget(startSymbol, points[0], points[1]);
1490
                        placeRunInputs.AddSymbolTarget(startSymbol, points[0], points[1], true);
1497 1491
                    }
1498 1492
                }
1499 1493
                // 마지막 심볼이 있고 마지막 좌표일 때
......
1513 1507
                    }
1514 1508
                    else
1515 1509
                    {
1516
                        placeRunInputs.AddSymbolTarget(endSymbol, points[0], points[1]);
1510
                        placeRunInputs.AddSymbolTarget(endSymbol, points[0], points[1], true);
1517 1511
                    }
1518 1512
                }
1519 1513
                // 첫번째이며 시작 심볼이 아니고 Connecotr일 경우
1520 1514
                else if (i == 0 && prevLMConnector.ConnectItem1SymbolObject != null)
1521
                    placeRunInputs.AddSymbolTarget(prevLMConnector.ConnectItem1SymbolObject, points[0], points[1]);
1515
                    placeRunInputs.AddSymbolTarget(prevLMConnector.ConnectItem1SymbolObject, points[0], points[1], true);
1522 1516
                // 마지막이며 마지막 심볼이 아니고 Connecotr일 경우
1523 1517
                else if (i == vertices.Count - 1 && prevLMConnector.ConnectItem2SymbolObject != null)
1524
                    placeRunInputs.AddSymbolTarget(prevLMConnector.ConnectItem2SymbolObject, points[0], points[1]);
1518
                    placeRunInputs.AddSymbolTarget(prevLMConnector.ConnectItem2SymbolObject, points[0], points[1], true);
1525 1519
                else
1526 1520
                    placeRunInputs.AddPoint(points[0], points[1]);
1527 1521
            }
......
1539 1533
                {
1540 1534
                    _LMAItem = _placement.PIDCreateItem(symbolPath);
1541 1535
                    placeRunInputs = new PlaceRunInputs();
1542
                    placeRunInputs.AddSymbolTarget(startSymbol, vertices[0][0], vertices[0][1]);
1543
                    placeRunInputs.AddConnectorTarget(newConnector, vertices[0][0], vertices[0][1]);
1536
                    placeRunInputs.AddSymbolTarget(startSymbol, vertices[0][0], vertices[0][1], true);
1537
                    placeRunInputs.AddConnectorTarget(newConnector, vertices[0][0], vertices[0][1], true);
1544 1538
                    LMConnector _LMConnector = _placement.PIDPlaceRun(_LMAItem, placeRunInputs);
1545 1539
                    if (_LMConnector != null)
1546 1540
                    {
......
1562 1556

  
1563 1557
                    _LMAItem = _placement.PIDCreateItem(symbolPath);
1564 1558
                    placeRunInputs = new PlaceRunInputs();
1565
                    placeRunInputs.AddSymbolTarget(endSymbol, vertices[vertices.Count - 1][0], vertices[vertices.Count - 1][1]);
1566
                    placeRunInputs.AddConnectorTarget(newConnector, vertices[vertices.Count - 1][0], vertices[vertices.Count - 1][1]);
1559
                    placeRunInputs.AddSymbolTarget(endSymbol, vertices[vertices.Count - 1][0], vertices[vertices.Count - 1][1], true);
1560
                    placeRunInputs.AddConnectorTarget(newConnector, vertices[vertices.Count - 1][0], vertices[vertices.Count - 1][1], true);
1567 1561
                    LMConnector _LMConnector = _placement.PIDPlaceRun(_LMAItem, placeRunInputs);
1568 1562
                    if (_LMConnector != null)
1569 1563
                    {
......
1736 1730
                {
1737 1731
                    double[] point = startPoints[i];
1738 1732
                    if (i == 0)
1739
                        placeRunInputs.AddConnectorTarget(_StartTargetConnector, point[0], point[1]);
1733
                        placeRunInputs.AddConnectorTarget(_StartTargetConnector, point[0], point[1], true);
1740 1734
                    else if (i == startPoints.Count - 1)
1741
                        placeRunInputs.AddConnectorTarget(_EndTargetConnector, point[0], point[1]);
1735
                        placeRunInputs.AddConnectorTarget(_EndTargetConnector, point[0], point[1], true);
1742 1736
                    else
1743 1737
                        placeRunInputs.AddPoint(point[0], point[1]);
1744 1738
                }
......
1879 1873
                    {
1880 1874
                        if (_BranchTargetConnector != null)
1881 1875
                        {
1882
                            placeRunInputs.AddConnectorTarget(_BranchTargetConnector, point[0], point[1]);
1876
                            placeRunInputs.AddConnectorTarget(_BranchTargetConnector, point[0], point[1], true);
1883 1877
                        }
1884 1878
                        else
1885 1879
                        {
......
1889 1883
                    else
1890 1884
                    {
1891 1885
                        if (_SameRunTargetConnector != null)
1892
                            placeRunInputs.AddConnectorTarget(_SameRunTargetConnector, point[0], point[1]);
1886
                            placeRunInputs.AddConnectorTarget(_SameRunTargetConnector, point[0], point[1], true);
1893 1887
                        else if (_SameRunTargetLMSymbol != null && bNeedRemodeling)
1894 1888
                        {
1895 1889
                            SlopeType slopeType = SPPIDUtil.CalcSlope(point[0], point[1], points[i + 1][0], points[i + 1][1]);
......
1903 1897
                            placeRunInputs.AddPoint(point[0], point[1]);
1904 1898
                        }
1905 1899
                        else if (_SameRunTargetLMSymbol != null)
1906
                            placeRunInputs.AddSymbolTarget(_SameRunTargetLMSymbol, point[0], point[1]);
1900
                            placeRunInputs.AddSymbolTarget(_SameRunTargetLMSymbol, point[0], point[1], true);
1907 1901
                        else
1908 1902
                            placeRunInputs.AddPoint(point[0], point[1]);
1909 1903
                    }
......
1913 1907
                    if (IsStart)
1914 1908
                    {
1915 1909
                        if (_SameRunTargetConnector != null)
1916
                            placeRunInputs.AddConnectorTarget(_SameRunTargetConnector, point[0], point[1]);
1910
                            placeRunInputs.AddConnectorTarget(_SameRunTargetConnector, point[0], point[1], true);
1917 1911
                        else if (_SameRunTargetLMSymbol != null && bNeedRemodeling)
1918 1912
                        {
1919 1913
                            placeRunInputs.AddPoint(point[0], point[1]);
......
1927 1921
                                placeRunInputs.AddPoint(point[0], -0.1);
1928 1922
                        }
1929 1923
                        else if (_SameRunTargetLMSymbol != null)
1930
                            placeRunInputs.AddSymbolTarget(_SameRunTargetLMSymbol, point[0], point[1]);
1924
                            placeRunInputs.AddSymbolTarget(_SameRunTargetLMSymbol, point[0], point[1], true);
1931 1925
                        else
1932 1926
                            placeRunInputs.AddPoint(point[0], point[1]);
1933 1927
                    }
......
1935 1929
                    {
1936 1930
                        if (_BranchTargetConnector != null)
1937 1931
                        {
1938
                            placeRunInputs.AddConnectorTarget(_BranchTargetConnector, point[0], point[1]);
1932
                            placeRunInputs.AddConnectorTarget(_BranchTargetConnector, point[0], point[1], true);
1939 1933
                        }
1940 1934
                        else
1941 1935
                        {
......
1981 1975

  
1982 1976
                        _LMAItem = _placement.PIDCreateItem(symbolPath);
1983 1977
                        placeRunInputs = new PlaceRunInputs();
1984
                        placeRunInputs.AddSymbolTarget(_SameRunTargetLMSymbol, point[0], point[1]);
1985
                        placeRunInputs.AddConnectorTarget(_LMConnector, point[0], point[1]);
1978
                        placeRunInputs.AddSymbolTarget(_SameRunTargetLMSymbol, point[0], point[1], true);
1979
                        placeRunInputs.AddConnectorTarget(_LMConnector, point[0], point[1], true);
1986 1980
                        LMConnector _ZeroLengthLMConnector = _placement.PIDPlaceRun(_LMAItem, placeRunInputs);
1987 1981
                        if (_ZeroLengthLMConnector != null)
1988 1982
                        {
......
2066 2060
                double y = 0;
2067 2061
                lineStringGeometry.GetVertex(1, ref x, ref y);
2068 2062

  
2069
                placeRunInputs.AddSymbolTarget(connector.ConnectItem1SymbolObject, x, y);
2070
                placeRunInputs.AddSymbolTarget(connector.ConnectItem2SymbolObject, x, y);
2063
                placeRunInputs.AddSymbolTarget(connector.ConnectItem1SymbolObject, x, y, true);
2064
                placeRunInputs.AddSymbolTarget(connector.ConnectItem2SymbolObject, x, y, true);
2071 2065

  
2072 2066
                _placement.PIDRemovePlacement(connector.AsLMRepresentation());
2073 2067
                newConnector = _placement.PIDPlaceRun(_LMAItem, placeRunInputs);
......
2089 2083
                    if (i == 0)
2090 2084
                    {
2091 2085
                        if (connector.ConnectItem1SymbolObject != null)
2092
                            placeRunInputs.AddSymbolTarget(connector.ConnectItem1SymbolObject, points[0], points[1]);
2086
                            placeRunInputs.AddSymbolTarget(connector.ConnectItem1SymbolObject, points[0], points[1], true);
2093 2087
                        else
2094 2088
                            placeRunInputs.AddPoint(points[0], points[1]);
2095 2089
                    }
2096 2090
                    else if (i == vertices.Count - 1)
2097 2091
                    {
2098 2092
                        if (connector.ConnectItem2SymbolObject != null)
2099
                            placeRunInputs.AddSymbolTarget(connector.ConnectItem2SymbolObject, points[0], points[1]);
2093
                            placeRunInputs.AddSymbolTarget(connector.ConnectItem2SymbolObject, points[0], points[1], true);
2100 2094
                        else
2101 2095
                            placeRunInputs.AddPoint(points[0], points[1]);
2102 2096
                    }

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)