프로젝트

일반

사용자정보

개정판 898e39fe

ID898e39fe4e8c29134a418135034bdee7acb145ee
상위 845fd8b0
하위 30a5133e

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

dev issue #507 : fix line number modeling

Change-Id: Iaf3cfe3496defe97abe665dda147220dca90d707

차이점 보기:

DTI_PID/SPPIDConverter/AutoModeling.cs
4252 4252
                LMConnector connectedLMConnector = FindTargetLMConnectorForLabel(connectorVertices, x, y);
4253 4253
                if (connectedLMConnector != null)
4254 4254
                {
4255
                    
4256
                    if (connectedLMConnector.ConnectItem1SymbolObject != null && 
4257
                        connectedLMConnector.ConnectItem1SymbolObject.get_RepresentationType() == "OPC")
4258
                    {
4259
                        
4260
                    }
4261
                    if (connectedLMConnector.ConnectItem2SymbolObject != null &&
4262
                        connectedLMConnector.ConnectItem2SymbolObject.get_RepresentationType() == "OPC")
4263
                    {
4264
                        
4265
                    }
4266

  
4267 4255
                    Array points = new double[] { 0, x, y };
4268 4256
                    lineNumber.SPPID.SPPID_X = x;
4269 4257
                    lineNumber.SPPID.SPPID_Y = y;
......
4293 4281
                if (removeLabel != null)
4294 4282
                {
4295 4283
                    GridSetting gridSetting = GridSetting.GetInstance();
4284
                    LMConnector connector = dataSource.GetConnector(removeLabel.RepresentationID);
4285
                    //
4296 4286
                    double[] labelRange = null;
4297 4287
                    GetSPPIDSymbolRange(removeLabel, ref labelRange);
4298
                    LMConnector connector = dataSource.GetConnector(removeLabel.RepresentationID);
4299 4288
                    List<double[]> vertices = GetConnectorVertices(connector);
4300 4289

  
4301 4290
                    double[] resultStart = null;
......
4388 4377
                            }
4389 4378
                        }
4390 4379

  
4391
                        if (offsetY != 0 && offsetY != 0)
4380
                        if (offsetY != 0 || offsetY != 0)
4392 4381
                        {
4382
                            if (connector.ConnectItem1SymbolObject != null &&
4383
                                connector.ConnectItem1SymbolObject.get_RepresentationType() == "OPC")
4384
                            {
4385
                                Ingr.RAD2D.Symbol2d symbol = radApp.ActiveDocument.ActiveSheet.DrawingObjects[connector.ConnectItem1SymbolObject.get_GraphicOID().ToString()];
4386

  
4387
                                double x1, y1, x2, y2, originX, originY;
4388
                                symbol.Range(out x1, out y1, out x2, out y2);
4389
                                symbol.GetOrigin(out originX, out originY);
4390
                                if (originX < lineNumber.SPPID.SPPID_X)
4391
                                    lineNumber.SPPID.SPPID_X = originX + gridSetting.Length * 35;
4392
                                else
4393
                                    lineNumber.SPPID.SPPID_X = originX - gridSetting.Length * 35;
4394
                            }
4395
                            else if (connector.ConnectItem2SymbolObject != null &&
4396
                                    connector.ConnectItem2SymbolObject.get_RepresentationType() == "OPC")
4397
                            {
4398
                                Ingr.RAD2D.Symbol2d symbol = radApp.ActiveDocument.ActiveSheet.DrawingObjects[connector.ConnectItem2SymbolObject.get_GraphicOID().ToString()];
4399

  
4400
                                double x1, y1, x2, y2, originX, originY;
4401
                                symbol.Range(out x1, out y1, out x2, out y2);
4402
                                symbol.GetOrigin(out originX, out originY);
4403
                                if (originX < lineNumber.SPPID.SPPID_X)
4404
                                    lineNumber.SPPID.SPPID_X = originX + gridSetting.Length * 35;
4405
                                else
4406
                                    lineNumber.SPPID.SPPID_X = originX - gridSetting.Length * 35;
4407
                            }
4408

  
4393 4409
                            _placement.PIDRemovePlacement(removeLabel.AsLMRepresentation());
4394 4410
                            Array points = new double[] { 0, lineNumber.SPPID.SPPID_X, lineNumber.SPPID.SPPID_Y };
4395 4411
                            LMLabelPersist _LmLabelPresist = _placement.PIDPlaceLabel(lineNumber.SPPID.MAPPINGNAME, ref points, Rotation: lineNumber.ANGLE, LabeledItem: connector.AsLMRepresentation(), IsLeaderVisible: false);

내보내기 Unified diff

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