zhangyuekai
2024-08-10 a18b907beff8b21fb4c9d6fb72678ac5e9f7b80d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using Autodesk.Revit.DB;
using HStation.Model;
using HStation.RevitDev.RevitDataExport.Common;
 
namespace HStation.RevitDev.RevitDataExport.Utility
{
    public static class XYZExtension
    {
        public static RevitPosition ToCustomPoint(this XYZ point)
        {
            return new RevitPosition
            {
                X = (double)point.X.InnerToMM(),
                Y = (double)point.Y.InnerToMM(),
                Z = (double)point.Z.InnerToMM()
            };
        }
 
        public static XYZ ToXYZ(this RevitPosition point)
        {
            var ret = new XYZ(point.X, point.Y, point.Z);
            return ret;
        }
    }
}