From abf1e3b3334ab47c38aa92405a11a6ec92b7847a Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期四, 31 十月 2024 17:18:37 +0800 Subject: [PATCH] bimface 水流 --- Service/HStation.Service.Revit.Core/01-model/RevitModel_Method.cs | 366 ++++++++++++++++++++++++++++++++++----------------- 1 files changed, 241 insertions(+), 125 deletions(-) diff --git a/Service/HStation.Service.Revit.Core/01-model/RevitModel_Method.cs b/Service/HStation.Service.Revit.Core/01-model/RevitModel_Method.cs index 29724a1..f78aa65 100644 --- a/Service/HStation.Service.Revit.Core/01-model/RevitModel_Method.cs +++ b/Service/HStation.Service.Revit.Core/01-model/RevitModel_Method.cs @@ -12,266 +12,317 @@ { var list = new List<RevitParter>(); 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); } if (this.Junctions != null && this.Junctions.Count > 0) - { + {//杩炴帴鑺傜偣 list.AddRange(this.Junctions); } if (this.Nozzles != null && this.Nozzles.Count > 0) - { + {//鍠峰槾 list.AddRange(this.Nozzles); } if (this.Hydrants != null && this.Hydrants.Count > 0) - { + {//娑堢伀鏍� list.AddRange(this.Hydrants); } - if (this.Meters != null && this.Meters.Count > 0) - { - list.AddRange(this.Meters); - } - if (this.Flowmeters != null && this.Flowmeters.Count > 0) - { - list.AddRange(this.Flowmeters); - } - if (this.Pressmeters != null && this.Pressmeters.Count > 0) - { - list.AddRange(this.Pressmeters); + if (this.Bluntheads != null && this.Bluntheads.Count > 0) + {//闂峰ご + list.AddRange(this.Bluntheads); } if (this.Elbows != null && this.Elbows.Count > 0) - { + {//寮ご list.AddRange(this.Elbows); } if (this.Threelinks != null && this.Threelinks.Count > 0) - { + {//涓夐�� list.AddRange(this.Threelinks); } if (this.Fourlinks != null && this.Fourlinks.Count > 0) - { + {//鍥涢�� list.AddRange(this.Fourlinks); } - if (this.Bluntheads != null && this.Bluntheads.Count > 0) - { - list.AddRange(this.Bluntheads); + if (this.Meters != null && this.Meters.Count > 0) + {//姘磋〃 + list.AddRange(this.Meters); + } + if (this.Flowmeters != null && this.Flowmeters.Count > 0) + {//娴侀噺璁� + list.AddRange(this.Flowmeters); + } + if (this.Pressmeters != null && this.Pressmeters.Count > 0) + {//鍘嬪姏琛� + list.AddRange(this.Pressmeters); } - if (this.Pipes != null && this.Pipes.Count > 0) - { + {//绠¢亾 list.AddRange(this.Pipes); } if (this.Translations != null && this.Translations.Count > 0) - { + {//杩囨浮浠� list.AddRange(this.Translations); } if (this.Exchangers != null && this.Exchangers.Count > 0) - { + {//鎹㈢儹鍣� list.AddRange(this.Exchangers); } + if (this.Compressors != null && this.Compressors.Count > 0) + {//绌哄帇鏈� + list.AddRange(this.Compressors); + } if (this.Pumps != null && this.Pumps.Count > 0) - { + {//姘存车 list.AddRange(this.Pumps); } if (this.Valves != null && this.Valves.Count > 0) - { + {//闃�闂� list.AddRange(this.Valves); } - return list; - } /// <summary> - /// 鑾峰彇鎵�鏈夎妭鐐� + /// 鑾峰彇鎵�鏈夊彲瑙佺粍浠� + /// </summary> + public List<RevitVisual> GetAllVisuals() + { + var list = new List<RevitVisual>(); + 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); + } + if (this.Junctions != null && this.Junctions.Count > 0) + {//杩炴帴鑺傜偣 + list.AddRange(this.Junctions); + } + if (this.Nozzles != null && this.Nozzles.Count > 0) + {//鍠峰槾 + list.AddRange(this.Nozzles); + } + if (this.Hydrants != null && this.Hydrants.Count > 0) + {//娑堢伀鏍� + list.AddRange(this.Hydrants); + } + if (this.Bluntheads != null && this.Bluntheads.Count > 0) + {//闂峰ご + list.AddRange(this.Bluntheads); + } + if (this.Elbows != null && this.Elbows.Count > 0) + {//寮ご + list.AddRange(this.Elbows); + } + if (this.Threelinks != null && this.Threelinks.Count > 0) + {//涓夐�� + list.AddRange(this.Threelinks); + } + if (this.Fourlinks != null && this.Fourlinks.Count > 0) + {//鍥涢�� + list.AddRange(this.Fourlinks); + } + if (this.Meters != null && this.Meters.Count > 0) + {//姘磋〃 + list.AddRange(this.Meters); + } + if (this.Flowmeters != null && this.Flowmeters.Count > 0) + {//娴侀噺璁� + list.AddRange(this.Flowmeters); + } + if (this.Pressmeters != null && this.Pressmeters.Count > 0) + {//鍘嬪姏琛� + list.AddRange(this.Pressmeters); + } + + if (this.Pipes != null && this.Pipes.Count > 0) + {//绠¢亾 + list.AddRange(this.Pipes); + } + if (this.Translations != null && this.Translations.Count > 0) + {//杩囨浮浠� + list.AddRange(this.Translations); + } + if (this.Exchangers != null && this.Exchangers.Count > 0) + {//鎹㈢儹鍣� + list.AddRange(this.Exchangers); + } + if (this.Compressors != null && this.Compressors.Count > 0) + {//绌哄帇鏈� + list.AddRange(this.Compressors); + } + if (this.Pumps != null && this.Pumps.Count > 0) + {//姘存车 + list.AddRange(this.Pumps); + } + if (this.Valves != null && this.Valves.Count > 0) + {//闃�闂� + list.AddRange(this.Valves); + } + + return list; + } + + /// <summary> + /// 鑾峰彇鎵�鏈夎妭鐐圭粍浠� /// </summary> public List<RevitNode> GetAllNodes() { var list = new List<RevitNode>(); 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); } if (this.Junctions != null && this.Junctions.Count > 0) - { + {//杩炴帴鑺傜偣 list.AddRange(this.Junctions); } if (this.Nozzles != null && this.Nozzles.Count > 0) - { + {//鍠峰槾 list.AddRange(this.Nozzles); } if (this.Hydrants != null && this.Hydrants.Count > 0) - { + {//娑堢伀鏍� list.AddRange(this.Hydrants); } - if (this.Meters != null && this.Meters.Count > 0) - { - list.AddRange(this.Meters); - } - if (this.Flowmeters != null && this.Flowmeters.Count > 0) - { - list.AddRange(this.Flowmeters); - } - if (this.Pressmeters != null && this.Pressmeters.Count > 0) - { - list.AddRange(this.Pressmeters); + if (this.Bluntheads != null && this.Bluntheads.Count > 0) + {//闂峰ご + list.AddRange(this.Bluntheads); } if (this.Elbows != null && this.Elbows.Count > 0) - { + {//寮ご list.AddRange(this.Elbows); } if (this.Threelinks != null && this.Threelinks.Count > 0) - { + {//涓夐�� list.AddRange(this.Threelinks); } if (this.Fourlinks != null && this.Fourlinks.Count > 0) - { + {//鍥涢�� list.AddRange(this.Fourlinks); } - if (this.Bluntheads != null && this.Bluntheads.Count > 0) - { - list.AddRange(this.Bluntheads); + if (this.Meters != null && this.Meters.Count > 0) + {//姘磋〃 + list.AddRange(this.Meters); } - + if (this.Flowmeters != null && this.Flowmeters.Count > 0) + {//娴侀噺璁� + list.AddRange(this.Flowmeters); + } + if (this.Pressmeters != null && this.Pressmeters.Count > 0) + {//鍘嬪姏琛� + list.AddRange(this.Pressmeters); + } return list; } /// <summary> - /// 鑾峰彇鎵�鏈夌娈� + /// 鑾峰彇鎵�鏈夋按婧愮粍浠� /// </summary> - public List<RevitLink> GetAllLinks() - { - var list = new List<RevitLink>(); - - - if (this.Pipes != null && this.Pipes.Count > 0) - { - list.AddRange(this.Pipes); - } - if (this.Translations != null && this.Translations.Count > 0) - { - list.AddRange(this.Translations); - } - if (this.Exchangers != null && this.Exchangers.Count > 0) - { - list.AddRange(this.Exchangers); - } - if (this.Pumps != null && this.Pumps.Count > 0) - { - list.AddRange(this.Pumps); - } - if (this.Valves != null && this.Valves.Count > 0) - { - list.AddRange(this.Valves); - } - - - return list; - - } - - /// <summary> - /// 鑾峰彇鎵�鏈夋按婧� - /// </summary> - /// <returns></returns> - public List<RevitSource> GetAllWaterSources() + public List<RevitSource> GetAllSources() { 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<RevitJunction> GetAllJunctions() { var list = new List<RevitJunction>(); if (this.Junctions != null && this.Junctions.Count > 0) - { + {//杩炴帴鑺傜偣 list.AddRange(this.Junctions); } if (this.Nozzles != null && this.Nozzles.Count > 0) - { + {//鍠峰槾 list.AddRange(this.Nozzles); } if (this.Hydrants != null && this.Hydrants.Count > 0) - { + {//娑堢伀鏍� list.AddRange(this.Hydrants); } - if (this.Meters != null && this.Meters.Count > 0) - { - list.AddRange(this.Meters); - } - if (this.Flowmeters != null && this.Flowmeters.Count > 0) - { - list.AddRange(this.Flowmeters); - } - if (this.Pressmeters != null && this.Pressmeters.Count > 0) - { - list.AddRange(this.Pressmeters); + if (this.Bluntheads != null && this.Bluntheads.Count > 0) + {//闂峰ご + list.AddRange(this.Bluntheads); } if (this.Elbows != null && this.Elbows.Count > 0) - { + {//寮ご list.AddRange(this.Elbows); } if (this.Threelinks != null && this.Threelinks.Count > 0) - { + {//涓夐�� list.AddRange(this.Threelinks); } if (this.Fourlinks != null && this.Fourlinks.Count > 0) - { + {//鍥涢�� list.AddRange(this.Fourlinks); } - if (this.Bluntheads != null && this.Bluntheads.Count > 0) - { - list.AddRange(this.Bluntheads); + if (this.Meters != null && this.Meters.Count > 0) + {//姘磋〃 + list.AddRange(this.Meters); } - + if (this.Flowmeters != null && this.Flowmeters.Count > 0) + {//娴侀噺璁� + list.AddRange(this.Flowmeters); + } + if (this.Pressmeters != null && this.Pressmeters.Count > 0) + {//鍘嬪姏琛� + list.AddRange(this.Pressmeters); + } return list; } /// <summary> - /// 鑾峰彇鎵�鏈夋墿鏁e櫒 + /// 鑾峰彇鎵�鏈夋墿鏁e櫒缁勪欢 /// </summary> public List<RevitEmitter> GetAllEmitters() { var list = new List<RevitEmitter>(); if (this.Nozzles != null && this.Nozzles.Count > 0) - { + {//鍠峰槾 list.AddRange(this.Nozzles); } if (this.Hydrants != null && this.Hydrants.Count > 0) - { + {//娑堢伀鏍� list.AddRange(this.Hydrants); } @@ -279,22 +330,87 @@ } /// <summary> - /// 鑾峰彇鎵�鏈夌閬� + /// 鑾峰彇鎵�鏈夎繛鎺ョ粍浠� + /// </summary> + public List<RevitCoupling> GetAllCouplings() + { + var list = new List<RevitCoupling>(); + if (this.Bluntheads != null && this.Bluntheads.Count > 0) + {//闂峰ご + list.AddRange(this.Bluntheads); + } + if (this.Elbows != null && this.Elbows.Count > 0) + {//寮ご + list.AddRange(this.Elbows); + } + if (this.Threelinks != null && this.Threelinks.Count > 0) + {//涓夐�� + list.AddRange(this.Threelinks); + } + if (this.Fourlinks != null && this.Fourlinks.Count > 0) + {//鍥涢�� + list.AddRange(this.Fourlinks); + } + return list; + } + + /// <summary> + /// 鑾峰彇鎵�鏈夌娈电粍浠� + /// </summary> + public List<RevitLink> GetAllLinks() + { + var list = new List<RevitLink>(); + + if (this.Pipes != null && this.Pipes.Count > 0) + {//绠¢亾 + list.AddRange(this.Pipes); + } + if (this.Translations != null && this.Translations.Count > 0) + {//杩囨浮浠� + list.AddRange(this.Translations); + } + if (this.Exchangers != null && this.Exchangers.Count > 0) + {//鎹㈢儹鍣� + list.AddRange(this.Exchangers); + } + if (this.Compressors != null && this.Compressors.Count > 0) + {//绌哄帇鏈� + list.AddRange(this.Compressors); + } + if (this.Pumps != null && this.Pumps.Count > 0) + {//姘存车 + list.AddRange(this.Pumps); + } + if (this.Valves != null && this.Valves.Count > 0) + {//闃�闂� + list.AddRange(this.Valves); + } + + return list; + + } + + /// <summary> + /// 鑾峰彇鎵�鏈夌閬撶粍浠� /// </summary> public List<RevitPipe> GetAllPipes() { var list = new List<RevitPipe>(); if (this.Pipes != null && this.Pipes.Count > 0) - { + {//绠¢亾 list.AddRange(this.Pipes); } if (this.Translations != null && this.Translations.Count > 0) - { + {//杩囨浮浠� list.AddRange(this.Translations); } + if (this.Compressors != null && this.Compressors.Count > 0) + {//绌哄帇鏈� + list.AddRange(this.Compressors); + } if (this.Exchangers != null && this.Exchangers.Count > 0) - { + {//鎹㈢儹鍣� list.AddRange(this.Exchangers); } -- Gitblit v1.9.3