ソースを参照

mxg:Equipment
EquipPart
Other
JoinObject
添加Rotation字段,单位度

mengxiangge 5 年 前
コミット
1d230f53da

+ 4 - 1
Executer/DataExport/JBIM/Component/Equipment.cs

@@ -22,6 +22,9 @@ namespace JBIM.Component
         {
             
         }
-
+        /// <summary>
+        /// 旋转角度
+        /// </summary>
+        public double Rotation { get; set; }
     }
 }

+ 4 - 0
Executer/DataExport/JBIM/Component/Other.cs

@@ -18,5 +18,9 @@ namespace JBIM.Component
     [TypeDefiniton(TypeDefinition.Other)]
     public class Other : VisibleComponentObject
     {
+        /// <summary>
+        /// 旋转角度
+        /// </summary>
+        public double Rotation { get; set; }
     }
 }

+ 4 - 0
Executer/DataExport/JBIM/Component/OtherJoinObject.cs

@@ -26,5 +26,9 @@ namespace JBIM.Component
         /// Connector连接的connectorIds
         /// </summary>
         public List<BimId> ConnectedIds { get; private set; }
+        /// <summary>
+        /// 旋转角度
+        /// </summary>
+        public double Rotation { get; set; }
     }
 }

+ 2 - 0
Executer/DataExport/RevitToJBim/ComponentParse/ParseFacility.cs

@@ -21,6 +21,7 @@ using RevitExport.Export;
 using RevitToJBim.Common;
 using RevitToJBim.Extension;
 using RevitToJBim.ParseData;
+using SAGA.DotNetUtils.Extend;
 using SAGA.RevitUtils.Extends;
 using SAGA.RevitUtils.MEP;
 using FamilyType = RevitToJBim.Common.FamilyType;
@@ -53,6 +54,7 @@ namespace RevitToJBim.ComponentParse
             ParseCore.AttachObject(jObject, wrapper);
             //Location
             jObject.Location = GeometryLocation.CreatePointLocation(BimConvert.ConvertToXYZ(familyInstance.GetLocationPoint()));
+            jObject.Rotation = familyInstance.GetRotation().ToAngle();
             //OutLine
             var polygonPath = RevitUtil.GetBottomPolygon(familyInstance);
             if (polygonPath != null && polygonPath.Any())

+ 3 - 1
Executer/DataExport/RevitToJBim/ComponentParse/ParseFamilyJoinObject.cs

@@ -19,13 +19,14 @@ using RevitToJBim.Common;
 using RevitToJBim.Extension;
 using JFamilyType=RevitToJBim.Common.FamilyType;
 using RevitToJBim.ParseData;
+using SAGA.DotNetUtils.Extend;
 using SAGA.RevitUtils.Extends;
 using SAGA.RevitUtils.MEP;
 
 namespace RevitToJBim.ComponentParse
 {
     [UsableParse]
-    public class ParseFamilyJoinObject : ParseBase
+    public class ParseJoinObject : ParseBase
     {
         public override List<string> FastIndex()
         {
@@ -51,6 +52,7 @@ namespace RevitToJBim.ComponentParse
             jObject.FamilySymbol = familyInstance.GetFamilySymbolName();
             //Location
             jObject.Location = GeometryLocation.CreatePointLocation(BimConvert.ConvertToXYZ(familyInstance.GetLocationPoint()));
+            jObject.Rotation = familyInstance.GetRotation().ToAngle();
             //OutLine
             var polygonPath = RevitUtil.GetBottomPolygon(familyInstance);
             if (polygonPath != null && polygonPath.Any())

+ 2 - 0
Executer/DataExport/RevitToJBim/ComponentParse/ParseOther.cs

@@ -19,6 +19,7 @@ using RevitToJBim.Common;
 using RevitToJBim.Extension;
 using JFamilyType=RevitToJBim.Common.FamilyType;
 using RevitToJBim.ParseData;
+using SAGA.DotNetUtils.Extend;
 using SAGA.RevitUtils.Extends;
 using SAGA.RevitUtils.MEP;
 
@@ -51,6 +52,7 @@ namespace RevitToJBim.ComponentParse
             jObject.FamilySymbol = familyInstance.GetFamilySymbolName();
             //Location
             jObject.Location = GeometryLocation.CreatePointLocation(BimConvert.ConvertToXYZ(familyInstance.GetLocationPoint()));
+            jObject.Rotation = familyInstance.GetRotation().ToAngle();
             //OutLine
             var polygonPath = RevitUtil.GetBottomPolygon(familyInstance);
             if (polygonPath != null && polygonPath.Any())

+ 1 - 1
Executer/DataExport/RevitToJBim/RevitToJBim.csproj

@@ -87,7 +87,7 @@
     <Compile Include="ComponentParse\ParseFacility.cs" />
     <Compile Include="ComponentParse\ParseDoor.cs" />
     <Compile Include="ComponentParse\ParseDuct.cs" />
-    <Compile Include="ComponentParse\ParseFamilyJoinObject.cs" />
+    <Compile Include="ComponentParse\ParseJoinObject.cs" />
     <Compile Include="ComponentParse\ParseMepSystem.cs" />
     <Compile Include="ComponentParse\ParsePipe.cs" />
     <Compile Include="ComponentParse\ParseSpace.cs" />

+ 1 - 1
Starter/Starter/Program.cs

@@ -39,7 +39,7 @@ namespace ExportStart
                 command = "DataExport";
                 //command = "DataCheck";
                 path = @"E:\导出测试\testR17.rvt";
-                path = @"E:\导出测试\延庆园-B1.rvt";
+                path = @"E:\导出测试\拓扑图-计算示例\B2.rvt";
                 JObject jObject=new JObject();
                 jObject.Add("ResultFileName", @"C:\Users\SAGACLOUD\AppData\Local\RevitService\Result_e26be2fd-2097-462b-bdd0-a2a86b616928.txt");
                 param = jObject.ToString();