lixiaojun
2024-07-30 a6f889d45e29cbba4648bd7c4705d1de7aab36d2
Service/HStation.Service.Revit.Core/02-parter/00-core/RevitBoundingBox.cs
@@ -8,22 +8,23 @@
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("Min", NullValueHandling = NullValueHandling.Ignore)]
        public RevitPosition Min { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("Max", NullValueHandling = NullValueHandling.Ignore)]
        public RevitPosition Max { get; set; }
        /// <summary>
        /// 获取中心位置
        ///
        /// </summary>
        public RevitPosition GetCenter()
        {
            var x = (this.Max.X - this.Min.X) / 2;
            var y = (this.Max.Y - this.Min.Y) / 2;
            var z = (this.Max.Z - this.Min.Z) / 2;
            return new RevitPosition(x, y, z);
        }
        [JsonProperty("Center", NullValueHandling = NullValueHandling.Ignore)]
        public RevitPosition Center { get; set; }
    }
}