From a434b83043a5646d5dd99c3e934cc8a30ac6165f Mon Sep 17 00:00:00 2001 From: Shuxia Ning <NingShuxia0927@outlook.com> Date: 星期二, 29 十月 2024 13:29:35 +0800 Subject: [PATCH] 曲线修改 --- Service/HStation.Service.Revit.Core/01-model/RevitModel_Method.cs | 201 ++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 162 insertions(+), 39 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 3bdb160..f78aa65 100644 --- a/Service/HStation.Service.Revit.Core/01-model/RevitModel_Method.cs +++ b/Service/HStation.Service.Revit.Core/01-model/RevitModel_Method.cs @@ -76,6 +76,10 @@ {//鎹㈢儹鍣� 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); @@ -89,7 +93,94 @@ } /// <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() { @@ -150,42 +241,9 @@ } /// <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) @@ -204,7 +262,7 @@ } /// <summary> - /// 鑾峰彇鎵�鏈夎繛鎺ヨ妭鐐� + /// 鑾峰彇鎵�鏈夎繛鎺ヨ妭鐐圭粍浠� /// </summary> public List<RevitJunction> GetAllJunctions() { @@ -253,7 +311,7 @@ } /// <summary> - /// 鑾峰彇鎵�鏈夋墿鏁e櫒 + /// 鑾峰彇鎵�鏈夋墿鏁e櫒缁勪欢 /// </summary> public List<RevitEmitter> GetAllEmitters() { @@ -272,7 +330,68 @@ } /// <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() { @@ -286,6 +405,10 @@ {//杩囨浮浠� 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