lixiaojun
2024-09-15 f62dd6b3de7dae88ac638267a040e48a4d941e08
Service/HStation.Service.Revit.Core/01-model/RevitModel_Method.cs
@@ -8,9 +8,9 @@
        /// <summary>
        /// 获取所有组件
        /// </summary>
        public List<IRevitParter> GetAllParters()
        public List<RevitParter> GetAllParters()
        {
            var list = new List<IRevitParter>();
            var list = new List<RevitParter>();
            if (this.Reservoirs != null && this.Reservoirs.Count > 0)
            {
                list.AddRange(this.Reservoirs);
@@ -63,6 +63,7 @@
            {
                list.AddRange(this.Bluntheads);
            }
            if (this.Pipes != null && this.Pipes.Count > 0)
            {
@@ -93,9 +94,9 @@
        /// <summary>
        /// 获取所有节点
        /// </summary>
        public List<IRevitNode> GetAllNodes()
        public List<RevitNode> GetAllNodes()
        {
            var list = new List<IRevitNode>();
            var list = new List<RevitNode>();
            if (this.Reservoirs != null && this.Reservoirs.Count > 0)
            {
                list.AddRange(this.Reservoirs);
@@ -149,38 +150,15 @@
                list.AddRange(this.Bluntheads);
            }
            return list;
        }
        /// <summary>
        /// 获取所有水源
        /// </summary>
        /// <returns></returns>
        public List<IRevitNode> GetAllWaterSources()
        {
            var list = new List<IRevitNode>();
            if (this.Reservoirs != null && this.Reservoirs.Count > 0)
            {
                list.AddRange(this.Reservoirs);
            }
            if (this.Tanks != null && this.Tanks.Count > 0)
            {
                list.AddRange(this.Tanks);
            }
            if (this.Waterboxs != null && this.Waterboxs.Count > 0)
            {
                list.AddRange(this.Waterboxs);
            }
            return list;
        }
        /// <summary>
        /// 获取所有管段
        /// </summary>
        public List<IRevitLink> GetAllLinks()
        public List<RevitLink> GetAllLinks()
        {
            var list = new List<IRevitLink>();
            var list = new List<RevitLink>();
            if (this.Pipes != null && this.Pipes.Count > 0)
@@ -210,11 +188,33 @@
        }
        /// <summary>
        /// 获取所有水源
        /// </summary>
        /// <returns></returns>
        public List<RevitSource> GetAllWaterSources()
        {
            var list = new List<RevitSource>();
            if (this.Reservoirs != null && this.Reservoirs.Count > 0)
            {
                list.AddRange(this.Reservoirs);
            }
            if (this.Tanks != null && this.Tanks.Count > 0)
            {
                list.AddRange(this.Tanks);
            }
            if (this.Waterboxs != null && this.Waterboxs.Count > 0)
            {
                list.AddRange(this.Waterboxs);
            }
            return list;
        }
        /// <summary>
        /// 获取所有连接节点
        /// </summary>
        public List<IRevitJunction> GetAllJunctions()
        public List<RevitJunction> GetAllJunctions()
        {
            var list = new List<IRevitJunction>();
            var list = new List<RevitJunction>();
            if (this.Junctions != null && this.Junctions.Count > 0)
            {
                list.AddRange(this.Junctions);
@@ -256,48 +256,34 @@
                list.AddRange(this.Bluntheads);
            }
            return list;
        }
        /// <summary>
        /// 获取所有水池
        /// 获取所有扩散器
        /// </summary>
        /// <returns></returns>
        public List<IRevitTank> GetAllTanks()
        public List<RevitEmitter> GetAllEmitters()
        {
            var list = new List<IRevitTank>();
            if (this.Tanks != null && this.Tanks.Count > 0)
            var list = new List<RevitEmitter>();
            if (this.Nozzles != null && this.Nozzles.Count > 0)
            {
                list.AddRange(this.Tanks);
                list.AddRange(this.Nozzles);
            }
            if (this.Waterboxs != null && this.Waterboxs.Count > 0)
            if (this.Hydrants != null && this.Hydrants.Count > 0)
            {
                list.AddRange(this.Waterboxs);
                list.AddRange(this.Hydrants);
            }
            return list;
        }
        /// <summary>
        /// 获取所有水库
        /// </summary>
        public List<IRevitReservoir> GetAllReservoirs()
        {
            var list = new List<IRevitReservoir>();
            if (this.Reservoirs != null && this.Reservoirs.Count > 0)
            {
                list.AddRange(this.Reservoirs);
            }
            return list;
        }
        /// <summary>
        /// 获取所有管道
        /// </summary>
        public List<IRevitPipe> GetAllPipes()
        public List<RevitPipe> GetAllPipes()
        {
            var list = new List<IRevitPipe>();
            var list = new List<RevitPipe>();
            if (this.Pipes != null && this.Pipes.Count > 0)
            {
@@ -315,35 +301,6 @@
            return list;
        }
        /// <summary>
        /// 获取所有水泵
        /// </summary>
        public List<IRevitPump> GetAllPumps()
        {
            var list = new List<IRevitPump>();
            if (this.Pumps != null && this.Pumps.Count > 0)
            {
                list.AddRange(this.Pumps);
            }
            return list;
        }
        /// <summary>
        /// 获取所有阀门
        /// </summary>
        public List<IRevitValve> GetAllValves()
        {
            var list = new List<IRevitValve>();
            if (this.Valves != null && this.Valves.Count > 0)
            {
                list.AddRange(this.Valves);
            }
            return list;
        }
    }