| | |
| | | namespace HStation.Hydro |
| | | using HStation.Model; |
| | | using Yw.Model; |
| | | |
| | | namespace HStation.Hydro |
| | | { |
| | | /// <summary> |
| | | /// 转换辅助类 |
| | |
| | | //水库 |
| | | if (revitModel.Reservoirs != null && revitModel.Reservoirs.Count > 0) |
| | | { |
| | | if (hydro.Reservoirs == null) |
| | | { |
| | | hydro.Reservoirs = new List<Yw.Model.HydroReservoirInfo>(); |
| | | } |
| | | foreach (var revitReservoir in revitModel.Reservoirs) |
| | | { |
| | | var reservoir = new Yw.Model.HydroReservoirInfo(); |
| | | reservoir.Catalog = Yw.Hydro.ParterCatalog.Reservoir; |
| | | reservoir.Name = revitReservoir.Name; |
| | | reservoir.Code = revitReservoir.Code; |
| | | reservoir.ModelType = revitReservoir.ModelType; |
| | | reservoir.Flags = revitReservoir.Flags; |
| | | reservoir.Description = revitReservoir.Description; |
| | | reservoir.Quality = revitReservoir.Quality; |
| | | reservoir.PoolElev = revitReservoir.PoolElev; |
| | | reservoir.Head = revitReservoir.Head; |
| | | reservoir.HeadPattern = revitReservoir.HeadPattern; |
| | | reservoir.Position2d = new Yw.Model.Hydro.Position2d(revitReservoir.Position.X, revitReservoir.Position.Y); |
| | | reservoir.Position3d = new Yw.Model.Hydro.Position3d(revitReservoir.Position.X, revitReservoir.Position.Y, revitReservoir.Position.Z); |
| | | reservoir.ScenePropValueList = revitReservoir.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | var reservoir = FromRevit(revitReservoir); |
| | | hydro.Reservoirs.Add(reservoir); |
| | | } |
| | | } |
| | |
| | | //水池 |
| | | if (revitModel.Tanks != null && revitModel.Tanks.Count > 0) |
| | | { |
| | | if (hydro.Tanks == null) |
| | | { |
| | | hydro.Tanks = new List<Yw.Model.HydroTankInfo>(); |
| | | } |
| | | foreach (var revitTank in revitModel.Tanks) |
| | | { |
| | | var tank = new Yw.Model.HydroTankInfo(); |
| | | tank.Catalog = Yw.Hydro.ParterCatalog.Tank; |
| | | tank.Name = revitTank.Name; |
| | | tank.Code = revitTank.Code; |
| | | tank.ModelType = revitTank.ModelType; |
| | | tank.Flags = revitTank.Flags; |
| | | tank.Description = revitTank.Description; |
| | | tank.Quality = revitTank.Quality; |
| | | tank.PoolElev = revitTank.PoolElev; |
| | | tank.InitLevel = revitTank.InitLevel; |
| | | tank.MinLevel = revitTank.MinLevel; |
| | | tank.MaxLevel = revitTank.MaxLevel; |
| | | tank.DN = revitTank.DN; |
| | | tank.MinVol = revitTank.MinVol; |
| | | tank.VolCurve = revitTank.VolCurve; |
| | | tank.Position2d = new Yw.Model.Hydro.Position2d(revitTank.Position.X, revitTank.Position.Y); |
| | | tank.Position3d = new Yw.Model.Hydro.Position3d(revitTank.Position.X, revitTank.Position.Y, revitTank.Position.Z); |
| | | tank.ScenePropValueList = revitTank.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | var tank = FromRevit(revitTank); |
| | | hydro.Tanks.Add(tank); |
| | | } |
| | | } |
| | |
| | | //水箱 |
| | | if (revitModel.Waterboxs != null && revitModel.Waterboxs.Count > 0) |
| | | { |
| | | if (hydro.Waterboxs == null) |
| | | { |
| | | hydro.Waterboxs = new List<Yw.Model.HydroWaterboxInfo>(); |
| | | } |
| | | foreach (var revitWaterbox in revitModel.Waterboxs) |
| | | { |
| | | var waterbox = new Yw.Model.HydroWaterboxInfo(); |
| | | waterbox.Catalog = Yw.Hydro.ParterCatalog.Waterbox; |
| | | waterbox.Name = revitWaterbox.Name; |
| | | waterbox.Code = revitWaterbox.Code; |
| | | waterbox.ModelType = revitWaterbox.ModelType; |
| | | waterbox.Flags = revitWaterbox.Flags; |
| | | waterbox.Description = revitWaterbox.Description; |
| | | waterbox.Quality = revitWaterbox.Quality; |
| | | waterbox.PoolElev = revitWaterbox.PoolElev; |
| | | waterbox.InitLevel = revitWaterbox.InitLevel; |
| | | waterbox.MinLevel = revitWaterbox.MinLevel; |
| | | waterbox.MaxLevel = revitWaterbox.MaxLevel; |
| | | waterbox.DN = revitWaterbox.DN; |
| | | waterbox.MinVol = revitWaterbox.MinVol; |
| | | waterbox.VolCurve = revitWaterbox.VolCurve; |
| | | waterbox.Position2d = new Yw.Model.Hydro.Position2d(revitWaterbox.Position.X, revitWaterbox.Position.Y); |
| | | waterbox.Position3d = new Yw.Model.Hydro.Position3d(revitWaterbox.Position.X, revitWaterbox.Position.Y, revitWaterbox.Position.Z); |
| | | waterbox.ScenePropValueList = revitWaterbox.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | var waterbox = FromRevit(revitWaterbox); |
| | | hydro.Waterboxs.Add(waterbox); |
| | | } |
| | | } |
| | |
| | | //连接节点 |
| | | if (revitModel.Junctions != null && revitModel.Junctions.Count > 0) |
| | | { |
| | | if (hydro.Junctions == null) |
| | | { |
| | | hydro.Junctions = new List<Yw.Model.HydroJunctionInfo>(); |
| | | } |
| | | foreach (var revitJunction in revitModel.Junctions) |
| | | { |
| | | var junction = new Yw.Model.HydroJunctionInfo(); |
| | | junction.Catalog = Yw.Hydro.ParterCatalog.Junction; |
| | | junction.Name = revitJunction.Name; |
| | | junction.Code = revitJunction.Code; |
| | | junction.ModelType = revitJunction.ModelType; |
| | | junction.Flags = revitJunction.Flags; |
| | | junction.Description = revitJunction.Description; |
| | | junction.Quality = revitJunction.Quality; |
| | | junction.Elev = revitJunction.Elev; |
| | | junction.Demand = revitJunction.Demand; |
| | | junction.DemandPattern = revitJunction.DemandPattern; |
| | | junction.Position2d = new Yw.Model.Hydro.Position2d(revitJunction.Position.X, revitJunction.Position.Y); |
| | | junction.Position3d = new Yw.Model.Hydro.Position3d(revitJunction.Position.X, revitJunction.Position.Y, revitJunction.Position.Z); |
| | | junction.ScenePropValueList = revitJunction.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | var junction = FromRevit(revitJunction); |
| | | hydro.Junctions.Add(junction); |
| | | } |
| | | } |
| | | |
| | | //闷头 |
| | | if (revitModel.Bluntheads != null && revitModel.Bluntheads.Count > 0) |
| | | { |
| | | if (hydro.Bluntheads == null) |
| | | { |
| | | hydro.Bluntheads = new List<Yw.Model.HydroBluntheadInfo>(); |
| | | } |
| | | foreach (var revitBlunthead in revitModel.Bluntheads) |
| | | { |
| | | var blunthead = FromRevit(revitBlunthead); |
| | | hydro.Bluntheads.Add(blunthead); |
| | | } |
| | | } |
| | | |
| | | //弯头 |
| | | if (revitModel.Elbows != null && revitModel.Elbows.Count > 0) |
| | | { |
| | | if (hydro.Elbows == null) |
| | | { |
| | | hydro.Elbows = new List<HydroElbowInfo>(); |
| | | } |
| | | foreach (var revitElbow in revitModel.Elbows) |
| | | { |
| | | var elbow = new Yw.Model.HydroElbowInfo(); |
| | | elbow.Catalog = Yw.Hydro.ParterCatalog.Elbow; |
| | | elbow.Name = revitElbow.Name; |
| | | elbow.Code = revitElbow.Code; |
| | | elbow.ModelType = revitElbow.ModelType; |
| | | elbow.Flags = revitElbow.Flags; |
| | | elbow.Description = revitElbow.Description; |
| | | elbow.Quality = revitElbow.Quality; |
| | | elbow.Elev = revitElbow.Elev; |
| | | elbow.Demand = revitElbow.Demand; |
| | | elbow.DemandPattern = revitElbow.DemandPattern; |
| | | elbow.Position2d = new Yw.Model.Hydro.Position2d(revitElbow.Position.X, revitElbow.Position.Y); |
| | | elbow.Position3d = new Yw.Model.Hydro.Position3d(revitElbow.Position.X, revitElbow.Position.Y, revitElbow.Position.Z); |
| | | elbow.ScenePropValueList = revitElbow.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | var elbow = FromRevit(revitElbow); |
| | | hydro.Elbows.Add(elbow); |
| | | } |
| | | } |
| | |
| | | //三通 |
| | | if (revitModel.Threelinks != null && revitModel.Threelinks.Count > 0) |
| | | { |
| | | if (hydro.Threelinks == null) |
| | | { |
| | | hydro.Threelinks = new List<HydroThreelinkInfo>(); |
| | | } |
| | | foreach (var revitThreelink in revitModel.Threelinks) |
| | | { |
| | | var threelink = new Yw.Model.HydroThreelinkInfo(); |
| | | threelink.Catalog = Yw.Hydro.ParterCatalog.Threelink; |
| | | threelink.Name = revitThreelink.Name; |
| | | threelink.Code = revitThreelink.Code; |
| | | threelink.ModelType = revitThreelink.ModelType; |
| | | threelink.Flags = revitThreelink.Flags; |
| | | threelink.Description = revitThreelink.Description; |
| | | threelink.Quality = revitThreelink.Quality; |
| | | threelink.Elev = revitThreelink.Elev; |
| | | threelink.Demand = revitThreelink.Demand; |
| | | threelink.DemandPattern = revitThreelink.DemandPattern; |
| | | threelink.Position2d = new Yw.Model.Hydro.Position2d(revitThreelink.Position.X, revitThreelink.Position.Y); |
| | | threelink.Position3d = new Yw.Model.Hydro.Position3d(revitThreelink.Position.X, revitThreelink.Position.Y, revitThreelink.Position.Z); |
| | | threelink.ScenePropValueList = revitThreelink.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | var threelink = FromRevit(revitThreelink); |
| | | hydro.Threelinks.Add(threelink); |
| | | } |
| | | } |
| | |
| | | //四通 |
| | | if (revitModel.Fourlinks != null && revitModel.Fourlinks.Count > 0) |
| | | { |
| | | if (hydro.Fourlinks == null) |
| | | { |
| | | hydro.Fourlinks = new List<HydroFourlinkInfo>(); |
| | | } |
| | | foreach (var revitFourlink in revitModel.Fourlinks) |
| | | { |
| | | var fourlink = new Yw.Model.HydroFourlinkInfo(); |
| | | fourlink.Catalog = Yw.Hydro.ParterCatalog.Fourlink; |
| | | fourlink.Name = revitFourlink.Name; |
| | | fourlink.Code = revitFourlink.Code; |
| | | fourlink.ModelType = revitFourlink.ModelType; |
| | | fourlink.Flags = revitFourlink.Flags; |
| | | fourlink.Description = revitFourlink.Description; |
| | | fourlink.Quality = revitFourlink.Quality; |
| | | fourlink.Elev = revitFourlink.Elev; |
| | | fourlink.Demand = revitFourlink.Demand; |
| | | fourlink.DemandPattern = revitFourlink.DemandPattern; |
| | | fourlink.Position2d = new Yw.Model.Hydro.Position2d(revitFourlink.Position.X, revitFourlink.Position.Y); |
| | | fourlink.Position3d = new Yw.Model.Hydro.Position3d(revitFourlink.Position.X, revitFourlink.Position.Y, revitFourlink.Position.Z); |
| | | fourlink.ScenePropValueList = revitFourlink.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | var fourlink = FromRevit(revitFourlink); |
| | | hydro.Fourlinks.Add(fourlink); |
| | | } |
| | | } |
| | | |
| | | //喷嘴 |
| | | if (revitModel.Nozzles != null && revitModel.Nozzles.Count > 0) |
| | | { |
| | | foreach (var revitNozzle in revitModel.Nozzles) |
| | | { |
| | | var nozzle = new Yw.Model.HydroNozzleInfo(); |
| | | nozzle.Catalog = Yw.Hydro.ParterCatalog.Nozzle; |
| | | nozzle.Name = revitNozzle.Name; |
| | | nozzle.Code = revitNozzle.Code; |
| | | nozzle.ModelType = revitNozzle.ModelType; |
| | | nozzle.Flags = revitNozzle.Flags; |
| | | nozzle.Description = revitNozzle.Description; |
| | | nozzle.Quality = revitNozzle.Quality; |
| | | nozzle.Coefficient = revitNozzle.Coefficient; |
| | | nozzle.Elev = revitNozzle.Elev; |
| | | nozzle.Demand = revitNozzle.Demand; |
| | | nozzle.DemandPattern = revitNozzle.DemandPattern; |
| | | nozzle.Position2d = new Yw.Model.Hydro.Position2d(revitNozzle.Position.X, revitNozzle.Position.Y); |
| | | nozzle.Position3d = new Yw.Model.Hydro.Position3d(revitNozzle.Position.X, revitNozzle.Position.Y, revitNozzle.Position.Z); |
| | | nozzle.ScenePropValueList = revitNozzle.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | hydro.Nozzles.Add(nozzle); |
| | | } |
| | | } |
| | | |
| | | //消火栓 |
| | | if (revitModel.Hydrants != null && revitModel.Hydrants.Count > 0) |
| | | { |
| | | if (hydro.Hydrants == null) |
| | | { |
| | | hydro.Hydrants = new List<HydroHydrantInfo>(); |
| | | } |
| | | foreach (var revitHydrant in revitModel.Hydrants) |
| | | { |
| | | var hydrant = new Yw.Model.HydroHydrantInfo(); |
| | | hydrant.Catalog = Yw.Hydro.ParterCatalog.Hydrant; |
| | | hydrant.Name = revitHydrant.Name; |
| | | hydrant.Code = revitHydrant.Code; |
| | | hydrant.ModelType = revitHydrant.ModelType; |
| | | hydrant.Flags = revitHydrant.Flags; |
| | | hydrant.Description = revitHydrant.Description; |
| | | hydrant.Quality = revitHydrant.Quality; |
| | | hydrant.Coefficient = revitHydrant.Coefficient; |
| | | hydrant.Elev = revitHydrant.Elev; |
| | | hydrant.Demand = revitHydrant.Demand; |
| | | hydrant.DemandPattern = revitHydrant.DemandPattern; |
| | | hydrant.Position2d = new Yw.Model.Hydro.Position2d(revitHydrant.Position.X, revitHydrant.Position.Y); |
| | | hydrant.Position3d = new Yw.Model.Hydro.Position3d(revitHydrant.Position.X, revitHydrant.Position.Y, revitHydrant.Position.Z); |
| | | hydrant.ScenePropValueList = revitHydrant.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | var hydrant = FromRevit(revitHydrant); |
| | | hydro.Hydrants.Add(hydrant); |
| | | } |
| | | } |
| | | |
| | | //喷嘴 |
| | | if (revitModel.Nozzles != null && revitModel.Nozzles.Count > 0) |
| | | { |
| | | if (hydro.Nozzles == null) |
| | | { |
| | | hydro.Nozzles = new List<HydroNozzleInfo>(); |
| | | } |
| | | foreach (var revitNozzle in revitModel.Nozzles) |
| | | { |
| | | var nozzle = FromRevit(revitNozzle); |
| | | hydro.Nozzles.Add(nozzle); |
| | | } |
| | | } |
| | | |
| | | //水表 |
| | | if (revitModel.Meters != null && revitModel.Meters.Count > 0) |
| | | { |
| | | if (hydro.Meters == null) |
| | | { |
| | | hydro.Meters = new List<HydroMeterInfo>(); |
| | | } |
| | | foreach (var revitMeter in revitModel.Meters) |
| | | { |
| | | var meter = new Yw.Model.HydroMeterInfo(); |
| | | meter.Catalog = Yw.Hydro.ParterCatalog.Meter; |
| | | meter.Name = revitMeter.Name; |
| | | meter.Code = revitMeter.Code; |
| | | meter.ModelType = revitMeter.ModelType; |
| | | meter.Flags = revitMeter.Flags; |
| | | meter.Description = revitMeter.Description; |
| | | meter.Quality = revitMeter.Quality; |
| | | meter.Elev = revitMeter.Elev; |
| | | meter.Demand = revitMeter.Demand; |
| | | meter.DemandPattern = revitMeter.DemandPattern; |
| | | meter.Position2d = new Yw.Model.Hydro.Position2d(revitMeter.Position.X, revitMeter.Position.Y); |
| | | meter.Position3d = new Yw.Model.Hydro.Position3d(revitMeter.Position.X, revitMeter.Position.Y, revitMeter.Position.Z); |
| | | meter.ScenePropValueList = revitMeter.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | var meter = FromRevit(revitMeter); |
| | | hydro.Meters.Add(meter); |
| | | } |
| | | } |
| | |
| | | //流量计 |
| | | if (revitModel.Flowmeters != null && revitModel.Flowmeters.Count > 0) |
| | | { |
| | | if (hydro.Flowmeters == null) |
| | | { |
| | | hydro.Flowmeters = new List<HydroFlowmeterInfo>(); |
| | | } |
| | | foreach (var revitFlowmeter in revitModel.Flowmeters) |
| | | { |
| | | var flowmeter = new Yw.Model.HydroFlowmeterInfo(); |
| | | flowmeter.Catalog = Yw.Hydro.ParterCatalog.Flowmeter; |
| | | flowmeter.Name = revitFlowmeter.Name; |
| | | flowmeter.Code = revitFlowmeter.Code; |
| | | flowmeter.ModelType = revitFlowmeter.ModelType; |
| | | flowmeter.Flags = revitFlowmeter.Flags; |
| | | flowmeter.Description = revitFlowmeter.Description; |
| | | flowmeter.Quality = revitFlowmeter.Quality; |
| | | flowmeter.Elev = revitFlowmeter.Elev; |
| | | flowmeter.Demand = revitFlowmeter.Demand; |
| | | flowmeter.DemandPattern = revitFlowmeter.DemandPattern; |
| | | flowmeter.Position2d = new Yw.Model.Hydro.Position2d(revitFlowmeter.Position.X, revitFlowmeter.Position.Y); |
| | | flowmeter.Position3d = new Yw.Model.Hydro.Position3d(revitFlowmeter.Position.X, revitFlowmeter.Position.Y, revitFlowmeter.Position.Z); |
| | | flowmeter.ScenePropValueList = revitFlowmeter.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | var flowmeter = FromRevit(revitFlowmeter); |
| | | hydro.Flowmeters.Add(flowmeter); |
| | | } |
| | | } |
| | |
| | | //压力表 |
| | | if (revitModel.Pressmeters != null && revitModel.Pressmeters.Count > 0) |
| | | { |
| | | if (hydro.Pressmeters == null) |
| | | { |
| | | hydro.Pressmeters = new List<HydroPressmeterInfo>(); |
| | | } |
| | | foreach (var revitPressmeter in revitModel.Pressmeters) |
| | | { |
| | | var pressmeter = new Yw.Model.HydroPressmeterInfo(); |
| | | pressmeter.Catalog = Yw.Hydro.ParterCatalog.Pressmeter; |
| | | pressmeter.Name = revitPressmeter.Name; |
| | | pressmeter.Code = revitPressmeter.Code; |
| | | pressmeter.ModelType = revitPressmeter.ModelType; |
| | | pressmeter.Flags = revitPressmeter.Flags; |
| | | pressmeter.Description = revitPressmeter.Description; |
| | | pressmeter.Quality = revitPressmeter.Quality; |
| | | pressmeter.Elev = revitPressmeter.Elev; |
| | | pressmeter.Demand = revitPressmeter.Demand; |
| | | pressmeter.DemandPattern = revitPressmeter.DemandPattern; |
| | | pressmeter.Position2d = new Yw.Model.Hydro.Position2d(revitPressmeter.Position.X, revitPressmeter.Position.Y); |
| | | pressmeter.Position3d = new Yw.Model.Hydro.Position3d(revitPressmeter.Position.X, revitPressmeter.Position.Y, revitPressmeter.Position.Z); |
| | | pressmeter.ScenePropValueList = revitPressmeter.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | var pressmeter = FromRevit(revitPressmeter); |
| | | hydro.Pressmeters.Add(pressmeter); |
| | | } |
| | | } |
| | | |
| | | //闷头 |
| | | if (revitModel.Bluntheads != null && revitModel.Bluntheads.Count > 0) |
| | | { |
| | | foreach (var revitBlunthead in revitModel.Bluntheads) |
| | | { |
| | | var blunthead = new Yw.Model.HydroBluntheadInfo(); |
| | | blunthead.Catalog = Yw.Hydro.ParterCatalog.Blunthead; |
| | | blunthead.Name = revitBlunthead.Name; |
| | | blunthead.Code = revitBlunthead.Code; |
| | | blunthead.ModelType = revitBlunthead.ModelType; |
| | | blunthead.Flags = revitBlunthead.Flags; |
| | | blunthead.Description = revitBlunthead.Description; |
| | | blunthead.Quality = revitBlunthead.Quality; |
| | | blunthead.Elev = revitBlunthead.Elev; |
| | | blunthead.Demand = revitBlunthead.Demand; |
| | | blunthead.DemandPattern = revitBlunthead.DemandPattern; |
| | | blunthead.Position2d = new Yw.Model.Hydro.Position2d(revitBlunthead.Position.X, revitBlunthead.Position.Y); |
| | | blunthead.Position3d = new Yw.Model.Hydro.Position3d(revitBlunthead.Position.X, revitBlunthead.Position.Y, revitBlunthead.Position.Z); |
| | | blunthead.ScenePropValueList = revitBlunthead.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | hydro.Bluntheads.Add(blunthead); |
| | | } |
| | | } |
| | | |
| | | //水泵 |
| | | if (revitModel.Pumps != null && revitModel.Pumps.Count > 0) |
| | | { |
| | | foreach (var revitPump in revitModel.Pumps) |
| | | { |
| | | var pump = new Yw.Model.HydroPumpInfo(); |
| | | pump.Catalog = Yw.Hydro.ParterCatalog.Pump; |
| | | pump.Name = revitPump.Name; |
| | | pump.Code = revitPump.Code; |
| | | pump.ModelType = revitPump.ModelType; |
| | | pump.Flags = revitPump.Flags; |
| | | pump.Description = revitPump.Description; |
| | | pump.StartCode = revitPump.StartCode; |
| | | pump.EndCode = revitPump.EndCode; |
| | | pump.LinkStatus = revitPump.LinkStatus; |
| | | pump.RatedP = revitPump.RatedP; |
| | | pump.CurveQH = revitPump.CurveQH; |
| | | pump.Price = revitPump.Price; |
| | | pump.PricePattern = revitPump.PricePattern; |
| | | pump.CurveQE = revitPump.CurveQE; |
| | | pump.ScenePropValueList = revitPump.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | hydro.Pumps.Add(pump); |
| | | } |
| | | } |
| | | |
| | | //阀门 |
| | | if (revitModel.Valves != null && revitModel.Valves.Count > 0) |
| | | { |
| | | foreach (var revitValve in revitModel.Valves) |
| | | { |
| | | var valve = new Yw.Model.HydroValveInfo(); |
| | | valve.Catalog = Yw.Hydro.ParterCatalog.Valve; |
| | | valve.Name = revitValve.Name; |
| | | valve.Code = revitValve.Code; |
| | | valve.ModelType = revitValve.ModelType; |
| | | valve.Flags = revitValve.Flags; |
| | | valve.Description = revitValve.Description; |
| | | valve.StartCode = revitValve.StartCode; |
| | | valve.EndCode = revitValve.EndCode; |
| | | valve.LinkStatus = revitValve.LinkStatus; |
| | | valve.Diameter = revitValve.Diameter; |
| | | valve.MinorLoss = revitValve.MinorLoss; |
| | | valve.ValveType = revitValve.ValveType; |
| | | valve.ValveSetting = revitValve.ValveSetting; |
| | | valve.ScenePropValueList = revitValve.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | hydro.Valves.Add(valve); |
| | | } |
| | | } |
| | | |
| | | //管道 |
| | | if (revitModel.Pipes != null && revitModel.Pipes.Count > 0) |
| | | { |
| | | if (hydro.Pipes == null) |
| | | { |
| | | hydro.Pipes = new List<HydroPipeInfo>(); |
| | | } |
| | | foreach (var revitPipe in revitModel.Pipes) |
| | | { |
| | | var pipe = new Yw.Model.HydroPipeInfo(); |
| | | pipe.Catalog = Yw.Hydro.ParterCatalog.Pipe; |
| | | pipe.Name = revitPipe.Name; |
| | | pipe.Code = revitPipe.Code; |
| | | pipe.ModelType = revitPipe.ModelType; |
| | | pipe.Flags = revitPipe.Flags; |
| | | pipe.Description = revitPipe.Description; |
| | | pipe.StartCode = revitPipe.StartCode; |
| | | pipe.EndCode = revitPipe.EndCode; |
| | | pipe.LinkStatus = revitPipe.LinkStatus; |
| | | pipe.Material = revitPipe.Material; |
| | | pipe.Diameter = revitPipe.Diameter; |
| | | pipe.Length = revitPipe.Length; |
| | | pipe.Roughness = revitPipe.Roughness; |
| | | pipe.MinorLoss = revitPipe.MinorLoss; |
| | | pipe.ScenePropValueList = revitPipe.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | var pipe = FromRevit(revitPipe); |
| | | hydro.Pipes.Add(pipe); |
| | | } |
| | | } |
| | |
| | | //过渡件 |
| | | if (revitModel.Translations != null && revitModel.Translations.Count > 0) |
| | | { |
| | | if (hydro.Translations == null) |
| | | { |
| | | hydro.Translations = new List<HydroTranslationInfo>(); |
| | | } |
| | | foreach (var revitTranslation in revitModel.Translations) |
| | | { |
| | | var translation = new Yw.Model.HydroTranslationInfo(); |
| | | translation.Catalog = Yw.Hydro.ParterCatalog.Translation; |
| | | translation.Name = revitTranslation.Name; |
| | | translation.Code = revitTranslation.Code; |
| | | translation.ModelType = revitTranslation.ModelType; |
| | | translation.Flags = revitTranslation.Flags; |
| | | translation.Description = revitTranslation.Description; |
| | | translation.StartCode = revitTranslation.StartCode; |
| | | translation.EndCode = revitTranslation.EndCode; |
| | | translation.LinkStatus = revitTranslation.LinkStatus; |
| | | translation.Diameter = revitTranslation.Diameter; |
| | | translation.Length = revitTranslation.Length; |
| | | translation.Material = revitTranslation.Material; |
| | | translation.Roughness = revitTranslation.Roughness; |
| | | translation.MinorLoss = revitTranslation.MinorLoss; |
| | | translation.ScenePropValueList = revitTranslation.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | var translation = FromRevit(revitTranslation); |
| | | hydro.Translations.Add(translation); |
| | | } |
| | | } |
| | |
| | | //换热器 |
| | | if (revitModel.Exchangers != null && revitModel.Exchangers.Count > 0) |
| | | { |
| | | if (hydro.Exchangers == null) |
| | | { |
| | | hydro.Exchangers = new List<HydroExchangerInfo>(); |
| | | } |
| | | foreach (var revitExchanger in revitModel.Exchangers) |
| | | { |
| | | var exchanger = new Yw.Model.HydroExchangerInfo(); |
| | | exchanger.Catalog = Yw.Hydro.ParterCatalog.Exchanger; |
| | | exchanger.Name = revitExchanger.Name; |
| | | exchanger.Code = revitExchanger.Code; |
| | | exchanger.ModelType = revitExchanger.ModelType; |
| | | exchanger.Flags = revitExchanger.Flags; |
| | | exchanger.Description = revitExchanger.Description; |
| | | exchanger.StartCode = revitExchanger.StartCode; |
| | | exchanger.EndCode = revitExchanger.EndCode; |
| | | exchanger.LinkStatus = revitExchanger.LinkStatus; |
| | | exchanger.Diameter = revitExchanger.Diameter; |
| | | exchanger.Length = revitExchanger.Length; |
| | | exchanger.Material = revitExchanger.Material; |
| | | exchanger.Roughness = revitExchanger.Roughness; |
| | | exchanger.MinorLoss = revitExchanger.MinorLoss; |
| | | exchanger.ScenePropValueList = revitExchanger.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | var exchanger = FromRevit(revitExchanger); |
| | | hydro.Exchangers.Add(exchanger); |
| | | } |
| | | } |
| | | |
| | | //水泵 |
| | | if (revitModel.Pumps != null && revitModel.Pumps.Count > 0) |
| | | { |
| | | if (hydro.Pumps == null) |
| | | { |
| | | hydro.Pumps = new List<HydroPumpInfo>(); |
| | | } |
| | | foreach (var revitPump in revitModel.Pumps) |
| | | { |
| | | var pump = FromRevit(revitPump); |
| | | hydro.Pumps.Add(pump); |
| | | } |
| | | } |
| | | |
| | | |
| | | //阀门 |
| | | if (revitModel.Valves != null && revitModel.Valves.Count > 0) |
| | | { |
| | | if (hydro.Valves == null) |
| | | { |
| | | hydro.Valves = new List<HydroValveInfo>(); |
| | | } |
| | | foreach (var revitValve in revitModel.Valves) |
| | | { |
| | | var valve = FromRevit(revitValve); |
| | | hydro.Valves.Add(valve); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | return hydro; |
| | | } |
| | | |
| | | //水库 |
| | | private static Yw.Model.HydroReservoirInfo FromRevit(HStation.Model.RevitReservoir revitReservoir) |
| | | { |
| | | if (revitReservoir == null) |
| | | { |
| | | return default; |
| | | } |
| | | var reservoir = new Yw.Model.HydroReservoirInfo(); |
| | | reservoir.Catalog = Yw.Hydro.ParterCatalog.Reservoir; |
| | | reservoir.Name = revitReservoir.Name; |
| | | reservoir.UpdatePropStatus(nameof(reservoir.Name), revitReservoir, nameof(revitReservoir.Name)); |
| | | reservoir.Code = revitReservoir.Code; |
| | | reservoir.UpdatePropStatus(nameof(reservoir.Code), revitReservoir, nameof(revitReservoir.Code)); |
| | | reservoir.ModelType = revitReservoir.ModelType; |
| | | reservoir.UpdatePropStatus(nameof(reservoir.ModelType), revitReservoir, nameof(revitReservoir.ModelType)); |
| | | reservoir.Flags = revitReservoir.Flags; |
| | | reservoir.UpdatePropStatus(nameof(reservoir.Flags), revitReservoir, nameof(revitReservoir.Flags)); |
| | | reservoir.Description = revitReservoir.Description; |
| | | reservoir.UpdatePropStatus(nameof(reservoir.Description), revitReservoir, nameof(revitReservoir.Description)); |
| | | reservoir.Quality = revitReservoir.Quality; |
| | | reservoir.UpdatePropStatus(nameof(reservoir.Quality), revitReservoir, nameof(revitReservoir.Quality)); |
| | | reservoir.PoolElev = revitReservoir.PoolElev; |
| | | reservoir.UpdatePropStatus(nameof(reservoir.PoolElev), revitReservoir, nameof(revitReservoir.PoolElev)); |
| | | reservoir.Head = revitReservoir.Head; |
| | | reservoir.UpdatePropStatus(nameof(reservoir.Head), revitReservoir, nameof(revitReservoir.Head)); |
| | | reservoir.HeadPattern = revitReservoir.HeadPattern; |
| | | reservoir.UpdatePropStatus(nameof(reservoir.HeadPattern), revitReservoir, nameof(revitReservoir.HeadPattern)); |
| | | reservoir.Position2d = new Yw.Model.Hydro.Position2d(revitReservoir.Position.X, revitReservoir.Position.Y); |
| | | reservoir.UpdatePropStatus(nameof(reservoir.Position2d), revitReservoir, nameof(revitReservoir.Position)); |
| | | reservoir.Position3d = new Yw.Model.Hydro.Position3d(revitReservoir.Position.X, revitReservoir.Position.Y, revitReservoir.Position.Z); |
| | | reservoir.UpdatePropStatus(nameof(reservoir.Position3d), revitReservoir, nameof(revitReservoir.Position)); |
| | | reservoir.ScenePropValueList = revitReservoir.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | return reservoir; |
| | | } |
| | | |
| | | //水池 |
| | | private static Yw.Model.HydroTankInfo FromRevit(HStation.Model.RevitTank revitTank) |
| | | { |
| | | if (revitTank == null) |
| | | { |
| | | return default; |
| | | } |
| | | var tank = new Yw.Model.HydroTankInfo(); |
| | | tank.Catalog = Yw.Hydro.ParterCatalog.Tank; |
| | | tank.Name = revitTank.Name; |
| | | tank.UpdatePropStatus(nameof(tank.Name), revitTank, nameof(revitTank.Name)); |
| | | tank.Code = revitTank.Code; |
| | | tank.UpdatePropStatus(nameof(tank.Code), revitTank, nameof(revitTank.Code)); |
| | | tank.ModelType = revitTank.ModelType; |
| | | tank.UpdatePropStatus(nameof(tank.ModelType), revitTank, nameof(revitTank.ModelType)); |
| | | tank.Flags = revitTank.Flags; |
| | | tank.UpdatePropStatus(nameof(tank.Flags), revitTank, nameof(revitTank.Flags)); |
| | | tank.Description = revitTank.Description; |
| | | tank.UpdatePropStatus(nameof(tank.Description), revitTank, nameof(revitTank.Description)); |
| | | tank.Quality = revitTank.Quality; |
| | | tank.UpdatePropStatus(nameof(tank.Quality), revitTank, nameof(revitTank.Quality)); |
| | | tank.PoolElev = revitTank.PoolElev; |
| | | tank.UpdatePropStatus(nameof(tank.PoolElev), revitTank, nameof(revitTank.PoolElev)); |
| | | tank.InitLevel = revitTank.InitLevel; |
| | | tank.UpdatePropStatus(nameof(tank.InitLevel), revitTank, nameof(revitTank.InitLevel)); |
| | | tank.MinLevel = revitTank.MinLevel; |
| | | tank.UpdatePropStatus(nameof(tank.MinLevel), revitTank, nameof(revitTank.MinLevel)); |
| | | tank.MaxLevel = revitTank.MaxLevel; |
| | | tank.UpdatePropStatus(nameof(tank.MaxLevel), revitTank, nameof(revitTank.MaxLevel)); |
| | | tank.DN = revitTank.DN; |
| | | tank.UpdatePropStatus(nameof(tank.DN), revitTank, nameof(revitTank.DN)); |
| | | tank.MinVol = revitTank.MinVol; |
| | | tank.UpdatePropStatus(nameof(tank.MinVol), revitTank, nameof(revitTank.MinVol)); |
| | | tank.VolCurve = revitTank.VolCurve; |
| | | tank.UpdatePropStatus(nameof(tank.VolCurve), revitTank, nameof(revitTank.VolCurve)); |
| | | tank.Position2d = new Yw.Model.Hydro.Position2d(revitTank.Position.X, revitTank.Position.Y); |
| | | tank.UpdatePropStatus(nameof(tank.Position2d), revitTank, nameof(revitTank.Position)); |
| | | tank.Position3d = new Yw.Model.Hydro.Position3d(revitTank.Position.X, revitTank.Position.Y, revitTank.Position.Z); |
| | | tank.UpdatePropStatus(nameof(tank.Position3d), revitTank, nameof(revitTank.Position)); |
| | | tank.ScenePropValueList = revitTank.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | return tank; |
| | | } |
| | | |
| | | //水池 |
| | | private static Yw.Model.HydroWaterboxInfo FromRevit(HStation.Model.RevitWaterbox revitWaterbox) |
| | | { |
| | | if (revitWaterbox == null) |
| | | { |
| | | return default; |
| | | } |
| | | var waterbox = new Yw.Model.HydroWaterboxInfo(); |
| | | waterbox.Catalog = Yw.Hydro.ParterCatalog.Waterbox; |
| | | waterbox.Name = revitWaterbox.Name; |
| | | waterbox.UpdatePropStatus(nameof(waterbox.Name), revitWaterbox, nameof(revitWaterbox.Name)); |
| | | waterbox.Code = revitWaterbox.Code; |
| | | waterbox.UpdatePropStatus(nameof(waterbox.Code), revitWaterbox, nameof(revitWaterbox.Code)); |
| | | waterbox.ModelType = revitWaterbox.ModelType; |
| | | waterbox.UpdatePropStatus(nameof(waterbox.ModelType), revitWaterbox, nameof(revitWaterbox.ModelType)); |
| | | waterbox.Flags = revitWaterbox.Flags; |
| | | waterbox.UpdatePropStatus(nameof(waterbox.Flags), revitWaterbox, nameof(revitWaterbox.Flags)); |
| | | waterbox.Description = revitWaterbox.Description; |
| | | waterbox.UpdatePropStatus(nameof(waterbox.Description), revitWaterbox, nameof(revitWaterbox.Description)); |
| | | waterbox.Quality = revitWaterbox.Quality; |
| | | waterbox.UpdatePropStatus(nameof(waterbox.Quality), revitWaterbox, nameof(revitWaterbox.Quality)); |
| | | waterbox.PoolElev = revitWaterbox.PoolElev; |
| | | waterbox.UpdatePropStatus(nameof(waterbox.PoolElev), revitWaterbox, nameof(revitWaterbox.PoolElev)); |
| | | waterbox.InitLevel = revitWaterbox.InitLevel; |
| | | waterbox.UpdatePropStatus(nameof(waterbox.InitLevel), revitWaterbox, nameof(revitWaterbox.InitLevel)); |
| | | waterbox.MinLevel = revitWaterbox.MinLevel; |
| | | waterbox.UpdatePropStatus(nameof(waterbox.MinLevel), revitWaterbox, nameof(revitWaterbox.MinLevel)); |
| | | waterbox.MaxLevel = revitWaterbox.MaxLevel; |
| | | waterbox.UpdatePropStatus(nameof(waterbox.MaxLevel), revitWaterbox, nameof(revitWaterbox.MaxLevel)); |
| | | waterbox.DN = revitWaterbox.DN; |
| | | waterbox.UpdatePropStatus(nameof(waterbox.DN), revitWaterbox, nameof(revitWaterbox.DN)); |
| | | waterbox.MinVol = revitWaterbox.MinVol; |
| | | waterbox.UpdatePropStatus(nameof(waterbox.MinVol), revitWaterbox, nameof(revitWaterbox.MinVol)); |
| | | waterbox.VolCurve = revitWaterbox.VolCurve; |
| | | waterbox.UpdatePropStatus(nameof(waterbox.VolCurve), revitWaterbox, nameof(revitWaterbox.VolCurve)); |
| | | waterbox.Position2d = new Yw.Model.Hydro.Position2d(revitWaterbox.Position.X, revitWaterbox.Position.Y); |
| | | waterbox.UpdatePropStatus(nameof(waterbox.Position2d), revitWaterbox, nameof(revitWaterbox.Position)); |
| | | waterbox.Position3d = new Yw.Model.Hydro.Position3d(revitWaterbox.Position.X, revitWaterbox.Position.Y, revitWaterbox.Position.Z); |
| | | waterbox.UpdatePropStatus(nameof(waterbox.Position3d), revitWaterbox, nameof(revitWaterbox.Position)); |
| | | waterbox.ScenePropValueList = revitWaterbox.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | return waterbox; |
| | | } |
| | | |
| | | //连接节点 |
| | | private static Yw.Model.HydroJunctionInfo FromRevit(HStation.Model.RevitJunction revitJunction) |
| | | { |
| | | if (revitJunction == null) |
| | | { |
| | | return default; |
| | | } |
| | | var junction = new Yw.Model.HydroJunctionInfo(); |
| | | junction.Catalog = Yw.Hydro.ParterCatalog.Junction; |
| | | junction.Name = revitJunction.Name; |
| | | junction.UpdatePropStatus(nameof(junction.Name), revitJunction, nameof(revitJunction.Name)); |
| | | junction.Code = revitJunction.Code; |
| | | junction.UpdatePropStatus(nameof(junction.Code), revitJunction, nameof(revitJunction.Code)); |
| | | junction.ModelType = revitJunction.ModelType; |
| | | junction.UpdatePropStatus(nameof(junction.ModelType), revitJunction, nameof(revitJunction.ModelType)); |
| | | junction.Flags = revitJunction.Flags; |
| | | junction.UpdatePropStatus(nameof(junction.Flags), revitJunction, nameof(revitJunction.Flags)); |
| | | junction.Description = revitJunction.Description; |
| | | junction.UpdatePropStatus(nameof(junction.Description), revitJunction, nameof(revitJunction.Description)); |
| | | junction.Quality = revitJunction.Quality; |
| | | junction.UpdatePropStatus(nameof(junction.Quality), revitJunction, nameof(revitJunction.Quality)); |
| | | junction.Elev = revitJunction.Elev; |
| | | junction.UpdatePropStatus(nameof(junction.Elev), revitJunction, nameof(revitJunction.Elev)); |
| | | junction.MinorLoss = revitJunction.MinorLoss; |
| | | junction.UpdatePropStatus(nameof(junction.MinorLoss), revitJunction, nameof(revitJunction.MinorLoss)); |
| | | junction.Demand = revitJunction.Demand; |
| | | junction.UpdatePropStatus(nameof(junction.Demand), revitJunction, nameof(revitJunction.Demand)); |
| | | junction.DemandPattern = revitJunction.DemandPattern; |
| | | junction.UpdatePropStatus(nameof(junction.DemandPattern), revitJunction, nameof(revitJunction.DemandPattern)); |
| | | junction.Position2d = new Yw.Model.Hydro.Position2d(revitJunction.Position.X, revitJunction.Position.Y); |
| | | junction.UpdatePropStatus(nameof(junction.Position2d), revitJunction, nameof(revitJunction.Position)); |
| | | junction.Position3d = new Yw.Model.Hydro.Position3d(revitJunction.Position.X, revitJunction.Position.Y, revitJunction.Position.Z); |
| | | junction.UpdatePropStatus(nameof(junction.Position3d), revitJunction, nameof(revitJunction.Position)); |
| | | junction.ScenePropValueList = revitJunction.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | return junction; |
| | | } |
| | | |
| | | //闷头 |
| | | private static Yw.Model.HydroBluntheadInfo FromRevit(HStation.Model.RevitBlunthead revitBlunthead) |
| | | { |
| | | if (revitBlunthead == null) |
| | | { |
| | | return default; |
| | | } |
| | | var blunthead = new Yw.Model.HydroBluntheadInfo(); |
| | | blunthead.Catalog = Yw.Hydro.ParterCatalog.Blunthead; |
| | | blunthead.Name = revitBlunthead.Name; |
| | | blunthead.UpdatePropStatus(nameof(blunthead.Name), revitBlunthead, nameof(revitBlunthead.Name)); |
| | | blunthead.Code = revitBlunthead.Code; |
| | | blunthead.UpdatePropStatus(nameof(blunthead.Code), revitBlunthead, nameof(revitBlunthead.Code)); |
| | | blunthead.ModelType = revitBlunthead.ModelType; |
| | | blunthead.UpdatePropStatus(nameof(blunthead.ModelType), revitBlunthead, nameof(revitBlunthead.ModelType)); |
| | | blunthead.Flags = revitBlunthead.Flags; |
| | | blunthead.UpdatePropStatus(nameof(blunthead.Flags), revitBlunthead, nameof(revitBlunthead.Flags)); |
| | | blunthead.Description = revitBlunthead.Description; |
| | | blunthead.UpdatePropStatus(nameof(blunthead.Description), revitBlunthead, nameof(revitBlunthead.Description)); |
| | | blunthead.Quality = revitBlunthead.Quality; |
| | | blunthead.UpdatePropStatus(nameof(blunthead.Quality), revitBlunthead, nameof(revitBlunthead.Quality)); |
| | | blunthead.Elev = revitBlunthead.Elev; |
| | | blunthead.UpdatePropStatus(nameof(blunthead.Elev), revitBlunthead, nameof(revitBlunthead.Elev)); |
| | | blunthead.MinorLoss = revitBlunthead.MinorLoss; |
| | | blunthead.UpdatePropStatus(nameof(blunthead.MinorLoss), revitBlunthead, nameof(revitBlunthead.MinorLoss)); |
| | | blunthead.Demand = revitBlunthead.Demand; |
| | | blunthead.UpdatePropStatus(nameof(blunthead.Demand), revitBlunthead, nameof(revitBlunthead.Demand)); |
| | | blunthead.DemandPattern = revitBlunthead.DemandPattern; |
| | | blunthead.UpdatePropStatus(nameof(blunthead.DemandPattern), revitBlunthead, nameof(revitBlunthead.DemandPattern)); |
| | | blunthead.Position2d = new Yw.Model.Hydro.Position2d(revitBlunthead.Position.X, revitBlunthead.Position.Y); |
| | | blunthead.UpdatePropStatus(nameof(blunthead.Position2d), revitBlunthead, nameof(revitBlunthead.Position)); |
| | | blunthead.Position3d = new Yw.Model.Hydro.Position3d(revitBlunthead.Position.X, revitBlunthead.Position.Y, revitBlunthead.Position.Z); |
| | | blunthead.UpdatePropStatus(nameof(blunthead.Position3d), revitBlunthead, nameof(revitBlunthead.Position)); |
| | | blunthead.Material = revitBlunthead.Material; |
| | | blunthead.UpdatePropStatus(nameof(blunthead.Material), revitBlunthead, nameof(revitBlunthead.Material)); |
| | | blunthead.Caliber = revitBlunthead.Caliber; |
| | | blunthead.UpdatePropStatus(nameof(blunthead.Caliber), revitBlunthead, nameof(revitBlunthead.Caliber)); |
| | | blunthead.ScenePropValueList = revitBlunthead.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | return blunthead; |
| | | } |
| | | |
| | | //弯头 |
| | | private static Yw.Model.HydroElbowInfo FromRevit(HStation.Model.RevitElbow revitElbow) |
| | | { |
| | | if (revitElbow == null) |
| | | { |
| | | return default; |
| | | } |
| | | var elbow = new Yw.Model.HydroElbowInfo(); |
| | | elbow.Catalog = Yw.Hydro.ParterCatalog.Elbow; |
| | | elbow.Name = revitElbow.Name; |
| | | elbow.UpdatePropStatus(nameof(elbow.Name), revitElbow, nameof(revitElbow.Name)); |
| | | elbow.Code = revitElbow.Code; |
| | | elbow.UpdatePropStatus(nameof(elbow.Code), revitElbow, nameof(revitElbow.Code)); |
| | | elbow.ModelType = revitElbow.ModelType; |
| | | elbow.UpdatePropStatus(nameof(elbow.ModelType), revitElbow, nameof(revitElbow.ModelType)); |
| | | elbow.Flags = revitElbow.Flags; |
| | | elbow.UpdatePropStatus(nameof(elbow.Flags), revitElbow, nameof(revitElbow.Flags)); |
| | | elbow.Description = revitElbow.Description; |
| | | elbow.UpdatePropStatus(nameof(elbow.Description), revitElbow, nameof(revitElbow.Description)); |
| | | elbow.Quality = revitElbow.Quality; |
| | | elbow.UpdatePropStatus(nameof(elbow.Quality), revitElbow, nameof(revitElbow.Quality)); |
| | | elbow.Elev = revitElbow.Elev; |
| | | elbow.UpdatePropStatus(nameof(elbow.Elev), revitElbow, nameof(revitElbow.Elev)); |
| | | elbow.MinorLoss = revitElbow.MinorLoss; |
| | | elbow.UpdatePropStatus(nameof(elbow.MinorLoss), revitElbow, nameof(revitElbow.MinorLoss)); |
| | | elbow.Demand = revitElbow.Demand; |
| | | elbow.UpdatePropStatus(nameof(elbow.Demand), revitElbow, nameof(revitElbow.Demand)); |
| | | elbow.DemandPattern = revitElbow.DemandPattern; |
| | | elbow.UpdatePropStatus(nameof(elbow.DemandPattern), revitElbow, nameof(revitElbow.DemandPattern)); |
| | | elbow.Position2d = new Yw.Model.Hydro.Position2d(revitElbow.Position.X, revitElbow.Position.Y); |
| | | elbow.UpdatePropStatus(nameof(elbow.Position2d), revitElbow, nameof(revitElbow.Position)); |
| | | elbow.Position3d = new Yw.Model.Hydro.Position3d(revitElbow.Position.X, revitElbow.Position.Y, revitElbow.Position.Z); |
| | | elbow.UpdatePropStatus(nameof(elbow.Position3d), revitElbow, nameof(revitElbow.Position)); |
| | | elbow.Material = revitElbow.Material; |
| | | elbow.UpdatePropStatus(nameof(elbow.Material), revitElbow, nameof(revitElbow.Material)); |
| | | elbow.Caliber = revitElbow.Caliber; |
| | | elbow.UpdatePropStatus(nameof(elbow.Caliber), revitElbow, nameof(revitElbow.Caliber)); |
| | | elbow.ScenePropValueList = revitElbow.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | return elbow; |
| | | } |
| | | |
| | | //三通 |
| | | private static Yw.Model.HydroThreelinkInfo FromRevit(HStation.Model.RevitThreelink revitThreelink) |
| | | { |
| | | if (revitThreelink == null) |
| | | { |
| | | return default; |
| | | } |
| | | var threelink = new Yw.Model.HydroThreelinkInfo(); |
| | | threelink.Catalog = Yw.Hydro.ParterCatalog.Threelink; |
| | | threelink.Name = revitThreelink.Name; |
| | | threelink.UpdatePropStatus(nameof(threelink.Name), revitThreelink, nameof(revitThreelink.Name)); |
| | | threelink.Code = revitThreelink.Code; |
| | | threelink.UpdatePropStatus(nameof(threelink.Code), revitThreelink, nameof(revitThreelink.Code)); |
| | | threelink.ModelType = revitThreelink.ModelType; |
| | | threelink.UpdatePropStatus(nameof(threelink.ModelType), revitThreelink, nameof(revitThreelink.ModelType)); |
| | | threelink.Flags = revitThreelink.Flags; |
| | | threelink.UpdatePropStatus(nameof(threelink.Flags), revitThreelink, nameof(revitThreelink.Flags)); |
| | | threelink.Description = revitThreelink.Description; |
| | | threelink.UpdatePropStatus(nameof(threelink.Description), revitThreelink, nameof(revitThreelink.Description)); |
| | | threelink.Quality = revitThreelink.Quality; |
| | | threelink.UpdatePropStatus(nameof(threelink.Quality), revitThreelink, nameof(revitThreelink.Quality)); |
| | | threelink.Elev = revitThreelink.Elev; |
| | | threelink.UpdatePropStatus(nameof(threelink.Elev), revitThreelink, nameof(revitThreelink.Elev)); |
| | | threelink.MinorLoss = revitThreelink.MinorLoss; |
| | | threelink.UpdatePropStatus(nameof(threelink.MinorLoss), revitThreelink, nameof(revitThreelink.MinorLoss)); |
| | | threelink.Demand = revitThreelink.Demand; |
| | | threelink.UpdatePropStatus(nameof(threelink.Demand), revitThreelink, nameof(revitThreelink.Demand)); |
| | | threelink.DemandPattern = revitThreelink.DemandPattern; |
| | | threelink.UpdatePropStatus(nameof(threelink.DemandPattern), revitThreelink, nameof(revitThreelink.DemandPattern)); |
| | | threelink.Position2d = new Yw.Model.Hydro.Position2d(revitThreelink.Position.X, revitThreelink.Position.Y); |
| | | threelink.UpdatePropStatus(nameof(threelink.Position2d), revitThreelink, nameof(revitThreelink.Position)); |
| | | threelink.Position3d = new Yw.Model.Hydro.Position3d(revitThreelink.Position.X, revitThreelink.Position.Y, revitThreelink.Position.Z); |
| | | threelink.UpdatePropStatus(nameof(threelink.Position3d), revitThreelink, nameof(revitThreelink.Position)); |
| | | threelink.Material = revitThreelink.Material; |
| | | threelink.UpdatePropStatus(nameof(threelink.Material), revitThreelink, nameof(revitThreelink.Material)); |
| | | threelink.Caliber = revitThreelink.Caliber; |
| | | threelink.UpdatePropStatus(nameof(threelink.Caliber), revitThreelink, nameof(revitThreelink.Caliber)); |
| | | threelink.ScenePropValueList = revitThreelink.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | return threelink; |
| | | } |
| | | |
| | | //四通 |
| | | private static Yw.Model.HydroFourlinkInfo FromRevit(HStation.Model.RevitFourlink revitFourlink) |
| | | { |
| | | if (revitFourlink == null) |
| | | { |
| | | return default; |
| | | } |
| | | var fourlink = new Yw.Model.HydroFourlinkInfo(); |
| | | fourlink.Catalog = Yw.Hydro.ParterCatalog.Fourlink; |
| | | fourlink.Name = revitFourlink.Name; |
| | | fourlink.UpdatePropStatus(nameof(fourlink.Name), revitFourlink, nameof(revitFourlink.Name)); |
| | | fourlink.Code = revitFourlink.Code; |
| | | fourlink.UpdatePropStatus(nameof(fourlink.Code), revitFourlink, nameof(revitFourlink.Code)); |
| | | fourlink.ModelType = revitFourlink.ModelType; |
| | | fourlink.UpdatePropStatus(nameof(fourlink.ModelType), revitFourlink, nameof(revitFourlink.ModelType)); |
| | | fourlink.Flags = revitFourlink.Flags; |
| | | fourlink.UpdatePropStatus(nameof(fourlink.Flags), revitFourlink, nameof(revitFourlink.Flags)); |
| | | fourlink.Description = revitFourlink.Description; |
| | | fourlink.UpdatePropStatus(nameof(fourlink.Description), revitFourlink, nameof(revitFourlink.Description)); |
| | | fourlink.Quality = revitFourlink.Quality; |
| | | fourlink.UpdatePropStatus(nameof(fourlink.Quality), revitFourlink, nameof(revitFourlink.Quality)); |
| | | fourlink.Elev = revitFourlink.Elev; |
| | | fourlink.UpdatePropStatus(nameof(fourlink.Elev), revitFourlink, nameof(revitFourlink.Elev)); |
| | | fourlink.MinorLoss = revitFourlink.MinorLoss; |
| | | fourlink.UpdatePropStatus(nameof(fourlink.MinorLoss), revitFourlink, nameof(revitFourlink.MinorLoss)); |
| | | fourlink.Demand = revitFourlink.Demand; |
| | | fourlink.UpdatePropStatus(nameof(fourlink.Demand), revitFourlink, nameof(revitFourlink.Demand)); |
| | | fourlink.DemandPattern = revitFourlink.DemandPattern; |
| | | fourlink.UpdatePropStatus(nameof(fourlink.DemandPattern), revitFourlink, nameof(revitFourlink.DemandPattern)); |
| | | fourlink.Position2d = new Yw.Model.Hydro.Position2d(revitFourlink.Position.X, revitFourlink.Position.Y); |
| | | fourlink.UpdatePropStatus(nameof(fourlink.Position2d), revitFourlink, nameof(revitFourlink.Position)); |
| | | fourlink.Position3d = new Yw.Model.Hydro.Position3d(revitFourlink.Position.X, revitFourlink.Position.Y, revitFourlink.Position.Z); |
| | | fourlink.UpdatePropStatus(nameof(fourlink.Position3d), revitFourlink, nameof(revitFourlink.Position)); |
| | | fourlink.Material = revitFourlink.Material; |
| | | fourlink.UpdatePropStatus(nameof(fourlink.Material), revitFourlink, nameof(revitFourlink.Material)); |
| | | fourlink.Caliber = revitFourlink.Caliber; |
| | | fourlink.UpdatePropStatus(nameof(fourlink.Caliber), revitFourlink, nameof(revitFourlink.Caliber)); |
| | | fourlink.ScenePropValueList = revitFourlink.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | return fourlink; |
| | | } |
| | | |
| | | //消火栓 |
| | | private static Yw.Model.HydroHydrantInfo FromRevit(HStation.Model.RevitHydrant revitHydrant) |
| | | { |
| | | if (revitHydrant == null) |
| | | { |
| | | return default; |
| | | } |
| | | var hydrant = new Yw.Model.HydroHydrantInfo(); |
| | | hydrant.Catalog = Yw.Hydro.ParterCatalog.Hydrant; |
| | | hydrant.Name = revitHydrant.Name; |
| | | hydrant.UpdatePropStatus(nameof(hydrant.Name), revitHydrant, nameof(revitHydrant.Name)); |
| | | hydrant.Code = revitHydrant.Code; |
| | | hydrant.UpdatePropStatus(nameof(hydrant.Code), revitHydrant, nameof(revitHydrant.Code)); |
| | | hydrant.ModelType = revitHydrant.ModelType; |
| | | hydrant.UpdatePropStatus(nameof(hydrant.ModelType), revitHydrant, nameof(revitHydrant.ModelType)); |
| | | hydrant.Flags = revitHydrant.Flags; |
| | | hydrant.UpdatePropStatus(nameof(hydrant.Flags), revitHydrant, nameof(revitHydrant.Flags)); |
| | | hydrant.Description = revitHydrant.Description; |
| | | hydrant.UpdatePropStatus(nameof(hydrant.Description), revitHydrant, nameof(revitHydrant.Description)); |
| | | hydrant.Quality = revitHydrant.Quality; |
| | | hydrant.UpdatePropStatus(nameof(hydrant.Quality), revitHydrant, nameof(revitHydrant.Quality)); |
| | | hydrant.Elev = revitHydrant.Elev; |
| | | hydrant.UpdatePropStatus(nameof(hydrant.Elev), revitHydrant, nameof(revitHydrant.Elev)); |
| | | hydrant.MinorLoss = revitHydrant.MinorLoss; |
| | | hydrant.UpdatePropStatus(nameof(hydrant.MinorLoss), revitHydrant, nameof(revitHydrant.MinorLoss)); |
| | | hydrant.Demand = revitHydrant.Demand; |
| | | hydrant.UpdatePropStatus(nameof(hydrant.Demand), revitHydrant, nameof(revitHydrant.Demand)); |
| | | hydrant.DemandPattern = revitHydrant.DemandPattern; |
| | | hydrant.UpdatePropStatus(nameof(hydrant.DemandPattern), revitHydrant, nameof(revitHydrant.DemandPattern)); |
| | | hydrant.Position2d = new Yw.Model.Hydro.Position2d(revitHydrant.Position.X, revitHydrant.Position.Y); |
| | | hydrant.UpdatePropStatus(nameof(hydrant.Position2d), revitHydrant, nameof(revitHydrant.Position)); |
| | | hydrant.Position3d = new Yw.Model.Hydro.Position3d(revitHydrant.Position.X, revitHydrant.Position.Y, revitHydrant.Position.Z); |
| | | hydrant.UpdatePropStatus(nameof(hydrant.Position3d), revitHydrant, nameof(revitHydrant.Position)); |
| | | hydrant.Coefficient = revitHydrant.Coefficient; |
| | | hydrant.UpdatePropStatus(nameof(hydrant.Coefficient), revitHydrant, nameof(revitHydrant.Coefficient)); |
| | | hydrant.ScenePropValueList = revitHydrant.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | return hydrant; |
| | | } |
| | | |
| | | //喷嘴 |
| | | private static Yw.Model.HydroNozzleInfo FromRevit(HStation.Model.RevitNozzle revitNozzle) |
| | | { |
| | | if (revitNozzle == null) |
| | | { |
| | | return default; |
| | | } |
| | | var nozzle = new Yw.Model.HydroNozzleInfo(); |
| | | nozzle.Catalog = Yw.Hydro.ParterCatalog.Nozzle; |
| | | nozzle.Name = revitNozzle.Name; |
| | | nozzle.UpdatePropStatus(nameof(nozzle.Name), revitNozzle, nameof(revitNozzle.Name)); |
| | | nozzle.Code = revitNozzle.Code; |
| | | nozzle.UpdatePropStatus(nameof(nozzle.Code), revitNozzle, nameof(revitNozzle.Code)); |
| | | nozzle.ModelType = revitNozzle.ModelType; |
| | | nozzle.UpdatePropStatus(nameof(nozzle.ModelType), revitNozzle, nameof(revitNozzle.ModelType)); |
| | | nozzle.Flags = revitNozzle.Flags; |
| | | nozzle.UpdatePropStatus(nameof(nozzle.Flags), revitNozzle, nameof(revitNozzle.Flags)); |
| | | nozzle.Description = revitNozzle.Description; |
| | | nozzle.UpdatePropStatus(nameof(nozzle.Description), revitNozzle, nameof(revitNozzle.Description)); |
| | | nozzle.Quality = revitNozzle.Quality; |
| | | nozzle.UpdatePropStatus(nameof(nozzle.Quality), revitNozzle, nameof(revitNozzle.Quality)); |
| | | nozzle.Elev = revitNozzle.Elev; |
| | | nozzle.UpdatePropStatus(nameof(nozzle.Elev), revitNozzle, nameof(revitNozzle.Elev)); |
| | | nozzle.MinorLoss = revitNozzle.MinorLoss; |
| | | nozzle.UpdatePropStatus(nameof(nozzle.MinorLoss), revitNozzle, nameof(revitNozzle.MinorLoss)); |
| | | nozzle.Demand = revitNozzle.Demand; |
| | | nozzle.UpdatePropStatus(nameof(nozzle.Demand), revitNozzle, nameof(revitNozzle.Demand)); |
| | | nozzle.DemandPattern = revitNozzle.DemandPattern; |
| | | nozzle.UpdatePropStatus(nameof(nozzle.DemandPattern), revitNozzle, nameof(revitNozzle.DemandPattern)); |
| | | nozzle.Position2d = new Yw.Model.Hydro.Position2d(revitNozzle.Position.X, revitNozzle.Position.Y); |
| | | nozzle.UpdatePropStatus(nameof(nozzle.Position2d), revitNozzle, nameof(revitNozzle.Position)); |
| | | nozzle.Position3d = new Yw.Model.Hydro.Position3d(revitNozzle.Position.X, revitNozzle.Position.Y, revitNozzle.Position.Z); |
| | | nozzle.UpdatePropStatus(nameof(nozzle.Position3d), revitNozzle, nameof(revitNozzle.Position)); |
| | | nozzle.Coefficient = revitNozzle.Coefficient; |
| | | nozzle.UpdatePropStatus(nameof(nozzle.Coefficient), revitNozzle, nameof(revitNozzle.Coefficient)); |
| | | nozzle.ScenePropValueList = revitNozzle.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | return nozzle; |
| | | } |
| | | |
| | | //水表 |
| | | private static Yw.Model.HydroMeterInfo FromRevit(HStation.Model.RevitMeter revitMeter) |
| | | { |
| | | if (revitMeter == null) |
| | | { |
| | | return default; |
| | | } |
| | | var meter = new Yw.Model.HydroMeterInfo(); |
| | | meter.Catalog = Yw.Hydro.ParterCatalog.Meter; |
| | | meter.Name = revitMeter.Name; |
| | | meter.UpdatePropStatus(nameof(meter.Name), revitMeter, nameof(revitMeter.Name)); |
| | | meter.Code = revitMeter.Code; |
| | | meter.UpdatePropStatus(nameof(meter.Code), revitMeter, nameof(revitMeter.Code)); |
| | | meter.ModelType = revitMeter.ModelType; |
| | | meter.UpdatePropStatus(nameof(meter.ModelType), revitMeter, nameof(revitMeter.ModelType)); |
| | | meter.Flags = revitMeter.Flags; |
| | | meter.UpdatePropStatus(nameof(meter.Flags), revitMeter, nameof(revitMeter.Flags)); |
| | | meter.Description = revitMeter.Description; |
| | | meter.UpdatePropStatus(nameof(meter.Description), revitMeter, nameof(revitMeter.Description)); |
| | | meter.Quality = revitMeter.Quality; |
| | | meter.UpdatePropStatus(nameof(meter.Quality), revitMeter, nameof(revitMeter.Quality)); |
| | | meter.Elev = revitMeter.Elev; |
| | | meter.UpdatePropStatus(nameof(meter.Elev), revitMeter, nameof(revitMeter.Elev)); |
| | | meter.MinorLoss = revitMeter.MinorLoss; |
| | | meter.UpdatePropStatus(nameof(meter.MinorLoss), revitMeter, nameof(revitMeter.MinorLoss)); |
| | | meter.Demand = revitMeter.Demand; |
| | | meter.UpdatePropStatus(nameof(meter.Demand), revitMeter, nameof(revitMeter.Demand)); |
| | | meter.DemandPattern = revitMeter.DemandPattern; |
| | | meter.UpdatePropStatus(nameof(meter.DemandPattern), revitMeter, nameof(revitMeter.DemandPattern)); |
| | | meter.Position2d = new Yw.Model.Hydro.Position2d(revitMeter.Position.X, revitMeter.Position.Y); |
| | | meter.UpdatePropStatus(nameof(meter.Position2d), revitMeter, nameof(revitMeter.Position)); |
| | | meter.Position3d = new Yw.Model.Hydro.Position3d(revitMeter.Position.X, revitMeter.Position.Y, revitMeter.Position.Z); |
| | | meter.UpdatePropStatus(nameof(meter.Position3d), revitMeter, nameof(revitMeter.Position)); |
| | | meter.ScenePropValueList = revitMeter.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | return meter; |
| | | } |
| | | |
| | | //流量计 |
| | | private static Yw.Model.HydroFlowmeterInfo FromRevit(HStation.Model.RevitFlowmeter revitFlowmeter) |
| | | { |
| | | if (revitFlowmeter == null) |
| | | { |
| | | return default; |
| | | } |
| | | var flowmeter = new Yw.Model.HydroFlowmeterInfo(); |
| | | flowmeter.Catalog = Yw.Hydro.ParterCatalog.Flowmeter; |
| | | flowmeter.Name = revitFlowmeter.Name; |
| | | flowmeter.UpdatePropStatus(nameof(flowmeter.Name), revitFlowmeter, nameof(revitFlowmeter.Name)); |
| | | flowmeter.Code = revitFlowmeter.Code; |
| | | flowmeter.UpdatePropStatus(nameof(flowmeter.Code), revitFlowmeter, nameof(revitFlowmeter.Code)); |
| | | flowmeter.ModelType = revitFlowmeter.ModelType; |
| | | flowmeter.UpdatePropStatus(nameof(flowmeter.ModelType), revitFlowmeter, nameof(revitFlowmeter.ModelType)); |
| | | flowmeter.Flags = revitFlowmeter.Flags; |
| | | flowmeter.UpdatePropStatus(nameof(flowmeter.Flags), revitFlowmeter, nameof(revitFlowmeter.Flags)); |
| | | flowmeter.Description = revitFlowmeter.Description; |
| | | flowmeter.UpdatePropStatus(nameof(flowmeter.Description), revitFlowmeter, nameof(revitFlowmeter.Description)); |
| | | flowmeter.Quality = revitFlowmeter.Quality; |
| | | flowmeter.UpdatePropStatus(nameof(flowmeter.Quality), revitFlowmeter, nameof(revitFlowmeter.Quality)); |
| | | flowmeter.Elev = revitFlowmeter.Elev; |
| | | flowmeter.UpdatePropStatus(nameof(flowmeter.Elev), revitFlowmeter, nameof(revitFlowmeter.Elev)); |
| | | flowmeter.MinorLoss = revitFlowmeter.MinorLoss; |
| | | flowmeter.UpdatePropStatus(nameof(flowmeter.MinorLoss), revitFlowmeter, nameof(revitFlowmeter.MinorLoss)); |
| | | flowmeter.Demand = revitFlowmeter.Demand; |
| | | flowmeter.UpdatePropStatus(nameof(flowmeter.Demand), revitFlowmeter, nameof(revitFlowmeter.Demand)); |
| | | flowmeter.DemandPattern = revitFlowmeter.DemandPattern; |
| | | flowmeter.UpdatePropStatus(nameof(flowmeter.DemandPattern), revitFlowmeter, nameof(revitFlowmeter.DemandPattern)); |
| | | flowmeter.Position2d = new Yw.Model.Hydro.Position2d(revitFlowmeter.Position.X, revitFlowmeter.Position.Y); |
| | | flowmeter.UpdatePropStatus(nameof(flowmeter.Position2d), revitFlowmeter, nameof(revitFlowmeter.Position)); |
| | | flowmeter.Position3d = new Yw.Model.Hydro.Position3d(revitFlowmeter.Position.X, revitFlowmeter.Position.Y, revitFlowmeter.Position.Z); |
| | | flowmeter.UpdatePropStatus(nameof(flowmeter.Position3d), revitFlowmeter, nameof(revitFlowmeter.Position)); |
| | | flowmeter.ScenePropValueList = revitFlowmeter.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | return flowmeter; |
| | | } |
| | | |
| | | //压力表 |
| | | private static Yw.Model.HydroPressmeterInfo FromRevit(HStation.Model.RevitPressmeter revitPressmeter) |
| | | { |
| | | if (revitPressmeter == null) |
| | | { |
| | | return default; |
| | | } |
| | | var pressmeter = new Yw.Model.HydroPressmeterInfo(); |
| | | pressmeter.Catalog = Yw.Hydro.ParterCatalog.Pressmeter; |
| | | pressmeter.Name = revitPressmeter.Name; |
| | | pressmeter.UpdatePropStatus(nameof(pressmeter.Name), revitPressmeter, nameof(revitPressmeter.Name)); |
| | | pressmeter.Code = revitPressmeter.Code; |
| | | pressmeter.UpdatePropStatus(nameof(pressmeter.Code), revitPressmeter, nameof(revitPressmeter.Code)); |
| | | pressmeter.ModelType = revitPressmeter.ModelType; |
| | | pressmeter.UpdatePropStatus(nameof(pressmeter.ModelType), revitPressmeter, nameof(revitPressmeter.ModelType)); |
| | | pressmeter.Flags = revitPressmeter.Flags; |
| | | pressmeter.UpdatePropStatus(nameof(pressmeter.Flags), revitPressmeter, nameof(revitPressmeter.Flags)); |
| | | pressmeter.Description = revitPressmeter.Description; |
| | | pressmeter.UpdatePropStatus(nameof(pressmeter.Description), revitPressmeter, nameof(revitPressmeter.Description)); |
| | | pressmeter.Quality = revitPressmeter.Quality; |
| | | pressmeter.UpdatePropStatus(nameof(pressmeter.Quality), revitPressmeter, nameof(revitPressmeter.Quality)); |
| | | pressmeter.Elev = revitPressmeter.Elev; |
| | | pressmeter.UpdatePropStatus(nameof(pressmeter.Elev), revitPressmeter, nameof(revitPressmeter.Elev)); |
| | | pressmeter.MinorLoss = revitPressmeter.MinorLoss; |
| | | pressmeter.UpdatePropStatus(nameof(pressmeter.MinorLoss), revitPressmeter, nameof(revitPressmeter.MinorLoss)); |
| | | pressmeter.Demand = revitPressmeter.Demand; |
| | | pressmeter.UpdatePropStatus(nameof(pressmeter.Demand), revitPressmeter, nameof(revitPressmeter.Demand)); |
| | | pressmeter.DemandPattern = revitPressmeter.DemandPattern; |
| | | pressmeter.UpdatePropStatus(nameof(pressmeter.DemandPattern), revitPressmeter, nameof(revitPressmeter.DemandPattern)); |
| | | pressmeter.Position2d = new Yw.Model.Hydro.Position2d(revitPressmeter.Position.X, revitPressmeter.Position.Y); |
| | | pressmeter.UpdatePropStatus(nameof(pressmeter.Position2d), revitPressmeter, nameof(revitPressmeter.Position)); |
| | | pressmeter.Position3d = new Yw.Model.Hydro.Position3d(revitPressmeter.Position.X, revitPressmeter.Position.Y, revitPressmeter.Position.Z); |
| | | pressmeter.UpdatePropStatus(nameof(pressmeter.Position3d), revitPressmeter, nameof(revitPressmeter.Position)); |
| | | pressmeter.ScenePropValueList = revitPressmeter.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | return pressmeter; |
| | | } |
| | | |
| | | //管道 |
| | | private static Yw.Model.HydroPipeInfo FromRevit(HStation.Model.RevitPipe revitPipe) |
| | | { |
| | | if (revitPipe == null) |
| | | { |
| | | return default; |
| | | } |
| | | var pipe = new Yw.Model.HydroPipeInfo(); |
| | | pipe.Catalog = Yw.Hydro.ParterCatalog.Pipe; |
| | | pipe.Name = revitPipe.Name; |
| | | pipe.UpdatePropStatus(nameof(pipe.Name), revitPipe, nameof(revitPipe.Name)); |
| | | pipe.Code = revitPipe.Code; |
| | | pipe.UpdatePropStatus(nameof(pipe.Code), revitPipe, nameof(revitPipe.Code)); |
| | | pipe.ModelType = revitPipe.ModelType; |
| | | pipe.UpdatePropStatus(nameof(pipe.ModelType), revitPipe, nameof(revitPipe.ModelType)); |
| | | pipe.Flags = revitPipe.Flags; |
| | | pipe.UpdatePropStatus(nameof(pipe.Flags), revitPipe, nameof(revitPipe.Flags)); |
| | | pipe.Description = revitPipe.Description; |
| | | pipe.UpdatePropStatus(nameof(pipe.Description), revitPipe, nameof(revitPipe.Description)); |
| | | pipe.StartCode = revitPipe.StartCode; |
| | | pipe.UpdatePropStatus(nameof(pipe.StartCode), revitPipe, nameof(revitPipe.StartCode)); |
| | | pipe.EndCode = revitPipe.EndCode; |
| | | pipe.UpdatePropStatus(nameof(pipe.EndCode), revitPipe, nameof(revitPipe.EndCode)); |
| | | pipe.LinkStatus = revitPipe.LinkStatus; |
| | | pipe.UpdatePropStatus(nameof(pipe.LinkStatus), revitPipe, nameof(revitPipe.LinkStatus)); |
| | | pipe.Material = revitPipe.Material; |
| | | pipe.UpdatePropStatus(nameof(pipe.Material), revitPipe, nameof(revitPipe.Material)); |
| | | pipe.Diameter = revitPipe.Diameter; |
| | | pipe.UpdatePropStatus(nameof(pipe.Diameter), revitPipe, nameof(revitPipe.Diameter)); |
| | | pipe.Length = revitPipe.Length; |
| | | pipe.UpdatePropStatus(nameof(pipe.Length), revitPipe, nameof(revitPipe.Length)); |
| | | pipe.Roughness = revitPipe.Roughness; |
| | | pipe.UpdatePropStatus(nameof(pipe.Roughness), revitPipe, nameof(revitPipe.Roughness)); |
| | | pipe.MinorLoss = revitPipe.MinorLoss; |
| | | pipe.UpdatePropStatus(nameof(pipe.MinorLoss), revitPipe, nameof(revitPipe.MinorLoss)); |
| | | pipe.ScenePropValueList = revitPipe.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | return pipe; |
| | | } |
| | | |
| | | //过渡件 |
| | | private static Yw.Model.HydroTranslationInfo FromRevit(HStation.Model.RevitTranslation revitTranslation) |
| | | { |
| | | if (revitTranslation == null) |
| | | { |
| | | return default; |
| | | } |
| | | var translation = new Yw.Model.HydroTranslationInfo(); |
| | | translation.Catalog = Yw.Hydro.ParterCatalog.Translation; |
| | | translation.Name = revitTranslation.Name; |
| | | translation.UpdatePropStatus(nameof(translation.Name), revitTranslation, nameof(revitTranslation.Name)); |
| | | translation.Code = revitTranslation.Code; |
| | | translation.UpdatePropStatus(nameof(translation.Code), revitTranslation, nameof(revitTranslation.Code)); |
| | | translation.ModelType = revitTranslation.ModelType; |
| | | translation.UpdatePropStatus(nameof(translation.ModelType), revitTranslation, nameof(revitTranslation.ModelType)); |
| | | translation.Flags = revitTranslation.Flags; |
| | | translation.UpdatePropStatus(nameof(translation.Flags), revitTranslation, nameof(revitTranslation.Flags)); |
| | | translation.Description = revitTranslation.Description; |
| | | translation.UpdatePropStatus(nameof(translation.Description), revitTranslation, nameof(revitTranslation.Description)); |
| | | translation.StartCode = revitTranslation.StartCode; |
| | | translation.UpdatePropStatus(nameof(translation.StartCode), revitTranslation, nameof(revitTranslation.StartCode)); |
| | | translation.EndCode = revitTranslation.EndCode; |
| | | translation.UpdatePropStatus(nameof(translation.EndCode), revitTranslation, nameof(revitTranslation.EndCode)); |
| | | translation.LinkStatus = revitTranslation.LinkStatus; |
| | | translation.UpdatePropStatus(nameof(translation.LinkStatus), revitTranslation, nameof(revitTranslation.LinkStatus)); |
| | | translation.Material = revitTranslation.Material; |
| | | translation.UpdatePropStatus(nameof(translation.Material), revitTranslation, nameof(revitTranslation.Material)); |
| | | translation.Diameter = revitTranslation.Diameter; |
| | | translation.UpdatePropStatus(nameof(translation.Diameter), revitTranslation, nameof(revitTranslation.Diameter)); |
| | | translation.Length = revitTranslation.Length; |
| | | translation.UpdatePropStatus(nameof(translation.Length), revitTranslation, nameof(revitTranslation.Length)); |
| | | translation.Roughness = revitTranslation.Roughness; |
| | | translation.UpdatePropStatus(nameof(translation.Roughness), revitTranslation, nameof(revitTranslation.Roughness)); |
| | | translation.MinorLoss = revitTranslation.MinorLoss; |
| | | translation.UpdatePropStatus(nameof(translation.MinorLoss), revitTranslation, nameof(revitTranslation.MinorLoss)); |
| | | translation.ScenePropValueList = revitTranslation.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | return translation; |
| | | } |
| | | |
| | | //过渡件 |
| | | private static Yw.Model.HydroExchangerInfo FromRevit(HStation.Model.RevitExchanger revitExchanger) |
| | | { |
| | | if (revitExchanger == null) |
| | | { |
| | | return default; |
| | | } |
| | | var exchanger = new Yw.Model.HydroExchangerInfo(); |
| | | exchanger.Catalog = Yw.Hydro.ParterCatalog.Exchanger; |
| | | exchanger.Name = revitExchanger.Name; |
| | | exchanger.UpdatePropStatus(nameof(exchanger.Name), revitExchanger, nameof(revitExchanger.Name)); |
| | | exchanger.Code = revitExchanger.Code; |
| | | exchanger.UpdatePropStatus(nameof(exchanger.Code), revitExchanger, nameof(revitExchanger.Code)); |
| | | exchanger.ModelType = revitExchanger.ModelType; |
| | | exchanger.UpdatePropStatus(nameof(exchanger.ModelType), revitExchanger, nameof(revitExchanger.ModelType)); |
| | | exchanger.Flags = revitExchanger.Flags; |
| | | exchanger.UpdatePropStatus(nameof(exchanger.Flags), revitExchanger, nameof(revitExchanger.Flags)); |
| | | exchanger.Description = revitExchanger.Description; |
| | | exchanger.UpdatePropStatus(nameof(exchanger.Description), revitExchanger, nameof(revitExchanger.Description)); |
| | | exchanger.StartCode = revitExchanger.StartCode; |
| | | exchanger.UpdatePropStatus(nameof(exchanger.StartCode), revitExchanger, nameof(revitExchanger.StartCode)); |
| | | exchanger.EndCode = revitExchanger.EndCode; |
| | | exchanger.UpdatePropStatus(nameof(exchanger.EndCode), revitExchanger, nameof(revitExchanger.EndCode)); |
| | | exchanger.LinkStatus = revitExchanger.LinkStatus; |
| | | exchanger.UpdatePropStatus(nameof(exchanger.LinkStatus), revitExchanger, nameof(revitExchanger.LinkStatus)); |
| | | exchanger.Material = revitExchanger.Material; |
| | | exchanger.UpdatePropStatus(nameof(exchanger.Material), revitExchanger, nameof(revitExchanger.Material)); |
| | | exchanger.Diameter = revitExchanger.Diameter; |
| | | exchanger.UpdatePropStatus(nameof(exchanger.Diameter), revitExchanger, nameof(revitExchanger.Diameter)); |
| | | exchanger.Length = revitExchanger.Length; |
| | | exchanger.UpdatePropStatus(nameof(exchanger.Length), revitExchanger, nameof(revitExchanger.Length)); |
| | | exchanger.Roughness = revitExchanger.Roughness; |
| | | exchanger.UpdatePropStatus(nameof(exchanger.Roughness), revitExchanger, nameof(revitExchanger.Roughness)); |
| | | exchanger.MinorLoss = revitExchanger.MinorLoss; |
| | | exchanger.UpdatePropStatus(nameof(exchanger.MinorLoss), revitExchanger, nameof(revitExchanger.MinorLoss)); |
| | | exchanger.ScenePropValueList = revitExchanger.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | return exchanger; |
| | | } |
| | | |
| | | //水泵 |
| | | private static Yw.Model.HydroPumpInfo FromRevit(HStation.Model.RevitPump revitPump) |
| | | { |
| | | if (revitPump == null) |
| | | { |
| | | return default; |
| | | } |
| | | var pump = new Yw.Model.HydroPumpInfo(); |
| | | pump.Catalog = Yw.Hydro.ParterCatalog.Pump; |
| | | pump.Name = revitPump.Name; |
| | | pump.UpdatePropStatus(nameof(pump.Name), revitPump, nameof(revitPump.Name)); |
| | | pump.Code = revitPump.Code; |
| | | pump.UpdatePropStatus(nameof(pump.Code), revitPump, nameof(revitPump.Code)); |
| | | pump.ModelType = revitPump.ModelType; |
| | | pump.UpdatePropStatus(nameof(pump.ModelType), revitPump, nameof(revitPump.ModelType)); |
| | | pump.Flags = revitPump.Flags; |
| | | pump.UpdatePropStatus(nameof(pump.Flags), revitPump, nameof(revitPump.Flags)); |
| | | pump.Description = revitPump.Description; |
| | | pump.UpdatePropStatus(nameof(pump.Description), revitPump, nameof(revitPump.Description)); |
| | | pump.StartCode = revitPump.StartCode; |
| | | pump.UpdatePropStatus(nameof(pump.StartCode), revitPump, nameof(revitPump.StartCode)); |
| | | pump.EndCode = revitPump.EndCode; |
| | | pump.UpdatePropStatus(nameof(pump.EndCode), revitPump, nameof(revitPump.EndCode)); |
| | | pump.LinkStatus = revitPump.LinkStatus; |
| | | pump.UpdatePropStatus(nameof(pump.LinkStatus), revitPump, nameof(revitPump.LinkStatus)); |
| | | pump.RatedP = revitPump.RatedP; |
| | | pump.UpdatePropStatus(nameof(pump.RatedP), revitPump, nameof(revitPump.RatedP)); |
| | | pump.RatedQ = revitPump.RatedQ; |
| | | pump.UpdatePropStatus(nameof(pump.RatedQ), revitPump, nameof(revitPump.RatedQ)); |
| | | pump.RatedH = revitPump.RatedH; |
| | | pump.UpdatePropStatus(nameof(pump.RatedH), revitPump, nameof(revitPump.RatedH)); |
| | | pump.RatedN = revitPump.RatedN; |
| | | pump.UpdatePropStatus(nameof(pump.RatedN), revitPump, nameof(revitPump.RatedN)); |
| | | pump.RatedHz = revitPump.RatedHz; |
| | | pump.UpdatePropStatus(nameof(pump.RatedHz), revitPump, nameof(revitPump.RatedHz)); |
| | | pump.SpeedRatio = revitPump.SpeedRatio; |
| | | pump.UpdatePropStatus(nameof(pump.SpeedRatio), revitPump, nameof(revitPump.SpeedRatio)); |
| | | pump.SpeedRatioPattern = revitPump.SpeedRatioPattern; |
| | | pump.UpdatePropStatus(nameof(pump.SpeedRatioPattern), revitPump, nameof(revitPump.SpeedRatioPattern)); |
| | | pump.CurveQH = revitPump.CurveQH; |
| | | pump.UpdatePropStatus(nameof(pump.CurveQH), revitPump, nameof(revitPump.CurveQH)); |
| | | pump.CurveQP = revitPump.CurveQP; |
| | | pump.UpdatePropStatus(nameof(pump.CurveQP), revitPump, nameof(revitPump.CurveQP)); |
| | | pump.CurveQE = revitPump.CurveQE; |
| | | pump.UpdatePropStatus(nameof(pump.CurveQE), revitPump, nameof(revitPump.CurveQE)); |
| | | pump.Price = revitPump.Price; |
| | | pump.UpdatePropStatus(nameof(pump.Price), revitPump, nameof(revitPump.Price)); |
| | | pump.PricePattern = revitPump.PricePattern; |
| | | pump.UpdatePropStatus(nameof(pump.PricePattern), revitPump, nameof(revitPump.PricePattern)); |
| | | pump.ScenePropValueList = revitPump.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | return pump; |
| | | } |
| | | |
| | | //阀门 |
| | | private static Yw.Model.HydroValveInfo FromRevit(HStation.Model.RevitValve revitValve) |
| | | { |
| | | if (revitValve == null) |
| | | { |
| | | return default; |
| | | } |
| | | var valve = new Yw.Model.HydroValveInfo(); |
| | | valve.Catalog = Yw.Hydro.ParterCatalog.Valve; |
| | | valve.Name = revitValve.Name; |
| | | valve.UpdatePropStatus(nameof(valve.Name), revitValve, nameof(revitValve.Name)); |
| | | valve.Code = revitValve.Code; |
| | | valve.UpdatePropStatus(nameof(valve.Code), revitValve, nameof(revitValve.Code)); |
| | | valve.ModelType = revitValve.ModelType; |
| | | valve.UpdatePropStatus(nameof(valve.ModelType), revitValve, nameof(revitValve.ModelType)); |
| | | valve.Flags = revitValve.Flags; |
| | | valve.UpdatePropStatus(nameof(valve.Flags), revitValve, nameof(revitValve.Flags)); |
| | | valve.Description = revitValve.Description; |
| | | valve.UpdatePropStatus(nameof(valve.Description), revitValve, nameof(revitValve.Description)); |
| | | valve.StartCode = revitValve.StartCode; |
| | | valve.UpdatePropStatus(nameof(valve.StartCode), revitValve, nameof(revitValve.StartCode)); |
| | | valve.EndCode = revitValve.EndCode; |
| | | valve.UpdatePropStatus(nameof(valve.EndCode), revitValve, nameof(revitValve.EndCode)); |
| | | valve.LinkStatus = revitValve.LinkStatus; |
| | | valve.UpdatePropStatus(nameof(valve.LinkStatus), revitValve, nameof(revitValve.LinkStatus)); |
| | | valve.Material = revitValve.Material; |
| | | valve.UpdatePropStatus(nameof(valve.Material), revitValve, nameof(revitValve.Material)); |
| | | valve.Diameter = revitValve.Diameter; |
| | | valve.UpdatePropStatus(nameof(valve.Diameter), revitValve, nameof(revitValve.Diameter)); |
| | | valve.MinorLoss = revitValve.MinorLoss; |
| | | valve.UpdatePropStatus(nameof(valve.MinorLoss), revitValve, nameof(revitValve.MinorLoss)); |
| | | valve.ValveType = revitValve.ValveType; |
| | | valve.UpdatePropStatus(nameof(valve.ValveType), revitValve, nameof(revitValve.ValveType)); |
| | | valve.OpeningDegree = revitValve.OpeningDegree; |
| | | valve.UpdatePropStatus(nameof(valve.OpeningDegree), revitValve, nameof(revitValve.OpeningDegree)); |
| | | valve.ValveSetting = revitValve.ValveSetting; |
| | | valve.UpdatePropStatus(nameof(valve.ValveSetting), revitValve, nameof(revitValve.ValveSetting)); |
| | | valve.ScenePropValueList = revitValve.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | return valve; |
| | | } |
| | | |
| | | } |
| | | } |