프로젝트

일반

사용자정보

개정판 b85669d8

IDb85669d88fea7ad07120a5cbe776c13d0e99a799
상위 1e450cd9
하위 b76ea48d

조봉훈이(가) 약 2년 전에 추가함

Fix logic when diagonal starting point is in opposite direction for diagonal pipe drawing and PipeRun join

Change-Id: I46148849c1f45ead823da82ef84ea5a1d6c92461

차이점 보기:

DTI_PID/SPPIDConverter/AutoModeling.cs
106 106

  
107 107
                    // VendorPackage Modeling
108 108
                    // ID2에서 VendorPackage로 된 Symbol을 SPPID에서 그림
109
                    RunVendorPackageModeling();
109
//                    RunVendorPackageModeling();
110 110
                    // Equipment Modeling
111 111
                    // Id2에서 인식한 Equipment일 경우 SPPID에 Draft
112 112
                    RunEquipmentModeling();
......
2416 2416
                            LMConnector targetConnector = FindTargetLMConnectorForBranch(line, targetLine, ref x, ref y);
2417 2417
                            if (targetConnector != null)
2418 2418
                            {
2419
                                if (targetLine.SlopeType != SlopeType.HORIZONTAL && targetLine.SlopeType != SlopeType.VERTICAL)
2420
                                    diagonal = true;
2419 2421
                                placeRunInputs.AddConnectorTarget(targetConnector, x, y, diagonal);
2420 2422
                                ChangeLineSPPIDCoordinateByConnector(groupLine, targetLine, x, y, false);
2421 2423
                            }
......
4069 4071
                ReleaseCOMObjects(connector2);
4070 4072
                connector2 = null;
4071 4073

  
4072
                // item2가 item1으로 조인
4073
                _placement.PIDJoinRuns(ref item1, ref item2);
4074
                item1.Commit();
4075
                item2.Commit();
4076

  
4077 4074
                string beforeID = string.Empty;
4078 4075
                string afterID = string.Empty;
4079 4076

  
4080 4077
                if (modelItem1.get_ItemStatus() == "Active" && modelItem2.get_ItemStatus() != "Active")
4081 4078
                {
4079
                    // item2가 item1으로 조인
4080
                    _placement.PIDJoinRuns(ref item1, ref item2);
4081
                    item1.Commit();
4082
                    item2.Commit();
4083

  
4082 4084
                    beforeID = modelItem2.Id;
4083 4085
                    afterID = modelItem1.Id;
4084 4086
                    survivorId = afterID;
4085 4087
                }
4086 4088
                else if (modelItem1.get_ItemStatus() != "Active" && modelItem2.get_ItemStatus() == "Active")
4087 4089
                {
4090
                    // item1이 item2로 조인
4091
                    _placement.PIDJoinRuns(ref item2, ref item1);
4092
                    item1.Commit();
4093
                    item2.Commit();
4094

  
4088 4095
                    beforeID = modelItem1.Id;
4089 4096
                    afterID = modelItem2.Id;
4090 4097
                    survivorId = afterID;
......
4095 4102
                    int model2Cnt = GetConnectorCount(modelId2);
4096 4103
                    if (model1Cnt == 0)
4097 4104
                    {
4105
                        // item1이 item2로 조인
4106
                        _placement.PIDJoinRuns(ref item2, ref item1);
4107
                        item1.Commit();
4108
                        item2.Commit();
4109

  
4098 4110
                        beforeID = modelItem1.Id;
4099 4111
                        afterID = modelItem2.Id;
4100 4112
                        survivorId = afterID;
4101 4113
                    }
4102 4114
                    else if (model2Cnt == 0)
4103 4115
                    {
4116
                        // item2가 item1으로 조인
4117
                        _placement.PIDJoinRuns(ref item1, ref item2);
4118
                        item1.Commit();
4119
                        item2.Commit();
4120

  
4104 4121
                        beforeID = modelItem2.Id;
4105 4122
                        afterID = modelItem1.Id;
4106 4123
                        survivorId = afterID;
......
4297 4314
            {
4298 4315
                dynamic OID = connector.get_GraphicOID().ToString();
4299 4316
                DependencyObject drawingObject = radApp.ActiveDocument.ActiveSheet.DrawingObjects[OID];
4300
                Ingr.RAD2D.LineStringGeometry2d lineStringGeometry = drawingObject.GetGeometry() as Ingr.RAD2D.LineStringGeometry2d;
4301
                int verticesCount = lineStringGeometry.VertexCount;
4302
                double[] value = null;
4303
                lineStringGeometry.GetVertices(ref verticesCount, ref value);
4304
                for (int i = 0; i < verticesCount; i++)
4317
                if (drawingObject != null)
4305 4318
                {
4306
                    double x = 0;
4307
                    double y = 0;
4308
                    lineStringGeometry.GetVertex(i + 1, ref x, ref y);
4309
                    vertices.Add(new double[] { x, y });
4319
                    Ingr.RAD2D.LineStringGeometry2d lineStringGeometry = drawingObject.GetGeometry() as Ingr.RAD2D.LineStringGeometry2d;
4320
                    int verticesCount = lineStringGeometry.VertexCount;
4321
                    double[] value = null;
4322
                    lineStringGeometry.GetVertices(ref verticesCount, ref value);
4323
                    for (int i = 0; i < verticesCount; i++)
4324
                    {
4325
                        double x = 0;
4326
                        double y = 0;
4327
                        lineStringGeometry.GetVertex(i + 1, ref x, ref y);
4328
                        vertices.Add(new double[] { x, y });
4329
                    }
4310 4330
                }
4311 4331
            }
4312 4332
            return vertices;

내보내기 Unified diff

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