```c#
/// <summary>
/// 获取墙的结构层的体积,墙结构材质层layers的function属性为structure
/// zhq
/// </summary>
/// <param name="wall"></param>
/// <returns></returns>
public double GetWallStructVolume(Wall wall)
{
//获取墙的材质层layers
var wallLayers = wall.WallType.GetCompoundStructure().GetLayers();
double MaterialVolume = 0.0;
foreach (var j in wallLayers)
{
if (j.Function == MaterialFunctionAssignment.Structure)//判断墙结构材质层,layers的function属性为structure的层
{
//材质j的id
//j.MaterialId
// 得到指定材质的面积
//GetMaterialArea(j.MaterialId, bool usePaintMaterial);
// 得到指定材质的体积
MaterialVolume = wall.GetMaterialVolume(j.MaterialId);
//mvm = UnitUtils.Convert(mv, DisplayUnitType.DUT_CUBIC_FEET, DisplayUnitType.DUT_CUBIC_METERS);
//转换单位
}
}
return MaterialVolume;
}
```
获取墙的结构层
于 2022-03-07 18:28:07 首次发布