프로젝트

일반

사용자정보

개정판 f14b4e3b

IDf14b4e3b48cf57a9e4bb75fae9a66c4f51a2022c
상위 0466fd2b
하위 6cf04dae

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

dev issue #507 : VentDrain Modeling

Change-Id: I52725feb0cbdaf38b0a6cb8dad5f0e4848d7b50a

차이점 보기:

DTI_PID/SPPIDConverter/BaseModel/Document.cs
13 13
{
14 14
    public class Document
15 15
    {
16
        public List<Line> VentDrainLine = new List<Line>();
17
        public List<Symbol> VentDrainSymbol = new List<Symbol>();
18

  
16 19
        private string _DWGNAME;
17 20
        private string _SIZE;
18 21
        private double _SIZE_WIDTH;
......
103 106
                    SetAllConnectors();
104 107
                    Enable = true;
105 108
                    ValidationCheck();
109
                    SetVentDrainItem();
106 110
                }
107 111
            }
108 112
            catch (Exception ex)
......
581 585
                    connector.ConnectedObject = SPPIDUtil.FindObjectByUID(this, connector.CONNECTEDITEM);
582 586
        }
583 587

  
584
        
585

  
586 588
        public void ValidationCheck()
587 589
        {
588 590
           
......
1043 1045
                Enable = true;
1044 1046
            }
1045 1047
        }
1048

  
1049
        private void SetVentDrainItem()
1050
        {
1051
            foreach (var item in SYMBOLS)
1052
            {
1053
                List<Symbol> group = new List<Symbol>();
1054
                SPPIDUtil.FindConnectedSymbolGroup(this, item, group);
1055
                List<Line> lines = new List<Line>();
1056
                foreach (var symbol in group)
1057
                {
1058
                    foreach (var connector in symbol.CONNECTORS)
1059
                    {
1060
                        if (connector.ConnectedObject != null && connector.ConnectedObject.GetType() == typeof(Line))
1061
                        {
1062
                            Line line = connector.ConnectedObject as Line;
1063
                            if (!lines.Contains(line))
1064
                                lines.Add(line);
1065
                            
1066
                        }
1067
                    }
1068
                }
1069

  
1070
                if (lines.Count == 1 && !SPPIDUtil.IsBranchedLine(this, lines[0]) && SPPIDUtil.IsBranchLine(lines[0]) && 
1071
                    (lines[0].SlopeType == SlopeType.HORIZONTAL || lines[0].SlopeType == SlopeType.VERTICAL))
1072
                {
1073
                    foreach (var symbol in group)
1074
                    {
1075
                        if (!VentDrainSymbol.Contains(symbol))
1076
                            VentDrainSymbol.Add(symbol);
1077
                    }
1078
                    VentDrainLine.Add(lines[0]);
1079
                }
1080
            }
1081
        }
1046 1082
    }
1047 1083
}

내보내기 Unified diff

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