Browse Source

mxg:Rotation保留两位有效数字

mengxiangge 5 years ago
parent
commit
754fed6b0b

+ 1 - 1
Executer/DataExport/RevitToJBim/ComponentParse/ParseFacility.cs

@@ -54,7 +54,7 @@ namespace RevitToJBim.ComponentParse
             ParseCore.AttachObject(jObject, wrapper);
             //Location
             jObject.Location = GeometryLocation.CreatePointLocation(BimConvert.ConvertToXYZ(familyInstance.GetLocationPoint()));
-            jObject.Rotation = familyInstance.GetRotation().ToAngle();
+            jObject.Rotation = familyInstance.GetRotation().ToAngle().Round(2);
             //OutLine
             var polygonPath = RevitUtil.GetBottomPolygon(familyInstance);
             if (polygonPath != null && polygonPath.Any())

+ 1 - 1
Executer/DataExport/RevitToJBim/ComponentParse/ParseJoinObject.cs

@@ -52,7 +52,7 @@ namespace RevitToJBim.ComponentParse
             jObject.FamilySymbol = familyInstance.GetFamilySymbolName();
             //Location
             jObject.Location = GeometryLocation.CreatePointLocation(BimConvert.ConvertToXYZ(familyInstance.GetLocationPoint()));
-            jObject.Rotation = familyInstance.GetRotation().ToAngle();
+            jObject.Rotation = familyInstance.GetRotation().ToAngle().Round(2);
             //OutLine
             var polygonPath = RevitUtil.GetBottomPolygon(familyInstance);
             if (polygonPath != null && polygonPath.Any())

+ 1 - 1
Executer/DataExport/RevitToJBim/ComponentParse/ParseOther.cs

@@ -52,7 +52,7 @@ namespace RevitToJBim.ComponentParse
             jObject.FamilySymbol = familyInstance.GetFamilySymbolName();
             //Location
             jObject.Location = GeometryLocation.CreatePointLocation(BimConvert.ConvertToXYZ(familyInstance.GetLocationPoint()));
-            jObject.Rotation = familyInstance.GetRotation().ToAngle();
+            jObject.Rotation = familyInstance.GetRotation().ToAngle().Round(2);
             //OutLine
             var polygonPath = RevitUtil.GetBottomPolygon(familyInstance);
             if (polygonPath != null && polygonPath.Any())