프로젝트

일반

사용자정보

개정판 77a869a8

ID77a869a881cb73043814d128a4ef3ea00ba8e0e2
상위 65bc1e0f
하위 7a098fc5

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

dev issue #000 : fix angle and attribute

Change-Id: I9c2956abdc9e493d715b8a3a59a3aba8fa0a8aab

차이점 보기:

DTI_PID/SPPIDConverter/AutoModeling.cs
1901 1901
                    LMConnector connectedLMConnector = FindTargetLMConnectorForLabel(connectorVertices, symbol.SPPID.ORIGINAL_X, symbol.SPPID.ORIGINAL_Y);
1902 1902
                    if (connectedLMConnector != null)
1903 1903
                    {
1904
                        // Target Item에 Label의 Attribute Input
1905
                        InputSymbolAttribute(targetItem, symbol.ATTRIBUTES);
1906

  
1904 1907
                        // LEADER Line 검사
1905 1908
                        bool leaderLine = false;
1906 1909
                        SymbolMapping symbolMapping = document.SymbolMappings.Find(x => x.UID == symbol.DBUID);
......
4668 4671
        {
4669 4672
            // Object 아이템이 Symbol일 경우 Equipment일 경우 
4670 4673
            string sRep = null;
4674
            string sModelID = null;
4671 4675
            if (targetItem.GetType() == typeof(Symbol))
4672 4676
                sRep = ((Symbol)targetItem).SPPID.RepresentationId;
4673 4677
            else if (targetItem.GetType() == typeof(Equipment))
4674 4678
                sRep = ((Equipment)targetItem).SPPID.RepresentationId;
4675

  
4679
            else if (targetItem.GetType() == typeof(Line))
4680
                sModelID = ((Line)targetItem).SPPID.ModelItemId;
4681
            
4676 4682
            if (!string.IsNullOrEmpty(sRep))
4677 4683
            {
4678 4684
                LMSymbol _LMSymbol = dataSource.GetSymbol(sRep);
......
4709 4715
                ReleaseCOMObjects(_LMModelItem);
4710 4716
                ReleaseCOMObjects(_LMSymbol);
4711 4717
            }
4718
            else if (!string.IsNullOrEmpty(sModelID))
4719
            {
4720
                LMModelItem _LMModelItem = dataSource.GetModelItem(sModelID);
4721
                LMAAttributes _Attributes = _LMModelItem.Attributes;
4722

  
4723
                foreach (var item in targetAttributes)
4724
                {
4725
                    AttributeMapping mapping = document.AttributeMappings.Find(x => x.UID == item.UID);
4726
                    if (mapping != null && !string.IsNullOrEmpty(item.VALUE) && item.VALUE != "None")
4727
                    {
4728
                        if (!mapping.IsText)
4729
                        {
4730
                            LMAAttribute _Attribute = _Attributes[mapping.SPPIDATTRIBUTENAME];
4731
                            if (_Attribute != null)
4732
                                _Attribute.set_Value(item.VALUE);
4733
                        }
4734
                    }
4735
                }
4736
                _LMModelItem.Commit();
4737

  
4738
                ReleaseCOMObjects(_Attributes);
4739
                ReleaseCOMObjects(_LMModelItem);
4740
            }
4712 4741
        }
4713 4742

  
4714 4743
        /// <summary>
DTI_PID/SPPIDConverter/BaseModel/LineNumber.cs
38 38
                if (value < gap)
39 39
                    value = 0;
40 40
                else if (1.57 - gap < value && value < 1.57 + gap)
41
                    value = 90 * Math.PI / 180;
41
                    value = 270 * Math.PI / 180;
42 42
                else if (3.14 - gap < value && value < 3.14 + gap)
43 43
                    value = Math.PI;
44 44
                else if (4.71 - gap < value && value < 4.71 + gap)
45
                    value = 270 * Math.PI / 180;
45
                    value = 90 * Math.PI / 180;
46

  
46 47

  
47 48
                _ANGLE = value;
48 49
            }
DTI_PID/SPPIDConverter/BaseModel/Note.cs
57 57
                if (value < gap)
58 58
                    value = 0;
59 59
                else if (1.57 - gap < value && value < 1.57 + gap)
60
                    value = 90 * Math.PI / 180;
60
                    value = 270 * Math.PI / 180;
61 61
                else if (3.14 - gap < value && value < 3.14 + gap)
62 62
                    value = Math.PI;
63 63
                else if (4.71 - gap < value && value < 4.71 + gap)
64
                    value = 270 * Math.PI / 180;
64
                    value = 90 * Math.PI / 180;
65 65

  
66 66
                _ANGLE = value;
67 67
            }
DTI_PID/SPPIDConverter/BaseModel/Symbol.cs
53 53
                if (value < gap)
54 54
                    value = 0;
55 55
                else if (1.57 - gap < value && value < 1.57 + gap)
56
                    value = 90 * Math.PI / 180;
56
                    value = 270 * Math.PI / 180;
57 57
                else if (3.14 - gap < value && value < 3.14 + gap)
58 58
                    value = Math.PI;
59 59
                else if (4.71 - gap < value && value < 4.71 + gap)
60
                    value = 270 * Math.PI / 180;
60
                    value = 90 * Math.PI / 180;
61 61

  
62 62
                _ANGLE = value;
63 63
            }
DTI_PID/SPPIDConverter/BaseModel/Text.cs
58 58
                if (value < gap)
59 59
                    value = 0;
60 60
                else if (1.57 - gap < value && value < 1.57 + gap)
61
                    value = 90 * Math.PI / 180;
61
                    value = 270 * Math.PI / 180;
62 62
                else if (3.14 - gap < value && value < 3.14 + gap)
63 63
                    value = Math.PI;
64 64
                else if (4.71 - gap < value && value < 4.71 + gap)
65
                    value = 270 * Math.PI / 180;
65
                    value = 90 * Math.PI / 180;
66 66

  
67 67
                _ANGLE = value;
68 68
            }

내보내기 Unified diff

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