Browse Source

Merge branch 'master' of https://git.dev.tencent.com/xuhuo1234/saga

mengxiangge 6 năm trước cách đây
mục cha
commit
67c8a1ad54

+ 2 - 1
MBI/SAGA.GplotManage/GplotCommand.cs

@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+
+using System.Collections.Generic;
 using System.IO;
 using System.Linq;
 using System.Text;

+ 2 - 1
MBI/SAGA.GplotRelationComputerManage/RevitSystemParse/Handler/GplotGraphParse.cs

@@ -289,7 +289,8 @@ namespace SAGA.GplotRelationComputerManage
         private void ArrangeEdge(SystemGraph graph)
         {
             //有向化处理
-            DirectedEdge2(graph);
+            DirectedEdge(graph);
+            //DirectedEdge2(graph);
             graph.IsDirection = true;
             //串并联处理
             //EdgesArrayGraphUtil.GplotAnalyse(graph);

+ 2 - 0
MBI/SAGA.GplotRelationComputerManage/SystemChecks/GplotSystemCheckManager.cs

@@ -199,6 +199,8 @@ namespace SAGA.GplotRelationComputerManage.SystemChecks
         {
             List<string> categories = new List<string>();
             var sourceFlagDic = document.ProjectInformation.GetElementData<string, bool>(StorageEnum.EquipmentSource);
+            if (sourceFlagDic == null)
+                return categories;
             foreach (var keyValue in sourceFlagDic)
             {
                 if (keyValue.Value)

+ 1 - 1
MBI/SAGA.GplotRelationComputerManage/SystemRelation/Common/RelationTypeUtil.cs

@@ -33,7 +33,7 @@ namespace SAGA.GplotRelationComputerManage
                 if(check.IsExpired(dateTime))
                 {
                     //测试不验证事件
-                   // result.Add(relationType);
+                    result.Add(relationType);
                     continue;
                 }
             }

+ 8 - 8
MBI/SAGA.GplotRelationComputerManage/SystemRelation/SystemComputerHandler.cs

@@ -24,19 +24,19 @@ namespace SAGA.GplotRelationComputerManage
         public void Computer(SystemComputerContext context)
         {
             List<string> testFiles = new List<string>();
-            testFiles.Add("Fl420105000119b7c08edcee11e8a553abe8a598be93.rvt");
-            testFiles.Add("Fl420105000110be38e9dcf511e8a5532b791a1ee2c4.rvt");
+            //testFiles.Add("Fl420105000119b7c08edcee11e8a553abe8a598be93.rvt");
+            //testFiles.Add("Fl420105000110be38e9dcf511e8a5532b791a1ee2c4.rvt");
             var fileInfos = RevitModelPath.GetAllRevitFiles();
             foreach (var fileInfo in fileInfos)
             {
                 if (File.Exists(fileInfo))
                 {
-                    if (testFiles.All(f => !fileInfo.Contains(f)))
-                    {
-                        continue;
-                    }
-                    //FloorSystemItem floorItems = context.FloorItems.GetItem(fileInfo);
-                    FloorSystemItemTest floorItems = context.TestFloorItems.GetItem(fileInfo);
+                    //if (testFiles.All(f => !fileInfo.Contains(f)))
+                    //{
+                    //    continue;
+                    //}
+                    FloorSystemItem floorItems = context.FloorItems.GetItem(fileInfo);
+                    //FloorSystemItemTest floorItems = context.TestFloorItems.GetItem(fileInfo);
                     floorItems.Parse(context);
                     floorItems.Document.CloseDocSimple();
                 }

+ 18 - 18
MBI/SAGA.MBI/WinView/Space/SpaceManager.cs

@@ -132,26 +132,26 @@ namespace SAGA.MBI.WinView
                 ElementId phaseId = para.AsElementId();
                 var phase = doc.GetElement(phaseId) as Phase;
                 #region 创建新的节点
-                //List<XYZ> points = new List<XYZ>();
-                //var topology = doc.get_PlanTopology(level, phase);
-                //foreach (PlanCircuit topologyCircuit in topology.Circuits)
-                //{
-                //    var point = topologyCircuit.GetPointInside();
-                //    var xyz = new XYZ(point.U, point.V, level.ProjectElevation ); //适当升高一些
-                //    points.Add(xyz);
-                //}
+                List<XYZ> points = new List<XYZ>();
+                var topology = doc.get_PlanTopology(level, phase);
+                foreach (PlanCircuit topologyCircuit in topology.Circuits)
+                {
+                    var point = topologyCircuit.GetPointInside();
+                    var xyz = new XYZ(point.U, point.V, level.ProjectElevation); //适当升高一些
+                    points.Add(xyz);
+                }
 
-                //foreach (var point in points)
-                //{
-                //    var oldSpace = doc.GetSpaceAtPoint(point, phase);
-                //    if (oldSpace == null)
-                //    {
-                //        doc.Create.NewSpace(level, phase, new UV(point.X, point.Y));
-                //    }
-                //}
+                foreach (var point in points)
+                {
+                    var oldSpace = doc.GetSpaceAtPoint(point, phase);
+                    if (oldSpace == null)
+                    {
+                        doc.Create.NewSpace(level, phase, new UV(point.X, point.Y));
+                    }
+                }
                 #endregion
-               // doc.Create.NewSpaces2()
-                var newSpaces= doc.Create.NewSpaces2(level, phase, view);
+                // doc.Create.NewSpaces2()
+                var newSpaces = doc.Create.NewSpaces2(level, phase, view);
             }
 
         }