프로젝트

일반

사용자정보

개정판 243668f5

ID243668f54580a1b2f45897ea0c1c3553c7b109dd
상위 6025ea51
하위 c33fbd9b

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

dev issue #503 : fix modeling

Change-Id: I56135d909d496d632d5c44b21ea546b0f6a7b24b

차이점 보기:

DTI_PID/SPPIDConverter/ConverterDocking.cs
1858 1858

  
1859 1859
        #endregion
1860 1860

  
1861
        
1861

  
1862 1862
        #region TEST
1863
        private void GetSPPIDSymbolRange(Ingr.RAD2D.Symbol2d symbol2d, ref double[] range)
1864
        {
1865
            {
1866
                double x1 = 0;
1867
                double y1 = 0;
1868
                double x2 = 0;
1869
                double y2 = 0;
1870

  
1871
                x1 = double.MaxValue;
1872
                y1 = double.MaxValue;
1873
                x2 = double.MinValue;
1874
                y2 = double.MinValue;
1875
                range = new double[] { x1, y1, x2, y2 };
1876

  
1877
                foreach (var item in symbol2d.DrawingObjects)
1878
                {
1879
                    if (item.GetType() == typeof(Ingr.RAD2D.Line2d))
1880
                    {
1881
                        Ingr.RAD2D.Line2d rangeObject = item as Ingr.RAD2D.Line2d;
1882
                        if (rangeObject.Layer == "Default")
1883
                        {
1884
                            rangeObject.Range(out x1, out y1, out x2, out y2);
1885
                            range = new double[] {
1886
                                Math.Min(x1, range[0]),
1887
                                Math.Min(y1, range[1]),
1888
                                Math.Max(x2, range[2]),
1889
                                Math.Max(y2, range[3])
1890
                            };
1891
                        }
1892
                    }
1893
                    else if (item.GetType() == typeof(Ingr.RAD2D.Circle2d))
1894
                    {
1895
                        Ingr.RAD2D.Circle2d rangeObject = item as Ingr.RAD2D.Circle2d;
1896
                        if (rangeObject.Layer == "Default")
1897
                        {
1898
                            rangeObject.Range(out x1, out y1, out x2, out y2);
1899
                            range = new double[] {
1900
                                Math.Min(x1, range[0]),
1901
                                Math.Min(y1, range[1]),
1902
                                Math.Max(x2, range[2]),
1903
                                Math.Max(y2, range[3])
1904
                            };
1905
                        }
1906
                    }
1907
                    else if (item.GetType() == typeof(Ingr.RAD2D.Rectangle2d))
1908
                    {
1909
                        Ingr.RAD2D.Rectangle2d rangeObject = item as Ingr.RAD2D.Rectangle2d;
1910
                        if (rangeObject.Layer == "Default")
1911
                        {
1912
                            rangeObject.Range(out x1, out y1, out x2, out y2);
1913
                            range = new double[] {
1914
                                Math.Min(x1, range[0]),
1915
                                Math.Min(y1, range[1]),
1916
                                Math.Max(x2, range[2]),
1917
                                Math.Max(y2, range[3])
1918
                            };
1919
                        }
1920
                    }
1921
                    else if (item.GetType() == typeof(Ingr.RAD2D.Arc2d))
1922
                    {
1923
                        Ingr.RAD2D.Arc2d rangeObject = item as Ingr.RAD2D.Arc2d;
1924
                        if (rangeObject.Layer == "Default")
1925
                        {
1926
                            rangeObject.Range(out x1, out y1, out x2, out y2);
1927
                            range = new double[] {
1928
                                Math.Min(x1, range[0]),
1929
                                Math.Min(y1, range[1]),
1930
                                Math.Max(x2, range[2]),
1931
                                Math.Max(y2, range[3])
1932
                            };
1933
                        }
1934
                    }
1935
                }
1936
            }
1937
        }
1863 1938
        private void simpleButton1_Click(object sender, EventArgs e)
1864 1939
        {
1865 1940
            double x1 = double.MaxValue;
......
1868 1943
            double y2 = double.MinValue;
1869 1944
            foreach (DrawingObjectBase item in application.ActiveSelectSet)
1870 1945
            {
1871
                double tx1, ty1, tx2, ty2;
1872
                item.Range(out tx1, out ty1, out tx2, out ty2);
1873
                x1 = Math.Min(x1, tx1);
1874
                y1 = Math.Min(y1, ty1);
1875
                x2 = Math.Max(x2, tx2);
1876
                y2 = Math.Max(y2, ty2);
1946
                double[] range = new double[] { };
1947
                GetSPPIDSymbolRange(item as Symbol2d, ref range);
1877 1948
            }
1878 1949
            return;
1879 1950

  

내보내기 Unified diff

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