|
@@ -202,6 +202,7 @@ namespace SAGA.GplotRelationComputerManage
|
|
|
public void ParsePipe(SystemComputerContext context, RelationTypeShell relationSetting)
|
|
|
{
|
|
|
Domain useDomain = Domain.DomainPiping;
|
|
|
+ var relationType = relationSetting.RelationItem.Type;
|
|
|
List<FloorDrawRecord> drawRecords = new List<FloorDrawRecord>();
|
|
|
List<FloorRelationRecord> relationRecords = new List<FloorRelationRecord>();
|
|
|
List<Element> roomStartElements = new List<Element>();
|
|
@@ -269,7 +270,7 @@ namespace SAGA.GplotRelationComputerManage
|
|
|
#region 解析机房数据
|
|
|
|
|
|
var useEquipments = ParseMachineRoomData(context, relationSetting, roomStartElements);
|
|
|
- useEquipments=useEquipments.Distinct().ToList();
|
|
|
+ useEquipments = useEquipments.Distinct().ToList();
|
|
|
#endregion
|
|
|
|
|
|
//获取没有使用过的对象节点
|
|
@@ -278,7 +279,7 @@ namespace SAGA.GplotRelationComputerManage
|
|
|
for (int i = 0; i < singleInstances.Count; i++)
|
|
|
{
|
|
|
var useInstance = singleInstances[i];
|
|
|
- if (useIds.Any(id => id == useInstance.Id.IntegerValue)|| useEquipments.Any(id=>id==useInstance.Id.ToString()))
|
|
|
+ if (useIds.Any(id => id == useInstance.Id.IntegerValue) || useEquipments.Any(id => id == useInstance.Id.ToString()))
|
|
|
{
|
|
|
continue;
|
|
|
}
|
|
@@ -330,9 +331,9 @@ namespace SAGA.GplotRelationComputerManage
|
|
|
#endregion
|
|
|
|
|
|
//增加立管数据
|
|
|
- ComputerVerticalPipes(UseLevel, verticalMepCurves, context);
|
|
|
- context.FloorDrawRecords.AddRange(drawRecords);
|
|
|
- context.FloorRelationRecords.AddRange(relationRecords);
|
|
|
+ ComputerVerticalPipes(UseLevel, verticalMepCurves, context, relationSetting);
|
|
|
+ context[relationType].FloorDrawRecords.AddRange(drawRecords);
|
|
|
+ context[relationType].FloorRelationRecords.AddRange(relationRecords);
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
@@ -353,11 +354,12 @@ namespace SAGA.GplotRelationComputerManage
|
|
|
* 1、解析立管需要考虑,竖直风管,水管,空间的情况;
|
|
|
*2、将各层数据汇总,才能统一计算立管的相关关系数据
|
|
|
*/
|
|
|
- private void ComputerVerticalPipes(Level refLevel, List<MEPCurve> mepCurves, SystemComputerContext context)
|
|
|
+ private void ComputerVerticalPipes(Level refLevel, List<MEPCurve> mepCurves, SystemComputerContext context, RelationTypeShell relationSetting)
|
|
|
{
|
|
|
var result = new List<VerticalPipe>();
|
|
|
var spaces = Document.GetElements<SpatialElement>(BuiltInCategory.OST_MEPSpaces).OfType<Space>();
|
|
|
var level = refLevel;
|
|
|
+ var relationType = relationSetting.RelationItem.Type;
|
|
|
var currentLevelName = MBIInfoUtil.GetFloorNameByLevel(level.Name);
|
|
|
foreach (var pipe in mepCurves)
|
|
|
{
|
|
@@ -392,8 +394,8 @@ namespace SAGA.GplotRelationComputerManage
|
|
|
Id = refLevel.Id.ToString(),
|
|
|
Name = MBIInfoUtil.GetFloorNameByLevel(refLevel.Name)
|
|
|
};
|
|
|
- context.VerticalPipes.AddRange(result);
|
|
|
- context.Levels.Add(levelData);
|
|
|
+ context[relationType].VerticalPipes.AddRange(result);
|
|
|
+ context[relationType].Levels.Add(levelData);
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
@@ -513,6 +515,7 @@ namespace SAGA.GplotRelationComputerManage
|
|
|
* 2、设备整理,带缓存的设备信息读取
|
|
|
*/
|
|
|
List<string> useEquipments = new List<string>();
|
|
|
+ var relationType = relationSetting.RelationItem.Type;
|
|
|
SystemParse parse = new SystemParse(new SystemParseSetting(relationSetting));
|
|
|
List<Element> useStartElements = new List<Element>(startElements);
|
|
|
var arrays = parse.Execute(useStartElements);
|
|
@@ -525,7 +528,7 @@ namespace SAGA.GplotRelationComputerManage
|
|
|
MachineRoomDrawRecord record = new MachineRoomDrawRecord();
|
|
|
record.RelationName = relationSetting.RelationItem.Name;
|
|
|
record.DrawIems = drawData;
|
|
|
- context.MachineRoomDrawRecords.Add(record);
|
|
|
+ context[relationType].MachineRoomDrawRecords.Add(record);
|
|
|
#endregion
|
|
|
|
|
|
#region 生成关系数据
|
|
@@ -546,7 +549,7 @@ namespace SAGA.GplotRelationComputerManage
|
|
|
|
|
|
|
|
|
}
|
|
|
- context.MachineRoomRelationRecords.Add(relationRecord);
|
|
|
+ context[relationType].MachineRoomRelationRecords.Add(relationRecord);
|
|
|
#endregion
|
|
|
|
|
|
return useEquipments;
|