using HStation.Model; namespace HStation.Service { /// /// Revit位置拓展 /// internal static class RevitPositionExtensions { /// /// 距离 /// /// 自身位置 /// 其他位置 /// public static double Distance(this RevitPosition rhs, RevitPosition other) { if (rhs == null) { return default; } if (other == null) { return default; } return Math.Sqrt(Math.Pow(rhs.X - other.X, 2) + Math.Pow(rhs.Y - other.Y, 2) + Math.Pow(rhs.Z - other.Z, 2)); } } }